etc/mtree/special: remove nsd.conf
/etc/nsd.conf has been moved to /var/nsd/etc/nsd.conf. /etc/changelist has been changed accordingly, /etc/mtree/special has not. NSD's configuration file resides in a root:_nsd owned directory with permission set at 0750. As such there should be no need for inclusion of nsd.conf in the mtree specification for dangerous files. Included a small diff file. -- Björn Ketelaars GPG key: 0x4F0E5F21 Index: mtree/special === RCS file: /cvs/src/etc/mtree/special,v retrieving revision 1.99 diff -u -p -r1.99 special --- mtree/special 10 Jul 2013 05:23:18 - 1.99 +++ mtree/special 3 Dec 2013 07:53:51 - @@ -72,7 +72,6 @@ npppd type=dir mode=0755 uname=root gna npppd.conf type=file mode=0640 uname=root gname=wheel npppd-userstype=file mode=0600 uname=root gname=wheel .. #npppd -nsd.conf type=file mode=0640 uname=root gname=_nsd ntpd.conf type=file mode=0644 uname=root gname=wheel ospfd.conf type=file mode=0600 uname=root gname=wheel ospf6d.conftype=file mode=0600 uname=root gname=wheel
Re: etc/mtree/special: remove nsd.conf
On 03/12/2013, Ian McWilliam wrote: On 3/12/2013 7:12 PM, Björn Ketelaars wrote: /etc/nsd.conf has been moved to /var/nsd/etc/nsd.conf. /etc/changelist has been changed accordingly, /etc/mtree/special has not. NSD's configuration file resides in a root:_nsd owned directory with permission set at 0750. As such there should be no need for inclusion of nsd.conf in the mtree specification for dangerous files. Included a small diff file. Does a conf file really need to be executable? Ian McWilliam The directory has permission 0750, not the configuration file (which is 0640). So, no executable config file. Guess that my crappy English is to blame... -- Björn Ketelaars GPG key: 0x4F0E5F21
Re: pf.os: add additional fingerprints
On 2013/12/02 23:39, Eitan Adler wrote: Hi all, This is a simple enough patch: Index: pf.os ==*= RCS file: /cvs/src/etc/pf.os,v retrieving revision 1.26 diff -u -r1.26 pf.os --- pf.os 3 Aug 2012 12:25:16 - 1.26 +++ pf.os 3 Dec 2013 04:37:55 - @@ -314,6 +314,14 @@ 16384:64:1:64:M*,N,N,S,N,W3,N,N,T: OpenBSD:4.9::OpenBSD 4.9 16384:64:0:64:M*,N,N,S,N,W3,N,N,T: OpenBSD:4.9:no-df:OpenBSD 4.9 (scrub no-df) +# - DragonFly BSD - + +57344:64:1:60:M*,N,W0,N,N,T: DragonFly:1.0:A:DragonFly 1.0A +57344:64:0:64:M*,N,W0,N,N,S,N,N,T: DragonFly:1.2-1.12::DragonFly 1.2-1.12 +5840:64:1:60:M*,S,T,N,W4: DragonFly:2.0-2.1::DragonFly 2.0-2.1 +57344:64:0:64:M*,N,W0,N,N,S,N,N,T: DragonFly:2.2-2.3::DragonFly 2.2-2.3 +57344:64:0:64:M*,N,W5,N,N,S,N,N,T: DragonFly:2.4-2.7::DragonFly 2.4-2.7 DragonFly 2.7 is 3 years old; should the version range in this last one be extended, or has the signature changed now?
Re: etc/mtree/special: remove nsd.conf
On 2013/12/03 09:12, Björn Ketelaars wrote: /etc/nsd.conf has been moved to /var/nsd/etc/nsd.conf. /etc/changelist has been changed accordingly, /etc/mtree/special has not. NSD's configuration file resides in a root:_nsd owned directory with permission set at 0750. As such there should be no need for inclusion of nsd.conf in the mtree specification for dangerous files. Included a small diff file. Actually /var/nsd/ should be added here as the config may contain keys. Protecting the directory is safer than just nsd.conf as other config files may be included. OK? Index: special === RCS file: /cvs/src/etc/mtree/special,v retrieving revision 1.99 diff -u -p -r1.99 special --- special 10 Jul 2013 05:23:18 - 1.99 +++ special 3 Dec 2013 09:06:48 - @@ -72,7 +72,6 @@ npppd type=dir mode=0755 uname=root gna npppd.conf type=file mode=0640 uname=root gname=wheel npppd-userstype=file mode=0600 uname=root gname=wheel .. #npppd -nsd.conf type=file mode=0640 uname=root gname=_nsd ntpd.conf type=file mode=0644 uname=root gname=wheel ospfd.conf type=file mode=0600 uname=root gname=wheel ospf6d.conftype=file mode=0600 uname=root gname=wheel @@ -191,6 +190,10 @@ lastlogtype=file mode=0644 uname=root .. #var/log mail type=dir mode=0755 uname=root gname=wheel ignore .. #var/mail +nsdtype=dir mode=0755 uname=root gname=wheel +etctype=dir mode=0750 uname=root gname=_nsd +.. #var/nsd/etc +.. #var/nsd runtype=dir mode=0755 uname=root gname=wheel utmp type=file mode=0664 uname=root gname=utmp .. #var/run
Re: pf.os: add additional fingerprints
* Stuart Henderson st...@openbsd.org [2013-12-03 09:55]: On 2013/12/02 23:39, Eitan Adler wrote: Index: pf.os DragonFly 2.7 is 3 years old; should the version range in this last one be extended, or has the signature changed now? there was a much more complete update of pf.os committed a longish time ago, which changed the pf.os format. it was removed since pfctl choked if the pf.os file had the old format, where it should just not load fingerprints then but complain continue to load teh ruleset, for minimal backwards compat. fixing that updating the ancient OS fingerprints then is the way to go. Please sombody pick that up. -- Henning Brauer, h...@bsws.de, henn...@openbsd.org BS Web Services GmbH, http://bsws.de, Full-Service ISP Secure Hosting, Mail and DNS Services. Dedicated Servers, Root to Fully Managed Henning Brauer Consulting, http://henningbrauer.com/
Re: etc/mtree/special: remove nsd.conf
On 3/12/2013 7:12 PM, Björn Ketelaars wrote: /etc/nsd.conf has been moved to /var/nsd/etc/nsd.conf. /etc/changelist has been changed accordingly, /etc/mtree/special has not. NSD's configuration file resides in a root:_nsd owned directory with permission set at 0750. As such there should be no need for inclusion of nsd.conf in the mtree specification for dangerous files. Included a small diff file. Does a conf file really need to be executable? Ian McWilliam
Re: pf.os: add additional fingerprints
On Tue, Dec 3, 2013 at 3:55 AM, Stuart Henderson st...@openbsd.org wrote: On 2013/12/02 23:39, Eitan Adler wrote: Hi all, This is a simple enough patch: Index: pf.os ==*= RCS file: /cvs/src/etc/pf.os,v retrieving revision 1.26 diff -u -r1.26 pf.os --- pf.os 3 Aug 2012 12:25:16 - 1.26 +++ pf.os 3 Dec 2013 04:37:55 - @@ -314,6 +314,14 @@ 16384:64:1:64:M*,N,N,S,N,W3,N,N,T: OpenBSD:4.9::OpenBSD 4.9 16384:64:0:64:M*,N,N,S,N,W3,N,N,T: OpenBSD:4.9:no-df:OpenBSD 4.9 (scrub no-df) +# - DragonFly BSD - + +57344:64:1:60:M*,N,W0,N,N,T: DragonFly:1.0:A:DragonFly 1.0A +57344:64:0:64:M*,N,W0,N,N,S,N,N,T: DragonFly:1.2-1.12::DragonFly 1.2-1.12 +5840:64:1:60:M*,S,T,N,W4: DragonFly:2.0-2.1::DragonFly 2.0-2.1 +57344:64:0:64:M*,N,W0,N,N,S,N,N,T: DragonFly:2.2-2.3::DragonFly 2.2-2.3 +57344:64:0:64:M*,N,W5,N,N,S,N,N,T: DragonFly:2.4-2.7::DragonFly 2.4-2.7 DragonFly 2.7 is 3 years old; should the version range in this last one be extended, or has the signature changed now? I have no ability to check. This diff was originally committed to DragonFly a few years ago. I should have been clear about that. I'll look into getting a more recent signature, but no guarantee. -- Eitan Adler
xenocara fallout from libcompat removal
The xenocara fallout from libcompat removal is actually minimal. I don't know if there are any extant operating systems that still require sys/timeb.h for getrusage(). Index: app/xgc/tests.c === RCS file: /cvs/xenocara/app/xgc/tests.c,v retrieving revision 1.2 diff -u -p -r1.2 tests.c --- app/xgc/tests.c 31 Oct 2010 19:41:34 - 1.2 +++ app/xgc/tests.c 3 Dec 2013 19:12:03 - @@ -14,7 +14,6 @@ #define SYSV #endif #if !defined(SYSV) !defined(QNX4) -#include sys/timeb.h #include sys/resource.h #endif -- Christian naddy Weisgerber na...@mips.inka.de
select.2: update includes
POSIX says select() and everything it needs should come from sys/select.h. Eight years ago our headers have been fixed to provide this. Time to acknowledge this in the man page, too. ok? Index: select.2 === RCS file: /cvs/src/lib/libc/sys/select.2,v retrieving revision 1.32 diff -u -p -r1.32 select.2 --- select.22 Nov 2013 17:25:34 - 1.32 +++ select.23 Dec 2013 19:55:44 - @@ -38,10 +38,7 @@ .Nm pselect .Nd synchronous I/O multiplexing .Sh SYNOPSIS -.Fd #include sys/types.h -.Fd #include sys/time.h -.Fd #include string.h -.Fd #include unistd.h +.Fd #include sys/select.h .Ft int .Fn select int nfds fd_set *readfds fd_set *writefds fd_set *exceptfds struct timeval *timeout .Ft int -- Christian naddy Weisgerber na...@mips.inka.de
Re: select.2: update includes
On Tue, Dec 3, 2013 at 12:08 PM, Christian Weisgerber na...@mips.inka.de wrote: ok? ok matthew +.Fd #include sys/select.h Worth using .In instead while you're at it?
Re: select.2: update includes
On Tue, Dec 3, 2013 at 12:08 PM, Christian Weisgerber na...@mips.inka.de wrote: POSIX says select() and everything it needs should come from sys/select.h. Eight years ago our headers have been fixed to provide this. Time to acknowledge this in the man page, too. ok? ... -.Fd #include string.h string.h needs to stay until FD_ZERO() and FD_COPY() are changed to not use memset()/memcpy(). Philip
Re: Genesys Logic GL620USB-A, USB PC-to-PC link cable (take 2)
Hello, jca@ privately advised that I should write my own copyright to describe who modified the code. I am planning to add notice like if_axe.c and sent the diff to him but there is no answer (too busy?). So I ask here. Is there any good solution? Thanks, SASANO Takayoshi u...@mx5.nisiq.net Index: if_ugl.c === RCS file: /cvs/src/sys/dev/usb/if_ugl.c,v retrieving revision 1.1 diff -u -p -r1.1 if_ugl.c --- if_ugl.c15 Nov 2013 19:42:20 - 1.1 +++ if_ugl.c3 Dec 2013 20:36:32 - @@ -1,6 +1,22 @@ /* $OpenBSD: if_ugl.c,v 1.1 2013/11/15 19:42:20 sasano Exp $ */ /* $NetBSD: if_upl.c,v 1.19 2002/07/11 21:14:26 augustss Exp $ */ /* + * Copyright (c) 2013 SASANO Takayoshi u...@uaa.org.uk + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED AS IS AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* * Copyright (c) 2000 The NetBSD Foundation, Inc. * All rights reserved. *
cdce(4): sc-cdce_unit
Hello, I read sys/dev/usb/if_cdce.c and found sc-cdce_unit is refered but none initializes. Maybe the fix is required like this :- Index: if_cdce.c === RCS file: /cvs/src/sys/dev/usb/if_cdce.c,v retrieving revision 1.57 diff -u -p -r1.57 if_cdce.c --- if_cdce.c 15 Nov 2013 10:17:39 - 1.57 +++ if_cdce.c 3 Dec 2013 20:36:44 - @@ -177,6 +177,7 @@ cdce_attach(struct device *parent, struc int ctl_ifcno = -1; int data_ifcno = -1; + sc-cdce_unit = self-dv_unit; sc-cdce_udev = uaa-device; sc-cdce_ctl_iface = uaa-iface; id = usbd_get_interface_descriptor(sc-cdce_ctl_iface); And, sc-sc_unit of sys/dev/usb/if_cdcef.c seems to have save problem. Regards, -- SASANO Takayoshi u...@mx5.nisiq.net
Re: cdce(4): sc-cdce_unit
I read sys/dev/usb/if_cdce.c and found sc-cdce_unit is refered but none initializes. Maybe the fix is required like this :- [...] + sc-cdce_unit = self-dv_unit; I really dislike variables that serve no purpose. The same thing is available straight out of struct device. I've also fixed if_cdcef (and checked that it compiles on the zaurus where it is used). Index: if_cdce.c === RCS file: /cvs/src/sys/dev/usb/if_cdce.c,v retrieving revision 1.57 diff -u -p -u -r1.57 if_cdce.c --- if_cdce.c 15 Nov 2013 10:17:39 - 1.57 +++ if_cdce.c 3 Dec 2013 21:08:23 - @@ -324,7 +324,7 @@ found: getmicrotime(now); macaddr_lo = htonl(now.tv_usec 8); bcopy(macaddr_lo, sc-cdce_arpcom.ac_enaddr[2], sizeof(u_int32_t)); - sc-cdce_arpcom.ac_enaddr[5] = (u_int8_t)(sc-cdce_unit); + sc-cdce_arpcom.ac_enaddr[5] = (u_int8_t)(sc-cdce_dev.dv_unit); } else { for (i = 0; i ETHER_ADDR_LEN * 2; i++) { int c = UGETW(eaddr_str.bString[i]); Index: if_cdcef.c === RCS file: /cvs/src/sys/dev/usb/if_cdcef.c,v retrieving revision 1.31 diff -u -p -u -r1.31 if_cdcef.c --- if_cdcef.c 11 Nov 2013 10:09:40 - 1.31 +++ if_cdcef.c 3 Dec 2013 21:13:54 - @@ -79,7 +79,6 @@ struct cdcef_softc { #define GET_IFP(sc) ((sc)-sc_arpcom.ac_if) int sc_rxeof_errors; - int sc_unit; int sc_listening; }; @@ -243,7 +242,7 @@ cdcef_attach(struct device *parent, stru macaddr_hi = htons(0x2acb); bcopy(macaddr_hi, sc-sc_arpcom.ac_enaddr[0], sizeof(u_int16_t)); bcopy(ticks, sc-sc_arpcom.ac_enaddr[2], sizeof(u_int32_t)); - sc-sc_arpcom.ac_enaddr[5] = (u_int8_t)(sc-sc_unit); + sc-sc_arpcom.ac_enaddr[5] = (u_int8_t)(sc-sc_dev.bdev.dv_unit); printf(: address %s\n, ether_sprintf(sc-sc_arpcom.ac_enaddr)); Index: if_cdcereg.h === RCS file: /cvs/src/sys/dev/usb/if_cdcereg.h,v retrieving revision 1.5 diff -u -p -u -r1.5 if_cdcereg.h --- if_cdcereg.h11 Nov 2013 12:38:16 - 1.5 +++ if_cdcereg.h3 Dec 2013 21:06:22 - @@ -80,7 +80,6 @@ struct cdce_softc { struct usbd_pipe*cdce_bulkin_pipe; int cdce_bulkout_no; struct usbd_pipe*cdce_bulkout_pipe; - int cdce_unit; struct cdce_cdatacdce_cdata; int cdce_rxeof_errors; u_int16_tcdce_flags;
Re: select.2: update includes
Philip Guenther: string.h needs to stay until FD_ZERO() and FD_COPY() are changed to not use memset()/memcpy(). We could grab this from FreeBSD: #if __BSD_VISIBLE #define FD_COPY(f, t) (void)(*(t) = *(f)) #endif #define FD_ZERO(p) do { \ fd_set *_p; \ __size_t _n;\ \ _p = (p); \ _n = __howmany(FD_SETSIZE, __NFDBITS); \ while (_n 0) \ _p-fds_bits[--_n] = 0; \ } while (0) -- Christian naddy Weisgerber na...@mips.inka.de
Re: select.2: update includes
On Tue, Dec 3, 2013 at 12:37 PM, Philip Guenther guent...@gmail.com wrote: string.h needs to stay until FD_ZERO() and FD_COPY() are changed to not use memset()/memcpy(). Good point. Would something like this work? #define FD_COPY(f, t) (*(fd_set *)(t) = *(const fd_set *)(f)) static const fd_set __fd_zero_set; #define FD_ZERO(p) FD_COPY(__fd_zero_set, p) Downside is we lose const warnings. We could get those back if we change FD_COPY into an inline function instead of a macro, or do some GNU block-expression trickery. Or we can just declare memset/memcpy in sys/select.h too?
Re: select.2: update includes
On Tue, Dec 3, 2013 at 1:03 PM, Matthew Dempsky matt...@dempsky.org wrote: On Tue, Dec 3, 2013 at 12:37 PM, Philip Guenther guent...@gmail.com wrote: string.h needs to stay until FD_ZERO() and FD_COPY() are changed to not use memset()/memcpy(). Good point. Would something like this work? #define FD_COPY(f, t) (*(fd_set *)(t) = *(const fd_set *)(f)) What problem does the casts solve? (And actually, as noted in naddy's cite from FreeBSD, FD_COPY() is a non-standard BSDism, so it can just continue to assume the caller pulled in string.h) static const fd_set __fd_zero_set; #define FD_ZERO(p) FD_COPY(__fd_zero_set, p) That'll put a __fd_zero_set in each .o that references FD_ZERO(), ick. I think I would prefer either the FreeBSD inline bzero() routine (although zeroing from the end seems an odd choice for caching reasons, no?), or adding a strong alias to libc, _memset == memset, and then having sys/select.h say void *_memset(void *, int, size_t); #define FD_ZERO(p) (void )_memset(p, 0, sizeof(*(p))) Or we can just declare memset/memcpy in sys/select.h too? Magic POSIX 8-ball says no. Philip Guenther
Re: select.2: update includes
On Tue, Dec 3, 2013 at 12:37 PM, Philip Guenther guent...@gmail.com wrote: string.h needs to stay until FD_ZERO() and FD_COPY() are changed to not use memset()/memcpy(). Good point. Would something like this work? #define FD_COPY(f, t) (*(fd_set *)(t) = *(const fd_set *)(f)) Regarding your FD_ZERO: static const fd_set __fd_zero_set; #define FD_ZERO(p) FD_COPY(__fd_zero_set, p) I'm not super happy about that well-located gigantic .rodata nop sled. Furhermore, as const, it will be represented in the actual filesize of every executable. Downside is we lose const warnings. We could get those back if we change FD_COPY into an inline function instead of a macro, or do some GNU block-expression trickery. Hmm. Second reason against it. I think what naddy showed seems better, though the FD_ZERO expression can do with a bit more packing.
Re: select.2: update includes
Combining the various suggestions, I now have this: Index: sys/sys/select.h === RCS file: /cvs/src/sys/sys/select.h,v retrieving revision 1.13 diff -u -p -r1.13 select.h --- sys/sys/select.h29 Oct 2013 02:44:52 - 1.13 +++ sys/sys/select.h3 Dec 2013 21:51:08 - @@ -76,8 +76,17 @@ typedef struct fd_set { ((p)-fds_bits[(n) / __NFDBITS] = ~(1U ((n) % __NFDBITS))) #defineFD_ISSET(n, p) \ ((p)-fds_bits[(n) / __NFDBITS] (1U ((n) % __NFDBITS))) -#defineFD_COPY(f, t) memcpy(t, f, sizeof(*(f))) -#defineFD_ZERO(p) memset(p, 0, sizeof(*(p))) + +#if __BSD_VISIBLE +#defineFD_COPY(f, t) (void)(*(t) = *(f)) +#endif +#defineFD_ZERO(p) do \ + fd_set *_p = (p); \ + __size_t _n = __howmany(FD_SETSIZE, __NFDBITS); \ + \ + while (_n 0) \ + _p-fds_bits[--_n] = 0; \ +} while (0) #if __BSD_VISIBLE #defineNBBY__NBBY Index: lib/libc/sys/select.2 === RCS file: /cvs/src/lib/libc/sys/select.2,v retrieving revision 1.32 diff -u -p -r1.32 select.2 --- lib/libc/sys/select.2 2 Nov 2013 17:25:34 - 1.32 +++ lib/libc/sys/select.2 3 Dec 2013 21:43:17 - @@ -38,10 +38,7 @@ .Nm pselect .Nd synchronous I/O multiplexing .Sh SYNOPSIS -.Fd #include sys/types.h -.Fd #include sys/time.h -.Fd #include string.h -.Fd #include unistd.h +.In sys/select.h .Ft int .Fn select int nfds fd_set *readfds fd_set *writefds fd_set *exceptfds struct timeval *timeout .Ft int -- Christian naddy Weisgerber na...@mips.inka.de
Re: select.2: update includes
On Tue, Dec 3, 2013 at 1:55 PM, Christian Weisgerber na...@mips.inka.de wrote: +#if __BSD_VISIBLE +#defineFD_COPY(f, t) (void)(*(t) = *(f)) +#endif +#defineFD_ZERO(p) do \ + fd_set *_p = (p); \ + __size_t _n = __howmany(FD_SETSIZE, __NFDBITS); \ + \ + while (_n 0) \ + _p-fds_bits[--_n] = 0; \ +} while (0) I think you're missing a { after the do. :) But otherwise looks ok to me.
Re: select.2: update includes
On Tue, Dec 3, 2013 at 1:39 PM, Philip Guenther guent...@gmail.com wrote: What problem does the casts solve? I wasn't sure if people might be calling FD_COPY()/FD_ZERO() with void* or char* typed arguments (or other custom sized types). If we can assume they'll only pass fd_set* arguments, then they could be done away with. (And actually, as noted in naddy's cite from FreeBSD, FD_COPY() is a non-standard BSDism, so it can just continue to assume the caller pulled in string.h) Sounds good to me. That'll put a __fd_zero_set in each .o that references FD_ZERO(), ick. Oops, yeah, I was thinking they'd be collapsed into a single const value in the output object, but I forgot they'd need to be kept separate for object identity.
Re: select.2: update includes
I wasn't sure if people might be calling FD_COPY()/FD_ZERO() with void* or char* typed arguments (or other custom sized types). If we can assume they'll only pass fd_set* arguments, then they could be done away with. Hmm, that's a good question. The base appears clean, but it rarely makes promises for the rest of the ecosystem.
Re: xenocara fallout from libcompat removal
On Tue, Dec 03, 2013 at 08:53:37PM +0100, Christian Weisgerber wrote: The xenocara fallout from libcompat removal is actually minimal. I don't know if there are any extant operating systems that still require sys/timeb.h for getrusage(). ok. Index: app/xgc/tests.c === RCS file: /cvs/xenocara/app/xgc/tests.c,v retrieving revision 1.2 diff -u -p -r1.2 tests.c --- app/xgc/tests.c 31 Oct 2010 19:41:34 - 1.2 +++ app/xgc/tests.c 3 Dec 2013 19:12:03 - @@ -14,7 +14,6 @@ #define SYSV #endif #if !defined(SYSV) !defined(QNX4) -#include sys/timeb.h #include sys/resource.h #endif -- Christian naddy Weisgerber na...@mips.inka.de -- Matthieu Herrb
LLVM warning in dev/ic/aic79xx.c
This is unused within the aic79xx code. aic79xx.c:93:20: error: unused variable 'num_chip_names' [-Werror,-Wunused-const-variable] OK? Index: aic79xx.c === RCS file: /home/cvs/src/sys/dev/ic/aic79xx.c,v retrieving revision 1.51 diff -u -p -r1.51 aic79xx.c --- aic79xx.c 30 May 2013 16:15:02 - 1.51 +++ aic79xx.c 3 Dec 2013 22:21:40 - @@ -90,7 +90,6 @@ char *ahd_chip_names[] = aic7902, aic7901A }; -static const u_int num_chip_names = NUM_ELEMENTS(ahd_chip_names); /* * Hardware error codes. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
LLVM warning in dev/ic/atw.c
The bit of code that calls this function is #if 0'd out so leave the function there but #if 0 it out as well. atw.c:3021:1: error: unused function 'atw_hw_decrypted' [-Werror,-Wunused-function] OK? Index: atw.c === RCS file: /home/cvs/src/sys/dev/ic/atw.c,v retrieving revision 1.78 diff -u -p -r1.78 atw.c --- atw.c 26 Nov 2013 09:50:32 - 1.78 +++ atw.c 3 Dec 2013 22:30:22 - @@ -3017,6 +3017,7 @@ atw_linkintr(struct atw_softc *sc, u_int } } +#if 0 static __inline int atw_hw_decrypted(struct atw_softc *sc, struct ieee80211_frame *wh) { @@ -3026,6 +3027,7 @@ atw_hw_decrypted(struct atw_softc *sc, s return 0; return (sc-sc_wepctl ATW_WEPCTL_WEPRXBYP) == 0; } +#endif /* * atw_rxintr: -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
Re: select.2: update includes
Matthew Dempsky: I think you're missing a { after the do. :) Hmm, yes. This survives a make build: Index: sys/sys/select.h === RCS file: /cvs/src/sys/sys/select.h,v retrieving revision 1.13 diff -u -p -r1.13 select.h --- sys/sys/select.h29 Oct 2013 02:44:52 - 1.13 +++ sys/sys/select.h3 Dec 2013 22:08:31 - @@ -76,8 +76,17 @@ typedef struct fd_set { ((p)-fds_bits[(n) / __NFDBITS] = ~(1U ((n) % __NFDBITS))) #defineFD_ISSET(n, p) \ ((p)-fds_bits[(n) / __NFDBITS] (1U ((n) % __NFDBITS))) -#defineFD_COPY(f, t) memcpy(t, f, sizeof(*(f))) -#defineFD_ZERO(p) memset(p, 0, sizeof(*(p))) + +#if __BSD_VISIBLE +#defineFD_COPY(f, t) (void)(*(t) = *(f)) +#endif +#defineFD_ZERO(p) do { \ + fd_set *_p = (p); \ + __size_t _n = __howmany(FD_SETSIZE, __NFDBITS); \ + \ + while (_n 0) \ + _p-fds_bits[--_n] = 0; \ +} while (0) #if __BSD_VISIBLE #defineNBBY__NBBY Index: lib/libc/sys/select.2 === RCS file: /cvs/src/lib/libc/sys/select.2,v retrieving revision 1.32 diff -u -p -r1.32 select.2 --- lib/libc/sys/select.2 2 Nov 2013 17:25:34 - 1.32 +++ lib/libc/sys/select.2 3 Dec 2013 21:43:17 - @@ -38,10 +38,7 @@ .Nm pselect .Nd synchronous I/O multiplexing .Sh SYNOPSIS -.Fd #include sys/types.h -.Fd #include sys/time.h -.Fd #include string.h -.Fd #include unistd.h +.In sys/select.h .Ft int .Fn select int nfds fd_set *readfds fd_set *writefds fd_set *exceptfds struct timeval *timeout .Ft int -- Christian naddy Weisgerber na...@mips.inka.de
Re: LLVM warning in dev/ic/atw.c
On 2013/12/03 17:32, Brad Smith wrote: The bit of code that calls this function is #if 0'd out so leave the function there but #if 0 it out as well. atw.c:3021:1: error: unused function 'atw_hw_decrypted' [-Werror,-Wunused-function] OK, though after looking through BUGS in the manpage, and dmesglog (one single entry, long ago), I'd also be OK with moving it to the attic...
LLVM warning in dev/ic/uhci.c
Put UREAD4 under #ifdef UHCI_DEBUG as it is only used by a function for debugging which is also under UHCI_DEBUG. uhci.c:256:1: error: unused function 'UREAD4' [-Werror,-Wunused-function] OK? Index: uhci.c === RCS file: /home/cvs/src/sys/dev/usb/uhci.c,v retrieving revision 1.104 diff -u -p -r1.104 uhci.c --- uhci.c 9 Nov 2013 08:46:05 - 1.104 +++ uhci.c 3 Dec 2013 22:50:28 - @@ -252,12 +252,14 @@ UREAD2(struct uhci_softc *sc, bus_size_t return bus_space_read_2(sc-iot, sc-ioh, r); } +#ifdef UHCI_DEBUG static __inline u_int32_t UREAD4(struct uhci_softc *sc, bus_size_t r) { UBARR(sc); return bus_space_read_4(sc-iot, sc-ioh, r); } +#endif #define UHCICMD(sc, cmd) UWRITE2(sc, UHCI_CMD, cmd) #define UHCISTS(sc) UREAD2(sc, UHCI_STS) -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
LLVM warning in dev/ic/ohci.c
Some unused functions in ohci(4). #if 0 them out to appease the warnings but keep the code around in case it will be used at some point in the future. ohci.c:193:1: error: unused function 'OREAD1' [-Werror,-Wunused-function] ohci.c:200:1: error: unused function 'OREAD2' [-Werror,-Wunused-function] OK? Index: ohci.c === RCS file: /home/cvs/src/sys/dev/usb/ohci.c,v retrieving revision 1.116 diff -u -p -r1.116 ohci.c --- ohci.c 9 Nov 2013 08:46:05 - 1.116 +++ ohci.c 3 Dec 2013 22:52:01 - @@ -189,6 +189,7 @@ voidohci_dump_itds(struct ohci_soft_it #define OWRITE4(sc, r, x) \ do { OBARR(sc); bus_space_write_4((sc)-iot, (sc)-ioh, (r), (x)); } while (0) +#if 0 static __inline u_int8_t OREAD1(struct ohci_softc *sc, bus_size_t r) { @@ -202,6 +203,7 @@ OREAD2(struct ohci_softc *sc, bus_size_t OBARR(sc); return bus_space_read_2(sc-iot, sc-ioh, r); } +#endif static __inline u_int32_t OREAD4(struct ohci_softc *sc, bus_size_t r) -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
LLVM warning in amd64/amd64/amd64errata.c and i386 version too
The relvent code using amd64_errata_set4 is #if 0'd out so do the same to the variable. amd64errata.c:103:22: error: unused variable 'amd64_errata_set4' [-Werror,-Wunused-const-variable] OK? Index: amd64/amd64/amd64errata.c === RCS file: /home/cvs/src/sys/arch/amd64/amd64/amd64errata.c,v retrieving revision 1.5 diff -u -p -r1.5 amd64errata.c --- amd64/amd64/amd64errata.c 21 May 2013 21:12:17 - 1.5 +++ amd64/amd64/amd64errata.c 3 Dec 2013 23:38:59 - @@ -100,10 +100,12 @@ static const uint8_t amd64_errata_set3[] JH_E1, DH_E3, OINK }; +#if 0 static const uint8_t amd64_errata_set4[] = { SH_C0, SH_CG, DH_CG, CH_CG, SH_D0, DH_D0, CH_D0, JH_E1, DH_E3, SH_E4, BH_E4, SH_E5, DH_E6, JH_E6, OINK }; +#endif static const uint8_t amd64_errata_set5[] = { SH_B3, OINK Index: i386/i386/amd64errata.c === RCS file: /home/cvs/src/sys/arch/i386/i386/amd64errata.c,v retrieving revision 1.5 diff -u -p -r1.5 amd64errata.c --- i386/i386/amd64errata.c 21 May 2013 21:12:17 - 1.5 +++ i386/i386/amd64errata.c 3 Dec 2013 23:39:40 - @@ -100,10 +100,12 @@ static const uint8_t amd64_errata_set3[] JH_E1, DH_E3, OINK }; +#if 0 static const uint8_t amd64_errata_set4[] = { SH_C0, SH_CG, DH_CG, CH_CG, SH_D0, DH_D0, CH_D0, JH_E1, DH_E3, SH_E4, BH_E4, SH_E5, DH_E6, JH_E6, OINK }; +#endif static const uint8_t amd64_errata_set5[] = { SH_B3, OINK -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
LLVM warning in sys/uvm/uvm_map.c
An unused function in the UVM code. #if 0 it out for now. uvm_map.c:171:14: error: unused function 'uvm_mapentry_freecmp' [-Werror,-Wunused-function] uvm_map.c:353:1: error: unused function 'uvm_mapentry_freecmp' [-Werror,-Wunused-function] OK? Index: uvm_map.c === RCS file: /home/cvs/src/sys/uvm/uvm_map.c,v retrieving revision 1.163 diff -u -p -r1.163 uvm_map.c --- uvm_map.c 21 Sep 2013 10:01:27 - 1.163 +++ uvm_map.c 3 Dec 2013 23:27:50 - @@ -168,8 +168,10 @@ static __inline voiduvm_mapent_copy(st struct vm_map_entry*); static int uvm_mapentry_addrcmp(struct vm_map_entry*, struct vm_map_entry*); +#if 0 static int uvm_mapentry_freecmp(struct vm_map_entry*, struct vm_map_entry*); +#endif voiduvm_mapent_free_insert(struct vm_map*, struct uvm_addr_state*, struct vm_map_entry*); voiduvm_mapent_free_remove(struct vm_map*, @@ -349,12 +351,14 @@ uvm_mapentry_addrcmp(struct vm_map_entry * tree will be considered during 'any address' allocations. */ +#if 0 static __inline int uvm_mapentry_freecmp(struct vm_map_entry *e1, struct vm_map_entry *e2) { int cmp = e1-fspace e2-fspace ? -1 : e1-fspace e2-fspace; return cmp ? cmp : uvm_mapentry_addrcmp(e1, e2); } +#endif /* * Copy mapentry. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
LLVM warning in net/net80211/ieee80211_output.c
ieee80211_edca_table is unused within the code so just #if 0 it out for but but keeping it around for future reference in case it ever becomes useful. ieee80211_output.c:311:5: error: unused variable 'ieee80211_edca_table' [-Werror,-Wunused-const-variable] OK? Index: ieee80211_output.c === RCS file: /home/cvs/src/sys/net80211/ieee80211_output.c,v retrieving revision 1.88 diff -u -p -r1.88 ieee80211_output.c --- ieee80211_output.c 17 Jul 2010 16:30:01 - 1.88 +++ ieee80211_output.c 3 Dec 2013 23:20:22 - @@ -306,6 +306,7 @@ ieee80211_mgmt_output(struct ifnet *ifp, * 11G 15* 1023(*) aCWmin(1) * Turbo A/G 7 1023(Atheros proprietary mode) */ +#if 0 static const struct ieee80211_edca_ac_params ieee80211_edca_table[IEEE80211_MODE_MAX][EDCA_NUM_AC] = { [IEEE80211_MODE_11B] = { @@ -333,6 +334,7 @@ static const struct ieee80211_edca_ac_pa [EDCA_AC_VO] = { 2, 2, 1, 47 } } }; +#endif #ifndef IEEE80211_STA_ONLY static const struct ieee80211_edca_ac_params -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
dhclient support for /32 assignments
The patch below extends dhclient to mimic this logic from ISC DHCP's linux script: if [ x$new_subnet_mask = x255.255.255.255 ] ; then route add -host $router dev $interface fi route add default gw $router $metric_arg dev $interface With this change, dhclient is able to successfully configure the network via DHCP on Compute Engine: $ ifconfig vio0 vio0: flags=8b43UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST mtu 1500 lladdr 42:01:0a:f0:8f:56 priority: 0 groups: egress media: Ethernet autoselect status: active inet6 fe80::4001:aff:fef0:8f56%vio0 prefixlen 64 scopeid 0x1 inet 10.240.143.86 netmask 0x $ netstat -r -n -f inet Routing tables Internet: DestinationGatewayFlags Refs Use Mtu Prio Iface default10.240.0.1 UGS1 183 - 8 vio0 10.240.0.1 42:01:0a:f0:00:01 UHLc 10 -56 vio0 10.240.0.1/32 link#1 UC 10 -56 vio0 10.240.143.86/32 link#1 UC 00 - 4 vio0 127/8 127.0.0.1 UGRS 00 33144 8 lo0 127.0.0.1 127.0.0.1 UH 10 33144 4 lo0 224/4 127.0.0.1 URS00 33144 8 lo0 ok? Index: dhclient.c === RCS file: /cvs/src/sbin/dhclient/dhclient.c,v retrieving revision 1.268 diff -u -p -r1.268 dhclient.c --- dhclient.c 20 Nov 2013 17:22:46 - 1.268 +++ dhclient.c 4 Dec 2013 00:06:08 - @@ -879,6 +879,21 @@ bind_lease(void) /* XXX Only use FIRST router address for now. */ memcpy(gateway.s_addr, options[DHO_ROUTERS].data, options[DHO_ROUTERS].len); + + /* +* If we were given a /32 IP assignment, then make sure +* the gateway address is routable with equivalent of +* +* route add -net $gw -netmask 255.255.255.255 \ +* -cloning -iface $addr +*/ + if (mask.s_addr == INADDR_BROADCAST) { + add_route(ifi-rdomain, gateway, mask, + client-new-address, + RTA_DST | RTA_NETMASK | RTA_GATEWAY, + RTF_CLONING | RTF_STATIC); + } + add_default_route(ifi-rdomain, client-new-address, gateway); }
LLVM warning in dev/pci/drm/i915/i915_drv.c
The ValleyView PCI ids are #ifdef notyet in the table which references these structs so stick these under #ifdef notyet too until the ids are enabled. i915_drv.c:288:39: error: unused variable 'intel_valleyview_m_info' [-Werror,-Wunused-const-variable] i915_drv.c:297:39: error: unused variable 'intel_valleyview_d_info' [-Werror,-Wunused-const-variable] OK? Index: i915_drv.c === RCS file: /home/cvs/src/sys/dev/pci/drm/i915/i915_drv.c,v retrieving revision 1.54 diff -u -p -r1.54 i915_drv.c --- i915_drv.c 1 Dec 2013 13:53:52 - 1.54 +++ i915_drv.c 4 Dec 2013 01:20:10 - @@ -285,6 +285,7 @@ static const struct intel_device_info in .has_force_wake = 1, }; +#ifdef notyet static const struct intel_device_info intel_valleyview_m_info = { .gen = 7, .is_mobile = 1, .need_gfx_hws = 1, .has_hotplug = 1, @@ -302,6 +303,7 @@ static const struct intel_device_info in .has_blt_ring = 1, .is_valleyview = 1, }; +#endif static const struct intel_device_info intel_haswell_d_info = { .is_haswell = 1, .gen = 7, -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
LLVM warning in dev/pci/if_wpi.c
An unused function in wpi(4). #if 0 out the function for now. if_wpi.c:510:1: error: unused function 'wpi_mem_write' [-Werror,-Wunused-function] OK? Index: if_wpi.c === RCS file: /home/cvs/src/sys/dev/pci/if_wpi.c,v retrieving revision 1.116 diff -u -p -r1.116 if_wpi.c --- if_wpi.c28 Nov 2013 20:07:32 - 1.116 +++ if_wpi.c4 Dec 2013 00:55:43 - @@ -506,6 +506,7 @@ wpi_mem_read(struct wpi_softc *sc, uint3 return WPI_READ(sc, WPI_MEM_RDATA); } +#if 0 static __inline void wpi_mem_write(struct wpi_softc *sc, uint32_t addr, uint32_t data) { @@ -513,6 +514,7 @@ wpi_mem_write(struct wpi_softc *sc, uint WPI_BARRIER_WRITE(sc); WPI_WRITE(sc, WPI_MEM_WDATA, data); } +#endif static __inline void wpi_mem_read_region_4(struct wpi_softc *sc, uint32_t addr, uint32_t *data, -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
Re: dhclient support for /32 assignments
On Tue, Dec 03, 2013 at 04:15:10PM -0800, Matthew Dempsky wrote: The patch below extends dhclient to mimic this logic from ISC DHCP's linux script: if [ x$new_subnet_mask = x255.255.255.255 ] ; then route add -host $router dev $interface fi route add default gw $router $metric_arg dev $interface With this change, dhclient is able to successfully configure the network via DHCP on Compute Engine: $ ifconfig vio0 vio0: flags=8b43UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST mtu 1500 lladdr 42:01:0a:f0:8f:56 priority: 0 groups: egress media: Ethernet autoselect status: active inet6 fe80::4001:aff:fef0:8f56%vio0 prefixlen 64 scopeid 0x1 inet 10.240.143.86 netmask 0x $ netstat -r -n -f inet Routing tables Internet: DestinationGatewayFlags Refs Use Mtu Prio Iface default10.240.0.1 UGS1 183 - 8 vio0 10.240.0.1 42:01:0a:f0:00:01 UHLc 10 -56 vio0 10.240.0.1/32 link#1 UC 10 -56 vio0 10.240.143.86/32 link#1 UC 00 - 4 vio0 127/8 127.0.0.1 UGRS 00 33144 8 lo0 127.0.0.1 127.0.0.1 UH 10 33144 4 lo0 224/4 127.0.0.1 URS00 33144 8 lo0 ok? Index: dhclient.c === RCS file: /cvs/src/sbin/dhclient/dhclient.c,v retrieving revision 1.268 diff -u -p -r1.268 dhclient.c --- dhclient.c20 Nov 2013 17:22:46 - 1.268 +++ dhclient.c4 Dec 2013 00:06:08 - @@ -879,6 +879,21 @@ bind_lease(void) /* XXX Only use FIRST router address for now. */ memcpy(gateway.s_addr, options[DHO_ROUTERS].data, options[DHO_ROUTERS].len); + + /* + * If we were given a /32 IP assignment, then make sure + * the gateway address is routable with equivalent of + * + * route add -net $gw -netmask 255.255.255.255 \ + * -cloning -iface $addr + */ + if (mask.s_addr == INADDR_BROADCAST) { + add_route(ifi-rdomain, gateway, mask, + client-new-address, + RTA_DST | RTA_NETMASK | RTA_GATEWAY, + RTF_CLONING | RTF_STATIC); + } + add_default_route(ifi-rdomain, client-new-address, gateway); } Located here, the addition of the 255.255.255.255 route is not done in the presence of DHO_CLASSLESS_STATIC_ROUTES. As I recall only DHO_ROUTERS and DHO_STATIC_ROUTES are incompatible with DHO_CLASSLESS_STATIC_ROUTES. So we may want this chunk to occur unconditionally. Ken
Re: dhclient support for /32 assignments
On Tue, Dec 3, 2013 at 5:55 PM, Kenneth R Westerback kwesterb...@rogers.com wrote: Located here, the addition of the 255.255.255.255 route is not done in the presence of DHO_CLASSLESS_STATIC_ROUTES. As I recall only DHO_ROUTERS and DHO_STATIC_ROUTES are incompatible with DHO_CLASSLESS_STATIC_ROUTES. So we may want this chunk to occur unconditionally. I'm not opposed to that per se and I don't imagine it should cause any problems, but it would diverge somewhat from ISC DHCP's behavior. For reference, ISC DHCP 4.2.5-P1 doesn't support DHO_CLASSLESS_STATIC_ROUTES, the Linux client script doesn't support DHO_STATIC_ROUTES, and the FreeBSD script only does this routing magic for DHO_ROUTERS not DHO_STATIC_ROUTES. I'll try to find something authoritative on how we're 'supposed' to behave here.
Re: dhclient support for /32 assignments
Rfc 3442 is what I referred to. Ken On 3 Dec 2013 22:54, Matthew Dempsky matt...@dempsky.org wrote: On Tue, Dec 3, 2013 at 5:55 PM, Kenneth R Westerback kwesterb...@rogers.com wrote: Located here, the addition of the 255.255.255.255 route is not done in the presence of DHO_CLASSLESS_STATIC_ROUTES. As I recall only DHO_ROUTERS and DHO_STATIC_ROUTES are incompatible with DHO_CLASSLESS_STATIC_ROUTES. So we may want this chunk to occur unconditionally. I'm not opposed to that per se and I don't imagine it should cause any problems, but it would diverge somewhat from ISC DHCP's behavior. For reference, ISC DHCP 4.2.5-P1 doesn't support DHO_CLASSLESS_STATIC_ROUTES, the Linux client script doesn't support DHO_STATIC_ROUTES, and the FreeBSD script only does this routing magic for DHO_ROUTERS not DHO_STATIC_ROUTES. I'll try to find something authoritative on how we're 'supposed' to behave here.