Re: etherip alignment issues

2016-09-24 Thread YASUOKA Masahiko
On Sat, 24 Sep 2016 16:45:09 -0400 (EDT) Martin Brandenburg wrote: > On Sun, 25 Sep 2016, YASUOKA Masahiko wrote: > >> On Sat, 24 Sep 2016 13:08:18 -0400 (EDT) >> Martin Brandenburg wrote: >> > On Sat, 24 Sep 2016, YASUOKA Masahiko wrote: >> >> The problem doesn't repeat on my Octeon. >> >> >> >

Re: makes struct kinfo_file to provide va_nlink

2016-09-24 Thread Philip Guenther
On Sat, 24 Sep 2016, Sebastien Marie wrote: ... > The following diff adds a `va_nlink' member in `struct kinfo_file'. The > information become available though sysctl(3) via KERN_FILE interface, > as some others members of `struct vattr'. The idea seems sound, but the placement of the member in th

Re: /usr/share/man owner fixes for noperm builds

2016-09-24 Thread Theo Buehler
On Sun, Sep 25, 2016 at 01:14:17AM +0200, Theo Buehler wrote: > usr/share/mandoc.db is currently installed as the build user: > > -rw-r--r-- 1 builder wheel 396748 Sep 24 23:07 mandoc.db > > bsd.own.mk defines MANOWN=root, MANGRP=bin, MANMODE=444 and uses these > for installing the manpages t

/usr/share/man owner fixes for noperm builds

2016-09-24 Thread Theo Buehler
usr/share/mandoc.db is currently installed as the build user: -rw-r--r-- 1 builder wheel 396748 Sep 24 23:07 mandoc.db bsd.own.mk defines MANOWN=root, MANGRP=bin, MANMODE=444 and uses these for installing the manpages themselves. Therefore I think we should use these variables rather than usi

Boot problem with MBPro 8,2 and OSX/El Capitain and OpenBSD - and workaround

2016-09-24 Thread Sven-Volker Nowarra
Boot problem with MBPro 8,2 and OSX/El Capitain and OpenBSD - and workaround after updating OSX with El Capitain my Linux and OpenBSD partitions wouldn’t boot anymore. Here is how I worked around it: I anyhow had to install fresh OpenBSD 6.0, I re-installed it on a partition of the internal har

Re: cvs: owner of installed files

2016-09-24 Thread Theo Buehler
On Sun, Sep 18, 2016 at 12:32:17AM +0200, Martin Natano wrote: > Next round of wrestling with install permissions. This diff adjusts the > file owner/group for installed files of cvs(1). Ok? The diff doesn't apply because mkinstalldirs has an odd revision: > Index: mkinstalldirs > ===

Re: lenovo scrollpoint mouse

2016-09-24 Thread Giannis Tsaraias
On Sat, Sep 24, 2016 at 01:29:39PM -0400, Martin Brandenburg wrote: > The IBM/Lenovo ScrollPoint mouse is uses a TrackPoint-type mechanism > rather than a standard mouse wheel. It appears to the system as a > standard USB mouse with one caveat. > > (http://www.ibmfiles.com/pages/scrollpoint.htm) >

Re: etherip alignment issues

2016-09-24 Thread Martin Brandenburg
On Sun, 25 Sep 2016, YASUOKA Masahiko wrote: > On Sat, 24 Sep 2016 13:08:18 -0400 (EDT) > Martin Brandenburg wrote: > > On Sat, 24 Sep 2016, YASUOKA Masahiko wrote: > >> The problem doesn't repeat on my Octeon. > >> > >> Can you try the diff below? > >> > >> - I assume the diff fixes the proble

Re: share/: install ownership fixes

2016-09-24 Thread Theo Buehler
On Tue, Sep 20, 2016 at 08:49:24PM +0200, Martin Natano wrote: > Ping. Ok? ok > On Sat, Sep 10, 2016 at 10:16:20PM +0200, Martin Natano wrote: > > Another diff I typoed, also found by rpe@. Ok? > > > > Index: share/misc/pcvtfonts/Makefile > > =

Re: ownership fix for /usr/lib/locate/src.db

2016-09-24 Thread Theo Buehler
On Tue, Sep 20, 2016 at 10:09:28PM +0200, Martin Natano wrote: > Without this diff src.db is installed as the build user when makeing a > noperm release. is required for BINOWN/BINGRP. Ok? ok > > natano > > > Index: Makefile > ==

Re: hashfree: sizes for free(9) when using hashinit.

2016-09-24 Thread Ted Unangst
Philip Guenther wrote: > On Wed, Sep 21, 2016 at 1:30 AM, Mathieu - wrote: > >> > I'm introducing hashfree, a counterpart to hashinit in order to pass the > >> > size to free(9) while hiding the implementation details. thanks, committed. > I don't understand the rename to hashfree() from the Net

Re: etherip alignment issues

2016-09-24 Thread YASUOKA Masahiko
On Sat, 24 Sep 2016 13:08:18 -0400 (EDT) Martin Brandenburg wrote: > On Sat, 24 Sep 2016, YASUOKA Masahiko wrote: >> The problem doesn't repeat on my Octeon. >> >> Can you try the diff below? >> >> - I assume the diff fixes the problem >> - A kernel message is added. please let me know if it

Re: make rdaemon less error-prone

2016-09-24 Thread Jeremie Courreges-Anglas
j...@wxcvbn.org (Jeremie Courreges-Anglas) writes: > Simple idiom: always initialize the pre-opened fd to -1, and within > rdaemon() test whether the passed fd is valid. > > ok? Updated diff after Theo suggested avoiding the fcntl call if possible. Index: usr.sbin/rtadvd/rtadvd.c ==

Re: hashfree: sizes for free(9) when using hashinit.

2016-09-24 Thread Mathieu -
Philip Guenther wrote: > On Wed, Sep 21, 2016 at 1:30 AM, Mathieu - wrote: > > Ted Unangst wrote: > >> Mathieu - wrote: > >> > Hello list, > >> > > >> > I'm introducing hashfree, a counterpart to hashinit in order to pass the > >> > size to free(9) while hiding the implementation details. > >> > M

Re: clang: kern/vfs_subr.c

2016-09-24 Thread Jeremie Courreges-Anglas
Mark Kettenis writes: > Finally a case where clang isn't entirely helpful. Because vp->v_tag > is an enum, clang thinks its value can't be bigger than 15 and that > the vp->v_tag >= nitems(vtags) check is therefore always false. But I > think we want to prevent an out-of-bounds access here if t

Re: clang: dev/acpi/dsdt.c and dev/i2c/iatp.c

2016-09-24 Thread Jeremie Courreges-Anglas
Mark Kettenis writes: > In both cases we're comparing an array to NULL. > > Note that in dev/acpi/dsdt.c I changed the strcmp() condition to == 0; > using ! for string pointer comparison always confuses me. I can drop > that change if people consider it controversial. No objection. > ok? ok j

Re: clang: warning fix for vmt.c

2016-09-24 Thread Jeremie Courreges-Anglas
Mark Kettenis writes: > Using a variable for the format string isn't a godd idea. > > ok? ok jca@ > > Index: dev/pv/vmt.c > === > RCS file: /cvs/src/sys/dev/pv/vmt.c,v > retrieving revision 1.9 > diff -u -p -r1.9 vmt.c > --- dev/pv

Re: clang dev/pv/hyperv.c

2016-09-24 Thread Jeremie Courreges-Anglas
Mark Kettenis writes: > Another obvious mistake caught by clang. > > ok? ok jca@ > > Index: dev/pv/hyperv.c > === > RCS file: /cvs/src/sys/dev/pv/hyperv.c,v > retrieving revision 1.16 > diff -u -p -r1.16 hyperv.c > --- dev/pv/hyper

lenovo scrollpoint mouse

2016-09-24 Thread Martin Brandenburg
The IBM/Lenovo ScrollPoint mouse is uses a TrackPoint-type mechanism rather than a standard mouse wheel. It appears to the system as a standard USB mouse with one caveat. (http://www.ibmfiles.com/pages/scrollpoint.htm) Where a standard USB mouse with a scrollwheel reports one click of the wheel a

clang: kern/vfs_subr.c

2016-09-24 Thread Mark Kettenis
Finally a case where clang isn't entirely helpful. Because vp->v_tag is an enum, clang thinks its value can't be bigger than 15 and that the vp->v_tag >= nitems(vtags) check is therefore always false. But I think we want to prevent an out-of-bounds access here if the vnode is corrupted somehow.

clang: dev/acpi/dsdt.c and dev/i2c/iatp.c

2016-09-24 Thread Mark Kettenis
In both cases we're comparing an array to NULL. Note that in dev/acpi/dsdt.c I changed the strcmp() condition to == 0; using ! for string pointer comparison always confuses me. I can drop that change if people consider it controversial. ok? Index: dev/acpi/dsdt.c ==

clang: warning fix for vmt.c

2016-09-24 Thread Mark Kettenis
Using a variable for the format string isn't a godd idea. ok? Index: dev/pv/vmt.c === RCS file: /cvs/src/sys/dev/pv/vmt.c,v retrieving revision 1.9 diff -u -p -r1.9 vmt.c --- dev/pv/vmt.c3 Feb 2016 14:24:05 - 1.9 +

Re: clang -Wpointer-sign

2016-09-24 Thread Mark Kettenis
> From: "Theo de Raadt" > Date: Sat, 24 Sep 2016 10:44:19 -0600 > > Please add this to all arch/*/conf/conf/Makefile.* files. > > We are trying to minimize differences between these files. If > that effort isn't made, they will eventually wander far apart from > each other. Sure. I'll leave l

Re: etherip alignment issues

2016-09-24 Thread Martin Brandenburg
On Sat, 24 Sep 2016, YASUOKA Masahiko wrote: > Hi, > > The problem doesn't repeat on my Octeon. > > Can you try the diff below? > > - I assume the diff fixes the problem > - A kernel message is added. please let me know if it appears. > > Thanks, > I got the message, but had another panic.

clang dev/pv/hyperv.c

2016-09-24 Thread Mark Kettenis
Another obvious mistake caught by clang. ok? Index: dev/pv/hyperv.c === RCS file: /cvs/src/sys/dev/pv/hyperv.c,v retrieving revision 1.16 diff -u -p -r1.16 hyperv.c --- dev/pv/hyperv.c 20 Sep 2016 10:27:14 - 1.16 +++ de

Re: clang -Wpointer-sign

2016-09-24 Thread Theo de Raadt
Please add this to all arch/*/conf/conf/Makefile.* files. We are trying to minimize differences between these files. If that effort isn't made, they will eventually wander far apart from each other. > So clang has this warning turned on by default. And our codebase is > not clean. I don't thin

rc.securelevel example

2016-09-24 Thread Jeremie Courreges-Anglas
Looks like it's not completely obvious how to set a custom securelevel, at least one user went the /etc/sysctl.conf way, which has the nasty side-effect of preventing the use of /etc/pf.conf. Should we add more belts and suspenders? Index: rc

clang and

2016-09-24 Thread Mark Kettenis
clang warns by default about static functions that are unused. It does this even for static inline functions, except when those functions are defined in a header file. The RBT code in has macros that define static inline functions. Unfortunately that means that the inline functions generated by

make rdaemon less error-prone

2016-09-24 Thread Jeremie Courreges-Anglas
Simple idiom: always initialize the pre-opened fd to -1, and within rdaemon() test whether the passed fd is valid. ok? Index: usr.sbin/dhcrelay/dhcrelay.c === RCS file: /cvs/src/usr.sbin/dhcrelay/dhcrelay.c,v retrieving revision 1.

More clang warnings in the kernel

2016-09-24 Thread Mark Kettenis
Compiling sys/dev/athn.c fails with: ../../../../dev/ic/athn.c:2182:9: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value] reg = RW(reg, AR_AES_MUTE_MASK1_FC1_MGMT, ^~~ ../../../../dev/ic/

Re: etherip alignment issues

2016-09-24 Thread YASUOKA Masahiko
Hi, The problem doesn't repeat on my Octeon. Can you try the diff below? - I assume the diff fixes the problem - A kernel message is added. please let me know if it appears. Thanks, diff --git a/sys/net/if_etherip.c b/sys/net/if_etherip.c index ad58c52..c0af82e 100644 --- a/sys/net/if_eth

clang -Wpointer-sign

2016-09-24 Thread Mark Kettenis
So clang has this warning turned on by default. And our codebase is not clean. I don't think we intend to fix that anytime soon. In fact, I think we deliberately convert between signed and unsigned char pointers in places. So I propose to turn this warning off. Since gcc recognizes the option

Re: Some arm cleanups suggested by clang

2016-09-24 Thread Mark Kettenis
> Date: Sat, 24 Sep 2016 14:07:00 +1000 > From: Jonathan Gray > > On Fri, Sep 23, 2016 at 01:43:04PM +0200, Mark Kettenis wrote: > > Index: arch/arm/arm/cpu.c > > === > > RCS file: /cvs/src/sys/arch/arm/arm/cpu.c,v > > retrieving rev

Re: innetgr(3): fix matching when user, host and domain are specified

2016-09-24 Thread Todd C. Miller
On Sat, 24 Sep 2016 00:49:07 -0700, Philip Guenther wrote: > Hmm, but then in the strdup() fails you need to call > _ng_sl_free(sl, 1); > no? Yes, fixed. > (Speaking of, _ng_sl_free() is now static and its second argument is > always 1, so maybe it should lose that...) That arg can be 0

makes struct kinfo_file to provide va_nlink

2016-09-24 Thread Sebastien Marie
Hi, I would like access to `va_nlink' information in struct vattr. The purpose is to know when VTEXT node of a running process is "detached" from filesystem (read: the running process isn't the same anymore than the file on disk, maybe due to upgrade). `va_nlink' is the number of references of th

Re: timeout_set_proc(9)

2016-09-24 Thread Christiano F. Haesbaert
Am Samstag, 24. September 2016 schrieb David Gwynne : > On Fri, Sep 23, 2016 at 10:16:34PM -0700, Philip Guenther wrote: > > On Fri, 23 Sep 2016, Christiano F. Haesbaert wrote: > > ... > > > The diff as it is will deadlock against SCHED_LOCK. > > > tsleep() calls sleep_setup(), which grabs SCHED_L

pf.conf.5 patch

2016-09-24 Thread Peter J. Philipp
Hi, Please consider this patch for the pf.conf.5 manpage, it took me hours to figure out what went wrong with my network after parts stopped working due to this example. Changing it to what I have now makes it work right. Symptoms without this fix caused IPv6 neighbours to stop pinging/being av

Re: timeout_set_proc(9)

2016-09-24 Thread David Gwynne
On Fri, Sep 23, 2016 at 10:16:34PM -0700, Philip Guenther wrote: > On Fri, 23 Sep 2016, Christiano F. Haesbaert wrote: > ... > > The diff as it is will deadlock against SCHED_LOCK. > > tsleep() calls sleep_setup(), which grabs SCHED_LOCK, > > Then sleep_setup_timeout() will grab timeout_mutex in ti

add in6 multicast support to vxlan(4) ; question on mbufs

2016-09-24 Thread Vincent Gross
Hi, As said in Subject:. I would like to get comments on the m_adj/m_pullup dance at the end of vxlan_lookup() ; I do this because ether_input() access the ethernet header with mtod(), and under some conditions the mbuf handled would have its first data chunk empty (mh_len == 0). What is the rule

Re: correct option listing in switchd(8)

2016-09-24 Thread lists
Sat, 24 Sep 2016 12:12:03 +1000 Jonathan Gray > Sync the option list with reality. Don't document the internal > -I and -P options that set the instance number and title on > purpose. Hi Jonathan, I think undocumented and/or intentionally non synchronised options contradicts with the idea of "c

Re: innetgr(3): fix matching when user, host and domain are specified

2016-09-24 Thread Philip Guenther
On Tue, 13 Sep 2016, Todd C. Miller wrote: > Currently, innetgr(3) will return false if all of user, host and domain > are specified, even if the tuple would otherwise match. > > The commented assumption "If a domainname is given, we would have found > a match" is simply not true. Sure. > I al

Re: let openbgpd announce rtlabels

2016-09-24 Thread Peter Hessler
On 2016 Sep 14 (Wed) at 16:41:53 +0200 (+0200), Peter Hessler wrote: :It is quite common to want to do a cross-protocol readvertisement from :IGP->EGP. We can add rtlabels in bgpd and ospfd, but only advertise :in ospfd. : :This diff lets bgpd announce routes based on rtlabels. The existing :"can

Re: Two more arm aeabi functions for the kernel

2016-09-24 Thread Philip Guenther
On Thu, Sep 22, 2016 at 1:09 PM, Mark Kettenis wrote: > These functions are necessary to build our kernel with clang. I > picked these from NetBSD as I didn't quite like the way FreeBSD > implemented them. I stripped all the unecessary bits from the NetBSD > implementation (which is shared with