[PATCH 00/14] Make the user mode driver code a better citizen
Alexei Starovoitov
alexei.starovoitov at gmail.com
Tue Jun 30 16:48:17 UTC 2020
On Tue, Jun 30, 2020 at 03:28:49PM +0900, Tetsuo Handa wrote:
> On 2020/06/30 5:19, Eric W. Biederman wrote:
> > Tetsuo Handa <penguin-kernel at i-love.sakura.ne.jp> writes:
> >
> >> On 2020/06/29 4:44, Alexei Starovoitov wrote:
> >>> But all the defensive programming kinda goes against general kernel style.
> >>> I wouldn't do it. Especially pr_info() ?!
> >>> Though I don't feel strongly about it.
> >>
> >> Honestly speaking, caller should check for errors and print appropriate
> >> messages. info->wd.mnt->mnt_root != info->wd.dentry indicates that something
> >> went wrong (maybe memory corruption). But other conditions are not fatal.
> >> That is, I consider even pr_info() here should be unnecessary.
> >
> > They were all should never happen cases. Which is why my patches do:
> > if (WARN_ON_ONCE(...))
>
> No. Fuzz testing (which uses panic_on_warn=1) will trivially hit them.
I don't believe that's true.
Please show fuzzing stack trace to prove your point.
More information about the Linux-security-module-archive
mailing list