lkml.org 
[lkml]   [2022]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2022-10-18 18:05    [W:0.073 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site