Re: CVS commit: src/crypto/external/bsd/openssh/dist (reallocarray())

2019-03-09 Thread Geoff Wing
On Saturday 2019-03-09 07:35 +1100, Christos Zoulas output:
:Module Name:   src
:Committed By:  christos
:Date:  Fri Mar  8 20:34:24 UTC 2019
:
:Modified Files:
:   src/crypto/external/bsd/openssh/dist: recallocarray.c
:Log Message:
:Replace our buggy recallocarray implementation one with the portable one
:from OpenBSD.

This is interesting.  We still have libc/stdlib/reallocarr{,ay}.c
which implements recallocarray() in -lc
Every version of pkgsrc/news/inn I try - self built or downloaded from
nyftp.netbsd* segvs due to reallocarray() unless I hack around those calls.
Does this "external/bsd/openssh/..." fix only work for openssh?  Or does this
fix also affect the libc version we have?  (Not sure why we are duplicating
but I'll take any one which works)

[PS not pleased that ISC wanted to use this reallocarray() stuff]

Regards,
Geoff


Re: CVS commit: src (kern_export_address)

2018-12-05 Thread Geoff Wing
On Thursday 2018-12-06 05:16 +1100, Christos Zoulas output:
:Module Name:   src
:Committed By:  christos
:Date:  Wed Dec  5 18:16:51 UTC 2018
:
:Modified Files:
:   src/share/man/man7: sysctl.7
:   src/sys/dev: mm.c
:   src/sys/kern: init_sysctl.c kern_proc.c
:   src/sys/miscfs/procfs: procfs_linux.c
:   src/sys/sys: param.h proc.h sysctl.h
:
:Log Message:
:cvs rdiff -u -r1.221 -r1.222 src/sys/kern/kern_proc.c

Typo fix:

Index: sys/kern/kern_proc.c
===
RCS file: /cvsroot/src/sys/kern/kern_proc.c,v
retrieving revision 1.222
diff -u -r1.222 kern_proc.c
--- sys/kern/kern_proc.c5 Dec 2018 18:16:51 -   1.222
+++ sys/kern/kern_proc.c6 Dec 2018 06:04:59 -
@@ -223,7 +223,7 @@
 static int sysctl_security_expose_address(SYSCTLFN_PROTO);
 
 #ifdef KASLR
-static int kern_expose_address_= 0;
+static int kern_expose_address = 0;
 #else
 static int kern_expose_address = 1;
 #endif


npf changes (Re: CVS commit: src)

2018-09-30 Thread Geoff Wing
On Sunday 2018-09-30 00:41 +1000, Mindaugas Rasiukevicius output:
:Module Name:   src
:Committed By:  rmind
:Date:  Sat Sep 29 14:41:37 UTC 2018
:
:Modified Files:
[...elided...]
:Log Message:
:NPF: Major rework -- migrate NPF to the libnv library.
:- This conversion significantly simplifies the code and moves NPF to
:  a binary serialisation format (replacing the XML-like format).
:- Fix some memory/reference leaks and possibly use-after-free bugs.
:- Bump NPF_VERSION as this change makes libnpf incompatible with the
:  previous versions.  Also, different serialisation format means NPF
:  connection/config saving and loading is not compatible with the
:  previous versions either.
:
:Thanks to christos@ for extra testing.

Hi,
should this have a version bump?  Old npfctl won't work with the new lib.

Regards,
Geoff


Re: Register new acronym in wtf(6) (Re: CVS commit: src/share/misc)

2018-05-05 Thread Geoff Wing
On Friday 2018-05-04 03:01 +1000, Kamil Rytarowski output:
:Module Name:   src
:Committed By:  kamil
:Date:  Thu May  3 17:01:09 UTC 2018
:
:Modified Files:
:   src/share/misc: acronyms
:
:Log Message:
:Register new acronym in wtf(6)
:
:VLCvariable length array
:Noted by 
:cvs rdiff -u -r1.266 -r1.267 src/share/misc/acronyms

VLC = Variable Length Code (or the video player I use)
VLA = Variable Length Array

Am I missing something?

Regards,
Geoff


Add a manual for netpgp(3lua) (Re: CVS commit: src)

2018-04-29 Thread Geoff Wing
On Monday 2018-04-30 11:10 +1000, Sevan Janiyan output:
:Module Name:   src
:Committed By:  sevan
:Date:  Mon Apr 30 01:10:14 UTC 2018
:
:Modified Files:
:   src/distrib/sets/lists/man: mi
:   src/share/man/man3lua: Makefile intro.3lua
:Added Files:
:   src/share/man/man3lua: netpgp.3lua
:
:Log Message:
:Add a manual for netpgp(3lua)
:
:
:To generate a diff of this commit:
:cvs rdiff -u -r1.1577 -r1.1578 src/distrib/sets/lists/man/mi
:cvs rdiff -u -r1.4 -r1.5 src/share/man/man3lua/Makefile
:cvs rdiff -u -r1.7 -r1.8 src/share/man/man3lua/intro.3lua
:cvs rdiff -u -r0 -r1.1 src/share/man/man3lua/netpgp.3lua

There is a typo in the Makefile.

Regards,
Geoff


Index: share/man/man3lua/Makefile
===
RCS file: /cvsroot/src/share/man/man3lua/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- share/man/man3lua/Makefile  30 Apr 2018 01:10:13 -  1.5
+++ share/man/man3lua/Makefile  30 Apr 2018 04:59:07 -
@@ -1,6 +1,6 @@
 #  $NetBSD: Makefile,v 1.5 2018/04/30 01:10:13 sevan Exp $
 
-MAN=   gpio.3lua intro.3lua netpgp3.lua sqlite.3lua syslog.3lua
+MAN=   gpio.3lua intro.3lua netpgp.3lua sqlite.3lua syslog.3lua
 
 MLINKS+=gpio.3lua gpio.open.3lua \
gpio.3lua gpio.info.3lua \


Re: CVS commit: src/sys/arch/amd64/include

2017-11-12 Thread Geoff Wing
On Sunday 2017-11-12 07:24 +1100, matthew green output:
:Module Name:   src
:Committed By:  mrg
:Date:  Sat Nov 11 20:23:49 UTC 2017
:Modified Files:
:   src/sys/arch/amd64/include: vmparam.h
:Log Message:
:bump PAGER_MAP_DEFAULT_SIZE to 512MB.  this should allow more
:concurrent IOs to be possible, and i'm unable to see pager_map
:contention any more.
:other larger platforms should probably do this too.
[...]
:cvs rdiff -u -r1.43 -r1.44 src/sys/arch/amd64/include/vmparam.h

[...]
+ * Default pager_map of 16MB is awfully small.  There is have plenty
+ * of VA so use it.
[...]

It's only in a comment but "...is have..."?

Regards,
Geoff


Re: CVS commit: src (postinstall changes for mtree)

2010-04-26 Thread Geoff Wing
On Friday 2010-04-23 19:21 +, David Young output:
:Module Name:   src
:Committed By:  dyoung
:Date:  Fri Apr 23 19:21:08 UTC 2010
:
:Modified Files:
:   src/etc/mtree: Makefile
:   src/usr.sbin/postinstall: postinstall
:
:Log Message:
:Do not try in postinstall(8) to replicate the code in etc/mtree/Makefile
:that assembles /etc/mtree/NetBSD.dist.  Instead, use the Makefile's
:new target, emit_dist_file, to assemble the correct NetBSD.dist.
:
:Previously, 'postinstall -m amd64 -s $SRC_TOP' would install a
:NetBSD.dist that was missing /usr/lib/i386/ et cetera.

This presumes that every system where you wish to run "postinstall" has
access and availability to their system's tooldir "nbcat".  If you use
the "build.sh" system with the "-T" option instead of using /etc/mk.conf
then it fails.  It's also annoying for updating multiple hosts with
network mounted sources.

Regards,
Geoff


Re: CVS commit: src/sys (sched_pstats() + uvm_meter()/uvm_loadav())

2010-04-19 Thread Geoff Wing
On Friday 2010-04-16 03:21 +, Mindaugas Rasiukevicius output:
:Module Name:   src
:Committed By:  rmind
:Date:  Fri Apr 16 03:21:49 UTC 2010
:Modified Files:
:   src/sys/kern: kern_synch.c
:   src/sys/sys: sched.h
:   src/sys/uvm: uvm_extern.h uvm_glue.c uvm_meter.c
:
:Log Message:
:- Merge sched_pstats() and uvm_meter()/uvm_loadav().  Avoids double loop
:  through all LWPs and duplicate locking overhead.
:
:- Move sched_pstats() from soft-interrupt context to process 0 main loop.
:  Avoids blocking effect on real-time threads.  Mostly fixes PR/38792.
:
:Note: it might be worth to move the loop above PRI_PGDAEMON.  Also,
:sched_pstats() might be cleaned-up slightly.
:
:To generate a diff of this commit:
:cvs rdiff -u -r1.280 -r1.281 src/sys/kern/kern_synch.c

Something is funny with this new merged "load average" calculation.

% uptime
 2:06PM  up 33 mins, 1 user, load averages: 11.04, 11.03, 9.96
%

It should be showing about a tenth of that.

This is i386 with SMP (Core2Duo).

Regards,
Geoff


Re: CVS commit: src/sys/dev/wscons (wsemul_vt100.c)

2010-02-10 Thread Geoff Wing
On Wednesday 2010-02-10 22:25 +, Nick Hudson output:
:Module Name:   src
:Committed By:  skrll
:Date:  Wed Feb 10 22:25:08 UTC 2010
:
:Modified Files:
:   src/sys/dev/wscons: wsemul_vt100.c
:
:Log Message:
:Remove accidental commit.
:cvs rdiff -u -r1.33 -r1.34 src/sys/dev/wscons/wsemul_vt100.c

We needed the accidental commit!  :-)
This reversal removed variables that were being used.

