Re: [PATCH] [2.4] Re: /proc/ioports overrun patch
From: viro
Date: Wed Sep 24 2003 - 14:52:25 EST
On Wed, Sep 24, 2003 at 02:42:44PM -0500, olof@xxxxxxxxxxxxxx wrote:
> Marcelo,
>
> On Fri, 29 Aug 2003, Marcelo Tosatti wrote:
>
> > Your change to do_resource_list() will avoid copying out of bound by
> > truncating the resource output. Which means users might get truncated
> > information (only information that fits in the buffer) and not the full
> > information.
> >
> > Is that correct?
> >
> > If so, I would prefer to have a fix which outputs the full resource
> > information. For that we would need seq_file().
>
> I finally got some time to revisit this and convert /proc/ioports and
> /proc/iomem to seq_file. See below patch -- it's backed against the
> current BK tree.
Hmm... Why not make the iterator traverse the resource tree instead?
After all, all it takes is addition of pointer to parent resource into
struct resource. Goes for both 2.4 and 2.6...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/