[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2025011017-tubeless-hanky-0e99@gregkh>
Date: Fri, 10 Jan 2025 15:02:46 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Christoph Hellwig <hch@...radead.org>
Cc: Alexei Starovoitov <alexei.starovoitov@...il.com>,
Thomas Weißschuh <linux@...ssschuh.net>,
Michael Ellerman <mpe@...erman.id.au>,
Nicholas Piggin <npiggin@...il.com>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Naveen N Rao <naveen@...nel.org>,
Madhavan Srinivasan <maddy@...ux.ibm.com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Luis Chamberlain <mcgrof@...nel.org>,
Petr Pavlu <petr.pavlu@...e.com>,
Sami Tolvanen <samitolvanen@...gle.com>,
Daniel Gomez <da.gomez@...sung.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <martin.lau@...ux.dev>,
Eduard Zingerman <eddyz87@...il.com>, Song Liu <song@...nel.org>,
Yonghong Song <yonghong.song@...ux.dev>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>, Stanislav Fomichev <sdf@...ichev.me>,
Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
ppc-dev <linuxppc-dev@...ts.ozlabs.org>,
LKML <linux-kernel@...r.kernel.org>, linux-modules@...r.kernel.org,
bpf <bpf@...r.kernel.org>
Subject: Re: [PATCH v2 0/3] sysfs: constify bin_attribute argument of
sysfs_bin_attr_simple_read()
On Thu, Jan 09, 2025 at 12:23:01AM -0800, Christoph Hellwig wrote:
> On Thu, Jan 09, 2025 at 09:12:03AM +0100, Greg Kroah-Hartman wrote:
> > > Hey, when I duplicated the method to convert sysfs over to a proper
> > > seq_file based approach that avoids buffer overflows you basically
> > > came up with the same line that Alexei had here.
> >
> > I did? Sorry about that, I don't remember that.
>
> It's been a while..
>
> > As for seq_file for sysfs, is that for binary attributes only, or for
> > all? I can't recall that at all.
>
> Non-binary ones.
Ah, yeah, well the churn for "one single value" sysfs files would be
rough and seq_file doesn't really do much, if anything, for them as they
should be all simple strings that never overflow or are complex.
Yes, there are exceptions, so maybe for just them? I don't want to make
it easier to abuse sysfs files, but if you feel it would really help
out, I'm willing to reconsider it.
thanks,
greg k-h
>
Powered by blists - more mailing lists