Re: O_NOACCESS?

2012-02-11 Thread Steven Bellovin
On Feb 11, 2012, at 2:04 AM, Mouse wrote: I find myself wanting something I'm tentatively calling O_NOACCESS, which is basically open for neither read nor write. (I want this mostly so I can open a --x directory for fchdir() purposes.) Looking at sys_open(), I see that one of the first

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

2012-01-25 Thread Steven Bellovin
On Jan 24, 2012, at 3:26 41AM, David Laight wrote: 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

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

2012-01-23 Thread Steven Bellovin
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 a | b would be liable to cause infinite loops if 'a' didn't check the

Re: Use consistent errno for read(2) failure on directories

2011-12-10 Thread Steven Bellovin
On Dec 10, 2011, at 12:06 18PM, Mouse wrote: According to the online OpenGroup specification for read(2) available at [1], read(2) on directories is implementation dependant. If unsupported, it shall fail with EISDIR. Not all our file systems comply, and return random errno values in

Re: Patch: new random pseudodevice

2011-12-09 Thread Steven Bellovin
On Dec 9, 2011, at 3:15 52PM, Thor Lancelot Simon wrote: (1) Strong bits suitable for direct use as things like crypto keys. Using a PRNG here, even a really good one, is a major fail. This may be your opinion, but it differs radically from the opinion of almost every expert in the field

Re: Multiboot a NetBSD kernel with Grub2: it works

2011-09-13 Thread Steven Bellovin
On Sep 13, 2011, at 10:48 14AM, Emmanuel Kasper wrote: Am 2011-09-13 16:38, schrieb Andy Ruhl: On Tue, Sep 13, 2011 at 6:00 AM, Emmanuel Kasper emman...@libera.cc wrote: * grub2 does not need to know about labels, it needs the MS DOS NetBSD partition and seems to be fine with that. What

Re: Adding linux_link(2) system call (Was: Re: link(2) on a symlink to a directory fails)

2011-07-29 Thread Steven Bellovin
On Jul 29, 2011, at 10:20 10AM, Emmanuel Dreyfus wrote: On Fri, Jul 29, 2011 at 07:10:33AM -0400, Greg Troxel wrote: On Linux, is a hard link to the symlink created for link on any symlink? On Linux, it always work on the symlink itself, and it is coherent: $ mkdir i386 $ ln -s i386

Re: write alignment matters?

2011-06-23 Thread Steven Bellovin
On Jun 23, 2011, at 4:36 25AM, Robert Elz wrote: Date:Wed, 22 Jun 2011 19:30:55 -0400 (EDT) From:der Mouse mo...@rodents-montreal.org Message-ID: 201106222330.taa28...@sparkle.rodents-montreal.org | But the interface is much older than that, and, even if it's not

Re: write alignment matters?

2011-06-23 Thread Steven Bellovin
On Jun 23, 2011, at 7:43 34PM, Johnny Billquist wrote: On 2011-06-23 23:05, Steven Bellovin wrote: On Jun 23, 2011, at 4:36 25AM, Robert Elz wrote: Date:Wed, 22 Jun 2011 19:30:55 -0400 (EDT) From:der Mousemo...@rodents-montreal.org Message-ID:201106222330.taa28

Re: mount -o extattr (extended attributes)

2011-06-16 Thread Steven Bellovin
On Jun 16, 2011, at 3:22 29PM, Emmanuel Dreyfus wrote: Thor Lancelot Simon t...@panix.com wrote: But since the extended attribute database isn't validated by fsck, the kernel can still suddenly crash at that point, no? I did not observe that with -o extattr, at least yet. The EA code

Re: add DIAGNOSTIC back to GENERIC/INSTALL

2011-06-16 Thread Steven Bellovin
On Jun 16, 2011, at 3:29 36AM, Manuel Bouyer wrote: Hello, for the second time (at last) a kernel issue raised the question of adding back 'options DIAGNOSTIC' to GENERIC/INSTALL kernels in HEAD. Several people agreed tha this would be a good thing. Good idea. (I'm reminded of a comment,

Re: extended attributes

2011-06-10 Thread Steven Bellovin
On Jun 10, 2011, at 3:20 58AM, Emmanuel Dreyfus wrote: On Thu, Jun 09, 2011 at 01:33:46PM -0400, Thor Lancelot Simon wrote: I don't love having an option for this. Is there a space or performance issue with making it (or extended attribute support in general!) the default? I potential

Re: Proposal: killpeer(2)

2011-05-15 Thread Steven Bellovin
On May 15, 2011, at 11:27 43AM, Thor Lancelot Simon wrote: If we had a socket type which was record oriented but cloned on accept() like stream sockets, then we _would_ have a file descriptor per peer and what I'm describing below would work: It can still be many processes if the

Re: Is there a way to obtain a machine's cache line size?

2011-01-20 Thread Steven Bellovin
On Jan 20, 2011, at 3:00 37PM, Paul Koning wrote: On Jan 20, 2011, at 2:47 PM, der Mouse wrote: I see there is a compile time constant CACHE_LINE_SIZE in sys/param.h which currently seems to be always be set to 64, but I'm pretty certain that is not necessarily a correct value. You

Re: Providing access to the ELF Auxillary Vector for all binaries

2011-01-05 Thread Steven Bellovin
Further changes could include a careful check of initial system calls of typical process traces. One change to adopt from FreeBSD (IIRC) is to include the initial seed for arc4random to save that system call etc. Could you explain these points more carefully? What is the purpose of these

Re: Capsicum: practical capabilities for UNIX

2010-10-25 Thread Steven Bellovin
On Oct 26, 2010, at 5:44 48AM, Jukka Ruohonen wrote: On Mon, Oct 25, 2010 at 07:28:56PM -0500, David Young wrote: The chief difference I see between a process limited by Capsicum and a process limited by Systrace is that the Capsicum-limited process has only the privileges that the parent

Re: kernel module loading vs securelevel

2010-10-18 Thread Steven Bellovin
On Oct 18, 2010, at 8:51 03AM, Jean-Yves Migeon wrote: On Sun, 17 Oct 2010 20:11:06 -0400, Thor Lancelot Simon t...@panix.com wrote: On Sun, Oct 17, 2010 at 04:04:59PM -0400, Matthew Mondor wrote: On Sat, 16 Oct 2010 13:58:19 -0400 Thor Lancelot Simon t...@panix.com wrote: 2) Finish

Re: O_DIRECTORY

2010-09-13 Thread Steven Bellovin
On Sep 13, 2010, at 12:58 39PM, David Laight wrote: On Sat, Sep 11, 2010 at 02:01:43PM -0700, Chuck Silvers wrote: hi folks, the remaining missing bit that prevents acroread from working with the new linux emulation code (PR 43695) is support for the O_DIRECTORY flag to open(). Is

Re: 16 year old bug

2010-08-23 Thread Steven Bellovin
On Aug 24, 2010, at 12:02 42AM, der Mouse wrote: Was [running my house LAN with a noncontiguous netmask], for practical purposes, unsupportable? Was it something likely to cause subtle bugs all over the networking stack? Was it something obsoleted more or less 20 years ago? All yes.

Re: remote kernel debugging over a network

2010-06-06 Thread Steven Bellovin
On Jun 6, 2010, at 5:02 18AM, Jordan Gordeev wrote: Thor Lancelot Simon wrote: IPKDB used a custom MD5-based packet hash for security. I actually think it would probably be very easy to support a single IPsec ESP security association instead. The hair with IPsec is all with key

Re: remote kernel debugging over a network

2010-06-06 Thread Steven Bellovin
On Jun 6, 2010, at 9:54 01AM, Thor Lancelot Simon wrote: On Sun, Jun 06, 2010 at 12:02:18PM +0300, Jordan Gordeev wrote: Thor Lancelot Simon wrote: IPKDB used a custom MD5-based packet hash for security. I actually think it would probably be very easy to support a single IPsec ESP security

Re: remote kernel debugging over a network

