Re: merge vlan and carp input back into ether_input

2018-01-11 Thread David Gwynne
On Thu, Jan 11, 2018 at 02:51:40PM +0100, Martin Pieuchot wrote: > On 11/01/18(Thu) 21:59, David Gwynne wrote: > > [...] > > when you say i break carp balancing, are you talking about the removal of > > the PACKET_TAG_CARP_BAL_IP tagging? PACKET_TAG_CARP_BAL_IP is only used in > > carp_lsdrop to

Re: jot: small cleanup for conversion switch

2018-01-11 Thread Alexander Hall
On January 12, 2018 7:26:58 AM GMT+01:00, Theo Buehler wrote: >> >+ case 'd': >> >+ case 'i': >> >intdata = true; >> >break; >> >+ case 'o': >> >+ case 'u': >> >+ case 'x': >> >+ case 'X': >> >>

Re: jot: small cleanup for conversion switch

2018-01-11 Thread Theo Buehler
> >+case 'd': > >+case 'i': > > intdata = true; > > break; > >+case 'o': > >+case 'u': > >+case 'x': > >+case 'X': > > Convention is X before x in usage() and friends, so I guess that'd

Re: constrain drm alloc_pages() to dma range

2018-01-11 Thread David Gwynne
> On 12 Jan 2018, at 13:53, Jonathan Gray wrote: > > When trying to use alloc_page from ttm with radeon on an amd64 > machine with 8GB physmem the system would panic part way through > taking over the console along the lines of > > 'panic: Non dma-reachable buffer at paddr 0x1ef221000(raw)' >

implement linux request_firmware() api in drm

2018-01-11 Thread Jonathan Gray
Tested on radeon. This should cause no change in behaviour on inteldrm systems that require firmware (ie skylake, kabylake, broxton) until a mountroot hook is added and firmware installed but I have no way of testing that here. Index: drm_linux.h ==

constrain drm alloc_pages() to dma range

2018-01-11 Thread Jonathan Gray
When trying to use alloc_page from ttm with radeon on an amd64 machine with 8GB physmem the system would panic part way through taking over the console along the lines of 'panic: Non dma-reachable buffer at paddr 0x1ef221000(raw)' This adds the dma constraints ttm_uvm_alloc_page() has. Index: dr

Re: sysctl(3) or sysctl(2)?

2018-01-11 Thread Theo de Raadt
> According to /usr/src/sys/kern/syscalls.master, sysctl is system call > number 202. But its manual page is in section 3, at > /usr/src/lib/libc/gen/sysctl.3 > > Should it actually be in section 2? It used to be wrapped in an odd way. The manual page could now be renamed, but we have to f

sysctl(3) or sysctl(2)?

2018-01-11 Thread Anthony Coulter
According to /usr/src/sys/kern/syscalls.master, sysctl is system call number 202. But its manual page is in section 3, at /usr/src/lib/libc/gen/sysctl.3 Should it actually be in section 2? Regards, Anthony Coulter

stack pointer checking

2018-01-11 Thread Theo de Raadt
Stefan (stefan@) and I have been working for a few months on this diff, with help from a few others. At every trap and system call, it checks if the stack-pointer is on a page that is marked MAP_STACK. execve() is changed to create such mappings for the process stack. Also, libpthread is taught

have carp register detachhooks rather than get special handling in if.c

2018-01-11 Thread David Gwynne
this makes carp less special by having it register detachhooks. right now if.c treats it better than it needs to. the diff shuffles establishment of the link status hook and the new detachhook to make carp_set_ifp fail if the hooks cannot be allocated. the following seems to work both before and

Re: bpf for subsystems, not just interfaces

2018-01-11 Thread David Gwynne
> On 11 Jan 2018, at 23:54, Martin Pieuchot wrote: > > On 11/01/18(Thu) 23:10, David Gwynne wrote: >> >> >>> On 11 Jan 2018, at 9:11 pm, Martin Pieuchot wrote: >>> >>> On 11/01/18(Thu) 11:58, David Gwynne wrote: im sending this out more as a backup than a serious diff. >>> >>> I love t

Re: jot: small cleanup for conversion switch

