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: <20181009084241.tlmsjxnyxf4zx2fh@pathway.suse.cz>
Date:   Tue, 9 Oct 2018 10:42:41 +0200
From:   Petr Mladek <pmladek@...e.com>
To:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc:     Steven Rostedt <rostedt@...dmis.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Dmitriy Vyukov <dvyukov@...gle.com>,
        Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
        Tejun Heo <tj@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Subject: Re: [RFC][PATCH 3/3] printk: do not preliminary split up cont buffer

On Tue 2018-10-02 11:38:36, Sergey Senozhatsky wrote:
> We have a proper 'overflow' check which tells us that we need to
> split up existing cont buffer in separate records:
> 
> 	if (cont.len + len > sizeof(cont.buf))
> 		cont_flush();
> 
> At the same time we also have one extra flush: "if cont buffer is
> 80% full then split it up" in cont_add():
> 
> 	if (cont.len > (sizeof(cont.buf) * 80) / 100)
> 		cont_flush();
> 
> This looks to be redundant, since the existing "overflow" check
> should work just fine, so remove this 80% check and wait for either
> a normal cont termination \n, for preliminary flush due to
> possible buffer overflow or for preliminary flush due to cont race.
> 
> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@...il.com>

I wonder if this check ever triggered ;-) It is a nice clean up:

Reviewed-by: Petr Mladek <pmladek@...e.com>

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