Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 642690 - sys-kernel/vanilla-sources-4.14.10: execvp: ./sync-check.sh: Permission denied
Summary: sys-kernel/vanilla-sources-4.14.10: execvp: ./sync-check.sh: Permission denied
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-30 02:15 UTC by Ulenrich
Modified: 2018-01-25 01:30 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ulenrich 2017-12-30 02:15:40 UTC
I bet there will be problems with coming vanilla-sources-4.14.10

I do my own kernel: Downloaded and extracted linux-4.14.10
I did try with my own special .config and an ordinary Debian:
--- 
make --jobs=3 all
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  HOSTCXX -fPIC scripts/gcc-plugins/latent_entropy_plugin.o
  DESCEND  objtool
  HOSTCC   /common/src/linux-4.14/tools/objtool/fixdep.o
  HOSTLD   /common/src/linux-4.14/tools/objtool/fixdep-in.o
  LINK     /common/src/linux-4.14/tools/objtool/fixdep
  CC       /common/src/linux-4.14/tools/objtool/exec-cmd.o
  CC       /common/src/linux-4.14/tools/objtool/help.o
  CC       /common/src/linux-4.14/tools/objtool/pager.o
  CC       /common/src/linux-4.14/tools/objtool/parse-options.o
  HOSTLLD -shared scripts/gcc-plugins/latent_entropy_plugin.so
  CC       /common/src/linux-4.14/tools/objtool/arch/x86/decode.o
  CC       /common/src/linux-4.14/tools/objtool/run-command.o
  CC       /common/src/linux-4.14/tools/objtool/sigchain.o
  CC       /common/src/linux-4.14/tools/objtool/subcmd-config.o
  LD       /common/src/linux-4.14/tools/objtool/libsubcmd-in.o
  LD       /common/src/linux-4.14/tools/objtool/arch/x86/objtool-in.o
  AR       /common/src/linux-4.14/tools/objtool/libsubcmd.a
  CC       /common/src/linux-4.14/tools/objtool/builtin-check.o
  CC       /common/src/linux-4.14/tools/objtool/builtin-orc.o
  CC       /common/src/linux-4.14/tools/objtool/check.o
  CC       /common/src/linux-4.14/tools/objtool/orc_gen.o
  CC       /common/src/linux-4.14/tools/objtool/orc_dump.o
  CC       /common/src/linux-4.14/tools/objtool/elf.o
  CC       /common/src/linux-4.14/tools/objtool/special.o
  CC       /common/src/linux-4.14/tools/objtool/objtool.o
  CC       /common/src/linux-4.14/tools/objtool/libstring.o
  CC       /common/src/linux-4.14/tools/objtool/str_error_r.o
  LD       /common/src/linux-4.14/tools/objtool/objtool-in.o
make[2]: execvp: ./sync-check.sh: Permission denied
make[2]: *** [Makefile:49: /common/src/linux-4.14/tools/objtool/objtool] Error 127
make[1]: *** [Makefile:62: objtool] Error 2
make: *** [Makefile:1629: tools/objtool] Error 2
---
Comment 1 Ulenrich 2017-12-30 02:23:38 UTC
Disabling the GCC  latent_entropy_plugin  - same result
Comment 2 Ulenrich 2017-12-30 02:34:33 UTC
Whats interesting: 
As I make the kernel as root there should no be no problem with permissions ---
 # vdir $(find . -name sync-check.sh)
-rw-r--r-- 1 root root   0 30. Dez 02:54 ./.pc/arelease/patch-4.14.10/tools/objtool/sync-check.sh
-rw-r--r-- 1 root root 584 30. Dez 02:54 ./tools/objtool/sync-check.sh
---
I am clueless. Never happened to me failing to compile the kernel.
Comment 3 Cedric Sodhi 2017-12-30 08:51:34 UTC
Same here. Execution flags are missing and

# chmod 755 /tools/objtool/sync-check.sh

seems to fix it.
Comment 4 Cedric Sodhi 2017-12-30 09:41:14 UTC
According to

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/tools/objtool/sync-check.sh

sync-check.sh should have +x already set. Does Gentoo apply any changes to this?
Comment 5 Cedric Sodhi 2017-12-30 10:20:41 UTC
The reason why sync-check.sh doesn't have the necessary permission is apparently that the incremental patch from 4.14 to 4.14.10 does *not* correctly set permissions:

