Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3311660imm; Fri, 19 Oct 2018 08:33:20 -0700 (PDT) X-Google-Smtp-Source: ACcGV615kbcvtNgqZBfertDQvOsohJvFUVARwlOYcNTUxCDnqQSZCFynHr5Yx26i18tZlR4ID2Og X-Received: by 2002:a17:902:5c4:: with SMTP id f62-v6mr34871514plf.18.1539963200138; Fri, 19 Oct 2018 08:33:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539963200; cv=none; d=google.com; s=arc-20160816; b=cWsHaXhwUHMRf0oaJ4lny2w/uM17U7503QyCxQOKVlAzI0lnqU8A1QL45fLp4DYDx6 5zIOU9b4SHAm7d42LpzQYxw6Fj2XfNhyqvmr/nl1WsJfLmkwpGj+S0jpLZRJIj5HajvT hr628JM/J2DBDdIYergCKnmmwVpseTDCCjQL6CLwArpf6UZQ6+CzIZII0g8ehn74Gfvd 0Ul034Ll6Ekh5oCQ1ds7gJRZBCrkxL4umrP+Mkq/f2lS4Gk0l2Dbi5dMDZxdEn/PuR3O ZQKd07RSjVROXFxmUyxNV69EUTn94F+7x/yM+ehHKcsaOEohowzwqP44rRpbgouhDrum EjSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject; bh=qTQ2xxV2bDBKeeg2tqr7bmbV8Bgb04nEiQzjdEVgUMA=; b=DHKipG8xVmrHm5ZNA7NOcjBAVZjQ84WZWQIJOka7ePimx4+3YKW7wHW8nSecCEMdpV 3517USvBynhlJgpDv7EcuUsgqDa5wJp1lyG4hY0sWuV/M2+xykelQYf2wI8gN5jB6bVu x0XIgxH1TSpYGIrYqItmkuMuVLbUusKGp/gR/1Vq7nSEoVud14CLIMjqXrbE/j3vEL9A 1miKJcega2M3JNCUdFth3AWFZBvFQ2YJGct3O8J7XcVcuio0RLcgFGhIAdPKrtxVlnJN Z8sd3WRW24Ehq1V5EPMBwvn5+e7EysmgL3WUiTA+6bBQ/Zht+NXfN4DRvfMhcgMLJa08 a4jA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c21-v6si24133098pgg.407.2018.10.19.08.33.04; Fri, 19 Oct 2018 08:33:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727642AbeJSXhn (ORCPT + 99 others); Fri, 19 Oct 2018 19:37:43 -0400 Received: from mail.gydle.com ([64.18.173.180]:45970 "EHLO mail.gydle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726667AbeJSXhn (ORCPT ); Fri, 19 Oct 2018 19:37:43 -0400 X-Greylist: delayed 510 seconds by postgrey-1.27 at vger.kernel.org; Fri, 19 Oct 2018 19:37:42 EDT X-Received: from [10.42.0.204] (unknown [69.70.179.254]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: sboisvert@gydle.com) by mail.gydle.com (Postfix) with ESMTPSA id 02CD444081; Fri, 19 Oct 2018 11:22:38 -0400 (EDT) Subject: Re: [PATCH V2] perf arm64: Fix generate system call table failed with /tmp mounted with noexec To: Hongxu Jia , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Cc: kim.phillips@arm.com, brueckner@linux.ibm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, mpe@ellerman.id.au, peterz@infradead.org, ravi.bangoria@linux.vnet.ibm.com, tmricht@linux.vnet.ibm.com, acme@redhat.com, namhyung@kernel.org References: <1c6964d0-a7d2-83ef-16f2-bdf349e3f0af@gydle.com> <1539915379-11910-1-git-send-email-hongxu.jia@windriver.com> From: =?UTF-8?Q?S=c3=a9bastien_Boisvert?= Openpgp: preference=signencrypt Autocrypt: addr=sboisvert@gydle.com; keydata= xsFNBFi0QgMBEADLVQ63iQaeZj99I4+5AZe9ilJQ/fE7J49iS+NV3ChKgTfxMlxhagmq4a8E czme5AGkYeb9JAufWzcaGe4DGHJ0l26QdU/YQcpxGVGTobql+LUQ4VgEe9MxB6sMuO7QV5fZ aO27nCqk488ZS7e5g7Y10lMrY+4ZqzjOBIWVOXPpsDrqFY4zKuryLMtRDdINDCl+uahpIi4F P/c00/uGR04s+UmdZRgB1RroyZJjeSHgyR90THl8sDssR8zddaDEae2aO1/1dMI9KGamStYe 5wo9zS4ewPAgfNxRdhsdBvCNIrU2qnKFIE9Juc59NjGPmeRUjB/iHHS6zY4BSNruWrUG5KHs ykHpZhP/Gg5y2RL3Pmu9vIBo5C8sUb2/sRNeWXSD7Rh/0zHtYu5T3cx3/gz71WNRhiOncZuY pgZltzFRxCYc9kDuthITXbI8GoR3XGq8uo2hTDBW8b+VYqLZ7n4fggkvo8f1bgt0ACVKR0nq JViiVO9mYDr7UUWUfS8CABAJCjsbqjxRHMEDw+UNbCS54KJ5vxxkt4LNd0nkwaVwMfrOF3mA foEjSmeM2NLx5SOJuMPOSRyOKjfsOgYEbFsA9hZJ34r/zAPEIdwHf57dY+nSiV/avcE6WN5P ks0CfGMOTBNsxyqYXPov7kkwvCb09KYU9/J6F1nM9Wm83knzewARAQABzShTZWJhc3RpZW4g Qm9pc3ZlcnQgPHNib2lzdmVydEBneWRsZS5jb20+wsF9BBMBCAAnBQJYtEIDAhsjBQkJZgGA BQsJCAcCBhUICQoLAgQWAgMBAh4BAheAAAoJEGsrrSebZ4/x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f-ec36-c676-7472-fe7d642cd7e0@gydle.com> Date: Fri, 19 Oct 2018 11:22:38 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <1539915379-11910-1-git-send-email-hongxu.jia@windriver.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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` > > { > >