Skip to contentSkip to conversation

package/strace: disable mpers support

PATCH New Heiko Thiery 5 participants 7 messages Sep 7, 2020 – Sep 11, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/strace: disable mpers support

On aarch64 With the config option "--enable-mpers=check" the configure.ac script searchs for a 32bit compiler. When a matching compiler is found in the PATH some compatiblity checks are done. This can fail when the available kernel headers on host and buildroot target does not match.

Since buildroot does not support 32bit binaries when building for 64bit architecture (no -m32 option) we can disable this option unconditionally.

When disabling unconditionally also the configuration for toolchain using MUSL can be removed.

Cc Baruch Siach <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Brandon Maier <[email protected]>
---
 package/strace/strace.mk | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
package/strace/strace.mk +1 -9
index 8403e09cbd..50e6d90a87 100644
@@ -9,15 +9,7 @@ STRACE_SOURCE = strace-$(STRACE_VERSION).tar.xz
 STRACE_SITE = https://strace.io/files/$(STRACE_VERSION)
 STRACE_LICENSE = LGPL-2.1+
 STRACE_LICENSE_FILES = COPYING LGPL-2.1-or-later
-STRACE_CONF_OPTS = --enable-mpers=check
-
-# strace bundle some kernel headers to build libmpers, this mixes userspace
-# headers and kernel headers which break the build with musl.
-# The stddef.h from gcc is used instead of the one from musl.
-ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
-STRACE_CONF_OPTS += st_cv_m32_mpers=no \
-	st_cv_mx32_mpers=no
-endif
+STRACE_CONF_OPTS = --enable-mpers=no
 
 ifeq ($(BR2_PACKAGE_LIBUNWIND),y)
 STRACE_DEPENDENCIES += libunwind
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 package/strace: disable mpers support

Heiko, Baruch, All,

On 2020-09-07 22:24 +0200, Heiko Thiery spake thusly:

Quoted 1 line

On aarch64 With the config option "--enable-mpers=check" the configure.ac

The name of that option is misleading. At first, I thought it was about personalities:
https://man7.org/linux/man-pages/man2/personality.2.html

... and so I was wondering why another compiler would come into the mix...

Quoted 6 lines

script searchs for a 32bit compiler. When a matching compiler is found in the PATH some compatiblity checks are done. This can fail when the available kernel headers on host and buildroot target does not match.

Since buildroot does not support 32bit binaries when building for 64bit architecture (no -m32 option) we can disable this option unconditionally.

... but indeed, mpers is not about personalities at all; it is about multi-bitness systems. Buildroot does not support building a userland for multi-bitness systems.

However, some systems may very well run a 64-bit kernel with a 32-bit userland. In that case, strace should be able to interpret the syscalls made by the process and the replies sent by the kernel, and those are done in the bitness of the process, not of the kernel.

So, we always want an strace that is of the same bitness as the userland. And so I indeed think we do not need this ill-named multi-personality support of strace.

Note that some people may however run such multi-bitness systems. But in that case, they had to build two userlands, a 32-bit one and a 64-bit one, and somehow aggregate the two after the fact. In that case, they would bear the responsibility to carry an strace for each bitness.

(Note: I've left the x32 ABI on the side on purpose: it is not a real thing anymore, if it ever were...)

Regards,
Yann E. MORIN.

Quoted 39 lines

When disabling unconditionally also the configuration for toolchain using MUSL can be removed.

Cc Baruch Siach <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Brandon Maier <[email protected]>
---
 package/strace/strace.mk | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
package/strace/strace.mk +1 -9
index 8403e09cbd..50e6d90a87 100644
@@ -9,15 +9,7 @@ STRACE_SOURCE = strace-$(STRACE_VERSION).tar.xz
 STRACE_SITE = https://strace.io/files/$(STRACE_VERSION)
 STRACE_LICENSE = LGPL-2.1+
 STRACE_LICENSE_FILES = COPYING LGPL-2.1-or-later
-STRACE_CONF_OPTS = --enable-mpers=check
-
-# strace bundle some kernel headers to build libmpers, this mixes userspace
-# headers and kernel headers which break the build with musl.
-# The stddef.h from gcc is used instead of the one from musl.
-ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
-STRACE_CONF_OPTS += st_cv_m32_mpers=no \
-	st_cv_mx32_mpers=no
-endif
+STRACE_CONF_OPTS = --enable-mpers=no
 
 ifeq ($(BR2_PACKAGE_LIBUNWIND),y)
 STRACE_DEPENDENCIES += libunwind
Signature · 6 lines
2.20.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 package/strace: disable mpers support

Quoted 10 lines · On Tue, 8 Sep 2020 00:56:55 +0200 "Yann E. MORIN" <[email protected]>…
Quoted 6 lines

script searchs for a 32bit compiler. When a matching compiler is found in the PATH some compatiblity checks are done. This can fail when the available kernel headers on host and buildroot target does not match.

Since buildroot does not support 32bit binaries when building for 64bit architecture (no -m32 option) we can disable this option unconditionally.

... but indeed, mpers is not about personalities at all; it is about multi-bitness systems. Buildroot does not support building a userland for multi-bitness systems.

Absolutely.

Quoted 5 lines

However, some systems may very well run a 64-bit kernel with a 32-bit userland. In that case, strace should be able to interpret the syscalls made by the process and the replies sent by the kernel, and those are done in the bitness of the process, not of the kernel.

Quoted 8 lines

So, we always want an strace that is of the same bitness as the userland. And so I indeed think we do not need this ill-named multi-personality support of strace.

Note that some people may however run such multi-bitness systems. But in that case, they had to build two userlands, a 32-bit one and a 64-bit one, and somehow aggregate the two after the fact. In that case, they would bear the responsibility to carry an strace for each bitness.

So, is this an Acked-by for this patch ? :-)

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 1/1 package/strace: disable mpers support

