Re: CVS commit: src/sys/kern

2014-07-25 Thread Maxime Villard
Le 25/07/2014 10:25, David A. Holland a écrit : Module Name: src Committed By: dholland Date: Fri Jul 25 08:25:47 UTC 2014 Modified Files: src/sys/kern: syscalls.master vfs_syscalls.c Log Message: Add fdiscard and posix_fallocate syscalls. To generate a diff of

Re: CVS commit: src/sys/kern

2014-07-25 Thread David Holland
On Fri, Jul 25, 2014 at 11:21:47AM +0200, Maxime Villard wrote: Log Message: Add fdiscard and posix_fallocate syscalls. I think 'error' instead of 'result' is better; it makes clear that it's an error code, and it's consistent with the other functions in the file. ! If you care that

Re: CVS commit: src/sys/kern

2014-07-25 Thread Maxime Villard
Le 25/07/2014 16:47, David Holland a écrit : On Fri, Jul 25, 2014 at 11:21:47AM +0200, Maxime Villard wrote: Log Message: Add fdiscard and posix_fallocate syscalls. I think 'error' instead of 'result' is better; it makes clear that it's an error code, and it's consistent with

Re: CVS commit: src/sys/kern

2014-07-03 Thread Maxime Villard
Maxime Villard m...@netbsd.org wrote: |Module Name: src |Committed By: maxv |Date: Tue Jun 24 07:28:23 UTC 2014 | |Modified Files: | src/sys/kern: subr_kmem.c | |Log Message: |KMEM_REDZONE+KMEM_POISON is supposed to detect buffer overflows. But it only |poisons memory

Re: CVS commit: src/sys/kern

2014-07-03 Thread Steffen Nurpmeso
Maxime Villard m...@m00nbsd.net wrote: |That was in my TODO list, it's fixed in r1.59. Oh please, did you hear me complain? It is NetBSD in the end. (Cute :-) --steffen

Re: CVS commit: src/sys/kern

2014-07-03 Thread Maxime Villard
Le 03/07/2014 16:47, Steffen Nurpmeso a écrit : Maxime Villard m...@m00nbsd.net wrote: |Le 03/07/2014 15:59, Steffen Nurpmeso a écrit : | | Maxime Villard m...@m00nbsd.net wrote: ||That was in my TODO list, it's fixed in r1.59. | | Oh please, did you hear me complain? | It is

Re: CVS commit: src/sys/kern

2014-06-24 Thread Steffen Nurpmeso
Maxime Villard m...@netbsd.org wrote: |Module Name: src |Committed By: maxv |Date: Tue Jun 24 07:28:23 UTC 2014 | |Modified Files: | src/sys/kern: subr_kmem.c | |Log Message: |KMEM_REDZONE+KMEM_POISON is supposed to detect buffer overflows. But it only |poisons memory after

Re: CVS commit: src/sys/kern

2014-06-15 Thread J. Hannken-Illjes
On 14 Jun 2014, at 18:12, Joerg Sonnenberger jo...@netbsd.org wrote: Module Name: src Committed By: joerg Date: Sat Jun 14 16:12:34 UTC 2014 Modified Files: src/sys/kern: vfs_cache.c Log Message: Make the stat mutex a leaf. XXX Use atomic counters. This cannot work. We

re: CVS commit: src/sys/kern

2014-04-27 Thread David Brownlee
I'm away from my machine, but I believe the simple test for this is to build.sh a kernel and see if nm shows pool_head On 26 Apr 2014 20:11, matthew green m...@eterna.com.au wrote: David Brownlee writes: Module Name: src Committed By: abs Date: Sat Apr 26 16:30:05 UTC 2014

re: CVS commit: src/sys/kern

2014-04-26 Thread matthew green
David Brownlee writes: Module Name: src Committed By: abs Date: Sat Apr 26 16:30:05 UTC 2014 Modified Files: src/sys/kern: subr_pool.c Log Message: Ensure pool_head is non static - for vmstat -i did this use to work? does it work if you build your kernel with GCC 4.5?

Re: CVS commit: src/sys/kern

2014-04-16 Thread J. Hannken-Illjes
On 15 Apr 2014, at 20:18, Taylor R Campbell campbell+netbsd-source-change...@mumble.net wrote: Date: Tue, 15 Apr 2014 09:50:45 + From: Juergen Hannken-Illjes hann...@netbsd.org Fix a deadlock where one thread exits, enters fstrans_lwp_dtor() and wants fstrans_lock. This

Re: CVS commit: src/sys/kern

2014-04-15 Thread Taylor R Campbell
Date: Tue, 15 Apr 2014 09:50:45 + From: Juergen Hannken-Illjes hann...@netbsd.org Fix a deadlock where one thread exits, enters fstrans_lwp_dtor() and wants fstrans_lock. This thread holds the proc_lock. This sounds fishy. lwp_exit does not hold proc_lock while calling

re: CVS commit: src/sys/kern

2014-04-13 Thread matthew green
btw, why do you keep adding 4 space idented { } ? To narrow local var scopes. They should go away eventually... please do not commit these to the tree, keep them as local changes. .mrg.

