netbsd-tech-kern mailing list

FromSubjectsort iconDate
Alexander Nasonov
Fix for kern/44310 (write to /dev/bpf truncates size_t to int)
Hi, I have a fix for kern/44310 at the end of my post but first some commentary: -static int bpf_movein(struct uio *, int, int, +static int bpf_movein(struct uio *, int, uint64_t, struct mbuf **, struct sockaddr *); I change mtu type because the actual argument ifp->if_mtu at the call point is uint64_t. - int len; - int hlen; - int align; + size_t len; + size_t hlen; + size_t align; There is len = uio->uio_resid assignment later in the fuction and len should be ...
Jan 2, 7:32 am 2011
Eduardo Horvath
Re: semantics of TRYEMULROOT
On Sun, 2 Jan 2011, David Holland wrote: TRYEMULROOT should only open existing objects on the emul path, it should never create anything new, so you would never want to use it for mkdir. I don't know if that means you need to pass an extra flag to namei_parent() or what. Eduardo
Jan 2, 2:19 pm 2011
David Laight
Re: semantics of TRYEMULROOT
I wrote [1] a layered fs (for SYSV, also ran on solaris, SMP) that would never copy files between layers (but would create directories in the top layer). This worked fine for many uses - we used it for source trees and object files. For edits it rather relied on the fact that editors (well vi anyway) doesn't write the existing file ever - but does another open(..., O_CREAT) and so would create a new file in the top layer. This fs only really had to handle vnode lookup, almost all other ops ...
Jan 2, 12:46 pm 2011
David Laight
Re: semantics of TRYEMULROOT
When I added TRYEMULROOT I did so in order to maintain the same actions as the old code - which did all sorts of horrid checks before copying a changed path out into the stackgap. At that time I didn't want to be worried about which code paths should, or should not, look in the emulated root - since many of the emulations were probably broken. You are probably the only one who has actually looked into this deeply! It does seem likely that only ENOENT (and similar) should cause the main fs to ...
Jan 2, 11:14 am 2011
David Holland
Re: semantics of TRYEMULROOT
On Sun, Jan 02, 2011 at 09:19:30AM -0500, matthew sporleder wrote: > > [TRYEMULROOT] > > Since it's on http://www.netbsd.org/~dholland/buglists/file.html , I'm > sure you're aware of it, but would 41678 be solved? > > http://gnats.NetBSD.org/cgi-bin/query-pr-single.pl?number=41678 Doubtful, as that behavior's inside onionfs. I don't think applying the same simplification to onionfs would result in the behavior you want there, either. (Anyhow, like I wrote in that PR, the only real ...
Jan 2, 12:24 pm 2011
David Holland
Re: semantics of TRYEMULROOT
On Sun, Jan 02, 2011 at 06:14:57PM +0000, David Laight wrote: > On Sun, Jan 02, 2011 at 09:52:31AM +0000, David Holland wrote: > > Has anyone ever sat down and clearly worked out the desired semantics > > for TRYEMULROOT? I've noted inconsistencies in the past, and because > > in a number of ways it's a special case of onionfs I'm somewhat > > concerned that there may be cases where the proper or desired behavior > > is unclear or ambiguous. > > When I added TRYEMULROOT I did so in ...
Jan 2, 12:49 pm 2011
David Holland
semantics of TRYEMULROOT
Has anyone ever sat down and clearly worked out the desired semantics for TRYEMULROOT? I've noted inconsistencies in the past, and because in a number of ways it's a special case of onionfs I'm somewhat concerned that there may be cases where the proper or desired behavior is unclear or ambiguous. Right now most path lookups set TRYEMULROOT. This is fine for ordinary cases (e.g. stat) -- if the object is present under the emulation root, it's found and returned; if not, the real root is tried ...
Jan 2, 2:52 am 2011
David Holland
Re: semantics of TRYEMULROOT
On Sun, Jan 02, 2011 at 09:19:51PM +0000, Eduardo Horvath wrote: > TRYEMULROOT should only open existing objects on the emul path, it should > never create anything new, so you would never want to use it for mkdir. > I don't know if that means you need to pass an extra flag to > namei_parent() or what. That's what I thought at one point, but it's set on almost everything, including mount, open with or without O_CREAT, mknod, mkfifo, link, symlink, mkdir, and rename, and also unlink and ...
Jan 2, 2:57 pm 2011
matthew sporleder Jan 2, 7:19 am 2011
David Holland
parsepath op
Because we have at least one FS that may not want paths being looked up to be split on '/', namely rump etfs, and arguably the most important simplification to VOP_LOOKUP is to make it handle one path component at a time, we need a way for a FS to decide how much of a path it wants to digest at once. After thinking about this for a while I think the best approach is to add a parsepath op, which given a pathname returns the length of the string to consume. There are two major questions about ...
Jan 2, 2:17 am 2011
David Holland
Re: parsepath op
On Sun, Jan 02, 2011 at 10:48:03AM +0000, David Laight wrote: > On Sun, Jan 02, 2011 at 09:17:11AM +0000, David Holland wrote: > > Because we have at least one FS that may not want paths being looked > > up to be split on '/', namely rump etfs, and arguably the most > > important simplification to VOP_LOOKUP is to make it handle one path > > component at a time, we need a way for a FS to decide how much of a > > path it wants to digest at once. > > Slightly related is something I did ...
Jan 2, 1:13 pm 2011
David Laight
Re: parsepath op
Slightly related is something I did for an embedded os, where I appended /param1/param2 to a device path. This is particularly useful for passing baud rate (etc) to a serial port driver - saving the program from havinf to send a random set of ioctl requests. I suspect there are other places where not erroring spare pathname components might be useful. David -- David Laight: david@l8s.co.uk
Jan 2, 3:48 am 2011
Matt Thomas
Re: options USB_FRAG_DMA_WORKAROUND
I first saw that on my mpc85xx port but I thought it was a local bug. Then Frank reported something similar on ofppc so I committed it to see if it made his problem go away (which it did). That made me think it is a PowerPC bus_dma bug. But it still confused me since the mpc85xx does not have a cache which is coherent in regards to DMA but ofppc does have a DMA coherent cache. But if you are seeing this on non-PowerPC, I have to wonder if the problem is in the USB code itself since amd64 also ...
Jan 1, 8:10 pm 2011
Jonathan A. Kollasch
options USB_FRAG_DMA_WORKAROUND
Hi, I noticed the new USB_FRAG_DMA_WORKAROUND option. I had previously seen this bug on amd64 during heavy umass(4) use on ehci(4). Maybe we should enable this everywhere by default? Jonathan Kollasch P.S. ... That or we need to stop implementing "temporary" fixes.
Jan 1, 7:52 pm 2011
previous daytodaynext day
December 27, 2010January 2, 2011January 3, 2011