Re: CVS commit: src

2012-01-24 Thread YAMAMOTO Takashi
hi, > Module Name: src > Committed By: christos > Date: Wed Jan 25 00:28:36 UTC 2012 > > Modified Files: > src/lib/libc/sys: dup.2 fcntl.2 getsockopt.2 kqueue.2 open.2 pipe.2 > socket.2 > src/sys/kern: kern_descrip.c kern_event.c sys_descrip.c sys_generic.c >

Re: Adding an option to avoid SIGPIPE for all file descriptors

2012-01-24 Thread YAMAMOTO Takashi
hi, > On Jan 24, 3:20am, y...@mwd.biglobe.ne.jp (YAMAMOTO Takashi) wrote: > -- Subject: Re: Adding an option to avoid SIGPIPE for all file descriptors > > | please don't forget compat_netbsd32 copy. > > I don't see anything to do there? What should I do? i meant dofilewritev32. YAMAMOTO Takas

Re: Adding an option to avoid SIGPIPE for all file descriptors

2012-01-24 Thread Rhialto
On Tue 24 Jan 2012 at 21:33:44 +, Michael van Elst wrote: > Unfortunately noone did ever think about a SIGNOSPACE and that's > why every Unix system now requires an infinite disk. Well, that does sound like a resource limit being exceeded, so why not send 25SIGXFSZ terminate pr

Re: Possible incorrect usage of STACKALIGN in kern_exec

2012-01-24 Thread David Holland
On Tue, Jan 24, 2012 at 11:30:54PM +0100, Joerg Sonnenberger wrote: > > > > There is also a related PR but which is for threads stack alignment: > > > > lib/39465 > > > > > > That bug is wrong. NetBSD uses SYSV ABI and that mandates 4 Bytes > > > alignment for the stack. GCC versions bef

Re: Possible incorrect usage of STACKALIGN in kern_exec

2012-01-24 Thread Joerg Sonnenberger
On Tue, Jan 24, 2012 at 10:13:39PM +, David Holland wrote: > On Tue, Jan 24, 2012 at 09:55:30PM +0100, Joerg Sonnenberger wrote: > > > There is also a related PR but which is for threads stack alignment: > > > lib/39465 > > > > That bug is wrong. NetBSD uses SYSV ABI and that mandates 4 By

Re: Possible incorrect usage of STACKALIGN in kern_exec

2012-01-24 Thread David Holland
On Tue, Jan 24, 2012 at 09:55:30PM +0100, Joerg Sonnenberger wrote: > > There is also a related PR but which is for threads stack alignment: > > lib/39465 > > That bug is wrong. NetBSD uses SYSV ABI and that mandates 4 Bytes > alignment for the stack. GCC versions before ~4.5 or so are just

Re: Possible incorrect usage of STACKALIGN in kern_exec

2012-01-24 Thread Joerg Sonnenberger
On Tue, Jan 24, 2012 at 04:53:53PM -0500, Matthew Mondor wrote: > It's in the x86-64 case that stack frames are 16-byte aligned, with > arrays larger than 16 bytes also needing to be 16-byte aligned > (possibly including the stack)... Depending on when you look, the stack frame is either 8 mod 16

Re: Possible incorrect usage of STACKALIGN in kern_exec

2012-01-24 Thread Matthew Mondor
On Tue, 24 Jan 2012 21:55:30 +0100 Joerg Sonnenberger wrote: > On Tue, Jan 24, 2012 at 03:30:37PM -0500, Matthew Mondor wrote: > > There is also a related PR but which is for threads stack alignment: > > lib/39465 > > That bug is wrong. NetBSD uses SYSV ABI and that mandates 4 Bytes > alignment

Re: Adding an option to avoid SIGPIPE for all file descriptors

2012-01-24 Thread Michael van Elst
t...@panix.com (Thor Lancelot Simon) writes: >On Tue, Jan 24, 2012 at 03:07:45AM +, David Holland wrote: >> On Mon, Jan 23, 2012 at 09:28:48PM -0500, Christos Zoulas wrote: >> > [stuff] >> >> One thing jumps out at me: if it's a file-level flag, shouldn't it be >> sufficient to use F_GETFL /

Re: Possible incorrect usage of STACKALIGN in kern_exec

2012-01-24 Thread Stephen M. Rumble
On 2012-01-24, at 12:01 PM, Martin Husemann wrote: > Can anyone explain why arm would need 8 byte alignment? The ARM EABI requires 8-byte stack alignment at function entry. I don't know if we're using the EABI, but this bug and its fix might indicate as much. Steve

Re: Possible incorrect usage of STACKALIGN in kern_exec

2012-01-24 Thread Christos Zoulas
In article , Paul Fleischer wrote: >Hello there, > >I am currently working on a NetBSD port for the FriendlyARM MINI2440, >and have run into a situation where the arguments to user space >programs is garbled. >I've noticed it for the init-process and for the getty process. >Booting with rc_config

Re: Possible incorrect usage of STACKALIGN in kern_exec

