Skip to contentSkip to conversation

linux-libc-headers: fix 3.10 build issues

PATCH In review Bruce Ashfield 4 participants 7 messages Aug 26, 2013

lore
Share & tools
lore
#0 lore raw

Richard/Saul,

As I mentioned in my last reply to my previous series:

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

Should be dropped, and replaced with this patch.

It's a better idea to revert part of the kernel commit while we work on updating applications, than it is to patch eglibc and hope that include orders work in all cases.

If you'd like a resend of the whole series, I can do that as well. But for now, I'm only sending this single patch.

I've already build the offending applications on two architectures and everything looks fine. My full builds are still running, but I wanted to get this out and into Saul's hands sooner rather than later.

Cheers,

Bruce

#1 lore raw

PATCH 1/1 linux-libc-headers: ptrace.h: remove ptrace_peeksiginfo_args

The addition of ptrace_peeksiginfo_args to the uapi in kernel commit 84c751bd [ptrace: add ability to retrieve signals without removing from a queue (v4)] means that existing applications using glibc versions that define ptrace_peeksiginfo_args in sys/ptrace.h will get duplicate structure definitions like:

    | 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

Reverting to the previous status of not exporting this structure temporarily fixes applications, until they can be adjusted to not mix sys/ptrace.h and linux/ptrace.h includes.

---
 ...1-ptrace.h-remove-ptrace_peeksiginfo_args.patch |   50 ++++++++++++++++++++
 .../linux-libc-headers/linux-libc-headers_3.10.bb  |    2 +-
 2 files changed, 51 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ptrace.h-remove-ptrace_peeksiginfo_args.patch
meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ptrace.h-remove-ptrace_peeksiginfo_args.patch new file +50 -0
new file mode 100644
index 0000000..da2e117
@@ -0,0 +1,50 @@
+From 7dddfb8fec5317ea16154d30e8e18b6559979b60 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <[email protected]>
+Date: Sun, 25 Aug 2013 22:51:07 -0400
+Subject: [PATCH] ptrace.h: remove ptrace_peeksiginfo_args
+
+The addition of ptrace_peeksiginfo_args to the uapi in kernel commit
+84c751bd [ptrace: add ability to retrieve signals without removing from a queue (v4)]
+means that existing applications using glibc versions that define ptrace_peeksiginfo_args
+in sys/ptrace.h will get duplicate structure definitions like:
+
+    | 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
+
+Reverting to the previous status of not exporting this structure temporarily
+fixes applications, until they can be adjusted to not mix sys/ptrace.h and
+linux/ptrace.h includes.
+
+Signed-off-by: Bruce Ashfield <[email protected]>
+---
+ include/uapi/linux/ptrace.h |    6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/include/uapi/linux/ptrace.h b/include/uapi/linux/ptrace.h
+index 52ebcc8..524599d 100644
+--- a/include/uapi/linux/ptrace.h
++++ b/include/uapi/linux/ptrace.h
+@@ -55,12 +55,6 @@
+ 
+ #define PTRACE_PEEKSIGINFO	0x4209
+ 
+-struct ptrace_peeksiginfo_args {
+-	__u64 off;	/* from which siginfo to start */
+-	__u32 flags;
+-	__s32 nr;	/* how may siginfos to take */
+-};
+-
+ /* Read signals from a shared (process wide) queue */
+ #define PTRACE_PEEKSIGINFO_SHARED	(1 << 0)
+ 
+-- 
+1.7.10.4
+
meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.10.bb +1 -1
index eb04367..b2e6f0f 100644
@@ -1,6 +1,6 @@
 require linux-libc-headers.inc
 
-PR = "r0"
+SRC_URI += "file://0001-ptrace.h-remove-ptrace_peeksiginfo_args.patch"
 
 SRC_URI[md5sum] = "72d0a9b3e60cd86fabcd3f24b1708944"
 SRC_URI[sha256sum] = "46c9e55e1fddf40813b8d697d5645037a8e2af5c1a8dff52b3fe82b5021582b8"
Signature · 1 line
1.7.10.4
#2 lore raw

