From patchwork Fri Dec 13 00:32:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charlie Jenkins X-Patchwork-Id: 13906149 Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1AFD64C7D for ; Fri, 13 Dec 2024 00:33:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734049995; cv=none; b=jsTwnoinWJ3P38D3w/KawDuihaV5Kon9Wc4Gj6Ee1IeDLpGSMJAspkeiLmDYHKpLDo2cBl2OnvUmPE49U39cLmLN6HEgP6XRydG31rgVX3F515FJJYpVwZ7EfqXmBMk8j1J4dKp8PywgMyJbxf93YdghQR+A1pytbV8BWoSDB/8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734049995; c=relaxed/simple; bh=IQtfuUT0+eGZ51OwwywtWIPS5QSw2EsnD9K86OE9bhw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WpB5vp9z4rb8/RbYh6SnBR8VrTjYhw5IPA309Xh1YwXVIkG2rjyklGoR0erD0qlOp9m2mjQ5MnoLhXoCkUOGN5geWWgVbeZ5qSSErEKh4KpsiXRcggX0W3F0LVz1cpUwyLhDVKe83oeAae89osHwOb+nM3dorDNqaC0LVQUJH4I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=BsxPjUM2; arc=none smtp.client-ip=209.85.215.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="BsxPjUM2" Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-7feb6871730so862670a12.2 for ; Thu, 12 Dec 2024 16:33:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1734049993; x=1734654793; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=x/t4tAnrXs8dbqT90IARLfldAs+rJPVA/lhEFBD44es=; b=BsxPjUM2rRrUQUQ0leQAsyEBnudUfLUiSscfanhA3lw9tM15qIZ1pTrWZ8V58Js6JW 4x0oLX4nCVVG5srsUvkF3yG604MecM6lLevn4wUtvarZElKXk2TtQyZkIc56iAVqEAX0 2tUpyx6EmGid4CQqJHpvpysbvMn+QYi5L5puj/1cvp6875vA0FlAmoMC/35OJFKHOCSl gU6CnoNPWTGDh311cgOj3PdY7AHoqo+iVIT82NKIMJn2nFh7FdLrGUoTD30fNcmaxoZ/ p3YeFy68G7mOU8efe++wUALhLvuJz7BtvpFp6jT6H5En91tm4R8ST4TA4tnE7LjZb+E5 y4+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734049993; x=1734654793; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x/t4tAnrXs8dbqT90IARLfldAs+rJPVA/lhEFBD44es=; b=K/AdMe8gtDM33mhC4QvQZDXS2Si6xgDTwCKPDwLxAdFwq07nkG4Mbay4L8DSYYdTG2 uhGQNtKQ5loSbrWsjAnOyg5vUL5ZYf9z0o8OhGtfq/RYr2xS9m0s6yC5mQGJHhlRjk5j GlvmJKnJznXJwpyZOK0Jfzd9NCM1FUKS40sbGGGnM4ItldB1v600Oh7DROx8t0d5svu8 lYEIZKpLTZvVSQeSeYE75bqCxPTPkpPg/P8BKP5OXCHlhN2n7/zDZShTKDnf3Xg3+gNR nnQdRxJpmgrNjNx8mYChOr+/bTek+9O98JJr9N+SKnV9rTCXajz7CXyrX0D2MWGFfuN7 O43w== X-Forwarded-Encrypted: i=1; AJvYcCUtpFt95CEcNzlQK1G544TT+rp3eSKertRYT3dQB3Lqn+vwYa3DL3OtFGxVhmeFC7jsxres+dmcaTTFDwG+4lkNUkRjKaQ=@vger.kernel.org X-Gm-Message-State: AOJu0YwS4Wx8RsFt5G9hRwr/EOZ+CY+fKAPmmhr2cgXYZKdvD709MYa6 +F7dbac7fCltZqaskShhH74U6RuMuw0Ss4p7j8gHXs7sI0mUSbw8S+cbVG64An0= X-Gm-Gg: ASbGncsTzFu5eCM3FPNu0TD+9VfFyZi8801xab5cNf0NmBuLdFBLZ4ln+RXrevrtXpE t3YggEIMRbJYE2dQhJXrdmOuPPlhB7UU5XyrHc+b+gp2CFKEW5YrTZmnAQfBhBj9VdYZTB/n7tj YeWa1r5zrfpCmQRZ7nCvOQpCvxWL1xyowDAKRjCq4guV5y1CH5yHytVDdRtu6WHxRTi0j+DsUO3 0BUHIa8SMJFqxiz39/T3b03drG0/sdFobzZYoPlRQVvRFYVe1ZFAioBHFwnZRNndfjHncq3 X-Google-Smtp-Source: AGHT+IEd23eNeza65b/mFf2Ef1epXFx4Y/eggrgjqxpS7nxWsumxa7/TVE+fCJ8K+wC5TazJMd2/IA== X-Received: by 2002:a17:90b:54c7:b0:2ee:c9b6:c26a with SMTP id 98e67ed59e1d1-2f28fb68ef6mr1014242a91.11.1734049993490; Thu, 12 Dec 2024 16:33:13 -0800 (PST) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f142e0ce50sm1934462a91.39.2024.12.12.16.33.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2024 16:33:12 -0800 (PST) From: Charlie Jenkins Date: Thu, 12 Dec 2024 16:32:52 -0800 Subject: [PATCH v2 02/16] perf tools: arc: Support generic syscall headers Precedence: bulk X-Mailing-List: linux-security-module@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241212-perf_syscalltbl-v2-2-f8ca984ffe40@rivosinc.com> References: <20241212-perf_syscalltbl-v2-0-f8ca984ffe40@rivosinc.com> In-Reply-To: <20241212-perf_syscalltbl-v2-0-f8ca984ffe40@rivosinc.com> To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Paul Walmsley , Palmer Dabbelt , =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= , =?utf-8?q?G=C3=BCnt?= =?utf-8?q?her_Noack?= , Christian Brauner , Guo Ren , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Jonathan Corbet , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , Arnd Bergmann Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org, linux-security-module@vger.kernel.org, bpf@vger.kernel.org, linux-csky@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, Charlie Jenkins X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2767; i=charlie@rivosinc.com; h=from:subject:message-id; bh=IQtfuUT0+eGZ51OwwywtWIPS5QSw2EsnD9K86OE9bhw=; b=owGbwMvMwCHWx5hUnlvL8Y3xtFoSQ3p0w97f96cdWBjf3P5j8qf/XPecPv058Sizvjb1nfH/N DZe06qojlIWBjEOBlkxRRaeaw3MrXf0y46Klk2AmcPKBDKEgYtTACby9R8jw6mSmU2bFY+3Lfy/ XOjNdrf3s3MDnGu57qrvuLzXbt28jB+MDKsnS+vzMHHtjLyR+cPn56XF7vwGb3eaLjRf//zjQ7t NKlwA X-Developer-Key: i=charlie@rivosinc.com; a=openpgp; fpr=7D834FF11B1D8387E61C776FFB10D1F27D6B1354 Arc uses the generic syscall table, use that in perf instead of requiring libaudit. Signed-off-by: Charlie Jenkins --- tools/perf/Makefile.config | 2 +- tools/perf/Makefile.perf | 2 +- tools/perf/arch/arc/entry/syscalls/Kbuild | 2 ++ tools/perf/arch/arc/entry/syscalls/Makefile.syscalls | 3 +++ tools/perf/arch/arc/include/syscall_table.h | 2 ++ 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index a72f25162714f0117a88d94474da336814d4f030..3959a9c9972999f6d1bb85e8c1d7dc5dce92fd09 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -36,7 +36,7 @@ ifneq ($(NO_SYSCALL_TABLE),1) endif # architectures that use the generic syscall table scripts - ifeq ($(SRCARCH),riscv) + ifeq ($(SRCARCH),$(filter $(SRCARCH),riscv arc)) NO_SYSCALL_TABLE := 0 CFLAGS += -DGENERIC_SYSCALL_TABLE CFLAGS += -I$(OUTPUT)/tools/perf/arch/$(SRCARCH)/include/generated diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index f5278ed9f778f928436693a14e016c5c3c5171c1..3b463b42b0e3982e74056e672b2ee6adad5a3f0e 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -311,7 +311,7 @@ FEATURE_TESTS := all endif endif # architectures that use the generic syscall table -ifeq ($(SRCARCH),riscv) +ifeq ($(SRCARCH),$(filter $(SRCARCH),riscv arc)) include $(srctree)/tools/perf/scripts/Makefile.syscalls endif include Makefile.config diff --git a/tools/perf/arch/arc/entry/syscalls/Kbuild b/tools/perf/arch/arc/entry/syscalls/Kbuild new file mode 100644 index 0000000000000000000000000000000000000000..11707c481a24ecf4e220e51eb1aca890fe929a13 --- /dev/null +++ b/tools/perf/arch/arc/entry/syscalls/Kbuild @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0 +syscall-y += syscalls_32.h diff --git a/tools/perf/arch/arc/entry/syscalls/Makefile.syscalls b/tools/perf/arch/arc/entry/syscalls/Makefile.syscalls new file mode 100644 index 0000000000000000000000000000000000000000..391d30ab7a831b72d2ed3f2e7966fdbf558a9ed7 --- /dev/null +++ b/tools/perf/arch/arc/entry/syscalls/Makefile.syscalls @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0 + +syscall_abis_32 += arc time32 renameat stat64 rlimit diff --git a/tools/perf/arch/arc/include/syscall_table.h b/tools/perf/arch/arc/include/syscall_table.h new file mode 100644 index 0000000000000000000000000000000000000000..4c942821662d95216765b176a84d5fc7974e1064 --- /dev/null +++ b/tools/perf/arch/arc/include/syscall_table.h @@ -0,0 +1,2 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#include