Re: RTR support for bgpd

2021-02-17 Thread Theo de Raadt
Claudio Jeker wrote: > Sure. Lets do that. I just checked, bgpd does not use getservbyname() for > the BGP connection either (it uses a define). Maybe that should be changed > as well. Yeah, no kidding.

Re: RTR support for bgpd

2021-02-17 Thread Claudio Jeker
On Wed, Feb 17, 2021 at 06:37:56PM -0700, Theo de Raadt wrote: > Regarding port 323, > > +If not specified the default > +.Ic port > +is > +.Em 323 . > > and > > +rtr : RTR address { > + currtr = get_rtr(&$2); > + currtr->remote_port = 323; > +

Re: relayd and TLS client cert verification

2021-02-17 Thread Asherah Connor
On 21/02/18 01:02:p, Theo Buehler wrote: > This looks pretty good to me and appears to work in basic testing. > I'd be willing to get this in provided you address the tiny nits > below. Thanks for having a look. Unfortunately I no longer have the time to maintain this patchset, nor do I maintain

Re: RTR support for bgpd

2021-02-17 Thread Theo de Raadt
Regarding port 323, +If not specified the default +.Ic port +is +.Em 323 . and +rtr: RTR address { + currtr = get_rtr(&$2); + currtr->remote_port = 323; + if (insert_rtr(currtr) == -1) { +

Re: relayd and TLS client cert verification

2021-02-17 Thread Theo Buehler
Hi On Thu, Oct 15, 2020 at 05:52:40PM +1100, Ashe Connor wrote: > Hi there, > > A year or two ago I submitted a patch for adding TLS client certificate > validation to relayd. At the time it didn't make it in, and I stopped > pursuing it further. > (https://marc.info/?l=openbsd-tech&m=154509

Re: if calloc() needs nmemb and size, why doesn't freezero()?

2021-02-17 Thread Luke Small
Am I incorrect to presume that if the values are successfully used in calloc(), that (size_t)nmemb * (size_t)size will not overflow? Isn't the storage capacity of size_t greater than the amount of addressable space? If it is, calloc() will throw an "out of memory" or other error before you'll ever

Re: if calloc() needs nmemb and size, why doesn't freezero()?

2021-02-17 Thread Luke Small
if the nmemb and size values being passed to calloc() are of a larger integer datatype, they will have been truncated when passed to the function there as well. Perhaps you need something larger than size_t in the entire malloc manpage series? -Luke On Wed, Feb 17, 2021 at 2:25 PM Theo de Raa

Re: if calloc() needs nmemb and size, why doesn't freezero()?

2021-02-17 Thread Luke Small
I guess I’ve been doing it wrong all this time. Perhaps you can tell me how the following doesn't return a 0-255 value. uint64_t bufferToTime(const u_char buf[]) { return (( (( (( (( (( (( (( (uint64_t) buf[7]) << 8) | buf[6]) << 8) | buf[5]) << 8)

Re: if calloc() needs nmemb and size, why doesn't freezero()?

2021-02-17 Thread Theo de Raadt
> > Would it be too much hand-holding to put in the manpage that to avoid > potential > > freeezero() integer overflow, > > it may be useful to run freezero() as freezero((size_t)nmemb * > (size_t)size); > > Wow, Those casts make it very clear you don't understand C, if you do > that kind o

Re: if calloc() needs nmemb and size, why doesn't freezero()?

2021-02-17 Thread Theo de Raadt
Luke Small wrote: > I guess I always thought there'd be some more substantial overflow mitigation. You have to free with the exact same size as allocation. nmemb and size did not change. The math has already been checked, and regular codeflows will store the multiple in a single variable after

Re: if calloc() needs nmemb and size, why doesn't freezero()?

2021-02-17 Thread Luke Small
I guess I always thought there'd be some more substantial overflow mitigation. Would it be too much hand-holding to put in the manpage that to avoid potential freeezero() integer overflow, it may be useful to run freezero() as freezero((size_t)nmemb * (size_t)size); -Luke On Wed, Feb 17, 2021 a

Re: if calloc() needs nmemb and size, why doesn't freezero()?

2021-02-17 Thread Theo de Raadt
Luke Small wrote: > if calloc() and recallocarray() needs nmemb and size, why doesn't > freezero()? > > Should there be a freeczero(size_t nmemb, size_t size) ? Performing the nmemb*size overflow detection a second time provides no benefit.

if calloc() needs nmemb and size, why doesn't freezero()?

2021-02-17 Thread Luke Small
if calloc() and recallocarray() needs nmemb and size, why doesn't freezero()? Should there be a freeczero(size_t nmemb, size_t size) ? -Luke

Re: add simplepmbus(4)

2021-02-17 Thread Mark Kettenis
> Date: Wed, 17 Feb 2021 22:12:40 +1100 > From: Jonathan Gray > > On Wed, Feb 17, 2021 at 11:49:27AM +0100, Mark Kettenis wrote: > > > Date: Wed, 17 Feb 2021 20:59:06 +1100 > > > From: Jonathan Gray > > > > > > On Wed, Feb 17, 2021 at 10:33:18AM +0100, Patrick Wildt wrote: > > > > Am Wed, Feb 1

Re: add simplepmbus(4)

2021-02-17 Thread Jonathan Gray
On Wed, Feb 17, 2021 at 11:49:27AM +0100, Mark Kettenis wrote: > > Date: Wed, 17 Feb 2021 20:59:06 +1100 > > From: Jonathan Gray > > > > On Wed, Feb 17, 2021 at 10:33:18AM +0100, Patrick Wildt wrote: > > > Am Wed, Feb 17, 2021 at 11:56:16AM +1100 schrieb Jonathan Gray: > > > > Add a driver for "s

pdaemon vs anon locking

2021-02-17 Thread Martin Pieuchot
Diff below adds anon locking to the page daemon. It will become necessary to guarantee exclusive access to an anon as soon as the KERNEL_LOCK() is removed from the fault handler. Comments? Oks? Index: uvm/uvm_pdaemon.c === RCS file

Re: add simplepmbus(4)

2021-02-17 Thread Mark Kettenis
> Date: Wed, 17 Feb 2021 20:59:06 +1100 > From: Jonathan Gray > > On Wed, Feb 17, 2021 at 10:33:18AM +0100, Patrick Wildt wrote: > > Am Wed, Feb 17, 2021 at 11:56:16AM +1100 schrieb Jonathan Gray: > > > Add a driver for "simple-pm-bus" a way to enable a clock and/or > > > power domain for a group

Re: add simplepmbus(4)

2021-02-17 Thread Jonathan Gray
On Wed, Feb 17, 2021 at 10:33:18AM +0100, Patrick Wildt wrote: > Am Wed, Feb 17, 2021 at 11:56:16AM +1100 schrieb Jonathan Gray: > > Add a driver for "simple-pm-bus" a way to enable a clock and/or > > power domain for a group of devices. > > > > https://www.kernel.org/doc/Documentation/devicetree/

Re: add simplepmbus(4)

2021-02-17 Thread Patrick Wildt
Am Wed, Feb 17, 2021 at 11:56:16AM +1100 schrieb Jonathan Gray: > Add a driver for "simple-pm-bus" a way to enable a clock and/or > power domain for a group of devices. > > https://www.kernel.org/doc/Documentation/devicetree/bindings/bus/simple-pm-bus.txt > > This is needed to use am335x/omap4 dt