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]
Message-ID: <87d0fq239g.fsf@linutronix.de>
Date:   Mon, 23 Sep 2019 21:58:51 +0200
From:   John Ogness <john.ogness@...utronix.de>
To:     He Zhe <zhe.he@...driver.com>
Cc:     Petr Mladek <pmladek@...e.com>,
        Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        <sergey.senozhatsky@...il.com>, <rostedt@...dmis.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] printk: Fix unnecessary returning broken pipe error from devkmsg_read

On 2019-09-23, He Zhe <zhe.he@...driver.com> wrote:
>>>>> When users read the buffer from start, there is no need to return -EPIPE
>>>>> since the possible overflows will not affect the output.
>>>>>
>>>> [..]
>>>>> -	if (user->seq < log_first_seq) {
>>>>> +	if (user->seq == 0) {
>>>>> +		user->seq = log_first_seq;
>>>>> +	} else if (user->seq < log_first_seq) {
>>>>>  		/* our last seen message is gone, return error and reset */
>>>>>  		user->idx = log_first_idx;
>>>>>  		user->seq = log_first_seq;
>>
>> IMHO, the patch is wrong.
>
> If this is the case, I'm going to submit a patch for RT kernel.

It should be enough just to remove the if-branch.

FYI, this bug only exists in the RFCv1 of my proposed printk patchset,
which is what RT 5.x is based on. The code currently being prepared for
mainline does not have this issue.

Thanks for reporting. Looking forward to your patch.

John Ogness

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