Re: [PATCH] linux-libc-headers: ptrace.h: remove ptrace_peeksiginfo_args

Quoted 49 lines · Bruce Ashfield

The addition of ptrace_peeksiginfo_args to the uapi in kernel commit 84c751bd [ptrace: add ability to retrieve signals without removing from a queue (v4)] means that existing applications using glibc versions that define ptrace_peeksiginfo_args in sys/ptrace.h will get duplicate structure definitions like:

     | 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

Reverting to the previous status of not exporting this structure temporarily fixes applications, until they can be adjusted to not mix sys/ptrace.h and linux/ptrace.h includes.

---
  ...1-ptrace.h-remove-ptrace_peeksiginfo_args.patch |   50 ++++++++++++++++++++
  .../linux-libc-headers/linux-libc-headers_3.10.bb  |    2 +-
  2 files changed, 51 insertions(+), 1 deletion(-)

create mode 100644 meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ptrace.h-remove-ptrace_peeksiginfo_args.patch

meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ptrace.h-remove-ptrace_peeksiginfo_args.patch new file +16 -0
new file mode 100644
index 0000000..da2e117
@@ -0,0 +1,50 @@
+From 7dddfb8fec5317ea16154d30e8e18b6559979b60 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <[email protected]>
+Date: Sun, 25 Aug 2013 22:51:07 -0400
+Subject: [PATCH] ptrace.h: remove ptrace_peeksiginfo_args
+
+The addition of ptrace_peeksiginfo_args to the uapi in kernel commit
+84c751bd [ptrace: add ability to retrieve signals without removing from a queue (v4)]
+means that existing applications using glibc versions that define ptrace_peeksiginfo_args
+in sys/ptrace.h will get duplicate structure definitions like:
+
+    | 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:

meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ptrace.h-remove-ptrace_peeksiginfo_args.patch line 26

Quoted 10 lines
meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ptrace.h-remove-ptrace_peeksiginfo_args.patch new file +10 -0
+    | /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
+
+Reverting to the previous status of not exporting this structure temporarily
+fixes applications, until they can be adjusted to not mix sys/ptrace.h and
+linux/ptrace.h includes.
+
+Signed-off-by: Bruce Ashfield <[email protected]>

Just for the record, it has no Upstream-Status, I know how much you dislike upstream status and just how inappropriate this patch is!

I will put this in MUT so we can move forward tonight.

Thanks
Sau!

Quoted 37 lines
meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ptrace.h-remove-ptrace_peeksiginfo_args.patch new file +24 -0
+---
+ include/uapi/linux/ptrace.h |    6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/include/uapi/linux/ptrace.h b/include/uapi/linux/ptrace.h
+index 52ebcc8..524599d 100644
+--- a/include/uapi/linux/ptrace.h
++++ b/include/uapi/linux/ptrace.h
+@@ -55,12 +55,6 @@
+
+ #define PTRACE_PEEKSIGINFO	0x4209
+
+-struct ptrace_peeksiginfo_args {
+-	__u64 off;	/* from which siginfo to start */
+-	__u32 flags;
+-	__s32 nr;	/* how may siginfos to take */
+-};
+-
+ /* Read signals from a shared (process wide) queue */
+ #define PTRACE_PEEKSIGINFO_SHARED	(1 << 0)
+
+--
+1.7.10.4
+
meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.10.bb +1 -1
index eb04367..b2e6f0f 100644
@@ -1,6 +1,6 @@
  require linux-libc-headers.inc
 
-PR = "r0"
+SRC_URI += "file://0001-ptrace.h-remove-ptrace_peeksiginfo_args.patch"
 
  SRC_URI[md5sum] = "72d0a9b3e60cd86fabcd3f24b1708944"
  SRC_URI[sha256sum] = "46c9e55e1fddf40813b8d697d5645037a8e2af5c1a8dff52b3fe82b5021582b8"
#3 lore raw

Re: [PATCH] linux-libc-headers: ptrace.h: remove ptrace_peeksiginfo_args

Quoted 91 lines · Saul Wold
Quoted 90 lines · Bruce Ashfield