Regards,
Geoff

diff -u -r1.33 -r1.34
--- wsemul_vt100.c  10 Feb 2010 20:54:46 -  1.33
+++ wsemul_vt100.c  10 Feb 2010 22:25:08 -  1.34
[...]
@@ -1009,7 +1009,6 @@
 wsemul_vt100_getmsgattrs(void *cookie, struct wsdisplay_msgattrs *ma)
 {
struct wsemul_vt100_emuldata *edp = cookie;
-   struct vt100base_data *vd = &edp->bd;
 
*ma = vd->msgattrs;
 }
@@ -1021,7 +1020,6 @@
int error;
long tmp;
struct wsemul_vt100_emuldata *edp = cookie;
-   struct vt100base_data *vd = &edp->bd;
 
vd->msgattrs = *ma;
if (type->capabilities & WSSCREEN_WSCOLORS) {


Re: CVS commit: src/sys/uvm (uvm_fault.c)

2010-02-04 Thread Geoff Wing
On Thursday 2010-02-04 05:48 +, Masao Uebayashi output:
:Module Name:   src
:Committed By:  uebayasi
:Date:  Thu Feb  4 05:48:26 UTC 2010
:Modified Files:
:   src/sys/uvm: uvm_fault.c

One of the recent changes added a variable only used in KASSERT()s
thus will need a check for non-DIAGNOSTIC builds.

Regards,
Geoff

Index: sys/uvm/uvm_fault.c
===
RCS file: /cvsroot/src/sys/uvm/uvm_fault.c,v
retrieving revision 1.161
diff -u -r1.161 uvm_fault.c
--- sys/uvm/uvm_fault.c 4 Feb 2010 05:48:26 -   1.161
+++ sys/uvm/uvm_fault.c 5 Feb 2010 00:26:22 -
@@ -1210,7 +1210,9 @@
struct uvm_faultinfo *ufi, struct uvm_faultctx *flt,
struct vm_page **pages)
 {
+#ifdef DIAGNOSTIC
struct vm_amap *amap = ufi->entry->aref.ar_amap;
+#endif
struct uvm_object *uobj = ufi->entry->object.uvm_obj;
struct vm_page *uobjpage;
 


Re: CVS commit: src/doc (fix grammar: a -> an)

2009-10-02 Thread Geoff Wing
On Friday 2009-10-02 07:17 +, Christoph Egger output:
:Module Name:   src
:Committed By:  cegger
:Date:  Fri Oct  2 07:17:16 UTC 2009
:
:Modified Files:
:   src/doc: BUILDING.mdoc CHANGES CHANGES.prev
:   src/doc/roadmaps: storage
:
:Log Message:
:fix grammar: a -> an
:
:To generate a diff of this commit:
:cvs rdiff -u -r1.77 -r1.78 src/doc/BUILDING.mdoc
:cvs rdiff -u -r1.1297 -r1.1298 src/doc/CHANGES
:cvs rdiff -u -r1.95 -r1.96 src/doc/CHANGES.prev
:cvs rdiff -u -r1.5 -r1.6 src/doc/roadmaps/storage

You're kidding, right?  The only correct change is in doc/CHANGES.

Regards,
Geoff


Re: CVS commit: src/sys/ddb (db_access.c:1.20)

2009-09-27 Thread Geoff Wing
On Sunday 2009-09-27 18:24 +, Hiroyuki Bessho output:
:Module Name:   src
:Committed By:  bsh
:Date:  Sun Sep 27 18:24:23 UTC 2009
:
:Modified Files:
:   src/sys/ddb: db_access.c files.ddb
:
:Log Message:
:kgdb still needs db_{get,put}_value in ddb/db_access.c when SOFTWARE_SSTEP is 
defined in db_machdep.h.
:cvs rdiff -u -r1.19 -r1.20 src/sys/ddb/db_access.c
...
+#include "opt_kgdb.h"
...
+ * This file is shared by ddb and kgdb.
...

Unfortunately it's also shared with usr.sbin/crash

The include will need a "#ifdef _KERNEL_OPT" wrapper and
something extra to get all this included in crash(8).

Regards,
Geoff


hdaudio headers (Re: CVS commit: src/distrib/sets/lists/comp)

2009-09-17 Thread Geoff Wing
On Thursday 2009-09-17 08:55 +, Stephen Borrill output:
:Module Name:   src
:Committed By:  sborrill
:Date:  Thu Sep 17 08:55:19 UTC 2009
:
:Modified Files:
:   src/distrib/sets/lists/comp: mi
:
:Log Message:
:Add hdaudio headers
[...]
:cvs rdiff -u -r1.1311 -r1.1312 src/distrib/sets/lists/comp/mi

Matt added them already.  Maybe someone should run these lists through sort.

Regards,
Geoff



Re: CVS commit: src/usr.sbin/puffs/rump_smbfs

2009-09-10 Thread Geoff Wing
On Thursday 2009-09-10 13:55 +0300, Antti Kantee output:
:No, that is *absolutely the wrong thing*, since while it might make
:the build work, it breaks the resulting binary.  I'm a bit baffled that
:breakage like that was committed to rump_nfs/Makefile in the first place.
:
:It seems there is a regression in binutils 2.19 which prevents the
:standard DOMAIN_DEFINE() macro from working.  I suggest reverting back
:to 2.16 until the cause is identified and the bug is fixed.

No, that's a red herring.  The problem is a long-standing one with
sys/kern/uipc_domain.c (from rev 1.49 2005/01/23 onwards).

Someone has it use link sets without ever creating a section header so
that they actually work properly.  This caused librumpnet.so to also
have a bad copy.  With the following initial patch, you should see
a link section with "objdump -h".  The second patch just removes the
other wrong build stuff.

Regards,
Geoff

Index: sys/kern/uipc_domain.c
===
RCS file: /cvsroot/src/sys/kern/uipc_domain.c,v
retrieving revision 1.83
diff -u -r1.83 uipc_domain.c
--- sys/kern/uipc_domain.c  8 Sep 2009 18:01:34 -   1.83
+++ sys/kern/uipc_domain.c  11 Sep 2009 04:25:50 -
@@ -76,6 +76,9 @@
 static struct sysctllog *domain_sysctllog;
 static void sysctl_net_setup(void);
 
+static struct domain dummy_static_domain;
+__link_set_add_bss(domains, dummy_static_domain);
+
 void
 domaininit(bool addroute)
 {

Index: usr.sbin/puffs/rump_nfs/Makefile
===
RCS file: /cvsroot/src/usr.sbin/puffs/rump_nfs/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- usr.sbin/puffs/rump_nfs/Makefile21 Aug 2009 14:41:22 -  1.4
+++ usr.sbin/puffs/rump_nfs/Makefile11 Sep 2009 04:26:11 -
@@ -20,9 +20,6 @@
 #LDADD+=   -lrumpfs_nfs -lrumpnet -lrumpnet_net -lrumpnet_netinet  \
-lrumpnet_virtif
 
-LDFLAGS+=  -Wl,--ignore-unresolved-symbol,__start_link_set_domains
-LDFLAGS+=  -Wl,--ignore-unresolved-symbol,__stop_link_set_domains
-
 ISRUMP=# gives me nightmares
 #CPPFLAGS+=-DINET6 # for getnfsargs?
 


Re: CVS commit: src/usr.sbin/puffs/rump_smbfs

2009-09-09 Thread Geoff Wing
On Sunday 2009-09-06 20:26 +, Antti Kantee output:
:Module Name:   src
:Committed By:  pooka
:Date:  Sun Sep  6 20:26:47 UTC 2009
:Added Files:
:   src/usr.sbin/puffs/rump_smbfs: Makefile rump_smbfs.8 rump_smbfs.c
:   smb_rumpops.c
:Log Message:
:Add rump_smbfs.
[...]
:cvs rdiff -u -r0 -r1.1 src/usr.sbin/puffs/rump_smbfs/Makefile \
[...]

When I did a build, it seemed to need the following patch to link
(stolen from rump_nfs/Makefile).  Is it correct here?

Regards,
Geoff

PS. ``descualified''?

Index: Makefile
===
RCS file: /cvsroot/src/usr.sbin/puffs/rump_smbfs/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- Makefile6 Sep 2009 20:26:47 -   1.1
+++ Makefile10 Sep 2009 04:07:20 -
@@ -9,6 +9,9 @@
 LDADD+=-lrumpnet_netinet -lrumpnet_sockin -lrumpnet
 LDADD+=-lrumpcrypto -lrumpdev_netsmb -lrumpdev
 
+LDFLAGS+=  -Wl,--ignore-unresolved-symbol,__start_link_set_domains
+LDFLAGS+=  -Wl,--ignore-unresolved-symbol,__stop_link_set_domains
+
 ISRUMP=# it is
 
 .include "${.CURDIR}/../../../sbin/mount_smbfs/Makefile.inc"


Re: CVS commit: src (gpio)

2009-08-04 Thread Geoff Wing
On Saturday 2009-07-25 16:20 +, Marc Balmer output:
:Module Name:   src
:Committed By:  mbalmer
:Date:  Sat Jul 25 16:20:11 UTC 2009
[...]
:Added Files:
:   src/etc: gpio.conf
:   src/etc/rc.d: gpio
:   src/share/man/man5: gpio.conf.5

Add postinstall(8) stuff, please.

Regards,
Geoff

Index: usr.sbin/postinstall/postinstall
===
RCS file: /cvsroot/src/usr.sbin/postinstall/postinstall,v
retrieving revision 1.100
diff -u -r1.100 postinstall
--- usr.sbin/postinstall/postinstall20 Jul 2009 21:03:42 -  1.100
+++ usr.sbin/postinstall/postinstall4 Aug 2009 07:08:19 -
@@ -997,6 +997,7 @@
ccd cgd cleartmp cron \
dhclient dhcpcd dhcpd dhcrelay dmesg downinterfaces envsys \
fsck fsck_root ftp_proxy ftpd \
+   gpio \
hostapd httpd \
identd ifwatchd inetd ipfilter ipfs ipmon ipnat ipsec \
irdaattach iscsi_target isdnd \


Re: CVS commit: src/lib

2009-07-20 Thread Geoff Wing
On Monday 2009-07-20 12:16 +, Nick Hudson output:
:Module Name:   src
:Committed By:  skrll
:Date:  Mon Jul 20 12:16:37 UTC 2009
:
:Modified Files:
:   src/lib/libhx509: Makefile
:   src/lib/libkrb5: Makefile
:   src/lib/libradius: Makefile
:
:Log Message:
:libcrypto moved.

Are you really going to do them all or wait for Christos (to wake up)?

You'll need to fix all these plus fix how stuff (e.g. usr.bin/openssl) works
with crypto/Makefile.openssl

crypto/external/bsd/netpgp/lib/Makefile
crypto/external/bsd/openssh/lib/Makefile
crypto/external/bsd/openssl/dist/Makefile
external/bsd/bind/Makefile.inc
external/bsd/fetch/lib/Makefile
external/bsd/openldap/lib/libldap/Makefile.libldap
lib/libgssapi/Makefile
lib/libhx509/Makefile
lib/libkrb5/Makefile
lib/libpam/modules/pam_afslog/Makefile
lib/libpam/modules/pam_krb5/Makefile
lib/libpam/modules/pam_ksu/Makefile
lib/libpam/modules/pam_ssh/Makefile
lib/libradius/Makefile
lib/libssh/Makefile

external/bsd/openldap/dist/libraries/libldap/tls.c (this needs a "const" added)

Regards,
Geoff


Re: CVS commit: src (getdelim.c:1.1)

2009-07-14 Thread Geoff Wing
On Wednesday 2009-07-15 02:03 +1000, Geoff Wing output:
:Of course, since the comparison is with SSIZE_MAX (as the maximum of the
:signed numbers in that comparison) nothing is greater than it.  Or my
:understanding is really wonky.  Ah well, it is 2 a.m. here.

Or I just misread it.  Bleargh.  Ignore me.   The interweaving of size_t
and SSIZE_* confused me :-(

Regards,
Geoff


Re: CVS commit: src (getdelim.c:1.1)

2009-07-14 Thread Geoff Wing
On Tuesday 2009-07-14 16:46 +0100, Roy Marples output:
:-  newlen = off + len + 1;
:-  /* Ensure that the resultant buffer length fits in ssize_t */
:-  if (newlen > (size_t)SSIZE_MAX + 1) {
:+  newlen = off + len;
:+  /* Ensure that the resultant buffer length fits in ssize_t. */
:+  if (newlen > SSIZE_MAX) {

I may have explained this poorly.  "newlen", "off" and "len" are
signed numbers.  If the addition "off + len" overflows ssize_t (also signed),
then "newlen" is now negative and will never be greater than SSIZE_MAX.  Yes?

Of course, since the comparison is with SSIZE_MAX (as the maximum of the
signed numbers in that comparison) nothing is greater than it.  Or my
understanding is really wonky.  Ah well, it is 2 a.m. here.

Regards,
Geoff


Re: CVS commit: src (getdelim.c:1.1)

2009-07-13 Thread Geoff Wing
On Tuesday 2009-07-14 11:50 +1000, matthew green output:
:   -   newlen = off + len + 1;
:   /* Ensure that the resultant buffer length fits in ssize_t */
:   -   if (newlen > (size_t)SSIZE_MAX + 1) {
:   +   if (off + len + 1 > (unsigned int)SSIZE_MAX) {

:unsigned int will truncate this on 64 bit platforms, won't it?
:can't the cast just be removed?

I guess so.  I don't remember how the compiler chooses the comparison
for this.  "off", "len" and "SSIZE_MAX" are all ``ssize_t''.  I would
have thought you needed to expand one of them at least (even if, as you
say, ``unsigned int'' is the wrong choice here) to get a correct
comparison generated but I guess my C skills are a bit rusty.

Regards,
Geoff


Re: CVS commit: src (getdelim/getline distrib set entries)

2009-07-13 Thread Geoff Wing
On Monday 2009-07-13 22:19 +, Roy Marples output:
:Module Name:   src
:Committed By:  roy
:Date:  Mon Jul 13 22:19:25 UTC 2009
:
:Modified Files:
:   src/distrib/sets/lists/comp: mi
:   src/include: stdio.h
:   src/lib/libc/stdio: Makefile.inc stdio.3
:Added Files:
:   src/lib/libc/stdio: getdelim.3 getdelim.c getline.c
:
:Log Message:
:Add implementations for getdelim(3) and getline(3).
[...]
:To generate a diff of this commit:
:cvs rdiff -u -r1.1277 -r1.1278 src/distrib/sets/lists/comp/mi

Needs HTML pages also.

Regards,
Geoff

Index: distrib/sets/lists/comp/mi
===
RCS file: /cvsroot/src/distrib/sets/lists/comp/mi,v
retrieving revision 1.1278
diff -u -r1.1278 mi
--- distrib/sets/lists/comp/mi  13 Jul 2009 22:19:24 -  1.1278
+++ distrib/sets/lists/comp/mi  14 Jul 2009 01:40:42 -
@@ -11054,6 +11054,7 @@
 ./usr/share/man/html3/getcwd.html  comp-c-htmlman  html
 ./usr/share/man/html3/getdate.html comp-c-htmlman  html
 ./usr/share/man/html3/getdate_err.html comp-c-htmlman  html
+./usr/share/man/html3/getdelim.htmlcomp-c-htmlman  html
 ./usr/share/man/html3/getdevmajor.html comp-c-htmlman  html
 ./usr/share/man/html3/getdirentries.html   comp-c-htmlman  html
 ./usr/share/man/html3/getdiskbyname.html   comp-c-htmlman  html
@@ -11082,6 +11083,7 @@
 ./usr/share/man/html3/getlabeloffset.html  comp-c-htmlman  html
 ./usr/share/man/html3/getlabelsector.html  comp-c-htmlman  html
 ./usr/share/man/html3/getlastlogx.html comp-c-htmlman  html
+./usr/share/man/html3/getline.html comp-c-htmlman  html
 ./usr/share/man/html3/getloadavg.html  comp-c-htmlman  html
 ./usr/share/man/html3/getmaxpartitions.htmlcomp-c-htmlman  html
 ./usr/share/man/html3/getmaxx.html comp-c-htmlman  html


Re: CVS commit: src (getdelim.c:1.1)

2009-07-13 Thread Geoff Wing
On Monday 2009-07-13 22:19 +, Roy Marples output:
:Module Name:   src
:Committed By:  roy
:Date:  Mon Jul 13 22:19:25 UTC 2009
:
:Modified Files:
:   src/distrib/sets/lists/comp: mi
:   src/include: stdio.h
:   src/lib/libc/stdio: Makefile.inc stdio.3
:Added Files:
:   src/lib/libc/stdio: getdelim.3 getdelim.c getline.c
:
:Log Message:
:Add implementations for getdelim(3) and getline(3).
[...]
:cvs rdiff -u -r0 -r1.1 src/lib/libc/stdio/getdelim.3 \
:src/lib/libc/stdio/getdelim.c src/lib/libc/stdio/getline.c

arg #3 of memchr() is size_t.

I don't know how "Ensure that the resultant buffer length fits in ssize_t"
is supposed to work.  You're promoting SSIZE_MAX from ssize_t to ssize_t,
then comparing with an already possibly overflowed variable "newlen". 
Also I didn't really look through the code so I don't know why you added
an extra one there in the comparison.

Maybe you want something like the following.

Regards,
Geoff

Index: lib/libc/stdio/getdelim.c
===
RCS file: /cvsroot/src/lib/libc/stdio/getdelim.c,v
retrieving revision 1.1
diff -u -r1.1 getdelim.c
--- lib/libc/stdio/getdelim.c   13 Jul 2009 22:19:25 -  1.1
+++ lib/libc/stdio/getdelim.c   14 Jul 2009 01:13:02 -
@@ -79,18 +79,18 @@
}
 
/* Scan through looking for the separator */
-   p = memchr(fp->_p, sep, fp->_r);
+   p = memchr(fp->_p, sep, (size_t)fp->_r);
if (p == NULL)
len = fp->_r;
else
len = (p - fp->_p) + 1;
 
-   newlen = off + len + 1;
/* Ensure that the resultant buffer length fits in ssize_t */
-   if (newlen > (size_t)SSIZE_MAX + 1) {
+   if (off + len + 1 > (unsigned int)SSIZE_MAX) {
errno = EOVERFLOW;
goto error;
}
+   newlen = off + len + 1;
if (newlen > *buflen) {
if (newlen < MINBUF)
newlen = MINBUF;


Re: CVS commit: src/sys/arch

2009-06-28 Thread Geoff Wing
On Saturday 2009-06-27 10:18 +0200, vinc...@labri.fr output:
:David Young  writes:
:> And here is the new order:
:> A1 dump core
:> A2 sync filesystems and TOD clock
:I think this deserves a heads-up to users because I, for one, usually
:hardware reboot my computer while it dumps its GBs of RAM to the disk.

Don't you have sysctl machdep.sparse_dump on your architecture?
Then what about "echo kern.dump_on_panic=0 >>/etc/sysctl.conf"?

Regards,
Geoff


Re: CVS commit: src (dist/ipf/ipsend/sock.c:1.15)

2009-05-28 Thread Geoff Wing
On Monday 2009-05-25 00:15 +0200, Bernd Ernesti output:
:On Sun, May 24, 2009 at 09:41:44PM +, Andrew Doran wrote:
:> Committed By:ad
:> Date:Sun May 24 21:41:44 UTC 2009
:> Modified Files:
:>  src/dist/ipf/ipsend: sock.c
:>  src/usr.bin/fstat: fstat.c
:> Log Message:
:> More changes to improve kern_descrip.c.
:
:Hmm, is the __NetBSD__Version__ check correct in src/dist/ipf/ipsend/sock.c ?
:It looks revered. You added some new code, but the check enables
:the old code for -current.
:IMHO the
: __NetBSD__Version__ >= 599001200
:should be changed to
: __NetBSD__Version__ < 599001200

This one seems to have fallen through the cracks.  It works for current
since the variable isn't spelt correctly.

Regards,
Geoff

Index: dist/ipf/ipsend/sock.c
===
RCS file: /cvsroot/src/dist/ipf/ipsend/sock.c,v
retrieving revision 1.15
diff -u -r1.15 sock.c
--- dist/ipf/ipsend/sock.c  24 May 2009 21:41:44 -  1.15
+++ dist/ipf/ipsend/sock.c  29 May 2009 00:05:45 -
@@ -329,7 +329,7 @@
t = NULL;
 
o = (struct file **)calloc(1, sizeof(*o) * (fd->fd_lastfile + 1));
-#if defined(__NetBSD_Version__)  && __NetBSD__Version__ >= 599001200
+#if defined(__NetBSD_Version__)  && __NetBSD_Version__ < 599001200
if (KMCPY(o, fd->fd_ofiles, (fd->fd_lastfile + 1) * sizeof(*o)) == -1)
{
fprintf(stderr, "read(%#lx,%#lx,%lu) - u_ofile - failed\n",


Re: kern/40969 (Was: commit: src/sys/netkey (key.c:1.175))

2009-05-11 Thread Geoff Wing
On Monday 2009-05-11 11:00 +, Stephen Degler output:
:Module Name:   src
:Committed By:  skd
:Date:  Mon May 11 11:00:51 UTC 2009
:
:Modified Files:
:   src/sys/netkey: key.c
:
:Log Message:
:Fix the sense of two compares. I previously broke this.
:
:cvs rdiff -u -r1.174 -r1.175 src/sys/netkey/key.c

Fixes PR #40969

Regards,
Geoff


Re: CVS commit: src/sys/dev/ic (hme.c:1.77)

2009-05-06 Thread Geoff Wing
On Wednesday 2009-05-06 20:40 +, Julian Coleman output:
:Module Name:   src
:Committed By:  jdc
:Date:  Wed May  6 20:40:19 UTC 2009
:
:Modified Files:
:   src/sys/dev/ic: hme.c
:
:Log Message:
:Check for internal PHY first, so that it always attaches first, even when
:we have an MII transeiver attached.
:Count all collision and error counters.
:Handle counter overflow and RXTERR.
:
:Tested on U60 HME, PCI HME (501-5019) and SBus Sunswift (501-2739)
[...]
:cvs rdiff -u -r1.76 -r1.77 src/sys/dev/ic/hme.c

Did you forget to commit hmereg.h?

Regards,
Geoff


Re: CVS commit: src/usr.bin/ftp

2009-04-23 Thread Geoff Wing
On Sunday 2009-04-12 10:18 +, Luke Mewburn output:
:Module Name:   src
:Committed By:  lukem
:Date:  Sun Apr 12 10:18:52 UTC 2009
:
:Modified Files:
:   src/usr.bin/ftp: cmds.c cmdtab.c complete.c domacro.c extern.h fetch.c
:   ftp.c ftp_var.h main.c progressbar.c progressbar.h util.c version.h
:
:Log Message:
:Fix numerous WARNS=4 issues (-Wcast-qual -Wsign-compare).
:cvs rdiff -u -r1.114 -r1.115 src/usr.bin/ftp/main.c


@@ -570,7 +574,7 @@
anonftp = 0;
autologin = 0;
}
-   setpeer(argc+1, xargv);
+   setpeer(3, xargv);
autologin = oautologin;
if (connected == 1 && uuser != NULL)
(void)ftp_login(host, uuser, NULL);


This is a functional change, not a WARNS=4 issue.  And it's wrong.

Try "ftp ", e.g.
% ftp ftp.netbsd.org.

Regards,
Geoff