From patchwork Wed Dec 18 09:24:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charlie Jenkins X-Patchwork-Id: 13913260 Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) (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 DA4FC1991BB for ; Wed, 18 Dec 2024 09:24:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734513878; cv=none; b=G1GQ4c9ckOC5lo1fpFRdJ/kooNjRXAcN9YsG88kiqQs1gDRJgaTHp4UQfH4teECqDij0RIJFG1AosmpJZfm9r04FO6lxTD/AMU4q8C8ZeEx0pLLQ7jLAbdeVpAh/HsP96AWfTafA2YuUkKxB6UoE4jFkFBzwTRG1YNK5MrGPqFg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734513878; c=relaxed/simple; bh=aj6KhD87JndqJTmCbrJmfbqawzLsCSF87gVbexImUU4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PB4CdkD4xHJ+EcJkYsYAAWM/M1XOAcKt4duRlcUSsc53Foj14VjKex4d0Pq0sQ+8rTqCQ0UpINPxzg0bWDXu4y3COMFyZst7GHmlqevppJBXUtHsEgP5eoBK6YFF+v+Bk4frgMQa1yiOys6c50Z+f/0NIWN3WZn6r+3IEBKZCxU= 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=YuHBymNz; arc=none smtp.client-ip=209.85.216.45 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="YuHBymNz" Received: by mail-pj1-f45.google.com with SMTP id 98e67ed59e1d1-2efa856e4a4so4502882a91.0 for ; Wed, 18 Dec 2024 01:24:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1734513875; x=1735118675; 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=uc6AkHxSAkZ2nW0ejwY9TuAU4WyUl5DsEUDPCF/WMmI=; b=YuHBymNzRDeFZjOcAvAx/b2n6NphwdS5dDS2Z+/abgIXeOPpI5BZJCIa2kNz4hwSJc hs9KbHBIFwFZSDIficRCBIiVHshD7hXFYJksKcppum4oXjP0j9xAWNxvDRMgKYRMmfsv zABBh/SkgJRUPpL0bhbWg0PGTUU5eFNeIdzz5e4RI9sm17H6NR0XSWuDSYAVO2QyhNwp 2uAJBnzDkzAEdQogCwyd7j+MzDSMmRKZPYE7Y72XCLLkqtNYekGs90CV5uV50d/ZMXI7 xkfnktydZ/CPZX/w1y1oFMSHYvsTcw1Cmcdtji/CkJOMrKu4mpXQDtEK2DqldYz/azes tBIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734513875; x=1735118675; 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=uc6AkHxSAkZ2nW0ejwY9TuAU4WyUl5DsEUDPCF/WMmI=; b=sthNdsrydig3Y3jVuEc1gGTX0krZEFyNbYOYTkONSZ1JzXtBQC9a9wk84LJp1V3USU VvcZFrezkUrlUfId32shgNXOOfb4igIXsXqu7wcjt90WzktzWjqGJJSGZGlsai9TiLnS JQOQ+u4xPuzYk3O76/sWX7Km4TorMKQqzKb6Be7Jxagw/rWO/Mt0Bktte04sIkxEJ3GS qESityG44ZuQUBlO2Pq3v7U6S7JA1cg+TP3sf221qb4MrJswCxnkKSWhKcTRNcBLoqOV RORkbx3KtRi7Rwffe9mk/zhgSUB9L5bGdPNXkgYbZRZEwKvpDKlhdL/ffpUpfdGIQ7QJ 4jJA== X-Forwarded-Encrypted: i=1; AJvYcCWsKsPzxMxFxe6dSljullC/sDz3KWxGVvxbXt3AfOGX8wx8l6G83+MhTRRfvRl/r90Hgwylc9LpjESffOmcsNQ8jsT+SPM=@vger.kernel.org X-Gm-Message-State: AOJu0YwZF5vqIRMvgI0ND5zKp22tQlTu7P4c+/da1aZXPYNlgiHiSMEw MIRbUvb7J9B88aTjv67leiOEZ9+wlcXYBQBG2UlhfvIQv6jK82MADc4Zq8eAd+U= X-Gm-Gg: ASbGncuB41IcGgmYDIwzZA8UF9bz+4UDJRdzm/HP4WkW9XZTgTG687ZhI6CvOxWuXNG pnOV3GtRFJNO5zu2BiyhA/rcSYVJqs0bowFFBhat8ZX3Fw55NDiXJajPHviK0kAzVlV3ZHX+MbI qnlFQ3z0VbWCTmhD4im++U55S+6HxtO0oAgrEfVkZb1/5jf2fy1PT32+MEkisYfY2nPtCoKcjx2 4pjX/n8FXKNsI7Bdw2Kw9xoPl37c0wq995ezsbC6lR5nvvZ2EjYHq8OzGZa0nUGRAcEdmjB X-Google-Smtp-Source: AGHT+IEYfeptiNvPvwhEIFQk4qrtcNpSuwqJU4nqArf0lp9ixOHLB81Va8vS+TepDJm9AqqgSFUpaw== X-Received: by 2002:a17:90a:1208:b0:2ee:c457:bf83 with SMTP id 98e67ed59e1d1-2f2e9303915mr2983950a91.19.1734513875015; Wed, 18 Dec 2024 01:24:35 -0800 (PST) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-218a1e64f90sm72119995ad.241.2024.12.18.01.24.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2024 01:24:34 -0800 (PST) From: Charlie Jenkins Date: Wed, 18 Dec 2024 01:24:01 -0800 Subject: [PATCH v4 03/16] perf tools: csky: 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: <20241218-perf_syscalltbl-v4-3-bc8caef2ca8e@rivosinc.com> References: <20241218-perf_syscalltbl-v4-0-bc8caef2ca8e@rivosinc.com> In-Reply-To: <20241218-perf_syscalltbl-v4-0-bc8caef2ca8e@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 , Albert Ou 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=2180; i=charlie@rivosinc.com; h=from:subject:message-id; bh=aj6KhD87JndqJTmCbrJmfbqawzLsCSF87gVbexImUU4=; b=owGbwMvMwCHWx5hUnlvL8Y3xtFoSQ3rSlCO7U2T0SlQbfRQzLpk9SV20rivlS+UJhkt/FBjd2 NQFbOI7SlkYxDgYZMUUWXiuNTC33tEvOypaNgFmDisTyBAGLk4BmAjPMoa/oqfu9xrJb/Deu+KZ TKg26/IfpVo/Nm2dM9HFdaPp1bqbDowMaz61s3dXtR1+f+Vd/FWRSaezHH99rY7xvB9xsGqTQ8w udgA= X-Developer-Key: i=charlie@rivosinc.com; a=openpgp; fpr=7D834FF11B1D8387E61C776FFB10D1F27D6B1354 csky uses the generic syscall table, use that in perf instead of requiring libaudit. Signed-off-by: Charlie Jenkins --- tools/perf/Makefile.perf | 2 +- tools/perf/arch/csky/entry/syscalls/Kbuild | 2 ++ tools/perf/arch/csky/entry/syscalls/Makefile.syscalls | 3 +++ tools/perf/arch/csky/include/syscall_table.h | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index f717e4628d9e4632f53fed16524a659a3e4feea5..b20daf3769771a7c23cc0f7dd46f562510bc3199 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 -generic_syscall_table_archs := riscv arc +generic_syscall_table_archs := riscv arc csky ifneq ($(filter $(SRCARCH), $(generic_syscall_table_archs)),) include $(srctree)/tools/perf/scripts/Makefile.syscalls endif diff --git a/tools/perf/arch/csky/entry/syscalls/Kbuild b/tools/perf/arch/csky/entry/syscalls/Kbuild new file mode 100644 index 0000000000000000000000000000000000000000..11707c481a24ecf4e220e51eb1aca890fe929a13 --- /dev/null +++ b/tools/perf/arch/csky/entry/syscalls/Kbuild @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0 +syscall-y += syscalls_32.h diff --git a/tools/perf/arch/csky/entry/syscalls/Makefile.syscalls b/tools/perf/arch/csky/entry/syscalls/Makefile.syscalls new file mode 100644 index 0000000000000000000000000000000000000000..ea2dd10d0571df464574a9c0232ada0ac1f79a3f --- /dev/null +++ b/tools/perf/arch/csky/entry/syscalls/Makefile.syscalls @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0 + +syscall_abis_32 += csky time32 stat64 rlimit diff --git a/tools/perf/arch/csky/include/syscall_table.h b/tools/perf/arch/csky/include/syscall_table.h new file mode 100644 index 0000000000000000000000000000000000000000..4c942821662d95216765b176a84d5fc7974e1064 --- /dev/null +++ b/tools/perf/arch/csky/include/syscall_table.h @@ -0,0 +1,2 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#include