[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <21413ac5-f934-efe2-25ee-115c4dcc86a5@acm.org>
Date: Mon, 13 Sep 2021 09:39:56 -0700
From: Bart Van Assche <bvanassche@....org>
To: Christoph Hellwig <hch@....de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Alexander Viro <viro@...iv.linux.org.uk>
Cc: Jens Axboe <axboe@...nel.dk>, Tejun Heo <tj@...nel.org>,
linux-block@...r.kernel.org, linux-xfs@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: start switching sysfs attributes to expose the seq_file
On 9/12/21 10:41 PM, Christoph Hellwig wrote:
> Al pointed out multiple times that seq_get_buf is highly dangerous as
> it opens up the tight seq_file abstractions to buffer overflows. The
> last such caller now is sysfs.
>
> This series allows attributes to implement a seq_show method and switch
> the block and XFS code as users that I'm most familiar with to use
> seq_files directly after a few preparatory cleanups. With this series
> "leaf" users of sysfs_ops can be converted one at at a time, after that
> we can move the seq_get_buf into the multiplexers (e.g. kobj, device,
> class attributes) and remove the show method in sysfs_ops and repeat the
> process until all attributes are converted. This will probably take a
> fair amount of time.
Hi Christoph,
Thanks for having done this work. In case you would need it, some time ago
I posted the following sysfs patch but did not receive any feedback:
"[PATCH] kernfs: Improve lockdep annotation for files which implement mmap"
(https://lore.kernel.org/linux-kernel/20191004161124.111376-1-bvanassche@acm.org/).
Bart.
Powered by blists - more mailing lists