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: <Pine.LNX.4.64.0611300426070.6464@localhost.localdomain>
Date:	Thu, 30 Nov 2006 04:55:59 -0500 (EST)
From:	"Robert P. J. Day" <rpjday@...dspring.com>
To:	Alexey Dobriyan <adobriyan@...il.com>
cc:	linux-kernel@...r.kernel.org
Subject: Re: just how "sanitized" are the sanitized headers?

On Thu, 30 Nov 2006, Alexey Dobriyan wrote:

> On 11/30/06, Robert P. J. Day <rpjday@...dspring.com> wrote:
> >   i noticed that, when i generate the sanitized headers with "make
> > headers_install", there are still a number of headers files that are
> > installed with variations on "#ifdef __KERNEL__".
> >
> >   i always thought the fundamental property of sanitized headers was
> > to be compatible with glibc
>
> You were wrong.

ok, my fault, i worded that badly.  i have a *general* idea of the
purpose of sanitized headers -- i've been using a pre-built set for
crosstool for quite some time, and i'm assuming that (theoretically) i
should be able to replace that pre-built set with what's generated by
"make headers_install", is that right?

(BTW, what is the proper description for the sanitized headers?
there's *nothing* in the kernel source tree documentation that
explains their creation.)

> > and have no traces of "KERNEL" content
> > left.
>
> That's correct.

good.  at least *that* part i got right. :-)

> > so what's the purpose of leaving some header files with that
> > preprocessor content?
>
> When you see __KERNEL__ in sanitized headers, it's either due to
> a) unifdef bug, or
> b) header being listed in header-y when it should be listed in unifdef-y

a couple things going on here, actually.  in the simple case, there
are three header files:

  linux/if_fddi.h
  linux/personality.h
  linux/wireless.h

that can be fixed simply by adding "unifdef-y" entries for them to the
Kbuild file (i can submit a patch shortly).  but there are a few other
cases which still contain compound preprocessor directives such as:

  #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)

having never worked with unifdef before, i guess i was being overly
optimistic in thinking that it, if i "unifdef"ed __KERNEL__, it might
at least simplify the expression.  oh, well ... live and learn.

rday
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