The addition of ptrace_peeksiginfo_args to the uapi in kernel commit 84c751bd [ptrace: add ability to retrieve signals without removing from a queue (v4)]
means that existing applications using glibc versions that define ptrace_peeksiginfo_args
in sys/ptrace.h will get duplicate structure definitions like:

| 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

Reverting to the previous status of not exporting this structure temporarily
fixes applications, until they can be adjusted to not mix sys/ptrace.h and
linux/ptrace.h includes.

---
  ...1-ptrace.h-remove-ptrace_peeksiginfo_args.patch |   50
++++++++++++++++++++
  .../linux-libc-headers/linux-libc-headers_3.10.bb  |    2 +-
  2 files changed, 51 insertions(+), 1 deletion(-)

create mode 100644
meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ptrace.h-remove-ptrace_peeksiginfo_args.patch

diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ptrace.h-remove-ptrace_peeksiginfo_args.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ptrace.h-remove-ptrace_peeksiginfo_args.patch

new file mode 100644
index 0000000..da2e117
--- /dev/null
+++
b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ptrace.h-remove-ptrace_peeksiginfo_args.patch

meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ptrace.h-remove-ptrace_peeksiginfo_args.patch new file +7 -0
@@ -0,0 +1,50 @@
+From 7dddfb8fec5317ea16154d30e8e18b6559979b60 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <[email protected]>
+Date: Sun, 25 Aug 2013 22:51:07 -0400
+Subject: [PATCH] ptrace.h: remove ptrace_peeksiginfo_args
+
+The addition of ptrace_peeksiginfo_args to the uapi in kernel commit
+84c751bd [ptrace: add ability to retrieve signals without removing

from a queue (v4)]
+means that existing applications using glibc versions that define ptrace_peeksiginfo_args

meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ptrace.h-remove-ptrace_peeksiginfo_args.patch new file +3 -0
+in sys/ptrace.h will get duplicate structure definitions like:
+
+    | 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'

meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ptrace.h-remove-ptrace_peeksiginfo_args.patch new file +3 -0
+    |  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

meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ptrace.h-remove-ptrace_peeksiginfo_args.patch new file +5 -0
+    |  struct ptrace_peeksiginfo_args
+    |         ^
+    | make[2]: *** [process.o] Error 1
+
+Reverting to the previous status of not exporting this structure

temporarily

Quoted 8 lines

meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ptrace.h-remove-ptrace_peeksiginfo_args.patch line 26

Quoted 5 lines

+fixes applications, until they can be adjusted to not mix sys/ptrace.h and

meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ptrace.h-remove-ptrace_peeksiginfo_args.patch new file +3 -0
+linux/ptrace.h includes.
+
+Signed-off-by: Bruce Ashfield <[email protected]>

Just for the record, it has no Upstream-Status, I know how much you dislike upstream status and just how inappropriate this patch is!

Thanks! And honestly, I didn't leave out the upstream status on purpose this time .. like I said, it just isn't in my workflow, since I normally seek and destroy them!

I'm pretty sure I can't convince the kernel guys to not export that structure, but I can try. Otherwise, it can have the "dirty hack" upstream status.

Quoted 2 lines

I will put this in MUT so we can move forward tonight.

Fingers crossed, my builds are working here.

Bruce

Quoted 44 lines

Thanks
Sau!

Quoted 40 lines
+---
+ include/uapi/linux/ptrace.h |    6 ------

+ 1 file changed, 6 deletions(-)

meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ptrace.h-remove-ptrace_peeksiginfo_args.patch new file +21 -0
+
+diff --git a/include/uapi/linux/ptrace.h b/include/uapi/linux/ptrace.h
+index 52ebcc8..524599d 100644
+--- a/include/uapi/linux/ptrace.h
++++ b/include/uapi/linux/ptrace.h
+@@ -55,12 +55,6 @@
+
+ #define PTRACE_PEEKSIGINFO    0x4209
+
+-struct ptrace_peeksiginfo_args {
+-    __u64 off;    /* from which siginfo to start */
+-    __u32 flags;
+-    __s32 nr;    /* how may siginfos to take */
+-};
+-
+ /* Read signals from a shared (process wide) queue */
+ #define PTRACE_PEEKSIGINFO_SHARED    (1 << 0)
+
+--
+1.7.10.4
+

diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.10.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.10.bb index eb04367..b2e6f0f 100644

meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.10.bb +1 -1
@@ -1,6 +1,6 @@
  require linux-libc-headers.inc
 
-PR = "r0"
+SRC_URI += "file://0001-ptrace.h-remove-ptrace_peeksiginfo_args.patch"
 
  SRC_URI[md5sum] = "72d0a9b3e60cd86fabcd3f24b1708944"
  SRC_URI[sha256sum] =

"46c9e55e1fddf40813b8d697d5645037a8e2af5c1a8dff52b3fe82b5021582b8"

#4 lore raw

Re: [PATCH] linux-libc-headers: ptrace.h: remove ptrace_peeksiginfo_args

Quoted 5 lines · Bruce Ashfield

On 13-08-26 12:08 AM, Saul Wold wrote:
Thanks! And honestly, I didn't leave out the upstream status on purpose this time .. like I said, it just isn't in my workflow, since I normally seek and destroy them!

Quoted 8 lines

I'm pretty sure I can't convince the kernel guys to not export that structure, but I can try. Otherwise, it can have the "dirty hack" upstream status.

Quoted 2 lines

I will put this in MUT so we can move forward tonight.

Fingers crossed, my builds are working here.

Things failed badly on the autobuilder since we dropped the command length patch and it was still needed. I've updated it against 3.10, confirmed it worked on the autobuilder and then merged things.

Cheers,

Richard

#5 lore raw

Re: [PATCH] linux-libc-headers: ptrace.h: remove ptrace_peeksiginfo_args

Quoted 11 lines · Richard Purdie
Quoted 10 lines · Bruce Ashfield

On 13-08-26 12:08 AM, Saul Wold wrote:
Thanks! And honestly, I didn't leave out the upstream status on purpose this time .. like I said, it just isn't in my workflow, since I normally seek and destroy them!

I'm pretty sure I can't convince the kernel guys to not export that structure, but I can try. Otherwise, it can have the "dirty hack" upstream status.

Quoted 1 line
Quoted 7 lines
Quoted 3 lines
Quoted 1 line

I will put this in MUT so we can move forward tonight.

Fingers crossed, my builds are working here.

Things failed badly on the autobuilder since we dropped the command length patch and it was still needed. I've updated it against 3.10, confirmed it worked on the autobuilder and then merged things.

Argh. I was emailed about that same patch in the mainline kernel, and when I tested my previously "long" directory name .. it worked.

Thanks for pulling it back in, I had my doubts, which is why I hand't removed it completely :)

Bruce

Quoted 11 lines

Cheers,

Richard

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#6 lore raw

Re: [PATCH] linux-libc-headers: ptrace.h: remove ptrace_peeksiginfo_args

Quoted 15 lines · Bruce Ashfield
Quoted 13 lines · Richard Purdie
Quoted 12 lines · Bruce Ashfield

On 13-08-26 12:08 AM, Saul Wold wrote:
Thanks! And honestly, I didn't leave out the upstream status on purpose this time .. like I said, it just isn't in my workflow, since I normally seek and destroy them!

I'm pretty sure I can't convince the kernel guys to not export that structure, but I can try. Otherwise, it can have the "dirty hack" upstream status.

Quoted 2 lines

I will put this in MUT so we can move forward tonight.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Fingers crossed, my builds are working here.

Things failed badly on the autobuilder since we dropped the command length patch and it was still needed. I've updated it against 3.10, confirmed it worked on the autobuilder and then merged things.

Argh. I was emailed about that same patch in the mainline kernel, and when I tested my previously "long" directory name .. it worked.

I think there is a dependency on the running kernel version too...

Quoted 2 lines

Thanks for pulling it back in, I had my doubts, which is why I hand't removed it completely :)

I kind of guessed that was why the patch was still there :)

Cheers,

Richard