2012-01-24 Thread Joerg Sonnenberger
On Tue, Jan 24, 2012 at 03:30:37PM -0500, Matthew Mondor wrote: > There is also a related PR but which is for threads stack alignment: > lib/39465 That bug is wrong. NetBSD uses SYSV ABI and that mandates 4 Bytes alignment for the stack. GCC versions before ~4.5 or so are just completely broken in

Re: Possible incorrect usage of STACKALIGN in kern_exec

2012-01-24 Thread Martin Husemann
On Tue, Jan 24, 2012 at 03:30:37PM -0500, Matthew Mondor wrote: > Would this be considered wasteful? Of course, x86-64 MD code could > also be used... I would prefer the x86 MD code, using the same technique as the (fixed) arm code. Maybe it could even depend on actual CPU type (i.e. SSE2 availa

Re: Possible incorrect usage of STACKALIGN in kern_exec

2012-01-24 Thread Matthew Mondor
On Tue, 24 Jan 2012 21:01:49 +0100 Martin Husemann wrote: > On Tue, Jan 24, 2012 at 08:21:42PM +0100, Paul Fleischer wrote: > > Is the usage of STACKALIGN indeed incorrect in this situation, or am I > > missing the big picture? > > I stumbled across this when revamping execve1 for posix_spawn re

Re: Possible incorrect usage of STACKALIGN in kern_exec

2012-01-24 Thread Martin Husemann
On Tue, Jan 24, 2012 at 12:16:49PM -0800, Stephen M. Rumble wrote: > The ARM EABI requires 8-byte stack alignment at function entry. I don't know > if we're using the EABI, but this bug and its fix might indicate as much. I don't think we do yet, but we should ;-) Anyway, let's make a up-roundin

Re: Possible incorrect usage of STACKALIGN in kern_exec

2012-01-24 Thread Martin Husemann
On Tue, Jan 24, 2012 at 08:21:42PM +0100, Paul Fleischer wrote: > Is the usage of STACKALIGN indeed incorrect in this situation, or am I > missing the big picture? I stumbled across this when revamping execve1 for posix_spawn recently. The intention seems to be to align the stack on a 8 byte boun

Re: MI non-interlocked atomic ops?

2012-01-24 Thread David Laight
On Tue, Jan 24, 2012 at 11:16:00AM -0600, David Young wrote: > Does NetBSD run on any processor architectures where it is difficult > or impossible in the kernel[1] to provide non-interlocked atomic > operations? That is, operations that are atomic with respect to other > operations *on the same p

Possible incorrect usage of STACKALIGN in kern_exec

2012-01-24 Thread Paul Fleischer
Hello there, I am currently working on a NetBSD port for the FriendlyARM MINI2440, and have run into a situation where the arguments to user space programs is garbled. I've noticed it for the init-process and for the getty process. Booting with rc_configured=NO in /etc/rc.conf, mounting procfs, an

Re: Adding an option to avoid SIGPIPE for all file descriptors

2012-01-24 Thread Christos Zoulas
On Jan 24, 5:19pm, dholland-t...@netbsd.org (David Holland) wrote: -- Subject: Re: Adding an option to avoid SIGPIPE for all file descriptors | On Mon, Jan 23, 2012 at 10:43:38PM -0500, Christos Zoulas wrote: | > | On Mon, Jan 23, 2012 at 09:28:48PM -0500, Christos Zoulas wrote: | > | > [stuff

Re: Adding an option to avoid SIGPIPE for all file descriptors

2012-01-24 Thread David Holland
On Mon, Jan 23, 2012 at 10:43:38PM -0500, Christos Zoulas wrote: > | On Mon, Jan 23, 2012 at 09:28:48PM -0500, Christos Zoulas wrote: > | > [stuff] > | > | One thing jumps out at me: if it's a file-level flag, shouldn't it be > | sufficient to use F_GETFL / F_SETFL to manipulate it, rather t

MI non-interlocked atomic ops?

2012-01-24 Thread David Young
Does NetBSD run on any processor architectures where it is difficult or impossible in the kernel[1] to provide non-interlocked atomic operations? That is, operations that are atomic with respect to other operations *on the same processor*, but possibly divisible by operations on other processors?

Re: Adding an option to avoid SIGPIPE for all file descriptors

2012-01-24 Thread Christos Zoulas
On Jan 24, 3:20am, y...@mwd.biglobe.ne.jp (YAMAMOTO Takashi) wrote: -- Subject: Re: Adding an option to avoid SIGPIPE for all file descriptors | please don't forget compat_netbsd32 copy. I don't see anything to do there? What should I do? Thanks, christos

Re: NetBSD on current AMD motherboards

2012-01-24 Thread Edgar Fuß
I wrote: > So, are there any recommendations for current Opteron motherboards with good > NetBSD support? Since I didn't receive any specific suggestions, may I ask whether anyone is running NetBSD on either a Supermicro H8SCM-F or a Tyan S8010?

Re: Adding an option to avoid SIGPIPE for all file descriptors

2012-01-24 Thread David Laight
On Mon, Jan 23, 2012 at 10:58:59PM -0500, Steven Bellovin wrote: > > I also wonder whether we should also have a note that disabled SIGPIPE. > > similar to what paxctl does. > > > You mean a system-wide flag? That would worry me; I think it would have > bad effects, since anything that did > >