> diff --git a/tools/objtool/sync-check.sh b/tools/objtool/sync-check.sh
> new file mode 100755
> index 000000000000..1470e74e9d66
> --- /dev/null
> +++ b/tools/objtool/sync-check.sh
> @@ -0,0 +1,29 @@
> +#!/bin/sh
> ...

After applying this patch to the 4.14 sources, sync-check.sh appears, but without +x permissions.
Comment 6 Ulenrich 2017-12-30 13:20:54 UTC
@Cedric, I didn't dare to
# chmod 755 tools/objtool/sync-check.sh

because of the strange error message:
"make[2]: execvp: ./sync-check.sh: Permission denied"
I don't know "execvp"

I looked into patch-4.14.10:

# grep -A 3 -e'^new file mode' patch-4.14.10|grep -B 3 -e'sync-check.sh'
new file mode 100755
index 000000000000..1470e74e9d66
--- /dev/null
+++ b/tools/objtool/sync-check.sh

The issue is a missing feature of sys-devel/patch-2.7.5
The patch utility does not bother about file mode of sync-check.sh
It only can set a standard 644 mode

Downloading the full patche kernel.org source
https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.14.10.tar.xz
also shows correcty set execution file mode of sync-check.sh

These days all people use git not patch any more :(
Comment 7 Ulenrich 2017-12-30 15:22:31 UTC

*** This bug has been marked as a duplicate of bug 642664 ***
Comment 8 Jan Kundrát (RETIRED) gentoo-dev 2018-01-04 14:57:58 UTC
This still happens with vanilla-sources (checked with 4.14.10 renamed to 4.14.11 which isn't in the tree yet, but that doesn't matter). A change in gentoo-specific patches doesn't help, so I'm marking this as non-duplicate.
Comment 9 Arisu Tachibana Gentoo Infrastructure gentoo-dev 2018-01-04 15:47:00 UTC
this patch is not solving the problem ?
http://www.ozlabs.org/~akpm/mmotm/broken-out/tools-objtool-makefile-dont-assume-sync-checksh-is-executable.patch
Comment 10 Jan Kundrát (RETIRED) gentoo-dev 2018-01-04 16:00:28 UTC
(In reply to Alice Ferrazzi from comment #9)
> this patch is not solving the problem ?
> http://www.ozlabs.org/~akpm/mmotm/broken-out/tools-objtool-makefile-dont-
> assume-sync-checksh-is-executable.patch

It looks like it should solve the problem. However, it isn't present in the v4.14.11, and also not in the patch that the Gentoo ebuilds of vanilla-sources are using.
Comment 11 Arisu Tachibana Gentoo Infrastructure gentoo-dev 2018-01-05 09:05:15 UTC
Gentoo kernel team cannot support vanilla-sources.
Comment 12 Juergen Rose 2018-01-06 09:06:35 UTC
I see the same issue now with vanilla-sources-4.14.12.
Comment 14 Juergen Rose 2018-01-13 12:19:24 UTC
And it happens again with vanilla-sources-4.14.13.
Comment 15 Juergen Rose 2018-01-17 15:54:46 UTC
The same happens with vanilla-sources-4.14.14:

*  LD       /usr/src_lynx/linux-4.14.14/tools/objtool/objtool-in.o
*make[2]: execvp: ./sync-check.sh: Permission denied
*make[2]: *** [Makefile:49: /usr/src_lynx/linux-4.14.14/tools/objtool/objtool] Error 127
*make[1]: *** [Makefile:62: objtool] Error 2
Comment 16 Kelly Price 2018-01-25 01:11:12 UTC
Per Kernel.org at https://bugzilla.kernel.org/show_bug.cgi?id=198361

4.14.15 has this bug fixed.  Please close.
Comment 17 Greg Kubaryk 2018-01-25 01:30:02 UTC
(In reply to Kelly Price from comment #16)
> Per Kernel.org at https://bugzilla.kernel.org/show_bug.cgi?id=198361
> 
> 4.14.15 has this bug fixed.  Please close.

The bug has been closed for almost three weeks; it never belonged on a Gentoo bug tracker as it is/was an upstream issue.