Re: macppc kernel and clang

2020-03-16 Thread Theo de Raadt
ok deraadt Next up, to figure out the right plan for ofw. Thank you so much for figuring out these two details. How are the bootblocks faring? And userland? George Koehler wrote: > On Mon, 16 Mar 2020 12:54:52 +0100 (CET) > Mark Kettenis wrote: > > > I had a look at what NetBSD does, and t

Re: macppc kernel and clang

2020-03-16 Thread George Koehler
On Mon, 16 Mar 2020 12:54:52 +0100 (CET) Mark Kettenis wrote: > I had a look at what NetBSD does, and they use '%L0' instead of > '%0+1'. As far as I can tell this works on both gcc and clang. The > diff below produces a working kernel when building with gcc. Not yet > in a position to test a

change to pfsync(4) reduces a PF_LOCK scope

2020-03-16 Thread Alexandr Nedvedicky
Hello, patch below is a fairly large change, which reduces a scope of PF_LOCK(). Whenever pf(4) needs to send state table update to its peer, it must grab a PF_LOCK() to serialize access to internal pfsync(4) queues. The patch below adds a mutex to every queue pfsync's queue, so PF_LOCK() is no lo

Re: smtpd: handle buf == NULL from m_get_string

2020-03-16 Thread Todd C . Miller
On Tue, 17 Mar 2020 00:16:27 +0100, Tobias Heider wrote: > m_get_string(m, &buf) may set 'buf == NULL', which would lead > to strlen(NULL) in m_get_envelope. > > I chose fatalx because that's what seems to be the common way to handle > errors in mproc but I don't know the code base to well. Sure

smtpd: handle buf == NULL from m_get_string

2020-03-16 Thread Tobias Heider
m_get_string(m, &buf) may set 'buf == NULL', which would lead to strlen(NULL) in m_get_envelope. I chose fatalx because that's what seems to be the common way to handle errors in mproc but I don't know the code base to well. Index: mproc.c

Re: smtpd: mail.lmtp uninitialzed stack access

2020-03-16 Thread Tobias Heider
On Mon, Mar 16, 2020 at 04:54:19PM -0600, Todd C. Miller wrote: > On Mon, 16 Mar 2020 23:46:35 +0100, Tobias Heider wrote: > > > In main() mail.lmtp checks 'if (argc == 0 && session.rcptto == NULL)' > > after getopt(). If neither an 'r' nor an 'u' option was specified, > > 'session.rcptto' seems

Re: smtpd: mail.lmtp uninitialzed stack access

2020-03-16 Thread Todd C . Miller
On Mon, 16 Mar 2020 23:46:35 +0100, Tobias Heider wrote: > In main() mail.lmtp checks 'if (argc == 0 && session.rcptto == NULL)' > after getopt(). If neither an 'r' nor an 'u' option was specified, > 'session.rcptto' seems to be uninitialized. > The obvious solution would be to NULL initialize 's

smtpd: mail.lmtp uninitialzed stack access

2020-03-16 Thread Tobias Heider
In main() mail.lmtp checks 'if (argc == 0 && session.rcptto == NULL)' after getopt(). If neither an 'r' nor an 'u' option was specified, 'session.rcptto' seems to be uninitialized. The obvious solution would be to NULL initialize 'struct session'. ok? Index: mail.lmtp.c =

Re: unbound 1.10.0

2020-03-16 Thread Jordan Geoghegan
On 2020-03-16 06:01, Renaud Allard wrote: On 3/15/20 9:53 PM, Stuart Henderson wrote: On 2020/03/15 19:05, Renaud Allard wrote: On 15/03/2020 17:36, Stuart Henderson wrote: Lots of churn again.. most of the new + are related to the new rpz and serve-stale support. I've been running it f

in6_ifattach: strncpy to strlcpy

2020-03-16 Thread Tobias Heider
Using strncpy with sizeof(string) may result in a non-nul-terminated string at 'dst'. This is not too problematic here because if_xname is the same size as 'ifra_name' and should always be NUL terminated. I would still like to replace strncpy with strlcpy which implicitly includes the null byte in

Re: umcs(4) out-of-bound read

2020-03-16 Thread Mark Kettenis
> Date: Mon, 16 Mar 2020 20:51:54 +0100 > From: Martin Pieuchot > > If the given `rate' is bigger than the last element of the array there's > an out-of-bound read and `divisor' will contain garbage. > > Diff below fix this issue reported by coverity, CID 1453258. > > Ok? ok kettenis@ > Index

umcs(4) out-of-bound read

2020-03-16 Thread Martin Pieuchot
If the given `rate' is bigger than the last element of the array there's an out-of-bound read and `divisor' will contain garbage. Diff below fix this issue reported by coverity, CID 1453258. Ok? Index: umcs.c === RCS file: /cvs/src/

Re: Fix brightness control on ASUS 1005PXD

