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: <20251006134850-c8671ee1-d038-4efb-99e4-747c7898eafd@linutronix.de>
Date: Mon, 6 Oct 2025 13:54:25 +0200
From: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Nathan Chancellor <nathan@...nel.org>, 
	Nicolas Schier <nicolas.schier@...ux.dev>, linux-kbuild@...r.kernel.org, linux-m68k@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kbuild: uapi: Strip comments before size type check

On Mon, Oct 06, 2025 at 01:22:01PM +0200, Geert Uytterhoeven wrote:

(...)

> > > diff --git a/usr/include/headers_check.pl b/usr/include/headers_check.pl
> > > index 21c2fb9520e6af2d..75dfdce39e7f4610 100755
> > > --- a/usr/include/headers_check.pl
> > > +++ b/usr/include/headers_check.pl
> > > @@ -155,6 +155,9 @@ sub check_sizetypes
> > >       if (my $included = ($line =~ /^\s*#\s*include\s+[<"](\S+)[>"]/)[0]) {
> > >               check_include_typesh($included);
> > >       }
> > > +     # strip comments (single-line and C99 only)
> > > +     $line =~ s@\/\*.*?\*\/@@;
> > > +     $line =~ s@\/\/.*$@@;
> >
> > C99/C++ comments are rejected in UAPI headers, so this line can be dropped.
> 
> 'git grep "//" -- "*uapi*.h"' disagrees...

The ones I see from this call are either
a) in tools/
b) within a larger /* */ block
c) in URLs (http://...)
d) in headers which are not real UAPI headers (drivers/staging/gpib/uapi/gpib_ioctl.h)
e) ignored by the header check tools (include/uapi/linux/coda.h)

The UAPI headers are checked against -std=c90 which does not allow C99 comments.
See usr/include/Makefile.


Thomas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