2018-01-11 Thread Alexander Hall
Didn't test, but reads ok to me, with minor nit below. On January 11, 2018 9:25:10 PM GMT+01:00, Theo Buehler wrote: >This aligns all cases vertically which makes them easier to find. > >Normalize all cases: if the long form is illegal or unsupported, >'goto fmt_broken;', then set the flags for

jot: small cleanup for conversion switch

2018-01-11 Thread Theo Buehler
This aligns all cases vertically which makes them easier to find. Normalize all cases: if the long form is illegal or unsupported, 'goto fmt_broken;', then set the flags for the casts in putdata() on a single line. This is all straightforward, but I think the resulting code is easier to follow. O

Re: Basic SHA3 support (cryptographic discussion)

2018-01-11 Thread Daniel Loebenberger
Hi, concerning the question who needs SHA3, we do not agree that SHA3 should be skipped as a standard. As cryptographers we sincerely believe that the SHA3 design is superior to the one of SHA256 also due to the process it was created. We believe that an efficient implementation will trigger incre

Re: Basic SHA3 support

2018-01-11 Thread Daniel Loebenberger
Hi, we thank you for all your comments! The following contains our answers specific to your technical remarks on the patch itself. Another email on the cryptographic discussion will follow. 1.) We agree that six new commands are not a good idea. The minimal variant would be to include sha3-256.

Re: merge vlan and carp input back into ether_input

2018-01-11 Thread Martin Pieuchot
On 11/01/18(Thu) 21:59, David Gwynne wrote: > [...] > when you say i break carp balancing, are you talking about the removal of the > PACKET_TAG_CARP_BAL_IP tagging? PACKET_TAG_CARP_BAL_IP is only used in > carp_lsdrop to clear the M_MCAST flag on the mbuf. M_MCAST wont be set on > packets dest

Re: bpf for subsystems, not just interfaces

2018-01-11 Thread Martin Pieuchot
On 11/01/18(Thu) 23:10, David Gwynne wrote: > > > > On 11 Jan 2018, at 9:11 pm, Martin Pieuchot wrote: > > > > On 11/01/18(Thu) 11:58, David Gwynne wrote: > >> im sending this out more as a backup than a serious diff. > > > > I love this. It's one of the steps to be able to use bpf(4) for USB

Re: Basic SHA3 support

2018-01-11 Thread Todd C. Miller
On Wed, 10 Jan 2018 22:06:37 +, Christian Weisgerber wrote: > I've had something like this on my to-do list for some time and > eventually dropped it because I couldn't think of a compelling use > case. > > "Maybe Skip SHA-3" > https://www.imperialviolet.org/2017/05/31/skipsha3.html That make

Re: bpf for subsystems, not just interfaces

2018-01-11 Thread David Gwynne
> On 11 Jan 2018, at 9:11 pm, Martin Pieuchot wrote: > > On 11/01/18(Thu) 11:58, David Gwynne wrote: >> im sending this out more as a backup than a serious diff. > > I love this. It's one of the steps to be able to use bpf(4) for USB. oh yeah. > > Is there an easy way to also remove the mb

Re: restrict carp use to ethernet interfaces

2018-01-11 Thread Claudio Jeker
On Thu, Jan 11, 2018 at 11:51:25AM +0100, Peter Hessler wrote: > On 2018 Jan 11 (Thu) at 20:41:19 +1000 (+1000), David Gwynne wrote: > :vlan and trunk are definitely ethernet interfaces. > : > > Is there anything in OpenBSD that isn't an ethernet inteface? > How about gif(4), gre(4), tun(4), ppp

Re: merge vlan and carp input back into ether_input

2018-01-11 Thread David Gwynne
> On 11 Jan 2018, at 8:58 pm, Martin Pieuchot wrote: > > On 11/01/18(Thu) 11:50, David Gwynne wrote: >> while we were working on making the various pseudo interfaces you >> stack on top of ethernet mpsafe, we split their input processing >> off so they could be attacked one by one. they're all

Re: restrict carp use to ethernet interfaces

2018-01-11 Thread Peter Hessler
On 2018 Jan 11 (Thu) at 11:51:25 +0100 (+0100), Peter Hessler wrote: :On 2018 Jan 11 (Thu) at 20:41:19 +1000 (+1000), David Gwynne wrote: ::vlan and trunk are definitely ethernet interfaces. :: : :Is there anything in OpenBSD that isn't an ethernet inteface? : based on a simplistic grep: upl(4),

Re: merge vlan and carp input back into ether_input

2018-01-11 Thread Martin Pieuchot
On 11/01/18(Thu) 11:50, David Gwynne wrote: > while we were working on making the various pseudo interfaces you > stack on top of ethernet mpsafe, we split their input processing > off so they could be attacked one by one. they're all mpsafe now, > so this separation is not strictly necessary anymo

Re: bpf for subsystems, not just interfaces

2018-01-11 Thread Martin Pieuchot
On 11/01/18(Thu) 11:58, David Gwynne wrote: > im sending this out more as a backup than a serious diff. I love this. It's one of the steps to be able to use bpf(4) for USB. Is there an easy way to also remove the mbuf requirement? For example I'd like to call bpf_mtap() or similar in usb_transf

Re: ksh: unused param in print_expansions()

2018-01-11 Thread Theo Buehler
On Thu, Jan 11, 2018 at 11:56:32AM +0100, Ingo Schwarze wrote: > Hi, > > Michael W. Bombardieri wrote on Thu, Jan 11, 2018 at 05:37:29PM +0800: > > > The local function print_expansions() is a wrapper for > > x_print_expansions(). Going back to revision 1.1 of vi.c > > reveals the command paramet

Re: ksh: unused param in print_expansions()

2018-01-11 Thread Ingo Schwarze
Hi, Michael W. Bombardieri wrote on Thu, Jan 11, 2018 at 05:37:29PM +0800: > The local function print_expansions() is a wrapper for > x_print_expansions(). Going back to revision 1.1 of vi.c > reveals the command parameter wasn't used then either. Yes, this patch looks correct and works, and i f

Re: restrict carp use to ethernet interfaces

2018-01-11 Thread David Gwynne
> On 11 Jan 2018, at 8:51 pm, Peter Hessler wrote: > > On 2018 Jan 11 (Thu) at 20:41:19 +1000 (+1000), David Gwynne wrote: > :vlan and trunk are definitely ethernet interfaces. > : > > Is there anything in OpenBSD that isn't an ethernet inteface? carp :) > > -- > It is impossible to travel

Re: restrict carp use to ethernet interfaces

2018-01-11 Thread Peter Hessler
On 2018 Jan 11 (Thu) at 20:41:19 +1000 (+1000), David Gwynne wrote: :vlan and trunk are definitely ethernet interfaces. : Is there anything in OpenBSD that isn't an ethernet inteface? -- It is impossible to travel faster than light, and certainly not desirable, as one's hat keeps blowing off.

Re: restrict carp use to ethernet interfaces

2018-01-11 Thread David Gwynne
> On 11 Jan 2018, at 5:53 pm, Jonathan Gray wrote: > > On Thu, Jan 11, 2018 at 08:25:26AM +0100, Matthieu Herrb wrote: >> On Thu, Jan 11, 2018 at 10:29:17AM +1000, David Gwynne wrote: >>> carp interfaces output using ether_output, so it is reasonable to >>> require that they only get configured

Re: cast __swapXX in _endian.h to help the compiler

2018-01-11 Thread Mark Kettenis
> Date: Thu, 11 Jan 2018 13:53:00 +1000 > From: David Gwynne > > this silences the warnings when building dhclient. > > according to guenther@, the c standard says ternary operators are > subject to type promotion rules, ie, it ends up being at least an > int. this adds explicit casts to the exp

ksh: unused param in print_expansions()

2018-01-11 Thread Michael W. Bombardieri
Hello, The local function print_expansions() is a wrapper for x_print_expansions(). Going back to revision 1.1 of vi.c reveals the command parameter wasn't used then either. - Michael Index: vi.c === RCS file: /cvs/src/bin/ksh/vi.c

[PATCH] add support for Huawei E3372

2018-01-11 Thread Kevin Lo
Hi, Below are the diffs to make the Huawei E3372 work. dmesg: umsm0 at uhub0 port 4 configuration 1 interface 0 "HUAWEI_MOBILE HUAWEI_MOBILE" rev 2.10/1.02 addr 3 umsm0 detached umsm0 at uhub0 port 4 configuration 1 interface 0 "HUAWEI_MOBILE HUAWEI_MOBILE" rev 2.10/1.02 addr 3 ucom0 at umsm0 u