Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Jonathan Liu <net147@gmail.com>
To: Bruce Ashfield <bruce.ashfield@windriver.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 4/7] eglibc: ptrace: protect ptrace_peeksiginfo_args from redefintion
Date: Sun, 25 Aug 2013 16:35:47 +1000	[thread overview]
Message-ID: <5219A5C3.1010409@gmail.com> (raw)
In-Reply-To: <c2d44f9ff8d416b7f984bc4027de7acecbec0986.1377405083.git.bruce.ashfield@windriver.com>

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"



  reply	other threads:[~2013-08-25  6:40 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-25  5:16 [v2 PATCH 0/7] linux-yocto: consolidated pull request Bruce Ashfield
2013-08-25  5:16 ` [PATCH 1/7] kern-tools: usability, bug fixes and no guilt Bruce Ashfield
2013-08-25  5:16 ` [PATCH 2/7] guilt: update to latest git version Bruce Ashfield
2013-08-25  5:16 ` [PATCH 3/7] linux-libc-headers: update to v3.10 Bruce Ashfield
2013-08-25  5:16 ` [PATCH 4/7] eglibc: ptrace: protect ptrace_peeksiginfo_args from redefintion Bruce Ashfield
2013-08-25  6:35   ` Jonathan Liu [this message]
2013-08-25 14:22     ` Bruce Ashfield
2013-08-26  0:46   ` Khem Raj
2013-08-26  0:54     ` Bruce Ashfield
2013-08-26  2:14       ` Bruce Ashfield
2013-08-26  2:39         ` Bruce Ashfield
2013-08-26  2:46           ` Bruce Ashfield
2013-08-26 17:28             ` Khem Raj
2013-08-26 17:59               ` Bruce Ashfield
2013-08-26 21:16                 ` Khem Raj
2013-08-26 21:27                   ` Bruce Ashfield
2013-08-25  5:16 ` [PATCH 5/7] gst-plugins-good: fix 3.10 libc-headers build failure Bruce Ashfield
2013-08-25  6:36   ` Jonathan Liu
2013-08-25 14:20     ` Bruce Ashfield
2013-08-25  5:16 ` [PATCH 6/7] linux-yocto: introduce v3.10 Bruce Ashfield
2013-08-25  5:16 ` [PATCH 7/7] linux-yocto: remove 3.8 recipes Bruce Ashfield
2013-08-26  2:30   ` Saul Wold
2013-08-26  2:32     ` Bruce Ashfield
2013-08-26  4:10       ` Saul Wold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5219A5C3.1010409@gmail.com \
    --to=net147@gmail.com \
    --cc=bruce.ashfield@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox