* [PATCH V2] perf arm64: Fix generate system call table failed with /tmp mounted with noexec [not found] <1c6964d0-a7d2-83ef-16f2-bdf349e3f0af@gydle.com> @ 2018-10-19 2:16 ` Hongxu Jia 2018-10-19 15:22 ` Sébastien Boisvert 0 siblings, 1 reply; 4+ messages in thread From: Hongxu Jia @ 2018-10-19 2:16 UTC (permalink / raw) To: linux-kernel, linux-perf-users Cc: kim.phillips, brueckner, alexander.shishkin, jolsa, mpe, peterz, ravi.bangoria, tmricht, acme, namhyung, hongxu.jia When /tmp is mounted with noexec, mksyscalltbl fails. [snip] |perf-1.0/tools/perf/arch/arm64/entry/syscalls//mksyscalltbl: /tmp/create-table-6VGPSt: Permission denied [snip] Add variable TMPDIR as prefix dir of the temporary file, if it is set, replace default /tmp Remove extra slash from `syscalls//mksyscalltbl' Fixes: 2b5882435606 ("perf arm64: Generate system call table from asm/unistd.h") Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- tools/perf/arch/arm64/Makefile | 2 +- tools/perf/arch/arm64/entry/syscalls/mksyscalltbl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/arch/arm64/Makefile b/tools/perf/arch/arm64/Makefile index dbef716..bc2a284 100644 --- a/tools/perf/arch/arm64/Makefile +++ b/tools/perf/arch/arm64/Makefile @@ -13,7 +13,7 @@ out := $(OUTPUT)arch/arm64/include/generated/asm header := $(out)/syscalls.c incpath := $(srctree)/tools sysdef := $(srctree)/tools/arch/arm64/include/uapi/asm/unistd.h -sysprf := $(srctree)/tools/perf/arch/arm64/entry/syscalls/ +sysprf := $(srctree)/tools/perf/arch/arm64/entry/syscalls systbl := $(sysprf)/mksyscalltbl # Create output directory if not already present diff --git a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl index 2dbb8cad..c88fd32 100755 --- a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl +++ b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl @@ -23,7 +23,7 @@ create_table_from_c() { local sc nr last_sc - create_table_exe=`mktemp /tmp/create-table-XXXXXX` + create_table_exe=`mktemp ${TMPDIR:-/tmp}/create-table-XXXXXX` { -- 2.7.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH V2] perf arm64: Fix generate system call table failed with /tmp mounted with noexec 2018-10-19 2:16 ` [PATCH V2] perf arm64: Fix generate system call table failed with /tmp mounted with noexec Hongxu Jia @ 2018-10-19 15:22 ` Sébastien Boisvert 2018-10-19 15:30 ` Arnaldo Carvalho de Melo 0 siblings, 1 reply; 4+ messages in thread From: Sébastien Boisvert @ 2018-10-19 15:22 UTC (permalink / raw) To: Hongxu Jia, linux-kernel, linux-perf-users Cc: kim.phillips, brueckner, alexander.shishkin, jolsa, mpe, peterz, ravi.bangoria, tmricht, acme, namhyung On 2018-10-18 10:16 p.m., Hongxu Jia wrote: > When /tmp is mounted with noexec, mksyscalltbl fails. > [snip] > |perf-1.0/tools/perf/arch/arm64/entry/syscalls//mksyscalltbl: > /tmp/create-table-6VGPSt: Permission denied > [snip] > > Add variable TMPDIR as prefix dir of the temporary file, if it is set, > replace default /tmp > > Remove extra slash from `syscalls//mksyscalltbl' > > Fixes: 2b5882435606 ("perf arm64: Generate system call table from asm/unistd.h") > > Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> > --- > tools/perf/arch/arm64/Makefile | 2 +- > tools/perf/arch/arm64/entry/syscalls/mksyscalltbl | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tools/perf/arch/arm64/Makefile b/tools/perf/arch/arm64/Makefile > index dbef716..bc2a284 100644 > --- a/tools/perf/arch/arm64/Makefile > +++ b/tools/perf/arch/arm64/Makefile > @@ -13,7 +13,7 @@ out := $(OUTPUT)arch/arm64/include/generated/asm > header := $(out)/syscalls.c > incpath := $(srctree)/tools > sysdef := $(srctree)/tools/arch/arm64/include/uapi/asm/unistd.h > -sysprf := $(srctree)/tools/perf/arch/arm64/entry/syscalls/ > +sysprf := $(srctree)/tools/perf/arch/arm64/entry/syscalls Should this appear in different patch, since it is unrelated to adding TMPDIR support ? Thanks > systbl := $(sysprf)/mksyscalltbl > > # Create output directory if not already present > diff --git a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl > index 2dbb8cad..c88fd32 100755 > --- a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl > +++ b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl > @@ -23,7 +23,7 @@ create_table_from_c() > { > local sc nr last_sc > > - create_table_exe=`mktemp /tmp/create-table-XXXXXX` > + create_table_exe=`mktemp ${TMPDIR:-/tmp}/create-table-XXXXXX` > > { > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH V2] perf arm64: Fix generate system call table failed with /tmp mounted with noexec 2018-10-19 15:22 ` Sébastien Boisvert @ 2018-10-19 15:30 ` Arnaldo Carvalho de Melo 2018-10-19 15:36 ` Hongxu Jia 0 siblings, 1 reply; 4+ messages in thread From: Arnaldo Carvalho de Melo @ 2018-10-19 15:30 UTC (permalink / raw) To: Sébastien Boisvert Cc: Hongxu Jia, linux-kernel, linux-perf-users, kim.phillips, brueckner, alexander.shishkin, jolsa, mpe, peterz, ravi.bangoria, tmricht, namhyung Em Fri, Oct 19, 2018 at 11:22:38AM -0400, Sébastien Boisvert escreveu: > > > On 2018-10-18 10:16 p.m., Hongxu Jia wrote: > > When /tmp is mounted with noexec, mksyscalltbl fails. > > [snip] > > |perf-1.0/tools/perf/arch/arm64/entry/syscalls//mksyscalltbl: > > /tmp/create-table-6VGPSt: Permission denied > > [snip] > > > > Add variable TMPDIR as prefix dir of the temporary file, if it is set, > > replace default /tmp > > > > Remove extra slash from `syscalls//mksyscalltbl' > > > > Fixes: 2b5882435606 ("perf arm64: Generate system call table from asm/unistd.h") > > > > Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> > > --- > > tools/perf/arch/arm64/Makefile | 2 +- > > tools/perf/arch/arm64/entry/syscalls/mksyscalltbl | 2 +- > > 2 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/tools/perf/arch/arm64/Makefile b/tools/perf/arch/arm64/Makefile > > index dbef716..bc2a284 100644 > > --- a/tools/perf/arch/arm64/Makefile > > +++ b/tools/perf/arch/arm64/Makefile > > @@ -13,7 +13,7 @@ out := $(OUTPUT)arch/arm64/include/generated/asm > > header := $(out)/syscalls.c > > incpath := $(srctree)/tools > > sysdef := $(srctree)/tools/arch/arm64/include/uapi/asm/unistd.h > > -sysprf := $(srctree)/tools/perf/arch/arm64/entry/syscalls/ > > +sysprf := $(srctree)/tools/perf/arch/arm64/entry/syscalls > > Should this appear in different patch, since it is unrelated to adding TMPDIR support ? Exactly. So, to move forward, just send a new patch specifically for this part, i.e. the removal of the harmless but unneeded extra slash, the other part I already took care of. - Arnaldo > Thanks > > > systbl := $(sysprf)/mksyscalltbl > > > > # Create output directory if not already present > > diff --git a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl > > index 2dbb8cad..c88fd32 100755 > > --- a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl > > +++ b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl > > @@ -23,7 +23,7 @@ create_table_from_c() > > { > > local sc nr last_sc > > > > - create_table_exe=`mktemp /tmp/create-table-XXXXXX` > > + create_table_exe=`mktemp ${TMPDIR:-/tmp}/create-table-XXXXXX` > > > > { > > > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH V2] perf arm64: Fix generate system call table failed with /tmp mounted with noexec 2018-10-19 15:30 ` Arnaldo Carvalho de Melo @ 2018-10-19 15:36 ` Hongxu Jia 0 siblings, 0 replies; 4+ messages in thread From: Hongxu Jia @ 2018-10-19 15:36 UTC (permalink / raw) To: Arnaldo Carvalho de Melo, Sébastien Boisvert Cc: linux-kernel, linux-perf-users, kim.phillips, brueckner, alexander.shishkin, jolsa, mpe, peterz, ravi.bangoria, tmricht, namhyung On 2018/10/19 下午11:30, Arnaldo Carvalho de Melo wrote: > Exactly. > > So, to move forward, just send a new patch specifically for this part, > i.e. the removal of the harmless but unneeded extra slash, the other > part I already took care of. Got it, I will send a new patch for the removal of the harmless Thank a huge for all your guys to help me to improve commit message. //Hongxu > > - Arnaldo > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-10-19 15:40 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <1c6964d0-a7d2-83ef-16f2-bdf349e3f0af@gydle.com> 2018-10-19 2:16 ` [PATCH V2] perf arm64: Fix generate system call table failed with /tmp mounted with noexec Hongxu Jia 2018-10-19 15:22 ` Sébastien Boisvert 2018-10-19 15:30 ` Arnaldo Carvalho de Melo 2018-10-19 15:36 ` Hongxu Jia
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).