Patchwork [4/7] eglibc: ptrace: protect ptrace_peeksiginfo_args from redefintion

login
register
mail settings
Submitter Bruce Ashfield
Date Aug. 25, 2013, 5:16 a.m.
Message ID <c2d44f9ff8d416b7f984bc4027de7acecbec0986.1377405083.git.bruce.ashfield@windriver.com>
Download mbox | patch
Permalink /patch/56571/
State New
Headers show

Comments

Bruce Ashfield - Aug. 25, 2013, 5:16 a.m.
linux kernel commit 84c751bd [ptrace: add ability to retrieve signals without removing from a queue (v4)]
added ptrace_peeksiginfo_args to the exported kernel user api.

This leads to build errors such as:

| In file included from /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:66:0:
| /poky-master/build/tmp/sysroots/qemux86/usr/include/linux/ptrace.h:58:8: error: redefinition of 'struct ptrace_peeksiginfo_args'
|  struct ptrace_peeksiginfo_args {
|         ^
| In file included from /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/defs.h:159:0,
|                  from /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:37:
| /poky-master/build/tmp/sysroots/qemux86/usr/include/sys/ptrace.h:191:8: note: originally defined here
|  struct ptrace_peeksiginfo_args
|         ^
| make[2]: *** [process.o] Error 1

In files that include both the eglibc sys/ptrace.h and the linux kernel exported
one.

We can avoid this by making the eglibc variant only declare its structure if PTRACE_PEEKSIGINFO
has not been defined.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 ...ect-ptrace_peeksiginfo_args-from-redefint.patch |   55 ++++++++++++++++++++
 meta/recipes-core/eglibc/eglibc_2.18.bb            |    1 +
 2 files changed, 56 insertions(+)
 create mode 100644 meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
Jonathan Liu - Aug. 25, 2013, 6:35 a.m.
On 25/08/2013 3:16 PM, Bruce Ashfield wrote:
> linux kernel commit 84c751bd [ptrace: add ability to retrieve signals without removing from a queue (v4)]
> added ptrace_peeksiginfo_args to the exported kernel user api.
>
> This leads to build errors such as:
>
> | In file included from /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:66:0:
> | /poky-master/build/tmp/sysroots/qemux86/usr/include/linux/ptrace.h:58:8: error: redefinition of 'struct ptrace_peeksiginfo_args'
> |  struct ptrace_peeksiginfo_args {
> |         ^
> | In file included from /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/defs.h:159:0,
> |                  from /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:37:
> | /poky-master/build/tmp/sysroots/qemux86/usr/include/sys/ptrace.h:191:8: note: originally defined here
> |  struct ptrace_peeksiginfo_args
> |         ^
> | make[2]: *** [process.o] Error 1
>
> In files that include both the eglibc sys/ptrace.h and the linux kernel exported
> one.
>
> We can avoid this by making the eglibc variant only declare its structure if PTRACE_PEEKSIGINFO
> has not been defined.
>
> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
> ---
>   ...ect-ptrace_peeksiginfo_args-from-redefint.patch |   55 ++++++++++++++++++++
>   meta/recipes-core/eglibc/eglibc_2.18.bb            |    1 +
>   2 files changed, 56 insertions(+)
>   create mode 100644 meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
>
> diff --git a/meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch b/meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
> new file mode 100644
> index 0000000..edf10fb
> --- /dev/null
> +++ b/meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
> @@ -0,0 +1,55 @@
> +From b5fe604678ffc7e0d6c2704a73d22f99b24a6d25 Mon Sep 17 00:00:00 2001
> +From: Bruce Ashfield <bruce.ashfield@windriver.com>
> +Date: Sat, 24 Aug 2013 23:51:06 -0400
> +Subject: [PATCH] ptrace: protect ptrace_peeksiginfo_args from redefintion
> +
> +linux kernel commit 84c751bd [ptrace: add ability to retrieve signals without removing from a queue (v4)]
> +added ptrace_peeksiginfo_args to the exported kernel user api.
> +
> +This leads to build errors such as:
> +
> +| In file included from /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:66:0:
> +| /poky-master/build/tmp/sysroots/qemux86/usr/include/linux/ptrace.h:58:8: error: redefinition of 'struct ptrace_peeksiginfo_args'
> +|  struct ptrace_peeksiginfo_args {
> +|         ^
> +| In file included from /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/defs.h:159:0,
> +|                  from /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:37:
> +| /poky-master/build/tmp/sysroots/qemux86/usr/include/sys/ptrace.h:191:8: note: originally defined here
> +|  struct ptrace_peeksiginfo_args
> +|         ^
> +| make[2]: *** [process.o] Error 1
> +
> +In files that include both the eglibc sys/ptrace.h and the linux kernel exported
> +one.
> +
> +We can avoid this by making the eglibc variant only declare its structure if PTRACE_PEEKSIGINFO
> +has not been defined.
Missing Upstream-Status.

Regards,
Jonathan
> +
> +Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
> +---
> + libc/sysdeps/unix/sysv/linux/sys/ptrace.h |    2 ++
> + 1 file changed, 2 insertions(+)
> +
> +diff --git a/sysdeps/unix/sysv/linux/sys/ptrace.h b/sysdeps/unix/sysv/linux/sys/ptrace.h
> +index 2b78565..7800d9a 100644
> +--- a/sysdeps/unix/sysv/linux/sys/ptrace.h
> ++++ b/sysdeps/unix/sysv/linux/sys/ptrace.h
> +@@ -187,6 +187,7 @@ enum __ptrace_eventcodes
> +   PTRAVE_EVENT_SECCOMP  = 7
> + };
> +
> ++#ifndef PTRACE_PEEKSIGINFO
> + /* Arguments for PTRACE_PEEKSIGINFO.  */
> + struct ptrace_peeksiginfo_args
> + {
> +@@ -194,6 +195,7 @@ struct ptrace_peeksiginfo_args
> +   __uint32_t flags;	/* Flags for peeksiginfo.  */
> +   __int32_t nr;		/* How many siginfos to take.  */
> + };
> ++#endif
> +
> + enum __ptrace_peeksiginfo_flags
> + {
> +--
> +1.7.10.4
> +
> diff --git a/meta/recipes-core/eglibc/eglibc_2.18.bb b/meta/recipes-core/eglibc/eglibc_2.18.bb
> index 17b651f..2257c21 100644
> --- a/meta/recipes-core/eglibc/eglibc_2.18.bb
> +++ b/meta/recipes-core/eglibc/eglibc_2.18.bb
> @@ -26,6 +26,7 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr23
>              file://tzselect-awk.patch \
>              file://0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
>              file://fix-tibetian-locales.patch \
> +           file://0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch \
>             "
>   SRC_URI[md5sum] = "b395b021422a027d89884992e91734fc"
>   SRC_URI[sha256sum] = "15f564b45dc5dd65faf0875579e3447961ae61e876933384ae05d19328539ad4"
Bruce Ashfield - Aug. 25, 2013, 2:22 p.m.
On Sun, Aug 25, 2013 at 2:35 AM, Jonathan Liu <net147@gmail.com> wrote:
> On 25/08/2013 3:16 PM, Bruce Ashfield wrote:
>>
>> linux kernel commit 84c751bd [ptrace: add ability to retrieve signals
>> without removing from a queue (v4)]
>> added ptrace_peeksiginfo_args to the exported kernel user api.
>>
>> This leads to build errors such as:
>>
>> | In file included from
>> /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:66:0:
>> | /poky-master/build/tmp/sysroots/qemux86/usr/include/linux/ptrace.h:58:8:
>> error: redefinition of 'struct ptrace_peeksiginfo_args'
>> |  struct ptrace_peeksiginfo_args {
>> |         ^
>> | In file included from
>> /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/defs.h:159:0,
>> |                  from
>> /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:37:
>> | /poky-master/build/tmp/sysroots/qemux86/usr/include/sys/ptrace.h:191:8:
>> note: originally defined here
>> |  struct ptrace_peeksiginfo_args
>> |         ^
>> | make[2]: *** [process.o] Error 1
>>
>> In files that include both the eglibc sys/ptrace.h and the linux kernel
>> exported
>> one.
>>
>> We can avoid this by making the eglibc variant only declare its structure
>> if PTRACE_PEEKSIGINFO
>> has not been defined.
>>
>> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
>> ---
>>   ...ect-ptrace_peeksiginfo_args-from-redefint.patch |   55
>> ++++++++++++++++++++
>>   meta/recipes-core/eglibc/eglibc_2.18.bb            |    1 +
>>   2 files changed, 56 insertions(+)
>>   create mode 100644
>> meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
>>
>> diff --git
>> a/meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
>> b/meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
>> new file mode 100644
>> index 0000000..edf10fb
>> --- /dev/null
>> +++
>> b/meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
>> @@ -0,0 +1,55 @@
>> +From b5fe604678ffc7e0d6c2704a73d22f99b24a6d25 Mon Sep 17 00:00:00 2001
>> +From: Bruce Ashfield <bruce.ashfield@windriver.com>
>> +Date: Sat, 24 Aug 2013 23:51:06 -0400
>> +Subject: [PATCH] ptrace: protect ptrace_peeksiginfo_args from redefintion
>> +
>> +linux kernel commit 84c751bd [ptrace: add ability to retrieve signals
>> without removing from a queue (v4)]
>> +added ptrace_peeksiginfo_args to the exported kernel user api.
>> +
>> +This leads to build errors such as:
>> +
>> +| In file included from
>> /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:66:0:
>> +|
>> /poky-master/build/tmp/sysroots/qemux86/usr/include/linux/ptrace.h:58:8:
>> error: redefinition of 'struct ptrace_peeksiginfo_args'
>> +|  struct ptrace_peeksiginfo_args {
>> +|         ^
>> +| In file included from
>> /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/defs.h:159:0,
>> +|                  from
>> /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:37:
>> +| /poky-master/build/tmp/sysroots/qemux86/usr/include/sys/ptrace.h:191:8:
>> note: originally defined here
>> +|  struct ptrace_peeksiginfo_args
>> +|         ^
>> +| make[2]: *** [process.o] Error 1
>> +
>> +In files that include both the eglibc sys/ptrace.h and the linux kernel
>> exported
>> +one.
>> +
>> +We can avoid this by making the eglibc variant only declare its structure
>> if PTRACE_PEEKSIGINFO
>> +has not been defined.
>
> Missing Upstream-Status.

Thanks for the double check, but I'm not the one to tag this with an upstream
status. My opinion on the applicability of this to eglibc is largely irrelevant.

Cheers,

Bruce

>
> Regards,
> Jonathan
>
>> +
>> +Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
>> +---
>> + libc/sysdeps/unix/sysv/linux/sys/ptrace.h |    2 ++
>> + 1 file changed, 2 insertions(+)
>> +
>> +diff --git a/sysdeps/unix/sysv/linux/sys/ptrace.h
>> b/sysdeps/unix/sysv/linux/sys/ptrace.h
>> +index 2b78565..7800d9a 100644
>> +--- a/sysdeps/unix/sysv/linux/sys/ptrace.h
>> ++++ b/sysdeps/unix/sysv/linux/sys/ptrace.h
>> +@@ -187,6 +187,7 @@ enum __ptrace_eventcodes
>> +   PTRAVE_EVENT_SECCOMP  = 7
>> + };
>> +
>> ++#ifndef PTRACE_PEEKSIGINFO
>> + /* Arguments for PTRACE_PEEKSIGINFO.  */
>> + struct ptrace_peeksiginfo_args
>> + {
>> +@@ -194,6 +195,7 @@ struct ptrace_peeksiginfo_args
>> +   __uint32_t flags;   /* Flags for peeksiginfo.  */
>> +   __int32_t nr;               /* How many siginfos to take.  */
>> + };
>> ++#endif
>> +
>> + enum __ptrace_peeksiginfo_flags
>> + {
>> +--
>> +1.7.10.4
>> +
>> diff --git a/meta/recipes-core/eglibc/eglibc_2.18.bb
>> b/meta/recipes-core/eglibc/eglibc_2.18.bb
>> index 17b651f..2257c21 100644
>> --- a/meta/recipes-core/eglibc/eglibc_2.18.bb
>> +++ b/meta/recipes-core/eglibc/eglibc_2.18.bb
>> @@ -26,6 +26,7 @@ SRC_URI =
>> "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr23
>>              file://tzselect-awk.patch \
>>
>> file://0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
>>              file://fix-tibetian-locales.patch \
>> +
>> file://0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch \
>>             "
>>   SRC_URI[md5sum] = "b395b021422a027d89884992e91734fc"
>>   SRC_URI[sha256sum] =
>> "15f564b45dc5dd65faf0875579e3447961ae61e876933384ae05d19328539ad4"
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Khem Raj - Aug. 26, 2013, 12:46 a.m.
Hi Bruce

On Sat, Aug 24, 2013 at 10:16 PM, Bruce Ashfield
<bruce.ashfield@windriver.com> wrote:
> linux kernel commit 84c751bd [ptrace: add ability to retrieve signals without removing from a queue (v4)]
> added ptrace_peeksiginfo_args to the exported kernel user api.
>
> This leads to build errors such as:
>
> | In file included from /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:66:0:
> | /poky-master/build/tmp/sysroots/qemux86/usr/include/linux/ptrace.h:58:8: error: redefinition of 'struct ptrace_peeksiginfo_args'
> |  struct ptrace_peeksiginfo_args {
> |         ^
> | In file included from /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/defs.h:159:0,
> |                  from /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:37:
> | /poky-master/build/tmp/sysroots/qemux86/usr/include/sys/ptrace.h:191:8: note: originally defined here
> |  struct ptrace_peeksiginfo_args
> |         ^
> | make[2]: *** [process.o] Error 1
>
> In files that include both the eglibc sys/ptrace.h and the linux kernel exported
> one.
>
> We can avoid this by making the eglibc variant only declare its structure if PTRACE_PEEKSIGINFO
> has not been defined.

The problem is there however we need not fix it in eglibc thats wrong
place to fix it. The right place to fix it is affected application
which seems so mix glibc and kernel interfaces. It should try to not
mix kernel and glibc interfaces. This patch as such is not
appropriate.


>
> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
> ---
>  ...ect-ptrace_peeksiginfo_args-from-redefint.patch |   55 ++++++++++++++++++++
>  meta/recipes-core/eglibc/eglibc_2.18.bb            |    1 +
>  2 files changed, 56 insertions(+)
>  create mode 100644 meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
>
> diff --git a/meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch b/meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
> new file mode 100644
> index 0000000..edf10fb
> --- /dev/null
> +++ b/meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
> @@ -0,0 +1,55 @@
> +From b5fe604678ffc7e0d6c2704a73d22f99b24a6d25 Mon Sep 17 00:00:00 2001
> +From: Bruce Ashfield <bruce.ashfield@windriver.com>
> +Date: Sat, 24 Aug 2013 23:51:06 -0400
> +Subject: [PATCH] ptrace: protect ptrace_peeksiginfo_args from redefintion
> +
> +linux kernel commit 84c751bd [ptrace: add ability to retrieve signals without removing from a queue (v4)]
> +added ptrace_peeksiginfo_args to the exported kernel user api.
> +
> +This leads to build errors such as:
> +
> +| In file included from /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:66:0:
> +| /poky-master/build/tmp/sysroots/qemux86/usr/include/linux/ptrace.h:58:8: error: redefinition of 'struct ptrace_peeksiginfo_args'
> +|  struct ptrace_peeksiginfo_args {
> +|         ^
> +| In file included from /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/defs.h:159:0,
> +|                  from /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:37:
> +| /poky-master/build/tmp/sysroots/qemux86/usr/include/sys/ptrace.h:191:8: note: originally defined here
> +|  struct ptrace_peeksiginfo_args
> +|         ^
> +| make[2]: *** [process.o] Error 1
> +
> +In files that include both the eglibc sys/ptrace.h and the linux kernel exported
> +one.
> +
> +We can avoid this by making the eglibc variant only declare its structure if PTRACE_PEEKSIGINFO
> +has not been defined.
> +
> +Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
> +---
> + libc/sysdeps/unix/sysv/linux/sys/ptrace.h |    2 ++
> + 1 file changed, 2 insertions(+)
> +
> +diff --git a/sysdeps/unix/sysv/linux/sys/ptrace.h b/sysdeps/unix/sysv/linux/sys/ptrace.h
> +index 2b78565..7800d9a 100644
> +--- a/sysdeps/unix/sysv/linux/sys/ptrace.h
> ++++ b/sysdeps/unix/sysv/linux/sys/ptrace.h
> +@@ -187,6 +187,7 @@ enum __ptrace_eventcodes
> +   PTRAVE_EVENT_SECCOMP  = 7
> + };
> +
> ++#ifndef PTRACE_PEEKSIGINFO
> + /* Arguments for PTRACE_PEEKSIGINFO.  */
> + struct ptrace_peeksiginfo_args
> + {
> +@@ -194,6 +195,7 @@ struct ptrace_peeksiginfo_args
> +   __uint32_t flags;   /* Flags for peeksiginfo.  */
> +   __int32_t nr;               /* How many siginfos to take.  */
> + };
> ++#endif
> +
> + enum __ptrace_peeksiginfo_flags
> + {
> +--
> +1.7.10.4
> +
> diff --git a/meta/recipes-core/eglibc/eglibc_2.18.bb b/meta/recipes-core/eglibc/eglibc_2.18.bb
> index 17b651f..2257c21 100644
> --- a/meta/recipes-core/eglibc/eglibc_2.18.bb
> +++ b/meta/recipes-core/eglibc/eglibc_2.18.bb
> @@ -26,6 +26,7 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr23
>             file://tzselect-awk.patch \
>             file://0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
>             file://fix-tibetian-locales.patch \
> +           file://0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch \
>            "
>  SRC_URI[md5sum] = "b395b021422a027d89884992e91734fc"
>  SRC_URI[sha256sum] = "15f564b45dc5dd65faf0875579e3447961ae61e876933384ae05d19328539ad4"
> --
> 1.7.10.4
>
Bruce Ashfield - Aug. 26, 2013, 12:54 a.m.
On 13-08-25 8:46 PM, Khem Raj wrote:
> Hi Bruce
>
> On Sat, Aug 24, 2013 at 10:16 PM, Bruce Ashfield
> <bruce.ashfield@windriver.com> wrote:
>> linux kernel commit 84c751bd [ptrace: add ability to retrieve signals without removing from a queue (v4)]
>> added ptrace_peeksiginfo_args to the exported kernel user api.
>>
>> This leads to build errors such as:
>>
>> | In file included from /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:66:0:
>> | /poky-master/build/tmp/sysroots/qemux86/usr/include/linux/ptrace.h:58:8: error: redefinition of 'struct ptrace_peeksiginfo_args'
>> |  struct ptrace_peeksiginfo_args {
>> |         ^
>> | In file included from /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/defs.h:159:0,
>> |                  from /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:37:
>> | /poky-master/build/tmp/sysroots/qemux86/usr/include/sys/ptrace.h:191:8: note: originally defined here
>> |  struct ptrace_peeksiginfo_args
>> |         ^
>> | make[2]: *** [process.o] Error 1
>>
>> In files that include both the eglibc sys/ptrace.h and the linux kernel exported
>> one.
>>
>> We can avoid this by making the eglibc variant only declare its structure if PTRACE_PEEKSIGINFO
>> has not been defined.
>
> The problem is there however we need not fix it in eglibc thats wrong
> place to fix it. The right place to fix it is affected application
> which seems so mix glibc and kernel interfaces. It should try to not
> mix kernel and glibc interfaces. This patch as such is not
> appropriate.

My insistence is that this go in in the mean time, otherwise the 3.10
kernel headers miss the M4 cutoff and basically the whole release.

I'm certainly not going to have the time and cycles to fix individual
applications, so our choices boil down to taking this change, rolling
back to the 3.8 headers, or waiting for individual package maintainers
to update their packages to work with the 3.10 headers.

I personally don't see the harm in this change, since these applications
have always had this mix of both sys/ptrace.h and linux/ptrace.h in the
past, now doesn't seem like the time to fix them.

Cheers,

Bruce


>
>
>>
>> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
>> ---
>>   ...ect-ptrace_peeksiginfo_args-from-redefint.patch |   55 ++++++++++++++++++++
>>   meta/recipes-core/eglibc/eglibc_2.18.bb            |    1 +
>>   2 files changed, 56 insertions(+)
>>   create mode 100644 meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
>>
>> diff --git a/meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch b/meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
>> new file mode 100644
>> index 0000000..edf10fb
>> --- /dev/null
>> +++ b/meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
>> @@ -0,0 +1,55 @@
>> +From b5fe604678ffc7e0d6c2704a73d22f99b24a6d25 Mon Sep 17 00:00:00 2001
>> +From: Bruce Ashfield <bruce.ashfield@windriver.com>
>> +Date: Sat, 24 Aug 2013 23:51:06 -0400
>> +Subject: [PATCH] ptrace: protect ptrace_peeksiginfo_args from redefintion
>> +
>> +linux kernel commit 84c751bd [ptrace: add ability to retrieve signals without removing from a queue (v4)]
>> +added ptrace_peeksiginfo_args to the exported kernel user api.
>> +
>> +This leads to build errors such as:
>> +
>> +| In file included from /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:66:0:
>> +| /poky-master/build/tmp/sysroots/qemux86/usr/include/linux/ptrace.h:58:8: error: redefinition of 'struct ptrace_peeksiginfo_args'
>> +|  struct ptrace_peeksiginfo_args {
>> +|         ^
>> +| In file included from /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/defs.h:159:0,
>> +|                  from /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:37:
>> +| /poky-master/build/tmp/sysroots/qemux86/usr/include/sys/ptrace.h:191:8: note: originally defined here
>> +|  struct ptrace_peeksiginfo_args
>> +|         ^
>> +| make[2]: *** [process.o] Error 1
>> +
>> +In files that include both the eglibc sys/ptrace.h and the linux kernel exported
>> +one.
>> +
>> +We can avoid this by making the eglibc variant only declare its structure if PTRACE_PEEKSIGINFO
>> +has not been defined.
>> +
>> +Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
>> +---
>> + libc/sysdeps/unix/sysv/linux/sys/ptrace.h |    2 ++
>> + 1 file changed, 2 insertions(+)
>> +
>> +diff --git a/sysdeps/unix/sysv/linux/sys/ptrace.h b/sysdeps/unix/sysv/linux/sys/ptrace.h
>> +index 2b78565..7800d9a 100644
>> +--- a/sysdeps/unix/sysv/linux/sys/ptrace.h
>> ++++ b/sysdeps/unix/sysv/linux/sys/ptrace.h
>> +@@ -187,6 +187,7 @@ enum __ptrace_eventcodes
>> +   PTRAVE_EVENT_SECCOMP  = 7
>> + };
>> +
>> ++#ifndef PTRACE_PEEKSIGINFO
>> + /* Arguments for PTRACE_PEEKSIGINFO.  */
>> + struct ptrace_peeksiginfo_args
>> + {
>> +@@ -194,6 +195,7 @@ struct ptrace_peeksiginfo_args
>> +   __uint32_t flags;   /* Flags for peeksiginfo.  */
>> +   __int32_t nr;               /* How many siginfos to take.  */
>> + };
>> ++#endif
>> +
>> + enum __ptrace_peeksiginfo_flags
>> + {
>> +--
>> +1.7.10.4
>> +
>> diff --git a/meta/recipes-core/eglibc/eglibc_2.18.bb b/meta/recipes-core/eglibc/eglibc_2.18.bb
>> index 17b651f..2257c21 100644
>> --- a/meta/recipes-core/eglibc/eglibc_2.18.bb
>> +++ b/meta/recipes-core/eglibc/eglibc_2.18.bb
>> @@ -26,6 +26,7 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr23
>>              file://tzselect-awk.patch \
>>              file://0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
>>              file://fix-tibetian-locales.patch \
>> +           file://0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch \
>>             "
>>   SRC_URI[md5sum] = "b395b021422a027d89884992e91734fc"
>>   SRC_URI[sha256sum] = "15f564b45dc5dd65faf0875579e3447961ae61e876933384ae05d19328539ad4"
>> --
>> 1.7.10.4
>>
Bruce Ashfield - Aug. 26, 2013, 2:14 a.m.
On 13-08-25 8:54 PM, Bruce Ashfield wrote:
> On 13-08-25 8:46 PM, Khem Raj wrote:
>> Hi Bruce
>>
>> On Sat, Aug 24, 2013 at 10:16 PM, Bruce Ashfield
>> <bruce.ashfield@windriver.com> wrote:
>>> linux kernel commit 84c751bd [ptrace: add ability to retrieve signals
>>> without removing from a queue (v4)]
>>> added ptrace_peeksiginfo_args to the exported kernel user api.
>>>
>>> This leads to build errors such as:
>>>
>>> | In file included from
>>> /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:66:0:
>>>
>>> |
>>> /poky-master/build/tmp/sysroots/qemux86/usr/include/linux/ptrace.h:58:8:
>>> error: redefinition of 'struct ptrace_peeksiginfo_args'
>>> |  struct ptrace_peeksiginfo_args {
>>> |         ^
>>> | In file included from
>>> /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/defs.h:159:0,
>>>
>>> |                  from
>>> /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:37:
>>>
>>> |
>>> /poky-master/build/tmp/sysroots/qemux86/usr/include/sys/ptrace.h:191:8:
>>> note: originally defined here
>>> |  struct ptrace_peeksiginfo_args
>>> |         ^
>>> | make[2]: *** [process.o] Error 1
>>>
>>> In files that include both the eglibc sys/ptrace.h and the linux
>>> kernel exported
>>> one.
>>>
>>> We can avoid this by making the eglibc variant only declare its
>>> structure if PTRACE_PEEKSIGINFO
>>> has not been defined.
>>
>> The problem is there however we need not fix it in eglibc thats wrong
>> place to fix it. The right place to fix it is affected application
>> which seems so mix glibc and kernel interfaces. It should try to not
>> mix kernel and glibc interfaces. This patch as such is not
>> appropriate.
>
> My insistence is that this go in in the mean time, otherwise the 3.10

s/insistence/suggestion/

That came out a bit to strong! :)

Bruce

> kernel headers miss the M4 cutoff and basically the whole release.
>
> I'm certainly not going to have the time and cycles to fix individual
> applications, so our choices boil down to taking this change, rolling
> back to the 3.8 headers, or waiting for individual package maintainers
> to update their packages to work with the 3.10 headers.
>
> I personally don't see the harm in this change, since these applications
> have always had this mix of both sys/ptrace.h and linux/ptrace.h in the
> past, now doesn't seem like the time to fix them.
>
> Cheers,
>
> Bruce
>
>
>>
>>
>>>
>>> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
>>> ---
>>>   ...ect-ptrace_peeksiginfo_args-from-redefint.patch |   55
>>> ++++++++++++++++++++
>>>   meta/recipes-core/eglibc/eglibc_2.18.bb            |    1 +
>>>   2 files changed, 56 insertions(+)
>>>   create mode 100644
>>> meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
>>>
>>>
>>> diff --git
>>> a/meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
>>> b/meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
>>>
>>> new file mode 100644
>>> index 0000000..edf10fb
>>> --- /dev/null
>>> +++
>>> b/meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
>>>
>>> @@ -0,0 +1,55 @@
>>> +From b5fe604678ffc7e0d6c2704a73d22f99b24a6d25 Mon Sep 17 00:00:00 2001
>>> +From: Bruce Ashfield <bruce.ashfield@windriver.com>
>>> +Date: Sat, 24 Aug 2013 23:51:06 -0400
>>> +Subject: [PATCH] ptrace: protect ptrace_peeksiginfo_args from
>>> redefintion
>>> +
>>> +linux kernel commit 84c751bd [ptrace: add ability to retrieve
>>> signals without removing from a queue (v4)]
>>> +added ptrace_peeksiginfo_args to the exported kernel user api.
>>> +
>>> +This leads to build errors such as:
>>> +
>>> +| In file included from
>>> /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:66:0:
>>>
>>> +|
>>> /poky-master/build/tmp/sysroots/qemux86/usr/include/linux/ptrace.h:58:8:
>>> error: redefinition of 'struct ptrace_peeksiginfo_args'
>>> +|  struct ptrace_peeksiginfo_args {
>>> +|         ^
>>> +| In file included from
>>> /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/defs.h:159:0,
>>>
>>> +|                  from
>>> /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:37:
>>>
>>> +|
>>> /poky-master/build/tmp/sysroots/qemux86/usr/include/sys/ptrace.h:191:8:
>>> note: originally defined here
>>> +|  struct ptrace_peeksiginfo_args
>>> +|         ^
>>> +| make[2]: *** [process.o] Error 1
>>> +
>>> +In files that include both the eglibc sys/ptrace.h and the linux
>>> kernel exported
>>> +one.
>>> +
>>> +We can avoid this by making the eglibc variant only declare its
>>> structure if PTRACE_PEEKSIGINFO
>>> +has not been defined.
>>> +
>>> +Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
>>> +---
>>> + libc/sysdeps/unix/sysv/linux/sys/ptrace.h |    2 ++
>>> + 1 file changed, 2 insertions(+)
>>> +
>>> +diff --git a/sysdeps/unix/sysv/linux/sys/ptrace.h
>>> b/sysdeps/unix/sysv/linux/sys/ptrace.h
>>> +index 2b78565..7800d9a 100644
>>> +--- a/sysdeps/unix/sysv/linux/sys/ptrace.h
>>> ++++ b/sysdeps/unix/sysv/linux/sys/ptrace.h
>>> +@@ -187,6 +187,7 @@ enum __ptrace_eventcodes
>>> +   PTRAVE_EVENT_SECCOMP  = 7
>>> + };
>>> +
>>> ++#ifndef PTRACE_PEEKSIGINFO
>>> + /* Arguments for PTRACE_PEEKSIGINFO.  */
>>> + struct ptrace_peeksiginfo_args
>>> + {
>>> +@@ -194,6 +195,7 @@ struct ptrace_peeksiginfo_args
>>> +   __uint32_t flags;   /* Flags for peeksiginfo.  */
>>> +   __int32_t nr;               /* How many siginfos to take.  */
>>> + };
>>> ++#endif
>>> +
>>> + enum __ptrace_peeksiginfo_flags
>>> + {
>>> +--
>>> +1.7.10.4
>>> +
>>> diff --git a/meta/recipes-core/eglibc/eglibc_2.18.bb
>>> b/meta/recipes-core/eglibc/eglibc_2.18.bb
>>> index 17b651f..2257c21 100644
>>> --- a/meta/recipes-core/eglibc/eglibc_2.18.bb
>>> +++ b/meta/recipes-core/eglibc/eglibc_2.18.bb
>>> @@ -26,6 +26,7 @@ SRC_URI =
>>> "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr23
>>>              file://tzselect-awk.patch \
>>>
>>> file://0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
>>>              file://fix-tibetian-locales.patch \
>>> +
>>> file://0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch \
>>>             "
>>>   SRC_URI[md5sum] = "b395b021422a027d89884992e91734fc"
>>>   SRC_URI[sha256sum] =
>>> "15f564b45dc5dd65faf0875579e3447961ae61e876933384ae05d19328539ad4"
>>> --
>>> 1.7.10.4
>>>
>
Bruce Ashfield - Aug. 26, 2013, 2:39 a.m.
On Sun, Aug 25, 2013 at 10:14 PM, Bruce Ashfield
<bruce.ashfield@windriver.com> wrote:
> On 13-08-25 8:54 PM, Bruce Ashfield wrote:
>>
>> On 13-08-25 8:46 PM, Khem Raj wrote:
>>>
>>> Hi Bruce
>>>
>>> On Sat, Aug 24, 2013 at 10:16 PM, Bruce Ashfield
>>> <bruce.ashfield@windriver.com> wrote:
>>>>
>>>> linux kernel commit 84c751bd [ptrace: add ability to retrieve signals
>>>> without removing from a queue (v4)]
>>>> added ptrace_peeksiginfo_args to the exported kernel user api.
>>>>
>>>> This leads to build errors such as:
>>>>
>>>> | In file included from
>>>>
>>>> /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:66:0:
>>>>
>>>> |
>>>> /poky-master/build/tmp/sysroots/qemux86/usr/include/linux/ptrace.h:58:8:
>>>> error: redefinition of 'struct ptrace_peeksiginfo_args'
>>>> |  struct ptrace_peeksiginfo_args {
>>>> |         ^
>>>> | In file included from
>>>>
>>>> /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/defs.h:159:0,
>>>>
>>>> |                  from
>>>>
>>>> /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:37:
>>>>
>>>> |
>>>> /poky-master/build/tmp/sysroots/qemux86/usr/include/sys/ptrace.h:191:8:
>>>> note: originally defined here
>>>> |  struct ptrace_peeksiginfo_args
>>>> |         ^
>>>> | make[2]: *** [process.o] Error 1
>>>>
>>>> In files that include both the eglibc sys/ptrace.h and the linux
>>>> kernel exported
>>>> one.
>>>>
>>>> We can avoid this by making the eglibc variant only declare its
>>>> structure if PTRACE_PEEKSIGINFO
>>>> has not been defined.
>>>
>>>
>>> The problem is there however we need not fix it in eglibc thats wrong
>>> place to fix it. The right place to fix it is affected application
>>> which seems so mix glibc and kernel interfaces. It should try to not
>>> mix kernel and glibc interfaces. This patch as such is not
>>> appropriate.
>>
>>
>> My insistence is that this go in in the mean time, otherwise the 3.10
>
>
> s/insistence/suggestion/
>
> That came out a bit to strong! :)


... and I should point out that the fix I have in this patch also
requires a particular
include order. So by all definitions .. it is temporary!

Bruce

>
> Bruce
>
>
>> kernel headers miss the M4 cutoff and basically the whole release.
>>
>> I'm certainly not going to have the time and cycles to fix individual
>> applications, so our choices boil down to taking this change, rolling
>> back to the 3.8 headers, or waiting for individual package maintainers
>> to update their packages to work with the 3.10 headers.
>>
>> I personally don't see the harm in this change, since these applications
>> have always had this mix of both sys/ptrace.h and linux/ptrace.h in the
>> past, now doesn't seem like the time to fix them.
>>
>> Cheers,
>>
>> Bruce
>>
>>
>>>
>>>
>>>>
>>>> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
>>>> ---
>>>>   ...ect-ptrace_peeksiginfo_args-from-redefint.patch |   55
>>>> ++++++++++++++++++++
>>>>   meta/recipes-core/eglibc/eglibc_2.18.bb            |    1 +
>>>>   2 files changed, 56 insertions(+)
>>>>   create mode 100644
>>>>
>>>> meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
>>>>
>>>>
>>>> diff --git
>>>>
>>>> a/meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
>>>>
>>>> b/meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
>>>>
>>>> new file mode 100644
>>>> index 0000000..edf10fb
>>>> --- /dev/null
>>>> +++
>>>>
>>>> b/meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
>>>>
>>>> @@ -0,0 +1,55 @@
>>>> +From b5fe604678ffc7e0d6c2704a73d22f99b24a6d25 Mon Sep 17 00:00:00 2001
>>>> +From: Bruce Ashfield <bruce.ashfield@windriver.com>
>>>> +Date: Sat, 24 Aug 2013 23:51:06 -0400
>>>> +Subject: [PATCH] ptrace: protect ptrace_peeksiginfo_args from
>>>> redefintion
>>>> +
>>>> +linux kernel commit 84c751bd [ptrace: add ability to retrieve
>>>> signals without removing from a queue (v4)]
>>>> +added ptrace_peeksiginfo_args to the exported kernel user api.
>>>> +
>>>> +This leads to build errors such as:
>>>> +
>>>> +| In file included from
>>>>
>>>> /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:66:0:
>>>>
>>>> +|
>>>> /poky-master/build/tmp/sysroots/qemux86/usr/include/linux/ptrace.h:58:8:
>>>> error: redefinition of 'struct ptrace_peeksiginfo_args'
>>>> +|  struct ptrace_peeksiginfo_args {
>>>> +|         ^
>>>> +| In file included from
>>>>
>>>> /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/defs.h:159:0,
>>>>
>>>> +|                  from
>>>>
>>>> /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:37:
>>>>
>>>> +|
>>>> /poky-master/build/tmp/sysroots/qemux86/usr/include/sys/ptrace.h:191:8:
>>>> note: originally defined here
>>>> +|  struct ptrace_peeksiginfo_args
>>>> +|         ^
>>>> +| make[2]: *** [process.o] Error 1
>>>> +
>>>> +In files that include both the eglibc sys/ptrace.h and the linux
>>>> kernel exported
>>>> +one.
>>>> +
>>>> +We can avoid this by making the eglibc variant only declare its
>>>> structure if PTRACE_PEEKSIGINFO
>>>> +has not been defined.
>>>> +
>>>> +Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
>>>> +---
>>>> + libc/sysdeps/unix/sysv/linux/sys/ptrace.h |    2 ++
>>>> + 1 file changed, 2 insertions(+)
>>>> +
>>>> +diff --git a/sysdeps/unix/sysv/linux/sys/ptrace.h
>>>> b/sysdeps/unix/sysv/linux/sys/ptrace.h
>>>> +index 2b78565..7800d9a 100644
>>>> +--- a/sysdeps/unix/sysv/linux/sys/ptrace.h
>>>> ++++ b/sysdeps/unix/sysv/linux/sys/ptrace.h
>>>> +@@ -187,6 +187,7 @@ enum __ptrace_eventcodes
>>>> +   PTRAVE_EVENT_SECCOMP  = 7
>>>> + };
>>>> +
>>>> ++#ifndef PTRACE_PEEKSIGINFO
>>>> + /* Arguments for PTRACE_PEEKSIGINFO.  */
>>>> + struct ptrace_peeksiginfo_args
>>>> + {
>>>> +@@ -194,6 +195,7 @@ struct ptrace_peeksiginfo_args
>>>> +   __uint32_t flags;   /* Flags for peeksiginfo.  */
>>>> +   __int32_t nr;               /* How many siginfos to take.  */
>>>> + };
>>>> ++#endif
>>>> +
>>>> + enum __ptrace_peeksiginfo_flags
>>>> + {
>>>> +--
>>>> +1.7.10.4
>>>> +
>>>> diff --git a/meta/recipes-core/eglibc/eglibc_2.18.bb
>>>> b/meta/recipes-core/eglibc/eglibc_2.18.bb
>>>> index 17b651f..2257c21 100644
>>>> --- a/meta/recipes-core/eglibc/eglibc_2.18.bb
>>>> +++ b/meta/recipes-core/eglibc/eglibc_2.18.bb
>>>> @@ -26,6 +26,7 @@ SRC_URI =
>>>> "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr23
>>>>              file://tzselect-awk.patch \
>>>>
>>>> file://0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
>>>>              file://fix-tibetian-locales.patch \
>>>> +
>>>> file://0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch \
>>>>             "
>>>>   SRC_URI[md5sum] = "b395b021422a027d89884992e91734fc"
>>>>   SRC_URI[sha256sum] =
>>>> "15f564b45dc5dd65faf0875579e3447961ae61e876933384ae05d19328539ad4"
>>>> --
>>>> 1.7.10.4
>>>>
>>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Bruce Ashfield - Aug. 26, 2013, 2:46 a.m.
On Sun, Aug 25, 2013 at 10:39 PM, Bruce Ashfield
<bruce.ashfield@gmail.com> wrote:
> On Sun, Aug 25, 2013 at 10:14 PM, Bruce Ashfield
> <bruce.ashfield@windriver.com> wrote:
>> On 13-08-25 8:54 PM, Bruce Ashfield wrote:
>>>
>>> On 13-08-25 8:46 PM, Khem Raj wrote:
>>>>
>>>> Hi Bruce
>>>>
>>>> On Sat, Aug 24, 2013 at 10:16 PM, Bruce Ashfield
>>>> <bruce.ashfield@windriver.com> wrote:
>>>>>
>>>>> linux kernel commit 84c751bd [ptrace: add ability to retrieve signals
>>>>> without removing from a queue (v4)]
>>>>> added ptrace_peeksiginfo_args to the exported kernel user api.
>>>>>
>>>>> This leads to build errors such as:
>>>>>
>>>>> | In file included from
>>>>>
>>>>> /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:66:0:
>>>>>
>>>>> |
>>>>> /poky-master/build/tmp/sysroots/qemux86/usr/include/linux/ptrace.h:58:8:
>>>>> error: redefinition of 'struct ptrace_peeksiginfo_args'
>>>>> |  struct ptrace_peeksiginfo_args {
>>>>> |         ^
>>>>> | In file included from
>>>>>
>>>>> /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/defs.h:159:0,
>>>>>
>>>>> |                  from
>>>>>
>>>>> /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:37:
>>>>>
>>>>> |
>>>>> /poky-master/build/tmp/sysroots/qemux86/usr/include/sys/ptrace.h:191:8:
>>>>> note: originally defined here
>>>>> |  struct ptrace_peeksiginfo_args
>>>>> |         ^
>>>>> | make[2]: *** [process.o] Error 1
>>>>>
>>>>> In files that include both the eglibc sys/ptrace.h and the linux
>>>>> kernel exported
>>>>> one.
>>>>>
>>>>> We can avoid this by making the eglibc variant only declare its
>>>>> structure if PTRACE_PEEKSIGINFO
>>>>> has not been defined.
>>>>
>>>>
>>>> The problem is there however we need not fix it in eglibc thats wrong
>>>> place to fix it. The right place to fix it is affected application
>>>> which seems so mix glibc and kernel interfaces. It should try to not
>>>> mix kernel and glibc interfaces. This patch as such is not
>>>> appropriate.
>>>
>>>
>>> My insistence is that this go in in the mean time, otherwise the 3.10
>>
>>
>> s/insistence/suggestion/
>>
>> That came out a bit to strong! :)
>
>
> ... and I should point out that the fix I have in this patch also
> requires a particular
> include order. So by all definitions .. it is temporary!

A final (maybe .. hopefully!?) thought on this. Do drop this change,
but give me a
few minutes to remove the offending structure from linux-libc-headers_3.10. That
will also protect all users of yocto, regardless of the kernel unless
they provide
their own libc-headers .. and then they are on their own :)

That leaves the c library alone, and should buy us time to fix the
offending apps.

Bruce

>
> Bruce
>
>>
>> Bruce
>>
>>
>>> kernel headers miss the M4 cutoff and basically the whole release.
>>>
>>> I'm certainly not going to have the time and cycles to fix individual
>>> applications, so our choices boil down to taking this change, rolling
>>> back to the 3.8 headers, or waiting for individual package maintainers
>>> to update their packages to work with the 3.10 headers.
>>>
>>> I personally don't see the harm in this change, since these applications
>>> have always had this mix of both sys/ptrace.h and linux/ptrace.h in the
>>> past, now doesn't seem like the time to fix them.
>>>
>>> Cheers,
>>>
>>> Bruce
>>>
>>>
>>>>
>>>>
>>>>>
>>>>> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
>>>>> ---
>>>>>   ...ect-ptrace_peeksiginfo_args-from-redefint.patch |   55
>>>>> ++++++++++++++++++++
>>>>>   meta/recipes-core/eglibc/eglibc_2.18.bb            |    1 +
>>>>>   2 files changed, 56 insertions(+)
>>>>>   create mode 100644
>>>>>
>>>>> meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
>>>>>
>>>>>
>>>>> diff --git
>>>>>
>>>>> a/meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
>>>>>
>>>>> b/meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
>>>>>
>>>>> new file mode 100644
>>>>> index 0000000..edf10fb
>>>>> --- /dev/null
>>>>> +++
>>>>>
>>>>> b/meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
>>>>>
>>>>> @@ -0,0 +1,55 @@
>>>>> +From b5fe604678ffc7e0d6c2704a73d22f99b24a6d25 Mon Sep 17 00:00:00 2001
>>>>> +From: Bruce Ashfield <bruce.ashfield@windriver.com>
>>>>> +Date: Sat, 24 Aug 2013 23:51:06 -0400
>>>>> +Subject: [PATCH] ptrace: protect ptrace_peeksiginfo_args from
>>>>> redefintion
>>>>> +
>>>>> +linux kernel commit 84c751bd [ptrace: add ability to retrieve
>>>>> signals without removing from a queue (v4)]
>>>>> +added ptrace_peeksiginfo_args to the exported kernel user api.
>>>>> +
>>>>> +This leads to build errors such as:
>>>>> +
>>>>> +| In file included from
>>>>>
>>>>> /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:66:0:
>>>>>
>>>>> +|
>>>>> /poky-master/build/tmp/sysroots/qemux86/usr/include/linux/ptrace.h:58:8:
>>>>> error: redefinition of 'struct ptrace_peeksiginfo_args'
>>>>> +|  struct ptrace_peeksiginfo_args {
>>>>> +|         ^
>>>>> +| In file included from
>>>>>
>>>>> /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/defs.h:159:0,
>>>>>
>>>>> +|                  from
>>>>>
>>>>> /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:37:
>>>>>
>>>>> +|
>>>>> /poky-master/build/tmp/sysroots/qemux86/usr/include/sys/ptrace.h:191:8:
>>>>> note: originally defined here
>>>>> +|  struct ptrace_peeksiginfo_args
>>>>> +|         ^
>>>>> +| make[2]: *** [process.o] Error 1
>>>>> +
>>>>> +In files that include both the eglibc sys/ptrace.h and the linux
>>>>> kernel exported
>>>>> +one.
>>>>> +
>>>>> +We can avoid this by making the eglibc variant only declare its
>>>>> structure if PTRACE_PEEKSIGINFO
>>>>> +has not been defined.
>>>>> +
>>>>> +Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
>>>>> +---
>>>>> + libc/sysdeps/unix/sysv/linux/sys/ptrace.h |    2 ++
>>>>> + 1 file changed, 2 insertions(+)
>>>>> +
>>>>> +diff --git a/sysdeps/unix/sysv/linux/sys/ptrace.h
>>>>> b/sysdeps/unix/sysv/linux/sys/ptrace.h
>>>>> +index 2b78565..7800d9a 100644
>>>>> +--- a/sysdeps/unix/sysv/linux/sys/ptrace.h
>>>>> ++++ b/sysdeps/unix/sysv/linux/sys/ptrace.h
>>>>> +@@ -187,6 +187,7 @@ enum __ptrace_eventcodes
>>>>> +   PTRAVE_EVENT_SECCOMP  = 7
>>>>> + };
>>>>> +
>>>>> ++#ifndef PTRACE_PEEKSIGINFO
>>>>> + /* Arguments for PTRACE_PEEKSIGINFO.  */
>>>>> + struct ptrace_peeksiginfo_args
>>>>> + {
>>>>> +@@ -194,6 +195,7 @@ struct ptrace_peeksiginfo_args
>>>>> +   __uint32_t flags;   /* Flags for peeksiginfo.  */
>>>>> +   __int32_t nr;               /* How many siginfos to take.  */
>>>>> + };
>>>>> ++#endif
>>>>> +
>>>>> + enum __ptrace_peeksiginfo_flags
>>>>> + {
>>>>> +--
>>>>> +1.7.10.4
>>>>> +
>>>>> diff --git a/meta/recipes-core/eglibc/eglibc_2.18.bb
>>>>> b/meta/recipes-core/eglibc/eglibc_2.18.bb
>>>>> index 17b651f..2257c21 100644
>>>>> --- a/meta/recipes-core/eglibc/eglibc_2.18.bb
>>>>> +++ b/meta/recipes-core/eglibc/eglibc_2.18.bb
>>>>> @@ -26,6 +26,7 @@ SRC_URI =
>>>>> "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr23
>>>>>              file://tzselect-awk.patch \
>>>>>
>>>>> file://0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
>>>>>              file://fix-tibetian-locales.patch \
>>>>> +
>>>>> file://0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch \
>>>>>             "
>>>>>   SRC_URI[md5sum] = "b395b021422a027d89884992e91734fc"
>>>>>   SRC_URI[sha256sum] =
>>>>> "15f564b45dc5dd65faf0875579e3447961ae61e876933384ae05d19328539ad4"
>>>>> --
>>>>> 1.7.10.4
>>>>>
>>>
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
>
> --
> "Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end"
Khem Raj - Aug. 26, 2013, 5:28 p.m.
On Aug 25, 2013, at 7:46 PM, Bruce Ashfield <bruce.ashfield@gmail.com> wrote:

> A final (maybe .. hopefully!?) thought on this. Do drop this change,
> but give me a
> few minutes to remove the offending structure from linux-libc-headers_3.10. That
> will also protect all users of yocto, regardless of the kernel unless
> they provide
> their own libc-headers .. and then they are on their own :)
> 
> That leaves the c library alone, and should buy us time to fix the
> offending apps.

this is not again the correct place to fix it. since you will back this out say later
when all apps are fixed anyway. If we need to keep it I would rather have the app
builds failing and keep it enabled and it should not be the guy who is doing the kernel
headers upgrade to fix the whole ecosystem either. So add the headers by all means
and leave the old headers in there until the apps work correctly with new headers.
Bruce Ashfield - Aug. 26, 2013, 5:59 p.m.
On Mon, Aug 26, 2013 at 1:28 PM, Khem Raj <raj.khem@gmail.com> wrote:
>
> On Aug 25, 2013, at 7:46 PM, Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
>
>> A final (maybe .. hopefully!?) thought on this. Do drop this change,
>> but give me a
>> few minutes to remove the offending structure from linux-libc-headers_3.10. That
>> will also protect all users of yocto, regardless of the kernel unless
>> they provide
>> their own libc-headers .. and then they are on their own :)
>>
>> That leaves the c library alone, and should buy us time to fix the
>> offending apps.
>
> this is not again the correct place to fix it. since you will back this out say later
> when all apps are fixed anyway. If we need to keep it I would rather have the app
> builds failing and keep it enabled and it should not be the guy who is doing the kernel
> headers upgrade to fix the whole ecosystem either. So add the headers by all means
> and leave the old headers in there until the apps work correctly with new headers.

Whether or not to allow the apps to break, that's a call for Saul and
Richard. For
now, this fix works in all cases, and I'm able to build and boot with the 3.10
kernel and matching headers.

Given that we are about to hit the M4 freeze, I'd prefer this in now,
and the apps
fixed later. We need to get mileage with the matching headers and kernel.

I think this is a good compromise for the time being, we've had far
nastier hacks in
the libc-headers in the past.

Bruce
Khem Raj - Aug. 26, 2013, 9:16 p.m.
On Aug 26, 2013, at 10:59 AM, Bruce Ashfield <bruce.ashfield@gmail.com> wrote:

> On Mon, Aug 26, 2013 at 1:28 PM, Khem Raj <raj.khem@gmail.com> wrote:
>> 
>> On Aug 25, 2013, at 7:46 PM, Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
>> 
>>> A final (maybe .. hopefully!?) thought on this. Do drop this change,
>>> but give me a
>>> few minutes to remove the offending structure from linux-libc-headers_3.10. That
>>> will also protect all users of yocto, regardless of the kernel unless
>>> they provide
>>> their own libc-headers .. and then they are on their own :)
>>> 
>>> That leaves the c library alone, and should buy us time to fix the
>>> offending apps.
>> 
>> this is not again the correct place to fix it. since you will back this out say later
>> when all apps are fixed anyway. If we need to keep it I would rather have the app
>> builds failing and keep it enabled and it should not be the guy who is doing the kernel
>> headers upgrade to fix the whole ecosystem either. So add the headers by all means
>> and leave the old headers in there until the apps work correctly with new headers.
> 
> Whether or not to allow the apps to break, that's a call for Saul and
> Richard. For
> now, this fix works in all cases, and I'm able to build and boot with the 3.10
> kernel and matching headers.
> 
> Given that we are about to hit the M4 freeze, I'd prefer this in now,
> and the apps
> fixed later. We need to get mileage with the matching headers and kernel.
> 
> I think this is a good compromise for the time being, we've had far
> nastier hacks in
> the libc-headers in the past.

It would make it harder to fix this problem in the app if we work is around this way :)
while I see the your urgency of making 3.10 defaults. I don't think we should rush it but  thats
just me


> 
> Bruce
> 
> 
> 
> -- 
> "Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end"
Bruce Ashfield - Aug. 26, 2013, 9:27 p.m.
On Mon, Aug 26, 2013 at 5:16 PM, Khem Raj <raj.khem@gmail.com> wrote:
>
> On Aug 26, 2013, at 10:59 AM, Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
>
>> On Mon, Aug 26, 2013 at 1:28 PM, Khem Raj <raj.khem@gmail.com> wrote:
>>>
>>> On Aug 25, 2013, at 7:46 PM, Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
>>>
>>>> A final (maybe .. hopefully!?) thought on this. Do drop this change,
>>>> but give me a
>>>> few minutes to remove the offending structure from linux-libc-headers_3.10. That
>>>> will also protect all users of yocto, regardless of the kernel unless
>>>> they provide
>>>> their own libc-headers .. and then they are on their own :)
>>>>
>>>> That leaves the c library alone, and should buy us time to fix the
>>>> offending apps.
>>>
>>> this is not again the correct place to fix it. since you will back this out say later
>>> when all apps are fixed anyway. If we need to keep it I would rather have the app
>>> builds failing and keep it enabled and it should not be the guy who is doing the kernel
>>> headers upgrade to fix the whole ecosystem either. So add the headers by all means
>>> and leave the old headers in there until the apps work correctly with new headers.
>>
>> Whether or not to allow the apps to break, that's a call for Saul and
>> Richard. For
>> now, this fix works in all cases, and I'm able to build and boot with the 3.10
>> kernel and matching headers.
>>
>> Given that we are about to hit the M4 freeze, I'd prefer this in now,
>> and the apps
>> fixed later. We need to get mileage with the matching headers and kernel.
>>
>> I think this is a good compromise for the time being, we've had far
>> nastier hacks in
>> the libc-headers in the past.
>
> It would make it harder to fix this problem in the app if we work is around this way :)
> while I see the your urgency of making 3.10 defaults. I don't think we should rush it but  thats
> just me

Typically I just ask for bugzilla entries to track the fixes in a situation like
this. At a high enough priority that they block a release. That gets everyone's
attention :)

Bruce

>
>
>>
>> Bruce
>>
>>
>>
>> --
>> "Thou shalt not follow the NULL pointer, for chaos and madness await
>> thee at its end"
>

Patch

diff --git a/meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch b/meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
new file mode 100644
index 0000000..edf10fb
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch
@@ -0,0 +1,55 @@ 
+From b5fe604678ffc7e0d6c2704a73d22f99b24a6d25 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@windriver.com>
+Date: Sat, 24 Aug 2013 23:51:06 -0400
+Subject: [PATCH] ptrace: protect ptrace_peeksiginfo_args from redefintion
+
+linux kernel commit 84c751bd [ptrace: add ability to retrieve signals without removing from a queue (v4)]
+added ptrace_peeksiginfo_args to the exported kernel user api.
+
+This leads to build errors such as:
+
+| In file included from /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:66:0:
+| /poky-master/build/tmp/sysroots/qemux86/usr/include/linux/ptrace.h:58:8: error: redefinition of 'struct ptrace_peeksiginfo_args'
+|  struct ptrace_peeksiginfo_args {
+|         ^
+| In file included from /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/defs.h:159:0,
+|                  from /poky-master/build/tmp/work/i586-poky-linux/strace/4.8-r0/strace-4.8/process.c:37:
+| /poky-master/build/tmp/sysroots/qemux86/usr/include/sys/ptrace.h:191:8: note: originally defined here
+|  struct ptrace_peeksiginfo_args
+|         ^
+| make[2]: *** [process.o] Error 1
+
+In files that include both the eglibc sys/ptrace.h and the linux kernel exported
+one.
+
+We can avoid this by making the eglibc variant only declare its structure if PTRACE_PEEKSIGINFO
+has not been defined.
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+---
+ libc/sysdeps/unix/sysv/linux/sys/ptrace.h |    2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/sysdeps/unix/sysv/linux/sys/ptrace.h b/sysdeps/unix/sysv/linux/sys/ptrace.h
+index 2b78565..7800d9a 100644
+--- a/sysdeps/unix/sysv/linux/sys/ptrace.h
++++ b/sysdeps/unix/sysv/linux/sys/ptrace.h
+@@ -187,6 +187,7 @@ enum __ptrace_eventcodes
+   PTRAVE_EVENT_SECCOMP  = 7
+ };
+ 
++#ifndef PTRACE_PEEKSIGINFO
+ /* Arguments for PTRACE_PEEKSIGINFO.  */
+ struct ptrace_peeksiginfo_args
+ {
+@@ -194,6 +195,7 @@ struct ptrace_peeksiginfo_args
+   __uint32_t flags;	/* Flags for peeksiginfo.  */
+   __int32_t nr;		/* How many siginfos to take.  */
+ };
++#endif
+ 
+ enum __ptrace_peeksiginfo_flags
+ {
+-- 
+1.7.10.4
+
diff --git a/meta/recipes-core/eglibc/eglibc_2.18.bb b/meta/recipes-core/eglibc/eglibc_2.18.bb
index 17b651f..2257c21 100644
--- a/meta/recipes-core/eglibc/eglibc_2.18.bb
+++ b/meta/recipes-core/eglibc/eglibc_2.18.bb
@@ -26,6 +26,7 @@  SRC_URI = "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr23
            file://tzselect-awk.patch \
            file://0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
            file://fix-tibetian-locales.patch \
+           file://0001-ptrace-protect-ptrace_peeksiginfo_args-from-redefint.patch \
           "
 SRC_URI[md5sum] = "b395b021422a027d89884992e91734fc"
 SRC_URI[sha256sum] = "15f564b45dc5dd65faf0875579e3447961ae61e876933384ae05d19328539ad4"