Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] make: disable use of posix_spawn on mips
@ 2020-02-29  7:55 Victor Kamensky
  2020-02-29  8:32 ` ✗ patchtest: failure for " Patchwork
  2020-02-29  9:21 ` [PATCH] " Adrian Bunk
  0 siblings, 2 replies; 3+ messages in thread
From: Victor Kamensky @ 2020-02-29  7:55 UTC (permalink / raw)
  To: openembedded-core; +Cc: Jens Rehsack

After make-4.3 migration child_execute_job function started
using posix_spawn function, which happens to be broken on mips.

It manifests itself as when make executed by root, it switches
real user id to wrong value because of some issues with direct
setresuid system call done in glibc __spawni_child function
through inline assemble and/or gcc compiling it produces wrong
code. I.e instead of passing -1 posix_spawn function incorrectly
passes 127 as ruid. Subsequently job started by make can fail
with permission issue because they run under wrong user.

For now workaround is used by explicitly disabling posix_spawn
call use by make on mips through configure variable.

Signed-off-by: Victor Kamensky <kamensky@cisco.com>
---
 meta/recipes-devtools/make/make_4.3.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-devtools/make/make_4.3.bb b/meta/recipes-devtools/make/make_4.3.bb
index 70caf0ae16..5fa7059169 100644
--- a/meta/recipes-devtools/make/make_4.3.bb
+++ b/meta/recipes-devtools/make/make_4.3.bb
@@ -12,6 +12,9 @@ SRC_URI += "\
 
 EXTRA_OECONF += "--without-guile"
 
+EXTRA_OECONF_append_mips=" ac_cv_func_posix_spawn=no"
+EXTRA_OECONF_append_mips64=" ac_cv_func_posix_spawn=no"
+
 SRC_URI[md5sum] = "d5c40e7bd1e97a7404f5d3be982f479a"
 SRC_URI[sha256sum] = "de1a441c4edf952521db30bfca80baae86a0ff1acd0a00402999344f04c45e82"
 
-- 
2.21.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* ✗ patchtest: failure for make: disable use of posix_spawn on mips
  2020-02-29  7:55 [PATCH] make: disable use of posix_spawn on mips Victor Kamensky
@ 2020-02-29  8:32 ` Patchwork
  2020-02-29  9:21 ` [PATCH] " Adrian Bunk
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2020-02-29  8:32 UTC (permalink / raw)
  To: Andrii Bordunov via Openembedded-core; +Cc: openembedded-core

== Series Details ==

Series: make: disable use of posix_spawn on mips
Revision: 1
URL   : https://patchwork.openembedded.org/series/23022/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at a5beb977a5)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] make: disable use of posix_spawn on mips
  2020-02-29  7:55 [PATCH] make: disable use of posix_spawn on mips Victor Kamensky
  2020-02-29  8:32 ` ✗ patchtest: failure for " Patchwork
@ 2020-02-29  9:21 ` Adrian Bunk
  1 sibling, 0 replies; 3+ messages in thread
From: Adrian Bunk @ 2020-02-29  9:21 UTC (permalink / raw)
  To: Victor Kamensky; +Cc: Jens Rehsack, openembedded-core

On Fri, Feb 28, 2020 at 11:55:46PM -0800, Victor Kamensky via Openembedded-core wrote:
> After make-4.3 migration child_execute_job function started
> using posix_spawn function, which happens to be broken on mips.
> 
> It manifests itself as when make executed by root, it switches
> real user id to wrong value because of some issues with direct
> setresuid system call done in glibc __spawni_child function
> through inline assemble and/or gcc compiling it produces wrong
> code. I.e instead of passing -1 posix_spawn function incorrectly
> passes 127 as ruid. Subsequently job started by make can fail
> with permission issue because they run under wrong user.

Thanks for looking into this.

> For now workaround is used by explicitly disabling posix_spawn
> call use by make on mips through configure variable.

The proper fix would be to upgrade to the latest glibc 2.31 branch,
which has backported the fixes for the bug [1] on mips/risc-v/microblaze.

cu
Adrian

[1] https://sourceware.org/bugzilla/show_bug.cgi?id=25523


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-29  9:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-29  7:55 [PATCH] make: disable use of posix_spawn on mips Victor Kamensky
2020-02-29  8:32 ` ✗ patchtest: failure for " Patchwork
2020-02-29  9:21 ` [PATCH] " Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox