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] [day] [month] [year] [list]
Date:   Fri, 9 Sep 2022 07:37:37 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Alexey Dobriyan' <adobriyan@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>
Subject: RE: [PATCH] proc: give /proc/cmdline size

From: Alexey Dobriyan
> Sent: 09 September 2022 06:07
> 
> On Thu, Sep 08, 2022 at 01:45:46PM -0700, Andrew Morton wrote:
> > On Thu, 8 Sep 2022 21:21:54 +0300 Alexey Dobriyan <adobriyan@...il.com> wrote:
> >
> > > Most /proc files don't have length (in fstat sense). This leads
> > > to inefficiencies when reading such files with APIs commonly found in
> > > modern programming languages. They open file, then fstat descriptor,
> > > get st_size == 0 and either assume file is empty or start reading
> > > without knowing target size.
> > >
> > > cat(1) does OK because it uses large enough buffer by default.
> > > But naive programs copy-pasted from SO aren't:
> >
> > What is "SO"?
> 
> StackOverflow, the source of all best programs in the world!

Anyone directly copying anything from there gets what
they deserve.

Useful for hints, but they are so often wrong.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