lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 23 Jun 2023 16:21:36 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Beau Belgrave <beaub@...ux.microsoft.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        sunliming <sunliming@...inos.cn>
Subject: Re: [GIT PULL] tracing: user_event fix for 6.4

On Fri, 23 Jun 2023 at 12:29, Steven Rostedt <rostedt@...dmis.org> wrote:
>
> Before user events become an ABI, fix the return value of the write
> operation when tracing is disabled. It should not return an error, but
> simply report it wrote zero bytes. Just like any other write operation
> that doesn't write data but does not "fail".

This makes no sense.

A write() returning 0 means "Disk full". It's most definitely an
error, and a failure.

But zero is not a particularly _good_ failure code. At least not
unless your tracing disk is full. Is it?

If tracing is disabled, and you write something to it, I would expect
to get a valid and reasonable error code back. Something like EINVAL
or EIO or something to show "you did something wrong".

I do not at all understand the sentence

   "When user_events are disabled, its write operation should return zero"

as an "explanation" for this, and my immediate reaction is "Really?
Why? That makes no sense".

                  Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