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]
Message-ID: <2nnud556pfpx5jpn6ib7hre5ompspbiwdcbvn3ia7eosv4bjl5@4aq6ys7wxjkt>
Date: Mon, 7 Oct 2024 04:35:50 +0530
From: Brahmajit <brahmajit.xyz@...il.com>
To: Al Viro <viro@...iv.linux.org.uk>, 
	David Laight <David.Laight@...lab.com>
Cc: "brauner@...nel.org" <brauner@...nel.org>, 
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] fs/qnx6: Fix building with GCC 15

On 06.10.2024 21:00, Al Viro wrote:
> > Indeed - looks like it is checking that the first two directory entries
> > are "." and ".." in about the most complex way possible.
> > 
> > I have vague recollections on some code that ignored the first two entries
> > because they 'must be "." and ".."' - and then failed because some filesystem
> > (and I can't even remember the O/S) didn't meet its expectations!
> > 
> > A simple:
> > 	if (strcmp(dir_entry[0].de_fname, ".") || strcmp(dir_entry[1].de_fname, ".."))
> > 		error = 1;
> > would suffice.
> 
> memcmp(), please.  strcmp() is _not_ guaranteed to be safe without both being
> NUL-terminated; yes, compiler will almost simplify that in case when one of
> the arguments is a string literal, but it's better to do straight memcmp() in
> this case.  It's not worth trying to be fancy there...

Hi Al,
Hi David,

Is my version 2 of the patch correct, I updated with Al's initial
recommendation (both in terms of the patch and commit). Is there
anything else that needs to be updated/added.
-- 
Regards,
listout

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