[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YUC/iH9yLlxblM09@kroah.com>
Date: Tue, 14 Sep 2021 17:28:08 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Christoph Hellwig <hch@....de>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
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: [PATCH 13/13] xfs: convert xfs_sysfs attrs to use ->seq_show
On Tue, Sep 14, 2021 at 09:30:03AM +0200, Christoph Hellwig wrote:
> On Mon, Sep 13, 2021 at 08:27:50AM +0200, Greg Kroah-Hartman wrote:
> > Anyway, I like the idea, but as you can see here, it could lead to even
> > more abuse of sysfs files. We are just now getting people to use
> > sysfs_emit() and that is showing us where people have been abusing the
> > api in bad ways.
>
> To be honest I've always seen sysfs_emit as at best a horrible band aid
> to enforce the PAGE_SIZE bounds checking. Better than nothing, but
> not a solution at all, as you can't force anyone to actually use it.
We can "force" it by not allowing buffers to be bigger than that, which
is what the code has always done. I think we want to keep that for now
and not add the new seq_show api.
I've taken patches 2-6 in this series now, as those were great sysfs
and kernfs cleanups, thanks for those.
I can also take patch 1 if no one objects (I can edit the typo.)
I agree that getting rid of seq_get_buf() is good, and can work on
getting rid of the use here in sysfs if it's annoying people.
thanks,
greg k-h
Powered by blists - more mailing lists