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:   Tue, 16 May 2023 14:36:29 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Chuck Lever III' <chuck.lever@...cle.com>
CC:     Azeem Shaikh <azeemshaikh38@...il.com>,
        Jeff Layton <jlayton@...nel.org>,
        "linux-hardening@...r.kernel.org" <linux-hardening@...r.kernel.org>,
        "Linux NFS Mailing List" <linux-nfs@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v3] NFSD: Remove open coding of string copy

From: Chuck Lever III
> Sent: 16 May 2023 15:11
> 
> > On May 16, 2023, at 5:33 AM, David Laight <David.Laight@...LAB.COM> wrote:
> >
> > From: Azeem Shaikh
> >> Sent: 15 May 2023 03:41
> >>
> >> Instead of open coding a __dynamic_array(), use the __string() and
> >> __assign_str() helper macros that exist for this kind of use case.
> >
> > Is this actually a dynamic array, or just a char[8] ?
> > On 64 bit copying a short fixed-length string is far better
> > than any kind of dynamic sized allocation.
> 
> I'd prefer to use a string helper, since the netid is a string,
> and this documents the data type better and it is not subject
> to sudden breakage if someone creates a standard netid longer
> than 8 characters.
> 
> The nfsd_cb_setup tracepoint is not in a performance-sensitive
> path.
> 
> In addition, trace consumers should be able to count on the
> string helpers to perform memory copies without overrunning
> either the source or destination buffers... one less source
> of error.

That is an entirely different justification :-)

	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