Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2632142imm; Thu, 18 Oct 2018 19:07:08 -0700 (PDT) X-Google-Smtp-Source: ACcGV60uC5AvqvgR5VeZaYZROKW96QPz6yKs4cqKDe1Z+Ec2nRVy/T7j9PXYOmpCsq6l6tYDKChj X-Received: by 2002:a17:902:9896:: with SMTP id s22-v6mr31614111plp.113.1539914828846; Thu, 18 Oct 2018 19:07:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539914828; cv=none; d=google.com; s=arc-20160816; b=h+9kZMMEtZ/ycs19RGDDbtpVvOH4hh89e4ldP+6W/IxcBHqogA2Ky0mUQ+/oXLjX/o JdbkNz197T5S/vMUybEboq1Pi3owk/BZTL800WZdwKhtu+1t1+8RMnVXRSfItyGbuKNg s6tJ5PWZGqOkY5cuvuCml8D1XNYH+57KbsAkQ0T0veKS9SIglLXjClZlcp8a2hk4Fu2d dnPDMuUjo0IF8tmAaeFuHFgI9iLIEjS/JMKlXoZAtlbWgIWyuaA0eVJ7j4MkA9LrybsW 4IiPecVFtcwQ7Qse1BE30ssPRemttz49Zz8kSbsrL5RBeu/sxSKmqmdAVYDA60RMON2S JxAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=LmE2IBh3Japd2vELuLX7oTJAvXW433nc5Rt6teRVc1I=; b=EMWw2pWiMVoMWPCH2yyWzRZrW5QggEQ6Wa7Bh76i7VfWs+LS5Up0X+Aoqq56JaW5d2 DJj/8srA+URVVMoIR+VHECH50eOjXaN8Igmc7twcbgk8p3wgmWePpbbA9pXjmyie5lfA vepaQeYE7TSQFKVKV+XTkNvgVI9JeUxcobmogH4hNjmjUfLTpwtCze2Vws+tpVAF4eZF ivSk6pdS/EDI++6tutABasy5JwaN+2jkbJX5makSIsFfFAh2k83NkSBM4HV6bi7kdF0n BXf23/0A/kTJF3BATJlupJhs7pArCNMuVTilRzutp0wafQAxdxUEY7vBtwPC8nsP7RQX wI2g== 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 g5-v6si22726194pgf.565.2018.10.18.19.06.53; Thu, 18 Oct 2018 19:07:08 -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 S1726747AbeJSKKZ (ORCPT + 99 others); Fri, 19 Oct 2018 06:10:25 -0400 Received: from mail.windriver.com ([147.11.1.11]:58761 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725934AbeJSKKZ (ORCPT ); Fri, 19 Oct 2018 06:10:25 -0400 Received: from ALA-HCB.corp.ad.wrs.com ([147.11.189.41]) by mail.windriver.com (8.15.2/8.15.1) with ESMTPS id w9J263Jt010256 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Thu, 18 Oct 2018 19:06:03 -0700 (PDT) Received: from pek-lpg-core1-vm2.wrs.com (128.224.156.107) by ALA-HCB.corp.ad.wrs.com (147.11.189.41) with Microsoft SMTP Server id 14.3.408.0; Thu, 18 Oct 2018 19:06:02 -0700 From: Hongxu Jia To: , CC: , , , , , , , , , , Subject: [PATCH V2] perf arm64: Fix generate system call table failed with /tmp mounted with noexec Date: Fri, 19 Oct 2018 10:16:19 +0800 Message-ID: <1539915379-11910-1-git-send-email-hongxu.jia@windriver.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1c6964d0-a7d2-83ef-16f2-bdf349e3f0af@gydle.com> References: <1c6964d0-a7d2-83ef-16f2-bdf349e3f0af@gydle.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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