2020-03-16 Thread Alexandre Ratchov
On Mon, Mar 16, 2020 at 10:16:34AM +0100, Patrick Wildt wrote: > Otherwise, if we want to do that in acpivout_get_brightness(), > I guess we can update acpivout_select_brightness() and its caller > to remove the check for -1, since there will be no -1 anymore? > Sure, I missed those. Here's a new

Re: Fix brightness control on ASUS 1005PXD

2020-03-16 Thread Alexandre Ratchov
On Mon, Mar 16, 2020 at 10:16:34AM +0100, Patrick Wildt wrote: > On Sat, Mar 14, 2020 at 04:28:26AM +0100, Alexandre Ratchov wrote: > > On ASUS 1001PXD, _BQC returns an out of range value which makes > > acpivout_get_brightness() return -1, in turn breaking the > > display.brightness control (wscon

Re: unbound 1.10.0

2020-03-16 Thread Renaud Allard
On 3/15/20 9:53 PM, Stuart Henderson wrote: On 2020/03/15 19:05, Renaud Allard wrote: On 15/03/2020 17:36, Stuart Henderson wrote: Lots of churn again.. most of the new + are related to the new rpz and serve-stale support. I've been running it for a few days with my usual setup with no prob

ktrwriteraw & vget

2020-03-16 Thread Martin Pieuchot
vget(9) might fail, stop right away if that happens. CID 1453020 Unchecked return value. ok? Index: kern//kern_ktrace.c === RCS file: /cvs/src/sys/kern/kern_ktrace.c,v retrieving revision 1.100 diff -u -p -r1.100 kern_ktrace.c --- k

Re: macppc kernel and clang

2020-03-16 Thread Mark Kettenis
> Date: Sat, 14 Mar 2020 23:33:37 -0400 > From: George Koehler > > Hello tech@ list! > > With this diff, it becomes possible to build macppc kernel with > base-clang. The default compiler for macppc is base-gcc. > > rgc mailed the ppc@ list to report problems with > clang kernel, and got a wo

Re: Start point to learn OpenBSD programming

2020-03-16 Thread Rafael Sadowski
On Mon Mar 16, 2020 at 07:23:15AM +, Martin wrote: > Hello list, > > The best way for beginner to start with OpenbBSD programming? > > Martin http://www.grenadille.net/post/2019/10/21/10-projects-to-start-contributing-to-OpenBSD Rafael

Re: acpitoshiba: remove dead code

2020-03-16 Thread Jasper Lievisse Adriaanse
> On 16 Mar 2020, at 09:49, Stefan Sperling wrote: > > On Mon, Mar 16, 2020 at 09:29:43AM +0100, Jasper Lievisse Adriaanse wrote: >> Hi, >> >> The type of brightness and video_output is uint32_t; therefore it >> can never be less than 0 (which is what HCI_LCD_BRIGHTNESS_MIN and >> HCI_VIDEO_O

Re: Fix brightness control on ASUS 1005PXD

2020-03-16 Thread Patrick Wildt
On Sat, Mar 14, 2020 at 04:28:26AM +0100, Alexandre Ratchov wrote: > On ASUS 1001PXD, _BQC returns an out of range value which makes > acpivout_get_brightness() return -1, in turn breaking the > display.brightness control (wsconsctl displays a mangled value). > > This diff ignores the out of range

Re: acpitoshiba: remove dead code

2020-03-16 Thread Stefan Sperling
On Mon, Mar 16, 2020 at 09:29:43AM +0100, Jasper Lievisse Adriaanse wrote: > Hi, > > The type of brightness and video_output is uint32_t; therefore it > can never be less than 0 (which is what HCI_LCD_BRIGHTNESS_MIN and > HCI_VIDEO_OUTPUT_CYCLE_MIN are defined to). So trim the checks by > removig

Re: acpitoshiba: remove dead code

2020-03-16 Thread Claudio Jeker
On Mon, Mar 16, 2020 at 09:29:43AM +0100, Jasper Lievisse Adriaanse wrote: > Hi, > > The type of brightness and video_output is uint32_t; therefore it > can never be less than 0 (which is what HCI_LCD_BRIGHTNESS_MIN and > HCI_VIDEO_OUTPUT_CYCLE_MIN are defined to). So trim the checks by > removig

acpitoshiba: remove dead code

2020-03-16 Thread Jasper Lievisse Adriaanse
Hi, The type of brightness and video_output is uint32_t; therefore it can never be less than 0 (which is what HCI_LCD_BRIGHTNESS_MIN and HCI_VIDEO_OUTPUT_CYCLE_MIN are defined to). So trim the checks by removig the impossible cases. Coverity CID 1453109, 1453169 OK? Index: acpi/acpitoshiba.c ==

Start point to learn OpenBSD programming

2020-03-16 Thread Martin
Hello list, The best way for beginner to start with OpenbBSD programming? Martin