Re: vmd: add some NULL checks after {c,m}alloc()

2018-09-11 Thread Ori Bernstein
On Wed, 12 Sep 2018 12:04:21 +0800, Michael Mikonos wrote: > On Tue, Sep 11, 2018 at 11:25:52AM -0700, Ori Bernstein wrote: > > On Tue, 11 Sep 2018 15:36:49 +0800 > > Michael Mikonos wrote: > > > > > Hello, > > > > > > Sometimes vmd doesn't seem to check the result of malloc/calloc. > > > I tr

Re: add uid_from_user/gid_from_group [2/3]

2018-09-11 Thread Philip Guenther
On Mon, 10 Sep 2018, Todd C. Miller wrote: > 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. This part is ok guenther@ (

Re: add uid_from_user/gid_from_group [1/3]

2018-09-11 Thread Philip Guenther
On Mon, 10 Sep 2018, Todd C. Miller wrote: ... > --- /dev/null 1 Jan 1970 00:00:00 - > +++ lib/libc/gen/pwcache.h10 Sep 2018 00:46:44 - ... > +/* > + * Constants and data structures used to implement group and password file > + * caches. Traditional passwd/group cache routines perform q

Re: add uid_from_user/gid_from_group [1/3]

2018-09-11 Thread Philip Guenther
On Mon, 10 Sep 2018, Todd C. Miller wrote: > This is a port of uid_from_user() and gid_from_group() from NetBSD (also > present in FreeBSD). ... > --- lib/libc/gen/pwcache.c25 Nov 2015 23:16:01 - 1.13 > +++ lib/libc/gen/pwcache.c10 Sep 2018 15:04:35 - ... > +/* > + * routines

Re: vmd: add some NULL checks after {c,m}alloc()

2018-09-11 Thread Michael Mikonos
On Tue, Sep 11, 2018 at 11:25:52AM -0700, Ori Bernstein wrote: > On Tue, 11 Sep 2018 15:36:49 +0800 > Michael Mikonos wrote: > > > Hello, > > > > Sometimes vmd doesn't seem to check the result of malloc/calloc. > > I tried to preserve the existing behavour w.r.t. return values > > for the functi

pfctl: avoid unneeded variable in gen_dynnode()

2018-09-11 Thread Klemens Nanni
OK? Index: pfctl_parser.c === RCS file: /cvs/src/sbin/pfctl/pfctl_parser.c,v retrieving revision 1.336 diff -u -p -r1.336 pfctl_parser.c --- pfctl_parser.c 11 Sep 2018 10:42:10 - 1.336 +++ pfctl_parser.c 11 Sep 2018

Re: pfctl: prevent modifying internal anchors through their tables

2018-09-11 Thread Klemens Nanni
On Tue, Sep 11, 2018 at 12:17:05PM +0200, Klemens Nanni wrote: > Anchor names beginning with '_' are reserved for internal use, but this > particular case still works: My example is not exclusive; this effects all tables within special anchors including those automatically created by the ruleset op

pwd_mkdb: time to increase max cache size?

2018-09-11 Thread Todd C. Miller
The db hash table cache size used by pwd_mkdb is currently limited to 12MB. For very large passwd files this results in a lot of extra disk I/O. Increasing the max to 32MB makes pwd_mkdb several times faster on a real-world master.passwd files that is 264829 lines. On an amd64, the resident size

Re: vmd: add some NULL checks after {c,m}alloc()

2018-09-11 Thread Ori Bernstein
On Tue, 11 Sep 2018 15:36:49 +0800 Michael Mikonos wrote: > Hello, > > Sometimes vmd doesn't seem to check the result of malloc/calloc. > I tried to preserve the existing behavour w.r.t. return values > for the functions modified; some functions returned 1 on error > while others return -1. Does

Re: vmd: add some NULL checks after {c,m}alloc()

2018-09-11 Thread Mike Larkin
On Tue, Sep 11, 2018 at 03:36:49PM +0800, Michael Mikonos wrote: > Hello, > > Sometimes vmd doesn't seem to check the result of malloc/calloc. > I tried to preserve the existing behavour w.r.t. return values > for the functions modified; some functions returned 1 on error > while others return -1.

Re: pcb inet6ctlerrmap

2018-09-11 Thread Alexander Bluhm
On Sun, Sep 09, 2018 at 09:53:59PM +0200, Alexander Bluhm wrote: > My goal is to get in6_pcb and in_pcb in sync. > > Let's make both inetctlerrmap and inet6ctlerrmap u_char. That is > what FreeBSD does. There it is also in in6?_input.c. > > FreeBSD and NetBSD have the declaration in in6?_var.h,

Re: vmd: add some NULL checks after {c,m}alloc()

2018-09-11 Thread Michael Mikonos
On Tue, Sep 11, 2018 at 03:36:49PM +0800, Michael Mikonos wrote: > Hello, > > Sometimes vmd doesn't seem to check the result of malloc/calloc. > I tried to preserve the existing behavour w.r.t. return values > for the functions modified; some functions returned 1 on error > while others return -1.

Re: vmd fail fast on unknown disk format

2018-09-11 Thread Klemens Nanni
On Mon, Sep 10, 2018 at 08:00:16PM -0700, Carlos Cardenas wrote: > Attached patch allows vmd to fail fast on unknown disk format along with > some minor clean up on logging. OK kn with the following adjustment: > @@ -1756,7 +1756,7 @@ virtio_init_disk(struct virtio_backing * > case VMDF_RAW:

in_pcb.c in6_pcb.c cleanup

2018-09-11 Thread Alexander Bluhm
Hi, The inconsistent distribution of in_ and in6_ functions in in_pcb.c and in6_pcb.c makes comparing the code difficult. Move all inet6 functions to in6_. Reorder functions consistently in both source files. Cleanup the include section. Now in_pcb.c is a superset of in6_pcb.c. The latter con

pfctl: prevent modifying internal anchors through their tables

2018-09-11 Thread Klemens Nanni
Anchor names beginning with '_' are reserved for internal use, but this particular case still works: Automatically create a table that's bound to a specific anchor: # cat pf.conf anchor { pass keep state (max-src-conn-rate 100/10, overload ) } # pfc

Re: drm_wait_one_vblank() fix

2018-09-11 Thread Sebastien Marie
On Mon, Sep 10, 2018 at 08:53:15PM +0200, Mark Kettenis wrote: > 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 whet

vmd: add some NULL checks after {c,m}alloc()

2018-09-11 Thread Michael Mikonos
Hello, Sometimes vmd doesn't seem to check the result of malloc/calloc. I tried to preserve the existing behavour w.r.t. return values for the functions modified; some functions returned 1 on error while others return -1. Does this look correct? - Michael Index: loadfile_elf.c =