Re: strnlen(3) in kernel

2011-08-31 Thread Christos Zoulas
In article <4e5ea673.8030...@free.fr>, Jean-Yves Migeon wrote: >-=-=-=-=-=- > >Hi list, > >Subject says it all. Anyone objects? > >Motivation behind: >- we already have strlen(3), so having strnlen(3) in kernel is somehow >natural. >- avoids things like [1] (there are probably other possible cons

strnlen(3) in kernel

2011-08-31 Thread Jean-Yves Migeon
Hi list, Subject says it all. Anyone objects? Motivation behind: - we already have strlen(3), so having strnlen(3) in kernel is somehow natural. - avoids things like [1] (there are probably other possible consumers in kernel). http://nxr.netbsd.org/xref/src/sys/arch/usermode/usermode/copy.c#34

Perform mmap and poll on PUD character devices

2011-08-31 Thread Roger Pau Monné
Hello, I'm trying to port blktap2 Linux kernel driver to NetBSD using PUD (thanks to libpud developed by Vyacheslav Matyushin during this year SoC). blktap2 is composed of several devices, some of them are block devices, other are character devices. Now I have to implement a character device that

Re: netbsd-5 deadlocks when memory is low

2011-08-31 Thread Emmanuel Dreyfus
On Wed, Aug 31, 2011 at 09:06:14AM +, David Holland wrote: > The right fix is to not let the kernel wait for userspace. In this > case that's probably not trivial. I am trying to track non local vnode being paged, and exclude them from pagedaemon activation trigger. However I have trouble to

Re: netbsd-5 deadlocks when memory is low

2011-08-31 Thread David Holland
On Mon, Aug 29, 2011 at 03:49:09AM +0200, Emmanuel Dreyfus wrote: > > because those requests have ended up in your file server which is > > waiting for page daemon and thus deadlock? just a wild guess, though. > > So the right fix would be to have a uvm.user_paging count for pages from > non

Re: netbsd32 emulation in driver open() or read()

2011-08-31 Thread David Brownlee
On 30 August 2011 16:05, Manuel Bouyer wrote: > On Tue, Aug 30, 2011 at 10:19:20AM -0400, Christos Zoulas wrote: > > On Aug 30, 3:18pm, bou...@antioche.eu.org (Manuel Bouyer) wrote: > > -- Subject: Re: netbsd32 emulation in driver open() or read() > > > > | > Yes, look at PK_32 in the process fl

Re: Addition to kauth(9) framework

2011-08-31 Thread Aleksey Cheusov
>> If all listerners unshare kauth_cred_t *unconditionally*, we lost data >> set by kauth_cred_setdata. As I said later there is a workaround >> (kauth_cred_getrefcnt or kauth_cred_copy) but I don't like it. > why don't you like it? I cannot imagine applications for KAUTH_CRED_CHROOT other tha