Re: CVS commit: src/sys/kern

2014-04-12 Thread Christos Zoulas
In article 20140412150856.b6ca...@cvs.netbsd.org, Masao Uebayashi source-changes-d@NetBSD.org wrote: -=-=-=-=-=- - /* setup new registers and do misc. setup. */ - (*epp-ep_esch-es_emul-e_setregs)(l, epp, data-ed_newstack); +{ No need for braces, we use c99 in the kernel. christos

Re: CVS commit: src/sys/kern

2014-04-12 Thread Nick Hudson
On 04/12/14 16:08, Masao Uebayashi wrote: Module Name:src Committed By: uebayasi Date: Sat Apr 12 15:08:56 UTC 2014 Modified Files: src/sys/kern: kern_exec.c Log Message: execve_runproc: Correct thinko in Rev. 1.386; the new SP always points to after (higher adderss)

Re: CVS commit: src/sys/kern

2014-04-12 Thread Masao Uebayashi
On Sun, Apr 13, 2014 at 12:33 AM, Nick Hudson sk...@netbsd.org wrote: On 04/12/14 16:08, Masao Uebayashi wrote: Module Name:src Committed By: uebayasi Date: Sat Apr 12 15:08:56 UTC 2014 Modified Files: src/sys/kern: kern_exec.c Log Message: execve_runproc:

Re: CVS commit: src/sys/kern

2014-03-06 Thread Alan Barrett
On Wed, 05 Mar 2014, Andreas Gustafsson wrote: Changing the types of existing sysctl variables breaks both source and binary compatibility and should not be done lightly; Changing the types without sufficient care can break source and binary compatibility. With sufficient care, compatibility

Re: CVS commit: src/sys/kern

2014-03-06 Thread David Laight
On Wed, Mar 05, 2014 at 06:04:02PM +0200, Andreas Gustafsson wrote: 2. I also object to the change of kern_syctl.c 1.247. This change attempts to work around the problems caused by the changes to the variable types by making sysctl() return different types depending on the value of the

Re: CVS commit: src/sys/kern

2014-03-05 Thread Andreas Gustafsson
On Feb 27, David Laight said: Module Name: src Committed By: dsl Date: Thu Feb 27 22:50:52 UTC 2014 Modified Files: src/sys/kern: kern_sysctl.c Log Message: Allow CTLTYPE_INT and CTLTYPE_QUAD to be read and written as either 4 or 8 byte values regardless of the type.

Re: CVS commit: src/sys/kern

2014-03-05 Thread Christos Zoulas
In article 21271.19186.176517.832...@guava.gson.org, Andreas Gustafsson g...@netbsd.org wrote: On Feb 27, David Laight said: Module Name: src Committed By:dsl Date:Thu Feb 27 22:50:52 UTC 2014 Modified Files: src/sys/kern: kern_sysctl.c Log Message: Allow

Re: CVS commit: src/sys/kern

2014-03-01 Thread David Laight
On Sat, Mar 01, 2014 at 08:31:42AM +0200, Alan Barrett wrote: On Thu, 27 Feb 2014, David Laight wrote: Modified Files: src/sys/kern: kern_sysctl.c +case CTLTYPE_INT: +/* Allow for 64bit read of 32bit value */ +if (*oldlenp == sizeof (uint64_t)) { +

Re: CVS commit: src/sys/kern

2014-02-28 Thread Alan Barrett
On Thu, 27 Feb 2014, David Laight wrote: Modified Files: src/sys/kern: kern_sysctl.c + case CTLTYPE_INT: + /* Allow for 64bit read of 32bit value */ + if (*oldlenp == sizeof (uint64_t)) { + qval = *(int *)d; +

Re: CVS commit: src/sys/kern

2014-01-12 Thread Martin Husemann
On Sun, Jan 12, 2014 at 03:17:43AM +, David Holland wrote: On Sun, Jan 12, 2014 at 02:13:34PM +1100, matthew green wrote: i do not want this for my serial console systems, or my systems that drop to ddb on crashes before (manual) rebooting. Surely it should be set up so it skips the

re: CVS commit: src/sys/kern

2014-01-11 Thread matthew green
Module Name: src Committed By: joerg Date: Sun Jan 12 00:29:15 UTC 2014 Modified Files: src/sys/kern: subr_prf.c Log Message: Revert, breaks the build due to missing rumpns_delay in librump.so. thanks. when this comes back, i'd rather it defaulted to zero but was a

Re: CVS commit: src/sys/kern

2014-01-11 Thread David Holland
On Sun, Jan 12, 2014 at 02:13:34PM +1100, matthew green wrote: Modified Files: src/sys/kern: subr_prf.c Log Message: Revert, breaks the build due to missing rumpns_delay in librump.so. thanks. when this comes back, i'd rather it defaulted to zero but was a sysctl

Re: CVS commit: src/sys/kern

2014-01-11 Thread Christos Zoulas
On Jan 12, 3:17am, dholland-sourcechan...@netbsd.org (David Holland) wrote: -- Subject: Re: CVS commit: src/sys/kern | On Sun, Jan 12, 2014 at 02:13:34PM +1100, matthew green wrote: |Modified Files: | src/sys/kern: subr_prf.c | |Log Message: |Revert, breaks the build due

Re: CVS commit: src/sys/kern

2013-12-31 Thread Christos Zoulas
In article 20131231171938.ga26...@netbsd.org, David Holland dholland-sourcechan...@netbsd.org wrote: On Tue, Dec 24, 2013 at 09:47:04AM -0500, Christos Zoulas wrote: Modified Files: src/sys/kern: kern_exec.c Log Message: replace strcpy with copystr and remove useless strcpy (Maxime

Re: CVS commit: src/sys/kern

2013-08-27 Thread Thor Lancelot Simon
On Tue, Aug 27, 2013 at 02:01:36PM +, Taylor R Campbell wrote: This is a stop-gap on a stop-gap on a stop-gap; we really ought to back out all of these stop-gaps, make bcm2835_rng call rnd_add_data asynchronously to work around the original symptom, and design a real solution when we

Re: CVS commit: src/sys/kern

2013-07-25 Thread Joerg Sonnenberger
On Tue, Jul 23, 2013 at 08:17:24AM +0100, David Laight wrote: On Mon, Jul 22, 2013 at 07:49:09AM +0100, Alexander Nasonov wrote: Taylor R Campbell wrote: This shouldn't be necessary: snprintf guarantees null termination. Did you observe a pool name without null termination in pool_init in

Re: CVS commit: src/sys/kern

2013-07-22 Thread Alexander Nasonov
Taylor R Campbell wrote: This shouldn't be necessary: snprintf guarantees null termination. Did you observe a pool name without null termination in pool_init in the wild? I misremembered how snprintf works then. I didn't observe it in the wild but some dtrace code uses long vmem names

Re: CVS commit: src/sys/kern

2013-04-21 Thread David Laight
On Sat, Apr 20, 2013 at 02:17:17PM -0700, Matt Thomas wrote: On Apr 20, 2013, at 11:04 AM, Christos Zoulas chris...@netbsd.org wrote: Module Name:src Committed By: christos Date: Sat Apr 20 18:04:41 UTC 2013 Modified Files: src/sys/kern:

Re: CVS commit: src/sys/kern

2013-04-21 Thread Matt Thomas
On Apr 21, 2013, at 2:15 AM, David Laight da...@l8s.co.uk wrote: On Sat, Apr 20, 2013 at 02:17:17PM -0700, Matt Thomas wrote: On Apr 20, 2013, at 11:04 AM, Christos Zoulas chris...@netbsd.org wrote: Module Name:src Committed By: christos Date: Sat Apr 20

Re: CVS commit: src/sys/kern

2013-04-20 Thread Matt Thomas
On Apr 20, 2013, at 11:04 AM, Christos Zoulas chris...@netbsd.org wrote: Module Name: src Committed By: christos Date: Sat Apr 20 18:04:41 UTC 2013 Modified Files: src/sys/kern: kern_exec.c Log Message: don't attempt to load elf64 on 32 bit machines if the load address

Re: CVS commit: src/sys/kern

2013-04-01 Thread Christos Zoulas
In article 20130401123134.dbf3b17...@cvs.netbsd.org, Martin Husemann source-changes-d@NetBSD.org wrote: - KASSERT(*timo 0); This should really not be failing since itimespecfix uses tick to correct the minimal timeout. christos

Re: CVS commit: src/sys/kern

2013-04-01 Thread Martin Husemann
On Mon, Apr 01, 2013 at 02:28:02PM +, Christos Zoulas wrote: In article 20130401123134.dbf3b17...@cvs.netbsd.org, Martin Husemann source-changes-d@NetBSD.org wrote: -KASSERT(*timo 0); This should really not be failing since itimespecfix uses tick to correct the minimal timeout. It

Re: CVS commit: src/sys/kern

2013-04-01 Thread Christos Zoulas
On Apr 1, 4:32pm, mar...@duskware.de (Martin Husemann) wrote: -- Subject: Re: CVS commit: src/sys/kern | On Mon, Apr 01, 2013 at 02:28:02PM +, Christos Zoulas wrote: | In article 20130401123134.dbf3b17...@cvs.netbsd.org, | Martin Husemann source-changes-d@NetBSD.org wrote: | - KASSERT

Re: CVS commit: src/sys/kern

2013-04-01 Thread Martin Husemann
On Mon, Apr 01, 2013 at 11:36:57AM -0400, Christos Zoulas wrote: Probably cleaner to check for it there? Maybe, but I wasn't sure about the other callers. There is similar code in itimerfix() and changing it there symetrically made a lot of things fail imediately, so I went for the simple fix.

Re: CVS commit: src/sys/kern

2013-04-01 Thread Christos Zoulas
On Apr 1, 6:20pm, mar...@duskware.de (Martin Husemann) wrote: -- Subject: Re: CVS commit: src/sys/kern | On Mon, Apr 01, 2013 at 11:36:57AM -0400, Christos Zoulas wrote: | Probably cleaner to check for it there? | | Maybe, but I wasn't sure about the other callers. There is similar | code

Re: CVS commit: src/sys/kern

2013-03-12 Thread David Laight
On Tue, Mar 12, 2013 at 01:31:21PM +1100, matthew green wrote: Modified Files: src/sys/kern: subr_pool.c Log Message: In pool_cache_put_slow(), pool_get() can block (it does mutex_enter()), so we need to retry if curlwp took a context switch during the call. I didn't

Re: CVS commit: src/sys/kern

2013-03-11 Thread David Laight
On Mon, Mar 11, 2013 at 09:37:54PM +, Antti Kantee wrote: Module Name: src Committed By: pooka Date: Mon Mar 11 21:37:54 UTC 2013 Modified Files: src/sys/kern: subr_pool.c Log Message: In pool_cache_put_slow(), pool_get() can block (it does mutex_enter()), so we need

Re: CVS commit: src/sys/kern

2013-03-11 Thread YAMAMOTO Takashi
hi, Module Name: src Committed By: pooka Date: Mon Mar 11 21:37:54 UTC 2013 Modified Files: src/sys/kern: subr_pool.c Log Message: In pool_cache_put_slow(), pool_get() can block (it does mutex_enter()), so we need to retry if curlwp took a context switch during the

Re: CVS commit: src/sys/kern

2013-03-11 Thread Antti Kantee
On 11.03.2013 23:56, YAMAMOTO Takashi wrote: Module Name:src Committed By: pooka Date: Mon Mar 11 21:37:54 UTC 2013 Modified Files: src/sys/kern: subr_pool.c Log Message: In pool_cache_put_slow(), pool_get() can block (it does mutex_enter()), so we need to retry if

re: CVS commit: src/sys/kern

2013-03-11 Thread matthew green
Modified Files: src/sys/kern: subr_pool.c Log Message: In pool_cache_put_slow(), pool_get() can block (it does mutex_enter()), so we need to retry if curlwp took a context switch during the call. I didn't think mutex_enter() blocked - isn't it a spinlock. Which means that if

re: CVS commit: src/sys/kern

2013-02-19 Thread matthew green
Module Name: src Committed By: martin Date: Tue Feb 19 11:20:17 UTC 2013 Modified Files: src/sys/kern: subr_xcall.c Log Message: Oops, accidently did not commit this part of pooka's change. please update the commit log to reference the original commit, rather than the

Re: CVS commit: src/sys/kern

2013-01-30 Thread Martin Husemann
On Wed, Jan 30, 2013 at 08:07:14AM +, David Laight wrote: On Tue, Jan 29, 2013 at 11:00:31PM +, Lars Heidieker wrote: Module Name:src Committed By: para Date: Tue Jan 29 23:00:31 UTC 2013 Modified Files: src/sys/kern: kern_sysctl.c Log

Re: CVS commit: src/sys/kern

2013-01-30 Thread Valeriy E. Ushakov
On Wed, Jan 30, 2013 at 09:36:56 +, Martin Husemann wrote: On Wed, Jan 30, 2013 at 08:07:14AM +, David Laight wrote: On Tue, Jan 29, 2013 at 11:00:31PM +, Lars Heidieker wrote: Module Name: src Committed By: para Date: Tue Jan 29 23:00:31 UTC 2013

Re: CVS commit: src/sys/kern

2013-01-30 Thread Warner Losh
On Jan 30, 2013, at 1:07 AM, David Laight wrote: On Tue, Jan 29, 2013 at 11:00:31PM +, Lars Heidieker wrote: Module Name: src Committed By:para Date:Tue Jan 29 23:00:31 UTC 2013 Modified Files: src/sys/kern: kern_sysctl.c Log Message: fix the

Re: CVS commit: src/sys/kern

2013-01-29 Thread David Laight
On Tue, Jan 29, 2013 at 11:00:31PM +, Lars Heidieker wrote: Module Name: src Committed By: para Date: Tue Jan 29 23:00:31 UTC 2013 Modified Files: src/sys/kern: kern_sysctl.c Log Message: fix the sysctl_setup_func typedef -typedef void (*sysctl_setup_func)(struct

Re: CVS commit: src/sys/kern

2012-12-30 Thread J. Hannken-Illjes
On Dec 29, 2012, at 10:56 PM, Christos Zoulas chris...@netbsd.org wrote: Always call brelse() on error. Otherwise a possible error from bread() will cause the buffer to stay lock and we end up blocking forever in VOP_CLOSE-spec_close-vinvalbuf-bbysy since the buffer is marked busy but there

Re: CVS commit: src/sys/kern

2012-12-30 Thread Christos Zoulas
On Dec 30, 10:21am, hann...@eis.cs.tu-bs.de (J. Hannken-Illjes) wrote: -- Subject: Re: CVS commit: src/sys/kern | Thanks. Just applied the same to breadn(). Heh, I missed that! Thanks, christos

Re: CVS commit: src/sys/kern

2012-10-21 Thread David Holland
On Sat, Oct 20, 2012 at 09:33:03AM +0100, David Laight wrote: rename(a/b, a/c) and rename(a/c/x, a/b/y) will deadlock. Surely it just converts rename(a/c/x, a/b/y) into rename(a/c/x, a/c/y) which isn't quite the intended operation. No, it will (or can) deadlock. The

Re: CVS commit: src/sys/kern

2012-10-20 Thread David Laight
On Sat, Oct 20, 2012 at 04:06:13AM +, David Holland wrote: On Fri, Oct 19, 2012 at 07:58:34AM +0100, David Laight wrote: Module Name: src Committed By:riastradh Date:Fri Oct 19 02:07:23 UTC 2012 Modified Files: src/sys/kern: vfs_syscalls.c

Re: CVS commit: src/sys/kern

2012-10-20 Thread Taylor R Campbell
Date: Sat, 20 Oct 2012 04:06:13 + From: David Holland dholland-sourcechan...@netbsd.org On Fri, Oct 19, 2012 at 07:58:34AM +0100, David Laight wrote: Committed By: riastradh Date: Fri Oct 19 02:07:23 UTC 2012 rename(a/b, a/c) and rename(a/c/x,

Re: CVS commit: src/sys/kern

2012-10-19 Thread David Laight
On Fri, Oct 19, 2012 at 02:07:23AM +, Taylor R Campbell wrote: Module Name: src Committed By: riastradh Date: Fri Oct 19 02:07:23 UTC 2012 Modified Files: src/sys/kern: vfs_syscalls.c Log Message: No, we can't elide the fs-wide rename lock for same-directory rename.

Re: CVS commit: src/sys/kern

2012-10-19 Thread David Holland
On Fri, Oct 19, 2012 at 07:58:34AM +0100, David Laight wrote: Module Name: src Committed By: riastradh Date: Fri Oct 19 02:07:23 UTC 2012 Modified Files: src/sys/kern: vfs_syscalls.c Log Message: No, we can't elide the fs-wide rename lock for

Re: CVS commit: src/sys/kern

2012-10-19 Thread David Holland
On Sat, Oct 20, 2012 at 04:06:13AM +, David Holland wrote: Maybe convert the fs-wide rename lock into a rw-lock and only require read access for a same-directory rename. That will not help. Erm. I can read, honest. -- David A. Holland dholl...@netbsd.org

Re: CVS commit: src/sys/kern

2012-10-01 Thread Christos Zoulas
In article 20120930114944.5b4cb17...@cvs.netbsd.org, Michael van Elst source-changes-d@NetBSD.org wrote: -=-=-=-=-=- Module Name: src Committed By: mlelstv Date: Sun Sep 30 11:49:44 UTC 2012 Modified Files: src/sys/kern: tty.c Log Message: Provide consistent locking around

Re: CVS commit: src/sys/kern

2012-07-13 Thread Izumi Tsutsui
christos@ wrote: Module Name: src Committed By: christos Date: Fri Jul 13 16:15:49 UTC 2012 Modified Files: src/sys/kern: subr_disk_mbr.c Log Message: revert previous; the problem was off by one in the bios device comparison in x86_autoconf.c Sorry, the off by one is

Re: CVS commit: src/sys/kern

2012-07-13 Thread Christos Zoulas
On Jul 14, 9:20am, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote: -- Subject: Re: CVS commit: src/sys/kern | christos@ wrote: | | Module Name:src | Committed By: christos | Date: Fri Jul 13 16:15:49 UTC 2012 | | Modified Files: | src/sys/kern

Re: CVS commit: src/sys/kern

2012-07-13 Thread Izumi Tsutsui
christos@ wrote: On Jul 14, 9:20am, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote: -- Subject: Re: CVS commit: src/sys/kern | christos@ wrote: | | Module Name: src | Committed By: christos | Date: Fri Jul 13 16:15:49 UTC 2012 | | Modified Files: |src

Re: CVS commit: src/sys/kern

2012-07-13 Thread Michael L. Hitch
On Sat, 14 Jul 2012, Izumi Tsutsui wrote: It's just a guess because bootloader also fails to load boot.cfg in installcd. (I can test if someone provides debug code though) The boot.cfg fails because the read() of the file doesn't return any data (at least on my machine). The open() was

Re: CVS commit: src/sys/kern

2012-06-04 Thread Erik Fair
This the immediate predecessor are definitely a netbsd-5 pull up items. Erik f...@netbsd.org On Jun 3, 2012, at 09:23, David Laight wrote: Module Name: src Committed By: dsl Date: Sun Jun 3 16:23:44 UTC 2012 Modified Files: src/sys/kern: vfs_bio.c Log Message:

Re: CVS commit: src/sys/kern

2012-06-04 Thread David Laight
On Mon, Jun 04, 2012 at 12:02:37PM -0700, Erik Fair wrote: This the immediate predecessor are definitely a netbsd-5 pull up items. Just looked at a -5 tree. I think only the vfs_bio change really matters. (and the src/sys/dev/bluetooth/bcsp.c one - bool v int, but I suspect the -5 tree has a

Re: CVS commit: src/sys/kern

2012-05-16 Thread Jukka Ruohonen
On Wed, May 16, 2012 at 09:41:11AM +, Martin Husemann wrote: Module Name: src Committed By: martin Date: Wed May 16 09:41:11 UTC 2012 Modified Files: src/sys/kern: sys_pipe.c Log Message: Make sure we can deliver two file descriptors for pipe2() before we set up

Re: CVS commit: src/sys/kern

2012-05-16 Thread Martin Husemann
On Wed, May 16, 2012 at 04:49:06PM +0300, Jukka Ruohonen wrote: Thanks for fixing this. There is at least one other critical, 100 % reproducable, bug that allows non-root users to crash the system; PR kern/38889 (see also tests/lib/libc/sys/t_mmap; mmap_block). I'm investigating... But: I

Re: CVS commit: src/sys/kern

2012-02-20 Thread tsugutomo . enami
Christos Zoulas chris...@netbsd.org writes: To generate a diff of this commit: cvs rdiff -u -r1.341 -r1.342 src/sys/kern/kern_exec.c + kmem_free(fa-fae, sizeof(*fa-fae)); Two bugs here. fa-fae isn't allocated if (original) fa-len is zero. And the size of allocation is `sizeof(*fa-fae) *

Re: CVS commit: src/sys/kern

2012-02-20 Thread tsugutomo . enami
Christos Zoulas chris...@netbsd.org writes: Modified Files: src/sys/kern: kern_exec.c Log Message: fix fae free'ing, from enami. The fa-len in the posix_spawn_fa_free() might no longer be equal to the value used when fa-fae is allocated. So you can't use it as is. That's why I said

Re: CVS commit: src/sys/kern

2012-02-15 Thread YAMAMOTO Takashi
hi, Module Name: src Committed By: martin Date: Wed Feb 15 11:59:30 UTC 2012 Modified Files: src/sys/kern: kern_exit.c Log Message: Fix fallout from the new tests exercising all error paths: do not deactivate the pmap of a vmspace-less child of a posix spawn operation

Re: CVS commit: src/sys/kern

2012-02-04 Thread Mindaugas Rasiukevicius
y...@mwd.biglobe.ne.jp (YAMAMOTO Takashi) wrote: hi, Module Name:src Committed By: rmind Date: Mon Jan 30 21:05:40 UTC 2012 Modified Files: src/sys/kern: subr_kmem.c Log Message: Fix for KMEM_GUARD; do not use it from interrupt context.

Re: CVS commit: src/sys/kern

2012-01-31 Thread David Young
On Tue, Jan 31, 2012 at 07:11:38PM +, Alexander Nasonov wrote: Module Name: src Committed By: alnsn Date: Tue Jan 31 19:11:38 UTC 2012 Modified Files: src/sys/kern: subr_pcq.c Log Message: Replace offsetof(pcq_t, pcq_items[nitems]) with sizeof(pcq_t) + sizeof(void

Re: CVS commit: src/sys/kern

2012-01-31 Thread Alexander Nasonov
David Young wrote: Yuck. The offsetof() way was much more readable. Yes, it's more readable but it's not standard C99. And it's confusing to use offsetof when you want to use sizeof. Please put it back the old way. If you have to, provide and use a runtime_offsetof() that DTRT. DTRT TWW ;-)

Re: CVS commit: src/sys/kern

2012-01-31 Thread Joerg Sonnenberger
On Tue, Jan 31, 2012 at 07:32:52PM +, Alexander Nasonov wrote: What about something like this (untested)? /* * Return a size of a structure s with flexible-array member m * with n elements. */ #define sizeof_fam(s, m, n) (sizeof(s) + sizeof(((s *)NULL)-m[0]) * (n)) That's still not

Re: CVS commit: src/sys/kern

2012-01-31 Thread Alexander Nasonov
Joerg Sonnenberger wrote: On Tue, Jan 31, 2012 at 07:32:52PM +, Alexander Nasonov wrote: #define sizeof_fam(s, m, n) (sizeof(s) + sizeof(((s *)NULL)-m[0]) * (n)) That's still not necessarily optimal, depending on the padding rules of the platform. You want to do offsetof(s, m[0]) + n *

Re: CVS commit: src/sys/kern

2012-01-31 Thread David Laight
On Tue, Jan 31, 2012 at 07:50:26PM +, Alexander Nasonov wrote: Joerg Sonnenberger wrote: On Tue, Jan 31, 2012 at 07:32:52PM +, Alexander Nasonov wrote: #define sizeof_fam(s, m, n) (sizeof(s) + sizeof(((s *)NULL)-m[0]) * (n)) That's still not necessarily optimal, depending on the

Re: CVS commit: src/sys/kern

2012-01-31 Thread Alexander Nasonov
Joerg Sonnenberger wrote: That's still not necessarily optimal, depending on the padding rules of the platform. You want to do offsetof(s, m[0]) + n * sizeof((s*)NULL-m[0]). Using m[0] inside offsetof is non-standard but I think this will work: offsetof(s, m) + n * sizeof((s*)NULL-m[0]). Alex

Re: CVS commit: src/sys/kern

2012-01-31 Thread David Laight
On Tue, Jan 31, 2012 at 09:51:17PM +, Alexander Nasonov wrote: Joerg Sonnenberger wrote: That's still not necessarily optimal, depending on the padding rules of the platform. You want to do offsetof(s, m[0]) + n * sizeof((s*)NULL-m[0]). Using m[0] inside offsetof is non-standard but I

Re: CVS commit: src/sys/kern

2012-01-31 Thread Alexander Nasonov
David Laight wrote: I don't believe there is a problem using m[0], just m[non-constant-expr]. Practically speaking, m[0] is not a problem but the standard says ... to the structure member (designated by member-designator), ... ^^ OTOH 'sizeof (s *)0-m[0]' might be

Re: CVS commit: src/sys/kern

2012-01-31 Thread Warner Losh
On Jan 31, 2012, at 3:53 PM, Alexander Nasonov wrote: David Laight wrote: I don't believe there is a problem using m[0], just m[non-constant-expr]. Practically speaking, m[0] is not a problem but the standard says ... to the structure member (designated by member-designator), ...

Re: CVS commit: src/sys/kern

2012-01-31 Thread Valeriy E. Ushakov
On Tue, Jan 31, 2012 at 22:53:37 +, Alexander Nasonov wrote: David Laight wrote: I don't believe there is a problem using m[0], just m[non-constant-expr]. Practically speaking, m[0] is not a problem but the standard says ... to the structure member (designated by member-designator),

Re: CVS commit: src/sys/kern

2012-01-30 Thread YAMAMOTO Takashi
hi, Module Name: src Committed By: rmind Date: Mon Jan 30 21:05:40 UTC 2012 Modified Files: src/sys/kern: subr_kmem.c Log Message: Fix for KMEM_GUARD; do not use it from interrupt context. kmem_zalloc still seems broken and anyway the test looks too fragile. how about

Re: CVS commit: src/sys/kern

2012-01-22 Thread David Laight
On Sun, Jan 22, 2012 at 03:48:51AM +, Mindaugas Rasiukevicius wrote: Module Name: src Committed By: rmind Date: Sun Jan 22 03:48:51 UTC 2012 Modified Files: src/sys/kern: kern_fileassoc.c Log Message: fileassoc_file_delete: pre-check whether fileassoc was used and

Re: CVS commit: src/sys/kern

2012-01-22 Thread Mindaugas Rasiukevicius
David Laight da...@l8s.co.uk wrote: On Sun, Jan 22, 2012 at 03:48:51AM +, Mindaugas Rasiukevicius wrote: Module Name:src Committed By: rmind Date: Sun Jan 22 03:48:51 UTC 2012 Modified Files: src/sys/kern: kern_fileassoc.c Log Message:

Re: CVS commit: src/sys/kern

2011-12-14 Thread David Holland
On Thu, Dec 15, 2011 at 12:05:18AM +, Jared D. McNeill wrote: Modified Files: src/sys/kern: kern_lwp.c Log Message: In lwp_create, copy l_sigstk from the template. Previously sigaltstack wasn't inherited across fork (but SA_ONSTACK handlers was), causing the child process

Re: CVS commit: src/sys/kern

2011-12-06 Thread Christos Zoulas
On Dec 6, 4:32pm, nona...@gmail.com (NONAKA Kimihiro) wrote: -- Subject: Re: CVS commit: src/sys/kern | Thanks for fixing it. Now, I am more interested why the printf fired, | and under what conditions I can get it to fire again. | | nonaka@koharu:[-]$ mount | /dev/wd0a on / type ffs (log

Re: CVS commit: src/sys/kern

2011-12-05 Thread NONAKA Kimihiro
Hi, 2011/12/5 Christos Zoulas chris...@zoulas.com: | and good catch, I checked to see if the file had changed before | posting in current-users, and looked straight through it. :-/ Thanks for fixing it. Now, I am more interested why the printf fired, and under what conditions I can get it

Re: CVS commit: src/sys/kern

2011-12-04 Thread Bernd Ernesti
On Thu, Nov 24, 2011 at 02:55:22PM -0500, Christos Zoulas wrote: Module Name: src Committed By: christos Date: Thu Nov 24 19:55:22 UTC 2011 Modified Files: src/sys/kern: kern_exec.c Log Message: fix incomplete statement. To generate a diff of this commit: cvs rdiff

Re: CVS commit: src/sys/kern

2011-12-04 Thread David Holland
On Sun, Dec 04, 2011 at 11:22:54AM +0100, Bernd Ernesti wrote: Modified Files: src/sys/kern: kern_exec.c Log Message: fix incomplete statement. Hmm, why did you change two '#ifdef notyet' to '#ifndef notyet'? By mistake, I assume, probably because he's been running with

Re: CVS commit: src/sys/kern

2011-12-04 Thread Christos Zoulas
In article 20111204102254.ga16...@arresum.veego.de, Bernd Ernesti net...@lists.veego.de wrote: On Thu, Nov 24, 2011 at 02:55:22PM -0500, Christos Zoulas wrote: Module Name: src Committed By:christos Date:Thu Nov 24 19:55:22 UTC 2011 Modified Files:

Re: CVS commit: src/sys/kern

2011-12-04 Thread Christos Zoulas
On Dec 4, 3:13pm, dholland-sourcechan...@netbsd.org (David Holland) wrote: -- Subject: Re: CVS commit: src/sys/kern | On Sun, Dec 04, 2011 at 11:22:54AM +0100, Bernd Ernesti wrote: |Modified Files: | src/sys/kern: kern_exec.c | |Log Message: |fix incomplete statement

re: CVS commit: src/sys/kern

2011-11-30 Thread matthew green
Module Name: src Committed By: mbalmer Date: Wed Nov 30 10:27:46 UTC 2011 Modified Files: src/sys/kern: kern_ktrace.c Log Message: Only return values when there was no error. what's the motivation for this? does it match what *all* syscalls do? ie, not set anything

Re: CVS commit: src/sys/kern

2011-11-21 Thread Joerg Sonnenberger
On Mon, Nov 21, 2011 at 01:44:38PM +, Izumi Tsutsui wrote: Module Name: src Committed By: tsutsui Date: Mon Nov 21 13:44:38 UTC 2011 Modified Files: src/sys/kern: subr_cprng.c Log Message: Include MD machine/cpu_counter.h only if defined(__HAVE_CPU_COUNTER). XXX:

Re: CVS commit: src/sys/kern

2011-11-21 Thread Izumi Tsutsui
Modified Files: src/sys/kern: subr_cprng.c Log Message: Include MD machine/cpu_counter.h only if defined(__HAVE_CPU_COUNTER). XXX: Why not timecounter(9) but deprecated cpu_counter32() and microtime(9)? microtime(9) is part of timecounter(9). With extra overhead? There is

Re: CVS commit: src/sys/kern

2011-11-20 Thread J. Hannken-Illjes
On Nov 19, 2011, at 5:11 PM, Christos Zoulas wrote: Module Name: src Committed By: christos Date: Sat Nov 19 16:11:24 UTC 2011 Modified Files: src/sys/kern: cnmagic.c Log Message: PR/45633: Christian Biere: Don't access byte after NUL when setting magic. This cannot

Re: CVS commit: src/sys/kern

2011-11-20 Thread Christos Zoulas
On Nov 20, 10:02am, hann...@eis.cs.tu-bs.de (J. Hannken-Illjes) wrote: -- Subject: Re: CVS commit: src/sys/kern | | On Nov 19, 2011, at 5:11 PM, Christos Zoulas wrote: | | Module Name:src | Committed By: christos | Date: Sat Nov 19 16:11:24 UTC 2011

Re: CVS commit: src/sys/kern

2011-11-20 Thread J. Hannken-Illjes
On Nov 20, 2011, at 6:10 PM, Christos Zoulas wrote: On Nov 20, 10:02am, hann...@eis.cs.tu-bs.de (J. Hannken-Illjes) wrote: -- Subject: Re: CVS commit: src/sys/kern | | On Nov 19, 2011, at 5:11 PM, Christos Zoulas wrote: | | Module Name: src | Committed By: christos | Date

Re: CVS commit: src/sys/kern

2011-11-02 Thread Mindaugas Rasiukevicius
Hello Juergen, Juergen Hannken-Illjes hann...@netbsd.org wrote: Log Message: The path getnewvnode()-getcleanvnode()-vclean()-VOP_LOCK() will panic if the vnode we want to clean is a layered vnode and the caller already locked its lower vnode. Change getnewvnode() to always allocate a fresh

Re: CVS commit: src/sys/kern

2011-10-24 Thread Jean-Yves Migeon
On 24.10.2011 03:53, YAMAMOTO Takashi wrote: Log Message: Turn a workqueue(9) name into an array in the struct workqueue, rather than a const char *. This avoids keeping a reference to a string owned by caller (string could be allocated on stack). what needs it? Me, in a not-so-distant

Re: CVS commit: src/sys/kern

2011-10-23 Thread YAMAMOTO Takashi
hi, Module Name: src Committed By: jym Date: Sun Oct 23 21:41:23 UTC 2011 Modified Files: src/sys/kern: subr_workqueue.c Log Message: Turn a workqueue(9) name into an array in the struct workqueue, rather than a const char *. This avoids keeping a reference to a string

Re: CVS commit: src/sys/kern

2011-10-05 Thread Alan Barrett
On Thu, 06 Oct 2011, matthew green wrote: src/sys/kern: kern_synch.c Log Message: Print WARNING: negative runtime; monotonic clock has gone backwards\n using log(LOG_WARNING, ...), not just printf(...). From PR 45421 by Greg Woods. i object to this change. this is a serious error

re: CVS commit: src/sys/kern

2011-10-05 Thread matthew green
On Thu, 06 Oct 2011, matthew green wrote: src/sys/kern: kern_synch.c Log Message: Print WARNING: negative runtime; monotonic clock has gone backwards\n using log(LOG_WARNING, ...), not just printf(...). From PR 45421 by Greg Woods. i object to this change. this is a

<    1   2   3   4   5   6   7   >