Re: Enabled bnxt on arm64

2018-09-10 Thread Jonathan Matthew
On 11/09/18 12:03, Carlos Cardenas wrote: Howdy. Attached is a patch to enable bnxt on arm64. Tested (and running) on mcbin with Broadcom BCM57404 (Dell variant). Comments? Ok? ok by me. +--+ Carlos

Re: vmd fail fast on unknown disk format

2018-09-10 Thread Ori Bernstein
On Mon, 10 Sep 2018 20:00:16 -0700, Carlos Cardenas wrote: > Howdy. > > Attached patch allows vmd to fail fast on unknown disk format along with > some minor clean up on logging. > > Comments? Ok? > > +--+ > Carlos One nit: refs = htobe16(refs); if (pwrite(disk->fd, ,

vmd fail fast on unknown disk format

2018-09-10 Thread Carlos Cardenas
Howdy. Attached patch allows vmd to fail fast on unknown disk format along with some minor clean up on logging. Comments? Ok? +--+ Carlos Index: vioqcow2.c === RCS file: /home/los/cvs/src/usr.sbin/vmd/vioqcow2.c,v retrieving

Enabled bnxt on arm64

2018-09-10 Thread Carlos Cardenas
Howdy. Attached is a patch to enable bnxt on arm64. Tested (and running) on mcbin with Broadcom BCM57404 (Dell variant). Comments? Ok? +--+ Carlos Index: GENERIC === RCS file: /home/los/cvs/src/sys/arch/arm64/conf/GENERIC,v

pfctl: host(): remove now unused r buffer

2018-09-10 Thread Klemens Nanni
`r' is a left over from before my AF swipe. While here, use __func__. Now I can start syncing daemons in base. OK? Index: pfctl_parser.c === RCS file: /cvs/src/sbin/pfctl/pfctl_parser.c,v retrieving revision 1.334 diff -u -p

Re: remove pcb hash macros

2018-09-10 Thread Stefan Sperling
On Tue, Sep 11, 2018 at 12:01:28AM +0200, Alexander Bluhm wrote: > Hi, > > I don't see any use for the INPCBHASH() macros. Just expand them. > > ok? ok. Pretty pointless indeed. > > bluhm > > Index: netinet/in_pcb.c > === >

remove pcb hash macros

2018-09-10 Thread Alexander Bluhm
Hi, I don't see any use for the INPCBHASH() macros. Just expand them. ok? bluhm Index: netinet/in_pcb.c === RCS file: /data/mirror/openbsd/cvs/src/sys/netinet/in_pcb.c,v retrieving revision 1.241 diff -u -p -r1.241 in_pcb.c ---

Re: [patch] rebound: add NULL pointer checks

2018-09-10 Thread Ted Unangst
Anton Lindqvist wrote: > > > > Since it's a daemon I guess it makes sense to continue execution instead > > > > of dying. However, we should make sure to not leak memory along the > > > > error paths. Also, log something when preloading the cache fails. > > Committed, I settled on using goto.

drm_wait_one_vblank() fix

2018-09-10 Thread Mark Kettenis
When we're cold, vblank interrupts don't happen, so we would wait forever. I added a short-circuit for this case, but apparently some output connector detection code in inteldrm(4) relies on a delay here to reliably detect whether something is connected or not. I tried fixing this in our Linux

add uid_from_user/gid_from_group [3/3]

2018-09-10 Thread Todd C. Miller
This diff replaces calls to getpwuid/getgrgid with uid_from_user/gid_from_group and fixes warnings caused by the user_from_uid/group_from_gid return value change to const char *. I've also changed some getpwnam/getgrnam to user_from_uid/group_from_gid where it makes sense. If desired, I can

add uid_from_user/gid_from_group [2/3]

2018-09-10 Thread Todd C. Miller
This removes cache.c from pax in favor of using the new uid_from_user() and gid_from_group() functions in libc. I've added explicit calls to setpassent() and setgroupent() since they are no longer implicitly called. - todd Index: bin/pax/Makefile

add uid_from_user/gid_from_group [1/3]

2018-09-10 Thread Todd C. Miller
This is a port of uid_from_user() and gid_from_group() from NetBSD (also present in FreeBSD). I did not port the pwcache_userdb() and pwcache_groupdb() functions which we have no use for. This is basically just the contents pax's cache.c moved to libc. It replaces the existing pwcache.c

Re: pfctl: merge host_v{4,6}() into simpler host_ip()

2018-09-10 Thread Klemens Nanni
On Mon, Sep 10, 2018 at 12:46:22AM +0200, Klemens Nanni wrote: > Reduce duplicate code, make similar paths such as the memcpy() calls > more uniform to simplify upcoming diffs and tidy up a bit. Updated version that * has copy_satoaddr() instead of mempcy() * fills the node_host struct directly

Re: pfctl: introduce copy_satopfaddr()

2018-09-10 Thread Alexandr Nedvedicky
On Mon, Sep 10, 2018 at 06:01:05PM +0200, Alexander Bluhm wrote: > On Mon, Sep 10, 2018 at 05:52:43PM +0200, Klemens Nanni wrote: > > On Mon, Sep 10, 2018 at 05:41:56PM +0200, Alexander Bluhm wrote: > > > I would prefer to access pfa.v6 than to rely on the fact that pf_addr > > > contains a union

Re: switchd(8) stdio /dev/null

2018-09-10 Thread Klemens Nanni
On Mon, Sep 10, 2018 at 02:37:07AM -0700, Ayaka Koshibe wrote: > Mirroring bluhm's fixes for proc.c daemons to dup /dev/null for child > processes, for switchd(8). OK kn

Re: pfctl: introduce copy_satopfaddr()

2018-09-10 Thread Alexander Bluhm
On Mon, Sep 10, 2018 at 05:52:43PM +0200, Klemens Nanni wrote: > On Mon, Sep 10, 2018 at 05:41:56PM +0200, Alexander Bluhm wrote: > > I would prefer to access pfa.v6 than to rely on the fact that pf_addr > > contains a union as the first field. And the memcpy() is eqivalent > > to the following

Re: pfctl: introduce copy_satopfaddr()

2018-09-10 Thread Klemens Nanni
On Mon, Sep 10, 2018 at 05:41:56PM +0200, Alexander Bluhm wrote: > I would prefer to access pfa.v6 than to rely on the fact that pf_addr > contains a union as the first field. And the memcpy() is eqivalent > to the following assignment as both structures are aligned. > > pfa.v6 =

Re: pfctl: introduce copy_satopfaddr()

2018-09-10 Thread Alexander Bluhm
On Mon, Sep 10, 2018 at 05:24:04PM +0200, Klemens Nanni wrote: > If you find a bug in this diff, dinner is on me. unfortunately no bug found, just remarks > +void > +copy_satopfaddr(struct pf_addr *pfa, struct sockaddr *sa) > +{ > + if (sa->sa_family == AF_INET6) > + memcpy(pfa,

calculate packet header length

2018-09-10 Thread Alexander Bluhm
Hi, Instead of calculating the mbuf packet header length here and there, put the algorithm in a function m_calchdrlen(). ok? bluhm Index: share/man/man9/mbuf.9 === RCS file: /data/mirror/openbsd/cvs/src/share/man/man9/mbuf.9,v

Re: pfctl: introduce copy_satopfaddr()

2018-09-10 Thread Klemens Nanni
On Mon, Sep 10, 2018 at 01:23:32PM +0200, Alexander Bluhm wrote: > Can we call it copy_satopfaddr() so we know what is copied to where? Sure. > Could we use sa->sa_family? Then we do not have to pass an additional > parameter. Even better. My first diff passed a `struct node_host *' argument so

Re: vmd stdio /dev/null

2018-09-10 Thread Ayaka Koshibe
On Mon, Sep 10, 2018 at 01:48:23PM +0200, Alexander Bluhm wrote: > On Mon, Sep 10, 2018 at 09:59:31AM +0200, Reyk Floeter wrote: > > I already gave my OK for relayd but asked to adjust all proc.c instances. > > I have fixed relayd, httpd, vmd. > akoshibe@ cares about switchd. switchd is also now

Re: vmd stdio /dev/null

2018-09-10 Thread Alexander Bluhm
On Mon, Sep 10, 2018 at 09:59:31AM +0200, Reyk Floeter wrote: > I already gave my OK for relayd but asked to adjust all proc.c instances. I have fixed relayd, httpd, vmd. akoshibe@ cares about switchd. Could someone who uses snmpd apply the fix and test it? lpd/proc.c looks differently and

Re: pfctl: introduce copy_sa()

2018-09-10 Thread Alexander Bluhm
On Mon, Sep 10, 2018 at 01:10:29PM +0200, Klemens Nanni wrote: > +void > +copy_sa(int af, struct pf_addr *pfa, struct sockaddr *sa) Can we call it copy_satopfaddr() so we know what is copied to where? > +{ > + if (af == AF_INET6) Could we use sa->sa_family? Then we do not have to pass an

Re: pfctl: introduce copy_sa()

2018-09-10 Thread Klemens Nanni
On Mon, Sep 10, 2018 at 11:59:55AM +0200, Klemens Nanni wrote: > Small helper to put the dance around `af' into one single location. New diff with less cleverness^Wstupidity. regress passes, Both IPv4 and IPV6 addresses are parsed/copied correctly. I'd like to commit this before the `host_ip()'

Re: switchd(8) stdio /dev/null

2018-09-10 Thread Alexander Bluhm
On Mon, Sep 10, 2018 at 02:37:07AM -0700, Ayaka Koshibe wrote: > Mirroring bluhm's fixes for proc.c daemons to dup /dev/null for child > processes, for switchd(8). > > OK? OK bluhm@ > Index: proc.c > === > RCS file:

Re: pfctl: introduce copy_sa()

2018-09-10 Thread Michael Mikonos
On Mon, Sep 10, 2018 at 12:16:57PM +0200, Klemens Nanni wrote: > On Mon, Sep 10, 2018 at 11:59:55AM +0200, Klemens Nanni wrote: > > Small helper to put the dance around `af' into one single location. > Wrong/bad diff, please disregard. > I was just about to reply that the size in the memcpy()

Re: pfctl: introduce copy_sa()

2018-09-10 Thread Klemens Nanni
On Mon, Sep 10, 2018 at 11:59:55AM +0200, Klemens Nanni wrote: > Small helper to put the dance around `af' into one single location. Wrong/bad diff, please disregard.

Re: pfctl: merge host_v{4,6}() into simpler host_ip()

2018-09-10 Thread Alexandr Nedvedicky
Hello, On Mon, Sep 10, 2018 at 12:46:22AM +0200, Klemens Nanni wrote: > Reduce duplicate code, make similar paths such as the memcpy() calls > more uniform to simplify upcoming diffs and tidy up a bit. > > Feedback? OK? I'm OK with change. regards sasha

pfctl: introduce copy_sa()

2018-09-10 Thread Klemens Nanni
Small helper to put the dance around `af' into one single location. Feedback? OK? Index: pfctl_parser.c === RCS file: /cvs/src/sbin/pfctl/pfctl_parser.c,v retrieving revision 1.332 diff -u -p -r1.332 pfctl_parser.c ---

switchd(8) stdio /dev/null

2018-09-10 Thread Ayaka Koshibe
Hi, Mirroring bluhm's fixes for proc.c daemons to dup /dev/null for child processes, for switchd(8). OK? Thanks, Ayaka Index: proc.c === RCS file: /cvs/src/usr.sbin/switchd/proc.c,v retrieving revision 1.13 diff -u -p -u -r1.13

Re: vmd stdio /dev/null

2018-09-10 Thread Reyk Floeter
Hi, I already gave my OK for relayd but asked to adjust all proc.c instances. OK reyk@ > Am 09.09.2018 um 23:47 schrieb Mike Larkin : > >> On Sun, Sep 09, 2018 at 11:45:07PM +0200, Alexander Bluhm wrote: >> Hi, >> >> Like the other proc.c daemons, vmd(8) children do not detach from >> the