Re: [PATCH v8 3/6] tracefs: Check file permission even if user has CAP_DAC_OVERRIDE

From: Steven Rostedt

Date: Wed Feb 11 2026 - 10:47:37 EST


On Tue, 10 Feb 2026 17:43:51 +0900
"Masami Hiramatsu (Google)" <mhiramat@xxxxxxxxxx> wrote:

> From: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
>
> Strictly checking the file read/write permission even if the owner has
> CAP_DAC_OVERRIDE on tracefs as same as sysfs.
> Tracefs is a pseudo filesystem, just like sysfs, so any file that the
> system defines as unwritable should actually be unwritable by anyone.

This is getting too complex and still doesn't work. As I said in my
other email, simply check for the trace_array being readonly on opens()
and return -EACCES if it is and was opened for write or read-write.

With this still not working this late in the game, it will need to wait
until the next merge window. I'll take the first two patches of this
series now though.

-- Steve