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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 17 Aug 2016 12:33:22 -0700
From:	John Stultz <john.stultz@...aro.org>
To:	Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc:	lkml <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>, bmoses@...gle.com,
	Willem de Bruijn <willemb@...gle.com>,
	"David S. Miller" <davem@...emloft.net>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH tip/timers/core] uapi glibc compat: make linux/time.h
 compile after libc time.h files

On Wed, Aug 10, 2016 at 8:45 AM, Willem de Bruijn
<willemdebruijn.kernel@...il.com> wrote:
> From: Willem de Bruijn <willemb@...gle.com>
>
> Add libc-compat workaround for definitions in linux/time.h that
> duplicate those in libc time.h, sys/time.h and bits/time.h.
>
> With this change, userspace builds succeeds when linux/time.h is
> included after those libc files. The inverse requires changes to
> those userspace headers.
>
> Without this patch, when compiling the following program after
> make headers_install:
>
>   echo -e "#include <time.h>\n#include <linux/time.h>" | \
>         gcc -Wall -Werror -Iusr/include -c -xc -
>
> gcc gives these errors:
>
>   #include <time.h>
>   #include <linux/time.h>
>
>     In file included from ../test_time.c:3:0:
>     /usr/include/time.h:120:8: error: redefinition of ‘struct timespec’
>      struct timespec
>         ^
>     In file included from ../test_time.c:2:0:
>     ./usr/include/linux/time.h:9:8: note: originally defined here
>      struct timespec {
>         ^
>     In file included from ../test_time.c:3:0:
>     /usr/include/time.h:161:8: error: redefinition of ‘struct itimerspec’
>      struct itimerspec
>         ^
>     In file included from ../test_time.c:2:0:
>     ./usr/include/linux/time.h:34:8: note: originally defined here
>      struct itimerspec {
>
> and this warning by indirect inclusion of bits/time.h:
>
>     In file included from ../test_time.c:4:0:
>     ./usr/include/linux/time.h:67:0: error: "TIMER_ABSTIME" redefined [-Werror]
>      #define TIMER_ABSTIME   0x01
>      ^
>     In file included from /usr/include/time.h:41:0,
>                  from ../test_time.c:3:
>     /usr/include/x86_64-linux-gnu/bits/time.h:82:0: note: this is the location of the previous definition
>      #   define TIMER_ABSTIME  1
>      ^
>
> Ran the same program for sys/time.h and bits/time.h. The _SYS_TIME_H
> test resolves similar errors for timeval, timezone, itimerval and
> warnings for ITIMER_REAL, ITIMER_VIRTUAL, ITIMER_PROF.
>
> Signed-off-by: Willem de Bruijn <willemb@...gle.com>
> ---
>  include/uapi/linux/libc-compat.h | 50 ++++++++++++++++++++++++++++++++++++++++
>  include/uapi/linux/time.h        | 15 ++++++++++++
>  2 files changed, 65 insertions(+)


So I don't have any objection to this. But I'm not sure if I'm the
right path for such a change to go through.

>From the commit history, it seems David Miller or Andrew Morton would
be the right folks to take this.

thanks
-john

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