2010-06-06 Thread Steven Bellovin
On Jun 6, 2010, at 11:51 33AM, der Mouse wrote: IPKDB used [...]. [...] easy to support a single IPsec ESP [...] [...] [...] I must say, though, that the more I think about it, the more I'm concerned about replay attacks. You suggested that ESP replay prevention be disabled, and that is

Re: multiprocessor routing problem

2010-04-02 Thread Steven Bellovin
On Apr 2, 2010, at 9:45 43PM, matthew sporleder wrote: On Thu, Apr 1, 2010 at 3:28 AM, pif.paf@volny.cz wrote: dear all, we have 8x multiprocessors machine with twelve lan cards. we are use this only for routing. Kernel is GENERIC 5.0.1 with option GATEWAY enable. Problem is, if

Re: panic: ffs_valloc: dup alloc

2010-03-21 Thread Steven Bellovin
On Mar 20, 2010, at 7:17 PM, David Holland wrote: On Sat, Mar 20, 2010 at 05:03:16PM -0400, Steven Bellovin wrote: Let me see if I can find my first note on the subject -- it might give a clue about the date of any changes. Turns out that I sendpr-ed it in September: kern/42104. I even

Re: panic: ffs_valloc: dup alloc

2010-03-20 Thread Steven Bellovin
On Mar 20, 2010, at 7:59 AM, Brett Lymn wrote: On Fri, Mar 19, 2010 at 05:51:46PM -0500, KAMADA Ken'ichi wrote: I'm seeing a panic: ffs_valloc: dup alloc. Does anyone have a similar panic? I have seen various file system panics after suspend/resume for quite a while: NetBSD rover

Re: panic: ffs_valloc: dup alloc

2010-03-20 Thread Steven Bellovin
On Mar 20, 2010, at 3:49 PM, David Holland wrote: On Sat, Mar 20, 2010 at 10:29:44PM +1030, Brett Lymn wrote: I have given up on suspending because my filesystems would be corrupted with monotonous regularity. The chances of a corruption seems to increase with the amount of disk activity

Re: panic: ffs_valloc: dup alloc

2010-03-20 Thread Steven Bellovin
On Mar 20, 2010, at 4:17 PM, David Holland wrote: On Sat, Mar 20, 2010 at 04:06:32PM -0400, Steven Bellovin wrote: That suggests that something is flushing buffers to a device that's suspended and it's throwing them away instead of rejecting them or panicing. Possibly Although

Re: [gsoc] syscall/libc fuzzer proposal

2010-03-20 Thread Steven Bellovin
On Mar 20, 2010, at 3:35 PM, David Holland wrote: On Sat, Mar 20, 2010 at 12:40:12PM -0400, Thor Lancelot Simon wrote: As a part of my work I would like to write a translator for C language and a small library. Their goal would be to detect integer overflows, stack overflows, problems with

Re: (Semi-random) thoughts on device tree structure and devfs

2010-03-09 Thread Steven Bellovin
On Mar 9, 2010, at 10:25 AM, Joerg Sonnenberger wrote: On Tue, Mar 09, 2010 at 08:09:57AM +, Iain Hibbert wrote: I have never used wedges but, for the disk case, would it not be better to make a method of configuring a dk in advance, so that whenever a disk appears with the correct

Re: (Semi-random) thoughts on device tree structure and devfs

2010-03-09 Thread Steven Bellovin
On Mar 9, 2010, at 2:55 PM, Thor Lancelot Simon wrote: On Tue, Mar 09, 2010 at 08:45:09PM +0100, Joerg Sonnenberger wrote: On Tue, Mar 09, 2010 at 02:23:13PM -0500, Thor Lancelot Simon wrote: I want to be able to tell the kernel to mount a device reliably identified by some kind of unique,

Re: (Semi-random) thoughts on device tree structure and devfs

2010-03-09 Thread Steven Bellovin
On Mar 9, 2010, at 3:41 PM, Quentin Garnier wrote: On Tue, Mar 09, 2010 at 09:14:09PM +0100, Johnny Billquist wrote: Quentin Garnier wrote: [...] My answer only intended to show that the device enumeration isn't random, depending on if you add/remove other devices, which is what Masao was