Thomas, All,

On 2020-09-08 08:54 +0200, Thomas Petazzoni spake thusly:

Quoted 2 lines

On Tue, 8 Sep 2020 00:56:55 +0200
"Yann E. MORIN" <[email protected]> wrote:

[--SNIP--]

Quoted 9 lines
Quoted 9 lines

However, some systems may very well run a 64-bit kernel with a 32-bit userland. In that case, strace should be able to interpret the syscalls made by the process and the replies sent by the kernel, and those are done in the bitness of the process, not of the kernel.

So, we always want an strace that is of the same bitness as the userland. And so I indeed think we do not need this ill-named multi-personality support of strace.

Quoted 6 lines
Quoted 4 lines

Note that some people may however run such multi-bitness systems. But in that case, they had to build two userlands, a 32-bit one and a 64-bit one, and somehow aggregate the two after the fact. In that case, they would bear the responsibility to carry an strace for each bitness.

So, is this an Acked-by for this patch ? :-)

It would, but I'd still like to have some feedback from Baruch, who had initial added of the mpers option, so may have further explanations to provide.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#4 lore raw

PATCH 1/1 package/strace: disable mpers support

Hi Yann

Quoted 18 lines · Yann E. MORIN

On 2020-09-08 08:54 +0200, Thomas Petazzoni spake thusly:

Quoted 2 lines

On Tue, 8 Sep 2020 00:56:55 +0200
"Yann E. MORIN" <[email protected]> wrote:

[--SNIP--]

Quoted 14 lines
Quoted 13 lines

However, some systems may very well run a 64-bit kernel with a 32-bit userland. In that case, strace should be able to interpret the syscalls made by the process and the replies sent by the kernel, and those are done in the bitness of the process, not of the kernel.

So, we always want an strace that is of the same bitness as the userland. And so I indeed think we do not need this ill-named multi-personality support of strace.

Note that some people may however run such multi-bitness systems. But in that case, they had to build two userlands, a 32-bit one and a 64-bit one, and somehow aggregate the two after the fact. In that case, they would bear the responsibility to carry an strace for each bitness.

Quoted 5 lines
Quoted 1 line

So, is this an Acked-by for this patch ? :-)

It would, but I'd still like to have some feedback from Baruch, who had initial added of the mpers option, so may have further explanations to provide.

I only touched mpers (commit fc0d31caeedba) to fix build failure I (re)introduced in a previous commit (10883729419). strace enables mpers by default. I am fine with removing mpers support entirely.

baruch

Signature · 3 lines
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
#5 lore raw

PATCH 1/1 package/strace: disable mpers support

In reply to Heiko Thiery

Heiko, All,

On 2020-09-07 22:24 +0200, Heiko Thiery spake thusly:

Quoted 8 lines

On aarch64 With the config option "--enable-mpers=check" the configure.ac script searchs for a 32bit compiler. When a matching compiler is found in the PATH some compatiblity checks are done. This can fail when the available kernel headers on host and buildroot target does not match.

Since buildroot does not support 32bit binaries when building for 64bit architecture (no -m32 option) we can disable this option unconditionally.

Quoted 7 lines

When disabling unconditionally also the configuration for toolchain using MUSL can be removed.

Cc Baruch Siach <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Brandon Maier <[email protected]>

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 32 lines
---
 package/strace/strace.mk | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
package/strace/strace.mk +1 -9
index 8403e09cbd..50e6d90a87 100644
@@ -9,15 +9,7 @@ STRACE_SOURCE = strace-$(STRACE_VERSION).tar.xz
 STRACE_SITE = https://strace.io/files/$(STRACE_VERSION)
 STRACE_LICENSE = LGPL-2.1+
 STRACE_LICENSE_FILES = COPYING LGPL-2.1-or-later
-STRACE_CONF_OPTS = --enable-mpers=check
-
-# strace bundle some kernel headers to build libmpers, this mixes userspace
-# headers and kernel headers which break the build with musl.
-# The stddef.h from gcc is used instead of the one from musl.
-ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
-STRACE_CONF_OPTS += st_cv_m32_mpers=no \
-	st_cv_mx32_mpers=no
-endif
+STRACE_CONF_OPTS = --enable-mpers=no
 
 ifeq ($(BR2_PACKAGE_LIBUNWIND),y)
 STRACE_DEPENDENCIES += libunwind
Signature · 6 lines
2.20.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#6 lore raw

PATCH 1/1 package/strace: disable mpers support

In reply to Heiko Thiery
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Heiko" == Heiko Thiery <[email protected]> writes:

On aarch64 With the config option "--enable-mpers=check" the configure.ac script searchs for a 32bit compiler. When a matching compiler is found in the PATH some compatiblity checks are done. This can fail when the available kernel headers on host and buildroot target does not match.

Since buildroot does not support 32bit binaries when building for 64bit architecture (no -m32 option) we can disable this option unconditionally.

Quoted 7 lines

When disabling unconditionally also the configuration for toolchain using MUSL can be removed.

Cc Baruch Siach <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Brandon Maier <[email protected]>

Committed to 2020.02.x, 2020.05.x and 2020.08.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard