[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y07OsE+B9HwZPD0z@zn.tnic>
Date: Tue, 18 Oct 2022 18:05:04 +0200
From: Borislav Petkov <bp@...en8.de>
To: Tony Luck <tony.luck@...el.com>
Cc: "x86@...nel.org" <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] RAS: Fix the trace_show() function to output
trace_count
On Tue, Oct 18, 2022 at 07:36:53AM -0700, Tony Luck wrote:
> Sadly, we need to have a trace_show() function. If trace_open() just
> does:
>
> return single_open(file, NULL, NULL);
>
> then we get a deref NULL OOPs if somebody does "cat daemon_active" :-(
I guess but as you see yourself, cat-ting that file is done only by
us when debugging stuff. So we shouldn't waste too much energy on
"designing" an interface. As nothing'll use it.
But sure, trace_show(), why not.
I mean, if people go and open that file and confuse the system, they'll
only have themselves to blame. Besides, it is debugfs and root-only and
so on - if you wanna do damage, you already have root.
So yeah, let's keep this effort minimal and only address valid use cases.
IMO.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists