From nobody Fri Dec 19 00:38:01 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0ADFA2114; Thu, 10 Apr 2025 00:11:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744243888; cv=none; b=p3K5eKCOWUEyh/ymEkkJbYQVd60wyuxYfSZ6qZ38u3AoyjqYdnQofkfTDBn8a6CelZPk42FYwhrNfPPn8oo4m0ILesnihAYyovqg+6Gc9tyF8qD1IhhIzA2D2NbF1LoDpCSxQf0GmyXd9hAhLg4PNQIlC2oYsW1/hXiTUUewwAs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744243888; c=relaxed/simple; bh=5IDzi6FCSX8yvZjYvGsMcoY/WWOEXwW9nUi7OYzJos0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aBkHPPX2hINuIoTsrGgUMS3g93D79se1c+llshZt3CxsV5T4U7eXWQUwKi8TjrXIREb/CEK+pkUwmIZtVh0KyxfpYdDEHJjGA9MhGAKjjdWARG7224W8GItxRm+P+s7z6y/8a9S+sFZHvSCb8bRfGDstehU49APh5NkTQrXu38s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lBBh/Wlo; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lBBh/Wlo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37CDBC4CEEB; Thu, 10 Apr 2025 00:11:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744243887; bh=5IDzi6FCSX8yvZjYvGsMcoY/WWOEXwW9nUi7OYzJos0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lBBh/Wlo58XFFa1aoFG0Wzl80tjDlb7cgliHkzKwS7SvJJyfDzrCe9pga2Gv35uSB jwM9PSAVSVZdqOdbuyGbUscjrYPQMeFmk9xiSMzuBZFkoe3n98bpHclExKMhlzg6Py Y7xnpVRlVwO96g0ZkZTe+17Rl6yOZ+2GaszkckKs4PTeq6YyE0Yy2O5QgxvDAliawS +BM+w1pty2tXWk+wgEd7X32OuJSNwxCQsA6WpO8NHu4fFrqdZEZQbh1A3VioWDbPIs Eat1fzvAXUeh1iW2c8yq0+8uada7gUe4Jjlkk5/80tEwRDM55M5jv+Ju6BM3pK4NH6 88dsFc3l9U0kw== From: Namhyung Kim To: Arnaldo Carvalho de Melo , Ian Rogers , Kan Liang Cc: Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, kvm@vger.kernel.org Subject: [PATCH 01/10] tools headers: Update the KVM headers with the kernel sources Date: Wed, 9 Apr 2025 17:11:16 -0700 Message-ID: <20250410001125.391820-2-namhyung@kernel.org> X-Mailer: git-send-email 2.49.0.504.g3bcea36a83-goog In-Reply-To: <20250410001125.391820-1-namhyung@kernel.org> References: <20250410001125.391820-1-namhyung@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" To pick up the changes in: af5366bea2cb9dfb KVM: x86: Drop the now unused KVM_X86_DISABLE_VALID_EXITS 915d2f0718a42ee0 KVM: Move KVM_REG_SIZE() definition to common uAPI header 5c17848134ab1ffb KVM: x86/xen: Restrict hypercall MSR to unofficial synth= etic range 9364789567f9b492 KVM: x86: Add a VM type define for TDX fa662c9080732b1f KVM: SVM: Add Idle HLT intercept support 3adaee78306148da KVM: arm64: Allow userspace to change the implementation= ID registers faf7714a47a25c62 KVM: arm64: nv: Allow userland to set VGIC maintenance I= RQ c0000e58c74eed07 KVM: arm64: Introduce KVM_REG_ARM_VENDOR_HYP_BMAP_2 f83c41fb3dddbf47 KVM: arm64: Allow userspace to limit NV support to nVHE Addressing this perf tools build warning: Warning: Kernel ABI header differences: diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm= /kvm.h diff -u tools/arch/x86/include/uapi/asm/svm.h arch/x86/include/uapi/asm= /svm.h diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi= /asm/kvm.h Please see tools/include/uapi/README for further details. Cc: kvm@vger.kernel.org Signed-off-by: Namhyung Kim Acked-by: Ingo Molnar Tested-by: Venkat Rao Bagalkote --- tools/arch/arm64/include/uapi/asm/kvm.h | 5 ++--- tools/arch/x86/include/uapi/asm/kvm.h | 4 ++++ tools/arch/x86/include/uapi/asm/svm.h | 2 ++ tools/include/uapi/linux/kvm.h | 9 +++++---- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/tools/arch/arm64/include/uapi/asm/kvm.h b/tools/arch/arm64/inc= lude/uapi/asm/kvm.h index 6d44f8c8a18fd98e..af9d9acaf9975a88 100644 --- a/tools/arch/arm64/include/uapi/asm/kvm.h +++ b/tools/arch/arm64/include/uapi/asm/kvm.h @@ -43,9 +43,6 @@ #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 #define KVM_DIRTY_LOG_PAGE_OFFSET 64 =20 -#define KVM_REG_SIZE(id) \ - (1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT)) - struct kvm_regs { struct user_pt_regs regs; /* sp =3D sp_el0 */ =20 @@ -108,6 +105,7 @@ struct kvm_regs { #define KVM_ARM_VCPU_PTRAUTH_ADDRESS 5 /* VCPU uses address authentication= */ #define KVM_ARM_VCPU_PTRAUTH_GENERIC 6 /* VCPU uses generic authentication= */ #define KVM_ARM_VCPU_HAS_EL2 7 /* Support nested virtualization */ +#define KVM_ARM_VCPU_HAS_EL2_E2H0 8 /* Limit NV support to E2H RES0 */ =20 struct kvm_vcpu_init { __u32 target; @@ -418,6 +416,7 @@ enum { #define KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS 6 #define KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO 7 #define KVM_DEV_ARM_VGIC_GRP_ITS_REGS 8 +#define KVM_DEV_ARM_VGIC_GRP_MAINT_IRQ 9 #define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT 10 #define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_MASK \ (0x3fffffULL << KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT) diff --git a/tools/arch/x86/include/uapi/asm/kvm.h b/tools/arch/x86/include= /uapi/asm/kvm.h index 88585c1de416fa6f..460306b35a4bfee9 100644 --- a/tools/arch/x86/include/uapi/asm/kvm.h +++ b/tools/arch/x86/include/uapi/asm/kvm.h @@ -559,6 +559,9 @@ struct kvm_x86_mce { #define KVM_XEN_HVM_CONFIG_PVCLOCK_TSC_UNSTABLE (1 << 7) #define KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA (1 << 8) =20 +#define KVM_XEN_MSR_MIN_INDEX 0x40000000u +#define KVM_XEN_MSR_MAX_INDEX 0x4fffffffu + struct kvm_xen_hvm_config { __u32 flags; __u32 msr; @@ -925,5 +928,6 @@ struct kvm_hyperv_eventfd { #define KVM_X86_SEV_VM 2 #define KVM_X86_SEV_ES_VM 3 #define KVM_X86_SNP_VM 4 +#define KVM_X86_TDX_VM 5 =20 #endif /* _ASM_X86_KVM_H */ diff --git a/tools/arch/x86/include/uapi/asm/svm.h b/tools/arch/x86/include= /uapi/asm/svm.h index 1814b413fd5783d2..ec1321248dac2ab5 100644 --- a/tools/arch/x86/include/uapi/asm/svm.h +++ b/tools/arch/x86/include/uapi/asm/svm.h @@ -95,6 +95,7 @@ #define SVM_EXIT_CR14_WRITE_TRAP 0x09e #define SVM_EXIT_CR15_WRITE_TRAP 0x09f #define SVM_EXIT_INVPCID 0x0a2 +#define SVM_EXIT_IDLE_HLT 0x0a6 #define SVM_EXIT_NPF 0x400 #define SVM_EXIT_AVIC_INCOMPLETE_IPI 0x401 #define SVM_EXIT_AVIC_UNACCELERATED_ACCESS 0x402 @@ -224,6 +225,7 @@ { SVM_EXIT_CR4_WRITE_TRAP, "write_cr4_trap" }, \ { SVM_EXIT_CR8_WRITE_TRAP, "write_cr8_trap" }, \ { SVM_EXIT_INVPCID, "invpcid" }, \ + { SVM_EXIT_IDLE_HLT, "idle-halt" }, \ { SVM_EXIT_NPF, "npf" }, \ { SVM_EXIT_AVIC_INCOMPLETE_IPI, "avic_incomplete_ipi" }, \ { SVM_EXIT_AVIC_UNACCELERATED_ACCESS, "avic_unaccelerated_access" }, \ diff --git a/tools/include/uapi/linux/kvm.h b/tools/include/uapi/linux/kvm.h index 502ea63b5d2e7371..b6ae8ad8934b52c7 100644 --- a/tools/include/uapi/linux/kvm.h +++ b/tools/include/uapi/linux/kvm.h @@ -617,10 +617,6 @@ struct kvm_ioeventfd { #define KVM_X86_DISABLE_EXITS_HLT (1 << 1) #define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2) #define KVM_X86_DISABLE_EXITS_CSTATE (1 << 3) -#define KVM_X86_DISABLE_VALID_EXITS (KVM_X86_DISABLE_EXITS_MWAIT = | \ - KVM_X86_DISABLE_EXITS_HLT | \ - KVM_X86_DISABLE_EXITS_PAUSE = | \ - KVM_X86_DISABLE_EXITS_CSTATE) =20 /* for KVM_ENABLE_CAP */ struct kvm_enable_cap { @@ -933,6 +929,7 @@ struct kvm_enable_cap { #define KVM_CAP_PRE_FAULT_MEMORY 236 #define KVM_CAP_X86_APIC_BUS_CYCLES_NS 237 #define KVM_CAP_X86_GUEST_MODE 238 +#define KVM_CAP_ARM_WRITABLE_IMP_ID_REGS 239 =20 struct kvm_irq_routing_irqchip { __u32 irqchip; @@ -1070,6 +1067,10 @@ struct kvm_dirty_tlb { =20 #define KVM_REG_SIZE_SHIFT 52 #define KVM_REG_SIZE_MASK 0x00f0000000000000ULL + +#define KVM_REG_SIZE(id) \ + (1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT)) + #define KVM_REG_SIZE_U8 0x0000000000000000ULL #define KVM_REG_SIZE_U16 0x0010000000000000ULL #define KVM_REG_SIZE_U32 0x0020000000000000ULL --=20 2.49.0.504.g3bcea36a83-goog From nobody Fri Dec 19 00:38:01 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5000C4C8F; Thu, 10 Apr 2025 00:11:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744243888; cv=none; b=IJU2Lf9dezVbf3r7tMa75Y6zBnW6SOoXwO5TlfhxoIpsRDwXObmcyVZusxAzXNdSfOwaeYR6dfg7uJA43SVkZMKEkwda85qfi1V/s3qFtMxmyDaI7Y6es9pXusGjzfpm6aPVIo7xyxyCoSnlvYlDubt14rd2C7++MTfvX1b190Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744243888; c=relaxed/simple; bh=B43cXcCMVukr4s9eVIV7PT3CKGMOEh0Lt1ehXgVQI4I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LoHcgvgIJj1pPCHhgey1eCRg6v3+VI7tKQl2qKcYd8qo66SbaH1Ygl1CK6NaBWt6PjIAnJH3hzQdWhUMLoSpNfoq7QGMqSGfd0GkYiCGUL3fVuYpXhkoXvaJWLc84oDoYQXQO9fA/XJbJb6SuaVE0LRuTPfRC1qpt6+9wNphMV4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HNTdRx26; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HNTdRx26" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3010C4CEEC; Thu, 10 Apr 2025 00:11:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744243888; bh=B43cXcCMVukr4s9eVIV7PT3CKGMOEh0Lt1ehXgVQI4I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HNTdRx267Yd9ZPAf0CjbS+R7SJdL1fOT4gIcuk6GEmCkHBRqMDOWR3Vzv7M861j/l vMhkmlDOshN3ov5ximz9waGylyPw28XP7Mxcdx5LrDBldGhBYiK+wyxq8Kk9QAW4Qo SPfch3jPje4bXMW2V01QrZWbMltyEdQQVKKJzakOSE5LatLWVoilwbwx7Mtp6kWqNJ 7tWcNVCT7xXUiLNpFV5MpJu5LYQHV6+mKwaSGn7NCGznhA/HmQZoyhF7/Iv1HQd7YO UeukjSFiUG5Lf+aUB56RfHzbfMXNh8TOcSrko4T2RhEtxp/Vi2mvDfHxCLiOj3+EY7 PkT6vokW/huQw== From: Namhyung Kim To: Arnaldo Carvalho de Melo , Ian Rogers , Kan Liang Cc: Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 02/10] tools headers: Update the socket headers with the kernel sources Date: Wed, 9 Apr 2025 17:11:17 -0700 Message-ID: <20250410001125.391820-3-namhyung@kernel.org> X-Mailer: git-send-email 2.49.0.504.g3bcea36a83-goog In-Reply-To: <20250410001125.391820-1-namhyung@kernel.org> References: <20250410001125.391820-1-namhyung@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" To pick up the changes in: 64e844505bc08cde include: uapi: protocol number and packet structs for AG= GFRAG in ESP 18912c520674ec4d tcp: devmem: don't write truncated dmabuf CMSGs to users= pace Addressing this perf tools build warning: Warning: Kernel ABI header differences: diff -u tools/include/uapi/linux/in.h include/uapi/linux/in.h diff -u tools/perf/trace/beauty/include/linux/socket.h include/linux/so= cket.h Please see tools/include/uapi/README for further details. Cc: netdev@vger.kernel.org Signed-off-by: Namhyung Kim Acked-by: Ingo Molnar Tested-by: Venkat Rao Bagalkote --- tools/include/uapi/linux/in.h | 2 ++ tools/perf/trace/beauty/include/linux/socket.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tools/include/uapi/linux/in.h b/tools/include/uapi/linux/in.h index 5d32d53508d99f86..ced0fc3c3aa5343a 100644 --- a/tools/include/uapi/linux/in.h +++ b/tools/include/uapi/linux/in.h @@ -79,6 +79,8 @@ enum { #define IPPROTO_MPLS IPPROTO_MPLS IPPROTO_ETHERNET =3D 143, /* Ethernet-within-IPv6 Encapsulation */ #define IPPROTO_ETHERNET IPPROTO_ETHERNET + IPPROTO_AGGFRAG =3D 144, /* AGGFRAG in ESP (RFC 9347) */ +#define IPPROTO_AGGFRAG IPPROTO_AGGFRAG IPPROTO_RAW =3D 255, /* Raw IP packets */ #define IPPROTO_RAW IPPROTO_RAW IPPROTO_SMC =3D 256, /* Shared Memory Communications */ diff --git a/tools/perf/trace/beauty/include/linux/socket.h b/tools/perf/tr= ace/beauty/include/linux/socket.h index d18cc47e89bd0164..c3322eb3d6865d5e 100644 --- a/tools/perf/trace/beauty/include/linux/socket.h +++ b/tools/perf/trace/beauty/include/linux/socket.h @@ -392,6 +392,8 @@ struct ucred { =20 extern int move_addr_to_kernel(void __user *uaddr, int ulen, struct sockad= dr_storage *kaddr); extern int put_cmsg(struct msghdr*, int level, int type, int len, void *da= ta); +extern int put_cmsg_notrunc(struct msghdr *msg, int level, int type, int l= en, + void *data); =20 struct timespec64; struct __kernel_timespec; --=20 2.49.0.504.g3bcea36a83-goog From nobody Fri Dec 19 00:38:01 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 35D3326AF3; Thu, 10 Apr 2025 00:11:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744243889; cv=none; b=V7S9KEbcrQt/AGOAXdR+Pt7V0OuS4WoqPqIwrO5VaQeOT9N3yCnZPliOsmPs+NfF7waAUH4A5bRdlRsrPbh081ByHCmCjmKgAGgt636HdZr0BJfjhPA+nLvueF59csFr47kfyqg1thVDKESI+HOeIT7Z0XwZBYk4ydseR+pqGAk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744243889; c=relaxed/simple; bh=dsbGPVshCO+nHzc4NPbueKWHbW419n9zo+SvA0BkUZQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rYzsw6gw8loCTq+LmWaf83id2pS+ER66xP0BJsql/Tmz+VPccQtE/u7Y0spjXPevKRnIijHu+jDJJEpVQLxcOFcEfRuMuiHjx6lsOnrH5fJxpB0TV2XnO+XV9QLGiVirMcv1Qh708ek9Q7XC1Ah3LX3REueDJF1UH85f5DvQnuk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jIhH1Hth; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jIhH1Hth" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 572D5C4CEEB; Thu, 10 Apr 2025 00:11:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744243888; bh=dsbGPVshCO+nHzc4NPbueKWHbW419n9zo+SvA0BkUZQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jIhH1HthBdpBOkM5BQKi85nnkacsGfoJpFWNqbDZEtsvrq4RfY3dS5IXT9Eagz13z 0vQtc7xd1YKGA+59SZvYSXRUAXvO6xyVBIjPG0s7GOVvWHLQjvk+A9sP3ZW8vzpfjH ZrdK+Qk30oM5YuK0+z/bW+u5vyZqz5MhG3//X2matNN379A4Dk1EDDD7Zaq8pj/1Vw sAts++cbQEcYESVh8ddbwN+YX7bQ14MvSmbnl/y/8FZdcVlJThDODb/We+Py0hcsO+ bi87EYghWjEynyFHWZR/lZFSTllXbhn8raPtECt4sNuquO8oEGvb9u4lJQW3ymFqJI Rp/AmDkVJMM6w== From: Namhyung Kim To: Arnaldo Carvalho de Melo , Ian Rogers , Kan Liang Cc: Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org Subject: [PATCH 03/10] tools headers: Update the uapi/linux/perf_event.h copy with the kernel sources Date: Wed, 9 Apr 2025 17:11:18 -0700 Message-ID: <20250410001125.391820-4-namhyung@kernel.org> X-Mailer: git-send-email 2.49.0.504.g3bcea36a83-goog In-Reply-To: <20250410001125.391820-1-namhyung@kernel.org> References: <20250410001125.391820-1-namhyung@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" To pick up the changes in: c53e14f1ea4a8f8d perf: Extend per event callchain limit to branch stack Addressing this perf tools build warning: Warning: Kernel ABI header differences: diff -u tools/include/uapi/linux/perf_event.h include/uapi/linux/perf_e= vent.h Please see tools/include/uapi/README for further details. Cc: linux-perf-users@vger.kernel.org Signed-off-by: Namhyung Kim Acked-by: Ingo Molnar Tested-by: Venkat Rao Bagalkote --- tools/include/uapi/linux/perf_event.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/lin= ux/perf_event.h index 0524d541d4e3d501..5fc753c23734dfc4 100644 --- a/tools/include/uapi/linux/perf_event.h +++ b/tools/include/uapi/linux/perf_event.h @@ -385,6 +385,8 @@ enum perf_event_read_format { * * @sample_max_stack: Max number of frame pointers in a callchain, * should be < /proc/sys/kernel/perf_event_max_stack + * Max number of entries of branch stack + * should be < hardware limit */ struct perf_event_attr { =20 --=20 2.49.0.504.g3bcea36a83-goog From nobody Fri Dec 19 00:38:01 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73F8D2EAF7; Thu, 10 Apr 2025 00:11:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744243889; cv=none; b=tLWmEX94rmxeUxsNx+17USq/4s37SkpLdPffF1tvaQ+JvCoCsMWCvolVXzX70c9fGd8i2wvnwpbkb6/CSnQtA4m1peKX2qax457k5iK8RIJEslZEZbbgBwQeSBkNxTTWWz5vQFZdRmNj2EYkVmuuo2t1CracibgKfLijn0kDlvo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744243889; c=relaxed/simple; bh=Rgg5bpdxIO+BYS9u82ebgAKUejZ/QWm2LeNMH8pvgmE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OuOhUIISwkD9U1JWJfdTTxyH6dVPmnTip7X6n9NMUjqJ5ueknbD3eyMuNGVyyUZ46X0/ijctZBTNneVniTenTVCDvLmZ3r1s3LU0QzB5/U7A+Fi8aAmD3GhBb+IuT9mGu4s/xGBKiVQIoiqgo4E7HQB5lL7YwWRoVHqdvi4+WDQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KF3nTh2P; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KF3nTh2P" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6DBEC4CEEE; Thu, 10 Apr 2025 00:11:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744243889; bh=Rgg5bpdxIO+BYS9u82ebgAKUejZ/QWm2LeNMH8pvgmE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KF3nTh2PA78ZBLpHtjfW6V0CTvbETieFKZ0eJPn1+c5hc7ruw4koekY6t9TdQBBHg 4+8H/unmzf65vkEENSiX87ikBxhPN5dbOz/Bt2pa91uVRwAEkVoEZPAd8R8tFTRm6o YsanVfempdYNVpyaylX13GyMiBbPMbd8prmKz8HF2MasGULKU1yZpG/NN3o0FhKbLW PwgTNxCwQDVpD82sB9JMf8EvLgbUH5boW8t1DQj9I6+K8dNunSiWWOp6gnFFaCmD9I Qss3snrLTmC0/bdSDoLGgr0iF10sZB2xGQVaGU0CFo07LfsPPWzFlZGf+UG32fsO5o nCKO85kOgDdbA== From: Namhyung Kim To: Arnaldo Carvalho de Melo , Ian Rogers , Kan Liang Cc: Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH 04/10] tools headers: Update the VFS headers with the kernel sources Date: Wed, 9 Apr 2025 17:11:19 -0700 Message-ID: <20250410001125.391820-5-namhyung@kernel.org> X-Mailer: git-send-email 2.49.0.504.g3bcea36a83-goog In-Reply-To: <20250410001125.391820-1-namhyung@kernel.org> References: <20250410001125.391820-1-namhyung@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" To pick up the changes in: 7ed6cbe0f8caa6ee fs: add STATX_DIO_READ_ALIGN 8fc7e23a9bd851e6 fs: reformat the statx definition a5874fde3c0884a3 exec: Add a new AT_EXECVE_CHECK flag to execveat(2) 1ebd4a3c095cd538 blk-crypto: add ioctls to create and prepare hardware-wr= apped keys af6505e5745b9f3a fs: add RWF_DONTCACHE iocb and FOP_DONTCACHE file_operat= ions flag 10783d0ba0d7731e fs, iov_iter: define meta io descriptor 8f6116b5b77b0536 statmount: add a new supported_mask field 37c4a9590e1efcae statmount: allow to retrieve idmappings Addressing this perf tools build warning: Warning: Kernel ABI header differences: diff -u tools/include/uapi/linux/stat.h include/uapi/linux/stat.h diff -u tools/perf/trace/beauty/include/uapi/linux/stat.h include/uapi/= linux/stat.h diff -u tools/perf/trace/beauty/include/uapi/linux/fcntl.h include/uapi= /linux/fcntl.h diff -u tools/perf/trace/beauty/include/uapi/linux/fs.h include/uapi/li= nux/fs.h diff -u tools/perf/trace/beauty/include/uapi/linux/mount.h include/uapi= /linux/mount.h Please see tools/include/uapi/README for further details. Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Namhyung Kim Acked-by: Ingo Molnar Tested-by: Venkat Rao Bagalkote --- tools/include/uapi/linux/stat.h | 99 ++++++++++++++----- .../trace/beauty/include/uapi/linux/fcntl.h | 4 + .../perf/trace/beauty/include/uapi/linux/fs.h | 21 +++- .../trace/beauty/include/uapi/linux/mount.h | 10 +- .../trace/beauty/include/uapi/linux/stat.h | 99 ++++++++++++++----- 5 files changed, 179 insertions(+), 54 deletions(-) diff --git a/tools/include/uapi/linux/stat.h b/tools/include/uapi/linux/sta= t.h index 887a2528644168a3..f78ee3670dd5d7c8 100644 --- a/tools/include/uapi/linux/stat.h +++ b/tools/include/uapi/linux/stat.h @@ -98,43 +98,93 @@ struct statx_timestamp { */ struct statx { /* 0x00 */ - __u32 stx_mask; /* What results were written [uncond] */ - __u32 stx_blksize; /* Preferred general I/O size [uncond] */ - __u64 stx_attributes; /* Flags conveying information about the file [unco= nd] */ + /* What results were written [uncond] */ + __u32 stx_mask; + + /* Preferred general I/O size [uncond] */ + __u32 stx_blksize; + + /* Flags conveying information about the file [uncond] */ + __u64 stx_attributes; + /* 0x10 */ - __u32 stx_nlink; /* Number of hard links */ - __u32 stx_uid; /* User ID of owner */ - __u32 stx_gid; /* Group ID of owner */ - __u16 stx_mode; /* File mode */ + /* Number of hard links */ + __u32 stx_nlink; + + /* User ID of owner */ + __u32 stx_uid; + + /* Group ID of owner */ + __u32 stx_gid; + + /* File mode */ + __u16 stx_mode; __u16 __spare0[1]; + /* 0x20 */ - __u64 stx_ino; /* Inode number */ - __u64 stx_size; /* File size */ - __u64 stx_blocks; /* Number of 512-byte blocks allocated */ - __u64 stx_attributes_mask; /* Mask to show what's supported in stx_attrib= utes */ + /* Inode number */ + __u64 stx_ino; + + /* File size */ + __u64 stx_size; + + /* Number of 512-byte blocks allocated */ + __u64 stx_blocks; + + /* Mask to show what's supported in stx_attributes */ + __u64 stx_attributes_mask; + /* 0x40 */ - struct statx_timestamp stx_atime; /* Last access time */ - struct statx_timestamp stx_btime; /* File creation time */ - struct statx_timestamp stx_ctime; /* Last attribute change time */ - struct statx_timestamp stx_mtime; /* Last data modification time */ + /* Last access time */ + struct statx_timestamp stx_atime; + + /* File creation time */ + struct statx_timestamp stx_btime; + + /* Last attribute change time */ + struct statx_timestamp stx_ctime; + + /* Last data modification time */ + struct statx_timestamp stx_mtime; + /* 0x80 */ - __u32 stx_rdev_major; /* Device ID of special file [if bdev/cdev] */ + /* Device ID of special file [if bdev/cdev] */ + __u32 stx_rdev_major; __u32 stx_rdev_minor; - __u32 stx_dev_major; /* ID of device containing file [uncond] */ + + /* ID of device containing file [uncond] */ + __u32 stx_dev_major; __u32 stx_dev_minor; + /* 0x90 */ __u64 stx_mnt_id; - __u32 stx_dio_mem_align; /* Memory buffer alignment for direct I/O */ - __u32 stx_dio_offset_align; /* File offset alignment for direct I/O */ + + /* Memory buffer alignment for direct I/O */ + __u32 stx_dio_mem_align; + + /* File offset alignment for direct I/O */ + __u32 stx_dio_offset_align; + /* 0xa0 */ - __u64 stx_subvol; /* Subvolume identifier */ - __u32 stx_atomic_write_unit_min; /* Min atomic write unit in bytes */ - __u32 stx_atomic_write_unit_max; /* Max atomic write unit in bytes */ + /* Subvolume identifier */ + __u64 stx_subvol; + + /* Min atomic write unit in bytes */ + __u32 stx_atomic_write_unit_min; + + /* Max atomic write unit in bytes */ + __u32 stx_atomic_write_unit_max; + /* 0xb0 */ - __u32 stx_atomic_write_segments_max; /* Max atomic write segment count = */ - __u32 __spare1[1]; + /* Max atomic write segment count */ + __u32 stx_atomic_write_segments_max; + + /* File offset alignment for direct I/O reads */ + __u32 stx_dio_read_offset_align; + /* 0xb8 */ __u64 __spare3[9]; /* Spare space for future expansion */ + /* 0x100 */ }; =20 @@ -164,6 +214,7 @@ struct statx { #define STATX_MNT_ID_UNIQUE 0x00004000U /* Want/got extended stx_mount_id = */ #define STATX_SUBVOL 0x00008000U /* Want/got stx_subvol */ #define STATX_WRITE_ATOMIC 0x00010000U /* Want/got atomic_write_* fields */ +#define STATX_DIO_READ_ALIGN 0x00020000U /* Want/got dio read alignment in= fo */ =20 #define STATX__RESERVED 0x80000000U /* Reserved for future struct statx e= xpansion */ =20 diff --git a/tools/perf/trace/beauty/include/uapi/linux/fcntl.h b/tools/per= f/trace/beauty/include/uapi/linux/fcntl.h index 6e6907e63bfc2b4d..a15ac2fa4b202fa0 100644 --- a/tools/perf/trace/beauty/include/uapi/linux/fcntl.h +++ b/tools/perf/trace/beauty/include/uapi/linux/fcntl.h @@ -155,4 +155,8 @@ #define AT_HANDLE_MNT_ID_UNIQUE 0x001 /* Return the u64 unique mount ID. */ #define AT_HANDLE_CONNECTABLE 0x002 /* Request a connectable file handle */ =20 +/* Flags for execveat2(2). */ +#define AT_EXECVE_CHECK 0x10000 /* Only perform a check if execution + would be allowed. */ + #endif /* _UAPI_LINUX_FCNTL_H */ diff --git a/tools/perf/trace/beauty/include/uapi/linux/fs.h b/tools/perf/t= race/beauty/include/uapi/linux/fs.h index 7539717707337a8c..e762e1af650c4bf0 100644 --- a/tools/perf/trace/beauty/include/uapi/linux/fs.h +++ b/tools/perf/trace/beauty/include/uapi/linux/fs.h @@ -40,6 +40,15 @@ #define BLOCK_SIZE_BITS 10 #define BLOCK_SIZE (1< To: Arnaldo Carvalho de Melo , Ian Rogers , Kan Liang Cc: Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, linux-arch@vger.kernel.org Subject: [PATCH 05/10] tools headers: Update the syscall table with the kernel sources Date: Wed, 9 Apr 2025 17:11:20 -0700 Message-ID: <20250410001125.391820-6-namhyung@kernel.org> X-Mailer: git-send-email 2.49.0.504.g3bcea36a83-goog In-Reply-To: <20250410001125.391820-1-namhyung@kernel.org> References: <20250410001125.391820-1-namhyung@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" To pick up the changes in: c4a16820d9019940 fs: add open_tree_attr() 2df1ad0d25803399 x86/arch_prctl: Simplify sys_arch_prctl() e632bca07c8eef1d arm64: generate 64-bit syscall.tbl This is basically to support the new open_tree_attr syscall. But it also needs to update asm-generic unistd.h header to get the new syscall number. And arm64 unistd.h header was converted to use the generic 64-bit header. Addressing this perf tools build warning: Warning: Kernel ABI header differences: diff -u tools/scripts/syscall.tbl scripts/syscall.tbl diff -u tools/perf/arch/x86/entry/syscalls/syscall_32.tbl arch/x86/entr= y/syscalls/syscall_32.tbl diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entr= y/syscalls/syscall_64.tbl diff -u tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc= /kernel/syscalls/syscall.tbl diff -u tools/perf/arch/s390/entry/syscalls/syscall.tbl arch/s390/kerne= l/syscalls/syscall.tbl diff -u tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl arch/mips/k= ernel/syscalls/syscall_n64.tbl diff -u tools/perf/arch/arm/entry/syscalls/syscall.tbl arch/arm/tools/s= yscall.tbl diff -u tools/perf/arch/sh/entry/syscalls/syscall.tbl arch/sh/kernel/sy= scalls/syscall.tbl diff -u tools/perf/arch/sparc/entry/syscalls/syscall.tbl arch/sparc/ker= nel/syscalls/syscall.tbl diff -u tools/perf/arch/xtensa/entry/syscalls/syscall.tbl arch/xtensa/k= ernel/syscalls/syscall.tbl diff -u tools/arch/arm64/include/uapi/asm/unistd.h arch/arm64/include/u= api/asm/unistd.h diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generi= c/unistd.h Please see tools/include/uapi/README for further details. Cc: linux-arch@vger.kernel.org Signed-off-by: Namhyung Kim Acked-by: Ingo Molnar Tested-by: Jon Hunter Tested-by: Venkat Rao Bagalkote --- tools/arch/arm64/include/uapi/asm/unistd.h | 24 +------------------ tools/include/uapi/asm-generic/unistd.h | 4 +++- .../perf/arch/arm/entry/syscalls/syscall.tbl | 1 + .../arch/mips/entry/syscalls/syscall_n64.tbl | 1 + .../arch/powerpc/entry/syscalls/syscall.tbl | 1 + .../perf/arch/s390/entry/syscalls/syscall.tbl | 1 + tools/perf/arch/sh/entry/syscalls/syscall.tbl | 1 + .../arch/sparc/entry/syscalls/syscall.tbl | 1 + .../arch/x86/entry/syscalls/syscall_32.tbl | 3 ++- .../arch/x86/entry/syscalls/syscall_64.tbl | 1 + .../arch/xtensa/entry/syscalls/syscall.tbl | 1 + tools/scripts/syscall.tbl | 1 + 12 files changed, 15 insertions(+), 25 deletions(-) diff --git a/tools/arch/arm64/include/uapi/asm/unistd.h b/tools/arch/arm64/= include/uapi/asm/unistd.h index 9306726337fe005e..df36f23876e863ff 100644 --- a/tools/arch/arm64/include/uapi/asm/unistd.h +++ b/tools/arch/arm64/include/uapi/asm/unistd.h @@ -1,24 +1,2 @@ /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2012 ARM Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#define __ARCH_WANT_RENAMEAT -#define __ARCH_WANT_NEW_STAT -#define __ARCH_WANT_SET_GET_RLIMIT -#define __ARCH_WANT_TIME32_SYSCALLS -#define __ARCH_WANT_MEMFD_SECRET - -#include +#include diff --git a/tools/include/uapi/asm-generic/unistd.h b/tools/include/uapi/a= sm-generic/unistd.h index 88dc393c2bca38c0..2892a45023af6d3e 100644 --- a/tools/include/uapi/asm-generic/unistd.h +++ b/tools/include/uapi/asm-generic/unistd.h @@ -849,9 +849,11 @@ __SYSCALL(__NR_getxattrat, sys_getxattrat) __SYSCALL(__NR_listxattrat, sys_listxattrat) #define __NR_removexattrat 466 __SYSCALL(__NR_removexattrat, sys_removexattrat) +#define __NR_open_tree_attr 467 +__SYSCALL(__NR_open_tree_attr, sys_open_tree_attr) =20 #undef __NR_syscalls -#define __NR_syscalls 467 +#define __NR_syscalls 468 =20 /* * 32 bit systems traditionally used different diff --git a/tools/perf/arch/arm/entry/syscalls/syscall.tbl b/tools/perf/ar= ch/arm/entry/syscalls/syscall.tbl index 49eeb2ad8dbd8e07..27c1d5ebcd91c8c2 100644 --- a/tools/perf/arch/arm/entry/syscalls/syscall.tbl +++ b/tools/perf/arch/arm/entry/syscalls/syscall.tbl @@ -481,3 +481,4 @@ 464 common getxattrat sys_getxattrat 465 common listxattrat sys_listxattrat 466 common removexattrat sys_removexattrat +467 common open_tree_attr sys_open_tree_attr diff --git a/tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl b/tools/pe= rf/arch/mips/entry/syscalls/syscall_n64.tbl index c844cd5cda620b28..1e8c44c7b61492ea 100644 --- a/tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl +++ b/tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl @@ -381,3 +381,4 @@ 464 n64 getxattrat sys_getxattrat 465 n64 listxattrat sys_listxattrat 466 n64 removexattrat sys_removexattrat +467 n64 open_tree_attr sys_open_tree_attr diff --git a/tools/perf/arch/powerpc/entry/syscalls/syscall.tbl b/tools/per= f/arch/powerpc/entry/syscalls/syscall.tbl index d8b4ab78bef076bd..9a084bdb892694bc 100644 --- a/tools/perf/arch/powerpc/entry/syscalls/syscall.tbl +++ b/tools/perf/arch/powerpc/entry/syscalls/syscall.tbl @@ -557,3 +557,4 @@ 464 common getxattrat sys_getxattrat 465 common listxattrat sys_listxattrat 466 common removexattrat sys_removexattrat +467 common open_tree_attr sys_open_tree_attr diff --git a/tools/perf/arch/s390/entry/syscalls/syscall.tbl b/tools/perf/a= rch/s390/entry/syscalls/syscall.tbl index e9115b4d8b635b84..a4569b96ef06c54c 100644 --- a/tools/perf/arch/s390/entry/syscalls/syscall.tbl +++ b/tools/perf/arch/s390/entry/syscalls/syscall.tbl @@ -469,3 +469,4 @@ 464 common getxattrat sys_getxattrat sys_getxattrat 465 common listxattrat sys_listxattrat sys_listxattrat 466 common removexattrat sys_removexattrat sys_removexattrat +467 common open_tree_attr sys_open_tree_attr sys_open_tree_attr diff --git a/tools/perf/arch/sh/entry/syscalls/syscall.tbl b/tools/perf/arc= h/sh/entry/syscalls/syscall.tbl index c8cad33bf250ea11..52a7652fcff6394b 100644 --- a/tools/perf/arch/sh/entry/syscalls/syscall.tbl +++ b/tools/perf/arch/sh/entry/syscalls/syscall.tbl @@ -470,3 +470,4 @@ 464 common getxattrat sys_getxattrat 465 common listxattrat sys_listxattrat 466 common removexattrat sys_removexattrat +467 common open_tree_attr sys_open_tree_attr diff --git a/tools/perf/arch/sparc/entry/syscalls/syscall.tbl b/tools/perf/= arch/sparc/entry/syscalls/syscall.tbl index 727f99d333b304b3..83e45eb6c095a36b 100644 --- a/tools/perf/arch/sparc/entry/syscalls/syscall.tbl +++ b/tools/perf/arch/sparc/entry/syscalls/syscall.tbl @@ -512,3 +512,4 @@ 464 common getxattrat sys_getxattrat 465 common listxattrat sys_listxattrat 466 common removexattrat sys_removexattrat +467 common open_tree_attr sys_open_tree_attr diff --git a/tools/perf/arch/x86/entry/syscalls/syscall_32.tbl b/tools/perf= /arch/x86/entry/syscalls/syscall_32.tbl index 4d0fb2fba7e208ae..ac007ea00979dc28 100644 --- a/tools/perf/arch/x86/entry/syscalls/syscall_32.tbl +++ b/tools/perf/arch/x86/entry/syscalls/syscall_32.tbl @@ -396,7 +396,7 @@ 381 i386 pkey_alloc sys_pkey_alloc 382 i386 pkey_free sys_pkey_free 383 i386 statx sys_statx -384 i386 arch_prctl sys_arch_prctl compat_sys_arch_prctl +384 i386 arch_prctl sys_arch_prctl 385 i386 io_pgetevents sys_io_pgetevents_time32 compat_sys_io_pgetevents 386 i386 rseq sys_rseq 393 i386 semget sys_semget @@ -472,3 +472,4 @@ 464 i386 getxattrat sys_getxattrat 465 i386 listxattrat sys_listxattrat 466 i386 removexattrat sys_removexattrat +467 i386 open_tree_attr sys_open_tree_attr diff --git a/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl b/tools/perf= /arch/x86/entry/syscalls/syscall_64.tbl index 5eb708bff1c791de..cfb5ca41e30de1a4 100644 --- a/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl +++ b/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl @@ -390,6 +390,7 @@ 464 common getxattrat sys_getxattrat 465 common listxattrat sys_listxattrat 466 common removexattrat sys_removexattrat +467 common open_tree_attr sys_open_tree_attr =20 # # Due to a historical design error, certain syscalls are numbered differen= tly diff --git a/tools/perf/arch/xtensa/entry/syscalls/syscall.tbl b/tools/perf= /arch/xtensa/entry/syscalls/syscall.tbl index 37effc1b134eea06..f657a77314f8667f 100644 --- a/tools/perf/arch/xtensa/entry/syscalls/syscall.tbl +++ b/tools/perf/arch/xtensa/entry/syscalls/syscall.tbl @@ -437,3 +437,4 @@ 464 common getxattrat sys_getxattrat 465 common listxattrat sys_listxattrat 466 common removexattrat sys_removexattrat +467 common open_tree_attr sys_open_tree_attr diff --git a/tools/scripts/syscall.tbl b/tools/scripts/syscall.tbl index ebbdb3c42e9f7461..580b4e246aecd5f0 100644 --- a/tools/scripts/syscall.tbl +++ b/tools/scripts/syscall.tbl @@ -407,3 +407,4 @@ 464 common getxattrat sys_getxattrat 465 common listxattrat sys_listxattrat 466 common removexattrat sys_removexattrat +467 common open_tree_attr sys_open_tree_attr --=20 2.49.0.504.g3bcea36a83-goog From nobody Fri Dec 19 00:38:01 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1F42136658; Thu, 10 Apr 2025 00:11:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744243891; cv=none; b=hKPodSpwXKlVxN9n8Ctm0YjGnsG2EhJFPs7NR9KwwiuqB/xefaHMOFDYx42pR29q7NQW1ovv1NE5BE9ZthgqDS47vlpwQ3CwLvc7LGVP50iH6nFS43VXwnMZgA28sNJe6T4lH4Mo2yKZMH0aypI0fKJQ4zFwUuaF64s8vl0/n84= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744243891; c=relaxed/simple; bh=5gNrapU9m0iEfF2ywuXgY1f4VK/XQNsOp/LMBJem0Iw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XmSGiuZXEAWw44b9NYXriW9Lwvfefk/SFZWF5vVBRyGj8or5uAzJwxjr05mkNQQ/YBghAC9hnHst6eX8yKxHm+29xFTAsdTPupNR3cowJf1d3eg+auub0gTR6/tDT9LBlxnZaQWN/4cOWw5pbR/VAII37CcSOmR+SIS4IuvG7bE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XX3GQccz; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XX3GQccz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0ADF9C4CEE2; Thu, 10 Apr 2025 00:11:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744243890; bh=5gNrapU9m0iEfF2ywuXgY1f4VK/XQNsOp/LMBJem0Iw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XX3GQcczyy1utyiuIzeZCtY0hcxNZPBR9HAr96TrmFfdP8VUQ9VKBFAx9U0ZaFXC5 scFZDu9R0Bf+ypKriK2Gs5FuJD0j4ojHDWnsKSblSHmfchH8dtqJqlbNzUDMfwnpq2 a/BRdzj4UgJ/Lng8jJA8nsuPpp7lmmxH6MfmA2U1zIytnS86J0GjLbLXJExr4bBRJp 8N+mXWgjuRhtuO/HhYBNYV1ZImSj1CAog7RFfssch4BGCbX388uILulqQd2NEXbZ1u 88w/7QFVzyUjSX7MbwMX1Ol2xlYkGD74aoATRXWd02DrcfD8Syh8wU29Zw8qclAs/X LWppNk2bnEe8w== From: Namhyung Kim To: Arnaldo Carvalho de Melo , Ian Rogers , Kan Liang Cc: Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, Thomas Gleixner Subject: [PATCH 06/10] tools headers: Update the uapi/linux/prctl.h copy with the kernel sources Date: Wed, 9 Apr 2025 17:11:21 -0700 Message-ID: <20250410001125.391820-7-namhyung@kernel.org> X-Mailer: git-send-email 2.49.0.504.g3bcea36a83-goog In-Reply-To: <20250410001125.391820-1-namhyung@kernel.org> References: <20250410001125.391820-1-namhyung@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" To pick up the changes in: ec2d0c04624b3c8a posix-timers: Provide a mechanism to allocate a given ti= mer ID Addressing this perf tools build warning: Warning: Kernel ABI header differences: diff -u tools/perf/trace/beauty/include/uapi/linux/prctl.h include/uapi= /linux/prctl.h Please see tools/include/uapi/README for further details. Cc: Thomas Gleixner Signed-off-by: Namhyung Kim Acked-by: Ingo Molnar Tested-by: Venkat Rao Bagalkote --- tools/perf/trace/beauty/include/uapi/linux/prctl.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/perf/trace/beauty/include/uapi/linux/prctl.h b/tools/per= f/trace/beauty/include/uapi/linux/prctl.h index 5c6080680cb27b19..15c18ef4eb11a013 100644 --- a/tools/perf/trace/beauty/include/uapi/linux/prctl.h +++ b/tools/perf/trace/beauty/include/uapi/linux/prctl.h @@ -353,4 +353,15 @@ struct prctl_mm_map { */ #define PR_LOCK_SHADOW_STACK_STATUS 76 =20 +/* + * Controls the mode of timer_create() for CRIU restore operations. + * Enabling this allows CRIU to restore timers with explicit IDs. + * + * Don't use for normal operations as the result might be undefined. + */ +#define PR_TIMER_CREATE_RESTORE_IDS 77 +# define PR_TIMER_CREATE_RESTORE_IDS_OFF 0 +# define PR_TIMER_CREATE_RESTORE_IDS_ON 1 +# define PR_TIMER_CREATE_RESTORE_IDS_GET 2 + #endif /* _LINUX_PRCTL_H */ --=20 2.49.0.504.g3bcea36a83-goog From nobody Fri Dec 19 00:38:01 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 85EB6154BE2; Thu, 10 Apr 2025 00:11:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744243891; cv=none; b=YCjLPxCpR3s8uALkYl/tjm0vRK0hgEA2GHHeOdHG0ZcLZbiWnLAFvMbWQlgXLz9ze9U+/tniKla1stFTqSz0X1p7bCB2I2dimone8USvc7h9RBPRfI1d2GtsqecAGa+FXehkq5qnla2WbfjblFRlGzS6fOh4R3s6lJi7+3tbQ7Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744243891; c=relaxed/simple; bh=NNatGCeqYrE074to5dbGsLRZybeGe7nqOuNLtoyoWoU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=H2cebiBWd7uyAp26bRCZYb9MmkgI2+7TA/iMrxnjkDIbSFIAEczNXWQss+nsV8EE+2+aYzTaYvHxA7ezFBteCqYVcO7x9iblOJM52oc37v6X+3WhW3Ajt+yRQbuSr/fNffCY/jBeTeirHoC16UDduVnJCJ+CGL6Eh9hp/JxzBEw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BSROBZdD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BSROBZdD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 931CCC4CEE9; Thu, 10 Apr 2025 00:11:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744243891; bh=NNatGCeqYrE074to5dbGsLRZybeGe7nqOuNLtoyoWoU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BSROBZdDdz1rfjlqTJVC1jxYlIQaGdMjtzs/1suwOLTOSSX+/nrpCafn4Stxt29Ru 5kp3VCEe1FhkVb5voMR1ktfaN3JcQNI0ED1n6fNlDYQInXWn9KOUAJ6KQJE+HaHXn1 nHlOuQK+r2xzf8yQduNUGIiLVYdXiABoT3wGFAiDE90xDmP1kfm9n+FCAGFjOziDp/ b7EY+aHXrKsB3aMV/qj5sLNbxA39I/qwy0efGEd+62ojj3G4dBbyM32s8bHx2lKwHO bG0OhL1t/GrPmJbdP7p5faGkLttqCUxa8x8o2U/7g25g9vmlBDqoUnK0N8srVp0qaH j3UIxTysRSheA== From: Namhyung Kim To: Arnaldo Carvalho de Melo , Ian Rogers , Kan Liang Cc: Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, linux-arch@vger.kernel.org Subject: [PATCH 07/10] tools headers: Update the uapi/asm-generic/mman-common.h copy with the kernel sources Date: Wed, 9 Apr 2025 17:11:22 -0700 Message-ID: <20250410001125.391820-8-namhyung@kernel.org> X-Mailer: git-send-email 2.49.0.504.g3bcea36a83-goog In-Reply-To: <20250410001125.391820-1-namhyung@kernel.org> References: <20250410001125.391820-1-namhyung@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" To pick up the changes in: 6d61527d931ba07b mm/pkey: Add PKEY_UNRESTRICTED macro Addressing this perf tools build warning: Warning: Kernel ABI header differences: diff -u tools/include/uapi/asm-generic/mman-common.h include/uapi/asm-g= eneric/mman-common.h Please see tools/include/uapi/README for further details. Cc: linux-arch@vger.kernel.org Signed-off-by: Namhyung Kim Acked-by: Ingo Molnar Tested-by: Venkat Rao Bagalkote --- tools/include/uapi/asm-generic/mman-common.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/include/uapi/asm-generic/mman-common.h b/tools/include/u= api/asm-generic/mman-common.h index 1ea2c4c33b86a263..ef1c27fa3c570fa4 100644 --- a/tools/include/uapi/asm-generic/mman-common.h +++ b/tools/include/uapi/asm-generic/mman-common.h @@ -85,6 +85,7 @@ /* compatibility flags */ #define MAP_FILE 0 =20 +#define PKEY_UNRESTRICTED 0x0 #define PKEY_DISABLE_ACCESS 0x1 #define PKEY_DISABLE_WRITE 0x2 #define PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS |\ --=20 2.49.0.504.g3bcea36a83-goog From nobody Fri Dec 19 00:38:01 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0CD4E172BD5; Thu, 10 Apr 2025 00:11:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744243892; cv=none; b=oJUDtNBGiQh57GaRspb0uS1qyU7uV7qUeOhqpoGloaOdJNpfzt5ihlP2Tupr13InH9RBUoV8GYxwno8TSsoFbBJZP0rnKZ0qF4J9LK9F2tEWl1G4Eb3NdUH0QFXb9Xd3+XTCoN0BiH8rVbrXxgBfxmn9cqySUbkO15TFOljE318= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744243892; c=relaxed/simple; bh=+r8U8hwXDQFs2eGkncAiuoZnN1KgVhOqirh8hXUaHv0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Jbmlq8YuWMwUo445axvqfBAbpTHO7HgHD5R+RDZ1m3Rg0tAMDQYv6XD2LJRI8H0GcsUoTeEH9pThvqn9kTb/jsvz+HLAqlpgE/5l6rencyaXfB/H4g9c3+/AymAthdXOpu47DQtSAvZo6n6rrqyUz0CExWt5l6InohDhU/ksCmU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RfwQer2s; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RfwQer2s" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 272FFC4CEE3; Thu, 10 Apr 2025 00:11:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744243891; bh=+r8U8hwXDQFs2eGkncAiuoZnN1KgVhOqirh8hXUaHv0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RfwQer2sCctsdcsC6MXVyA0GpWyT21/x0C5xyD9+QJSfRFPzv2nvjEtKEelYuAPvy jE8Ws3/Y+fu0SOg9SrYs9x4LV/VcktOguQMKg8eKUtanrZM0Qr5Xv26zpXCEBZk+Fq vv0vG/0SkKUbpPuMpZiP4qrp67CkLJ0LbQCZQ2fc66iU6KKxmhpCONIrM+sfr3sdU6 CWMf19rxUoCHfUI75+AwLHXLE0LRCByhyClJ0Qk1FF1ihXUCT2siTzJDTPbtp+wJC1 3hzdmU6qaEEpYovY4onklJ2t6+cWoX1/jPVnz42D6X9BT7+Jtj/x4aIWyZqoqOM0Ux nU4S8V/YxCKfA== From: Namhyung Kim To: Arnaldo Carvalho de Melo , Ian Rogers , Kan Liang Cc: Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 08/10] tools headers: Update the linux/unaligned.h copy with the kernel sources Date: Wed, 9 Apr 2025 17:11:23 -0700 Message-ID: <20250410001125.391820-9-namhyung@kernel.org> X-Mailer: git-send-email 2.49.0.504.g3bcea36a83-goog In-Reply-To: <20250410001125.391820-1-namhyung@kernel.org> References: <20250410001125.391820-1-namhyung@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" To pick up the changes in: 3846699217798061 ALSA: rawmidi: Make tied_device=3D0 as default / unknown 7bb49d2e8b52adac ALSA: rawmidi: Bump protocol version to 2.0.5 b8fefed73a952a33 ALSA: rawmidi: Show substream activity in info ioctl bdf46443f350dd5d ALSA: rawmidi: Expose the tied device number in info ioc= tl Addressing this perf tools build warning: Warning: Kernel ABI header differences: diff -u tools/perf/trace/beauty/include/uapi/sound/asound.h include/uap= i/sound/asound.h Please see tools/include/uapi/README for further details. Cc: linux-sound@vger.kernel.org Signed-off-by: Namhyung Kim Acked-by: Ingo Molnar Tested-by: Venkat Rao Bagalkote --- tools/perf/trace/beauty/include/uapi/sound/asound.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/perf/trace/beauty/include/uapi/sound/asound.h b/tools/pe= rf/trace/beauty/include/uapi/sound/asound.h index 4cd513215bcd8f74..5a049eeaeccea59f 100644 --- a/tools/perf/trace/beauty/include/uapi/sound/asound.h +++ b/tools/perf/trace/beauty/include/uapi/sound/asound.h @@ -716,7 +716,7 @@ enum { * Raw MIDI section - /dev/snd/midi?? */ =20 -#define SNDRV_RAWMIDI_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 4) +#define SNDRV_RAWMIDI_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 5) =20 enum { SNDRV_RAWMIDI_STREAM_OUTPUT =3D 0, @@ -728,6 +728,9 @@ enum { #define SNDRV_RAWMIDI_INFO_INPUT 0x00000002 #define SNDRV_RAWMIDI_INFO_DUPLEX 0x00000004 #define SNDRV_RAWMIDI_INFO_UMP 0x00000008 +#define SNDRV_RAWMIDI_INFO_STREAM_INACTIVE 0x00000010 + +#define SNDRV_RAWMIDI_DEVICE_UNKNOWN 0 =20 struct snd_rawmidi_info { unsigned int device; /* RO/WR (control): device number */ @@ -740,7 +743,8 @@ struct snd_rawmidi_info { unsigned char subname[32]; /* name of active or selected subdevice */ unsigned int subdevices_count; unsigned int subdevices_avail; - unsigned char reserved[64]; /* reserved for future use */ + int tied_device; /* R: tied rawmidi device (UMP/legacy) */ + unsigned char reserved[60]; /* reserved for future use */ }; =20 #define SNDRV_RAWMIDI_MODE_FRAMING_MASK (7<<0) --=20 2.49.0.504.g3bcea36a83-goog From nobody Fri Dec 19 00:38:01 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A0375192B90; Thu, 10 Apr 2025 00:11:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744243892; cv=none; b=PTvfGLLONlETj7OUoWRBjFX2amOy60Zzhx/i64H1qIIn9KSF1p8bN0/FsDMRk6APBTRRNI9LSi4NE6n5uY9DxB2VVOXvZ5jAtDLB8bZzHMpHAzWlgGakf2JOQeixXCsA6Nc6IDOllqLYNAtvURjZDe/fCsZVTJrS/CUlUdfAORM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744243892; c=relaxed/simple; bh=hGfEZ5zzmZX1BJMLzXHaSYb5/okcl8lHhopN/b6c//A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JVEhoOguO8mQyLjnQ/6iHAJi7ovx7BwbE3+FkZgS1DhiSKfQe4rQsZNhmsGqtyFyfiM5d2KKs70Ufu1R5H93GRDjoaTEXH+8QoaTxS/TNsWnDUif+CrJsexFolEARhFCxIlp3pAmrlqPzZy+UKvn951e+QZI3ThgVRU4JlcQa0o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZhEDlz7F; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZhEDlz7F" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B16CBC4CEE2; Thu, 10 Apr 2025 00:11:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744243892; bh=hGfEZ5zzmZX1BJMLzXHaSYb5/okcl8lHhopN/b6c//A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZhEDlz7FAB5JIwhqexPqa+fZcOiC5+6LTHwya68LYlJzQSCJKEyLPqQvRTBn1Kpaf LGLT9hZwaK1IU3MiBTuo8Yiq556/SWkT7b79PDzdLyQDcmv8uac9IkTTc4YUJy6WHF Rvm8pSGnTBmqw37DuMmzpk0Fz2Gezp/eWkX7d0D0drBCv/fCtoKUTvhEQC6PAI4ThR 9TKtmQvX8q25qOZqqMCMzIaileQ/0vcHrcjPA2jmSOkabCSVvU9kmSG7BdhnXd9cRt GbRm3dX5DiuHKIeDltuZqhRduuEirNSbXf/kXZepmH+YHqsMMYmk6XL41PREfBg3yZ zjks92CesZmHA== From: Namhyung Kim To: Arnaldo Carvalho de Melo , Ian Rogers , Kan Liang Cc: Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, x86@kernel.org Subject: [PATCH 09/10] tools headers: Update the x86 headers with the kernel sources Date: Wed, 9 Apr 2025 17:11:24 -0700 Message-ID: <20250410001125.391820-10-namhyung@kernel.org> X-Mailer: git-send-email 2.49.0.504.g3bcea36a83-goog In-Reply-To: <20250410001125.391820-1-namhyung@kernel.org> References: <20250410001125.391820-1-namhyung@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" To pick up the changes in: 841326332bcb13ae x86/cpufeatures: Generate the he= ader based on build config 440a65b7d25fb06f x86/mm: Enable AMD translation cache extensions 767ae437a32d6447 x86/mm: Add INVLPGB feature and Kconfig entry b4cc466b97359011 cpufreq/amd-pstate: Replace all AMD_CPPC_* macros with m= asks 98c7a713db91c5a9 x86/bugs: Add X86_BUG_SPECTRE_V2_USER 8f64eee70cdd3bb8 x86/bugs: Remove X86_FEATURE_USE_IBPB 8442df2b49ed9bcd x86/bugs: KVM: Add support for SRSO_MSR_FIX 70792aed14551e31 x86/cpufeatures: Add CPUID feature bit for Idle HLT inte= rcept 968e9bc4cef87054 x86: move ZMM exclusion list into CPU feature flag c631a2de7ae48d50 perf/x86/intel: Ensure LBRs are disabled when a CPU is s= tarting 38cc6495cdec18a4 x86/sev: Prevent GUEST_TSC_FREQ MSR interception for Sec= ure TSC enabled guests 288bba2f4c8be1e1 x86/cpufeatures: Remove "AMD" from the comments to the A= MD-specific leaf 877818802c3e970f x86/bugs: Add SRSO_USER_KERNEL_NO support 8ae3291f773befee x86/sev: Add full support for a segmented RMP table 0cbc0258415814c8 x86/sev: Add support for the RMPREAD instruction 7a470e826d7521be x86/cpufeatures: Free up unused feature bits Addressing this perf tools build warning: Warning: Kernel ABI header differences: diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/c= pufeatures.h diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr= -index.h Please see tools/include/uapi/README for further details. Cc: x86@kernel.org Signed-off-by: Namhyung Kim Acked-by: Ingo Molnar Tested-by: Venkat Rao Bagalkote --- tools/arch/x86/include/asm/cpufeatures.h | 28 +++++++++++++++------ tools/arch/x86/include/asm/msr-index.h | 31 +++++++++++++++--------- 2 files changed, 39 insertions(+), 20 deletions(-) diff --git a/tools/arch/x86/include/asm/cpufeatures.h b/tools/arch/x86/incl= ude/asm/cpufeatures.h index 9e3fa7942e7d3f24..6c2c152d8a67b9bf 100644 --- a/tools/arch/x86/include/asm/cpufeatures.h +++ b/tools/arch/x86/include/asm/cpufeatures.h @@ -75,8 +75,8 @@ #define X86_FEATURE_CENTAUR_MCR ( 3*32+ 3) /* "centaur_mcr" Centaur MCRs = (=3D MTRRs) */ #define X86_FEATURE_K8 ( 3*32+ 4) /* Opteron, Athlon64 */ #define X86_FEATURE_ZEN5 ( 3*32+ 5) /* CPU based on Zen5 microarchitectur= e */ -#define X86_FEATURE_P3 ( 3*32+ 6) /* P3 */ -#define X86_FEATURE_P4 ( 3*32+ 7) /* P4 */ +/* Free ( 3*32+ 6) */ +/* Free ( 3*32+ 7) */ #define X86_FEATURE_CONSTANT_TSC ( 3*32+ 8) /* "constant_tsc" TSC ticks at= a constant rate */ #define X86_FEATURE_UP ( 3*32+ 9) /* "up" SMP kernel running on UP */ #define X86_FEATURE_ART ( 3*32+10) /* "art" Always running timer (ART) */ @@ -329,6 +329,7 @@ #define X86_FEATURE_CLZERO (13*32+ 0) /* "clzero" CLZERO instruction */ #define X86_FEATURE_IRPERF (13*32+ 1) /* "irperf" Instructions Retired Co= unt */ #define X86_FEATURE_XSAVEERPTR (13*32+ 2) /* "xsaveerptr" Always save/res= tore FP error pointers */ +#define X86_FEATURE_INVLPGB (13*32+ 3) /* INVLPGB and TLBSYNC instruction= s supported */ #define X86_FEATURE_RDPRU (13*32+ 4) /* "rdpru" Read processor register a= t user level */ #define X86_FEATURE_WBNOINVD (13*32+ 9) /* "wbnoinvd" WBNOINVD instructio= n */ #define X86_FEATURE_AMD_IBPB (13*32+12) /* Indirect Branch Prediction Bar= rier */ @@ -377,6 +378,7 @@ #define X86_FEATURE_V_SPEC_CTRL (15*32+20) /* "v_spec_ctrl" Virtual SPEC_= CTRL */ #define X86_FEATURE_VNMI (15*32+25) /* "vnmi" Virtual NMI */ #define X86_FEATURE_SVME_ADDR_CHK (15*32+28) /* SVME addr check */ +#define X86_FEATURE_IDLE_HLT (15*32+30) /* IDLE HLT intercept */ =20 /* Intel-defined CPU features, CPUID level 0x00000007:0 (ECX), word 16 */ #define X86_FEATURE_AVX512VBMI (16*32+ 1) /* "avx512vbmi" AVX512 Vector B= it Manipulation instructions*/ @@ -434,15 +436,18 @@ #define X86_FEATURE_SPEC_CTRL_SSBD (18*32+31) /* Speculative Store Bypass = Disable */ =20 /* AMD-defined memory encryption features, CPUID level 0x8000001f (EAX), w= ord 19 */ -#define X86_FEATURE_SME (19*32+ 0) /* "sme" AMD Secure Memory Encryption= */ -#define X86_FEATURE_SEV (19*32+ 1) /* "sev" AMD Secure Encrypted Virtual= ization */ +#define X86_FEATURE_SME (19*32+ 0) /* "sme" Secure Memory Encryption */ +#define X86_FEATURE_SEV (19*32+ 1) /* "sev" Secure Encrypted Virtualizat= ion */ #define X86_FEATURE_VM_PAGE_FLUSH (19*32+ 2) /* VM Page Flush MSR is suppo= rted */ -#define X86_FEATURE_SEV_ES (19*32+ 3) /* "sev_es" AMD Secure Encrypted Vi= rtualization - Encrypted State */ -#define X86_FEATURE_SEV_SNP (19*32+ 4) /* "sev_snp" AMD Secure Encrypted = Virtualization - Secure Nested Paging */ +#define X86_FEATURE_SEV_ES (19*32+ 3) /* "sev_es" Secure Encrypted Virtua= lization - Encrypted State */ +#define X86_FEATURE_SEV_SNP (19*32+ 4) /* "sev_snp" Secure Encrypted Virt= ualization - Secure Nested Paging */ #define X86_FEATURE_V_TSC_AUX (19*32+ 9) /* Virtual TSC_AUX */ -#define X86_FEATURE_SME_COHERENT (19*32+10) /* AMD hardware-enforced cache= coherency */ -#define X86_FEATURE_DEBUG_SWAP (19*32+14) /* "debug_swap" AMD SEV-ES full= debug state swap support */ +#define X86_FEATURE_SME_COHERENT (19*32+10) /* hardware-enforced cache coh= erency */ +#define X86_FEATURE_DEBUG_SWAP (19*32+14) /* "debug_swap" SEV-ES full deb= ug state swap support */ +#define X86_FEATURE_RMPREAD (19*32+21) /* RMPREAD instruction */ +#define X86_FEATURE_SEGMENTED_RMP (19*32+23) /* Segmented RMP support */ #define X86_FEATURE_SVSM (19*32+28) /* "svsm" SVSM present */ +#define X86_FEATURE_HV_INUSE_WR_ALLOWED (19*32+30) /* Allow Write to in-us= e hypervisor-owned pages */ =20 /* AMD-defined Extended Feature 2 EAX, CPUID level 0x80000021 (EAX), word = 20 */ #define X86_FEATURE_NO_NESTED_DATA_BP (20*32+ 0) /* No Nested Data Breakpo= ints */ @@ -455,6 +460,11 @@ #define X86_FEATURE_SBPB (20*32+27) /* Selective Branch Prediction Barrie= r */ #define X86_FEATURE_IBPB_BRTYPE (20*32+28) /* MSR_PRED_CMD[IBPB] flushes = all branch type predictions */ #define X86_FEATURE_SRSO_NO (20*32+29) /* CPU is not affected by SRSO */ +#define X86_FEATURE_SRSO_USER_KERNEL_NO (20*32+30) /* CPU is not affected = by SRSO across user/kernel boundaries */ +#define X86_FEATURE_SRSO_BP_SPEC_REDUCE (20*32+31) /* + * BP_CFG[BpSpecReduce] can be used to mitigate SRSO for VMs. + * (SRSO_MSR_FIX in the official doc). + */ =20 /* * Extended auxiliary flags: Linux defined - for features scattered in var= ious @@ -470,6 +480,7 @@ #define X86_FEATURE_AMD_FAST_CPPC (21*32 + 5) /* Fast CPPC */ #define X86_FEATURE_AMD_HETEROGENEOUS_CORES (21*32 + 6) /* Heterogeneous C= ore Topology */ #define X86_FEATURE_AMD_WORKLOAD_CLASS (21*32 + 7) /* Workload Classificat= ion */ +#define X86_FEATURE_PREFER_YMM (21*32 + 8) /* Avoid ZMM registers due to = downclocking */ =20 /* * BUG word(s) @@ -521,4 +532,5 @@ #define X86_BUG_RFDS X86_BUG(1*32 + 2) /* "rfds" CPU is vulnerable to Re= gister File Data Sampling */ #define X86_BUG_BHI X86_BUG(1*32 + 3) /* "bhi" CPU is affected by Branch= History Injection */ #define X86_BUG_IBPB_NO_RET X86_BUG(1*32 + 4) /* "ibpb_no_ret" IBPB om= its return target predictions */ +#define X86_BUG_SPECTRE_V2_USER X86_BUG(1*32 + 5) /* "spectre_v2_user" CP= U is affected by Spectre variant 2 attack between user processes */ #endif /* _ASM_X86_CPUFEATURES_H */ diff --git a/tools/arch/x86/include/asm/msr-index.h b/tools/arch/x86/includ= e/asm/msr-index.h index dc1c1057f26e45a8..e6134ef2263d50d1 100644 --- a/tools/arch/x86/include/asm/msr-index.h +++ b/tools/arch/x86/include/asm/msr-index.h @@ -397,7 +397,8 @@ #define MSR_IA32_PASID_VALID BIT_ULL(31) =20 /* DEBUGCTLMSR bits (others vary by model): */ -#define DEBUGCTLMSR_LBR (1UL << 0) /* last branch recording */ +#define DEBUGCTLMSR_LBR_BIT 0 /* last branch recording */ +#define DEBUGCTLMSR_LBR (1UL << DEBUGCTLMSR_LBR_BIT) #define DEBUGCTLMSR_BTF_SHIFT 1 #define DEBUGCTLMSR_BTF (1UL << 1) /* single-step on branches */ #define DEBUGCTLMSR_BUS_LOCK_DETECT (1UL << 2) @@ -610,6 +611,7 @@ #define MSR_AMD_PERF_CTL 0xc0010062 #define MSR_AMD_PERF_STATUS 0xc0010063 #define MSR_AMD_PSTATE_DEF_BASE 0xc0010064 +#define MSR_AMD64_GUEST_TSC_FREQ 0xc0010134 #define MSR_AMD64_OSVW_ID_LENGTH 0xc0010140 #define MSR_AMD64_OSVW_STATUS 0xc0010141 #define MSR_AMD_PPIN_CTL 0xc00102f0 @@ -646,6 +648,7 @@ #define MSR_AMD64_IBS_REG_COUNT_MAX 8 /* includes MSR_AMD64_IBSBRTARGET */ #define MSR_AMD64_SVM_AVIC_DOORBELL 0xc001011b #define MSR_AMD64_VM_PAGE_FLUSH 0xc001011e +#define MSR_AMD64_VIRT_SPEC_CTRL 0xc001011f #define MSR_AMD64_SEV_ES_GHCB 0xc0010130 #define MSR_AMD64_SEV 0xc0010131 #define MSR_AMD64_SEV_ENABLED_BIT 0 @@ -684,11 +687,12 @@ #define MSR_AMD64_SNP_SMT_PROT BIT_ULL(MSR_AMD64_SNP_SMT_PROT_BIT) #define MSR_AMD64_SNP_RESV_BIT 18 #define MSR_AMD64_SNP_RESERVED_MASK GENMASK_ULL(63, MSR_AMD64_SNP_RESV_BIT) - -#define MSR_AMD64_VIRT_SPEC_CTRL 0xc001011f - #define MSR_AMD64_RMP_BASE 0xc0010132 #define MSR_AMD64_RMP_END 0xc0010133 +#define MSR_AMD64_RMP_CFG 0xc0010136 +#define MSR_AMD64_SEG_RMP_ENABLED_BIT 0 +#define MSR_AMD64_SEG_RMP_ENABLED BIT_ULL(MSR_AMD64_SEG_RMP_ENABLED_BIT) +#define MSR_AMD64_RMP_SEGMENT_SHIFT(x) (((x) & GENMASK_ULL(13, 8)) >> 8) =20 #define MSR_SVSM_CAA 0xc001f000 =20 @@ -699,15 +703,17 @@ #define MSR_AMD_CPPC_REQ 0xc00102b3 #define MSR_AMD_CPPC_STATUS 0xc00102b4 =20 -#define AMD_CPPC_LOWEST_PERF(x) (((x) >> 0) & 0xff) -#define AMD_CPPC_LOWNONLIN_PERF(x) (((x) >> 8) & 0xff) -#define AMD_CPPC_NOMINAL_PERF(x) (((x) >> 16) & 0xff) -#define AMD_CPPC_HIGHEST_PERF(x) (((x) >> 24) & 0xff) +/* Masks for use with MSR_AMD_CPPC_CAP1 */ +#define AMD_CPPC_LOWEST_PERF_MASK GENMASK(7, 0) +#define AMD_CPPC_LOWNONLIN_PERF_MASK GENMASK(15, 8) +#define AMD_CPPC_NOMINAL_PERF_MASK GENMASK(23, 16) +#define AMD_CPPC_HIGHEST_PERF_MASK GENMASK(31, 24) =20 -#define AMD_CPPC_MAX_PERF(x) (((x) & 0xff) << 0) -#define AMD_CPPC_MIN_PERF(x) (((x) & 0xff) << 8) -#define AMD_CPPC_DES_PERF(x) (((x) & 0xff) << 16) -#define AMD_CPPC_ENERGY_PERF_PREF(x) (((x) & 0xff) << 24) +/* Masks for use with MSR_AMD_CPPC_REQ */ +#define AMD_CPPC_MAX_PERF_MASK GENMASK(7, 0) +#define AMD_CPPC_MIN_PERF_MASK GENMASK(15, 8) +#define AMD_CPPC_DES_PERF_MASK GENMASK(23, 16) +#define AMD_CPPC_EPP_PERF_MASK GENMASK(31, 24) =20 /* AMD Performance Counter Global Status and Control MSRs */ #define MSR_AMD64_PERF_CNTR_GLOBAL_STATUS 0xc0000300 @@ -719,6 +725,7 @@ =20 /* Zen4 */ #define MSR_ZEN4_BP_CFG 0xc001102e +#define MSR_ZEN4_BP_CFG_BP_SPEC_REDUCE_BIT 4 #define MSR_ZEN4_BP_CFG_SHARED_BTB_FIX_BIT 5 =20 /* Fam 19h MSRs */ --=20 2.49.0.504.g3bcea36a83-goog From nobody Fri Dec 19 00:38:01 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3726D1A5BA9; Thu, 10 Apr 2025 00:11:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744243893; cv=none; b=uwgmC2LZ7j/LuVPI+ryn/OhCd7enXwdi83/Ams3eEtQs7a9fZS+Wb1ADHovGHj64Ymj92krMuFheBJmqeY8n0EafnutrqAcIJZVHx+JI9EgK2sY5ktgHYGlWcXslQ24p+9RRRXXLDjLo0uu+Dvaj3FHWPGA1K8C7NYmf3AaxbGM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744243893; c=relaxed/simple; bh=T20OlLQN6t8NjiZOs1TLZ6/pvAdfjxkFgUg0j9VVE5A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qsbO6M72hViWzSsDMtOmnif9vxh+bi0heXgq3zkOQTjDaCyW2Q8s9oLl91ekHNwQanpypKqO9f4yDQwtUSjZetfprpDSQGPHrTpSdZIBysAE1gAyRkslGwEnSqQHtwOv867lO9JNZo9Pjdu2RpJvi/2EzcK3G7gUGuEpn92UfFA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HJZZ0T9k; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HJZZ0T9k" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4BE7FC4CEE9; Thu, 10 Apr 2025 00:11:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744243892; bh=T20OlLQN6t8NjiZOs1TLZ6/pvAdfjxkFgUg0j9VVE5A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HJZZ0T9kWDDhzcxxLMi/YSws1E6k+9grd87wjHAw5SOJAypp52zS0vPRWfHBqSdLY GFeGIskvein8Gi9gWmX7w5TemRF66AwmUdjhIzKHywkv17VvwEY+WQn0+Zc7KJfvO6 Zy3cpoRIVRWDwh/3/vWlY2ovhBRMFdqFO3j8qNGmiGuxKONjHSogZWYYFVta7irv/L wtk7WlL7PG9tSf053Pdc85osJt+atRtjLg8y+dVkaK7jBFkpLL0pxM4t3nc7ahy82J si85RUpVoiCq50v2XppQBSwOuuwF9QLWpqeCSvoFMsyDwRjS19VxExQliwJOpiz7Gw zrzZI2lXhYCtA== From: Namhyung Kim To: Arnaldo Carvalho de Melo , Ian Rogers , Kan Liang Cc: Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, x86@kernel.org Subject: [PATCH 10/10] tools headers: Update the arch/x86/lib/memset_64.S copy with the kernel sources Date: Wed, 9 Apr 2025 17:11:25 -0700 Message-ID: <20250410001125.391820-11-namhyung@kernel.org> X-Mailer: git-send-email 2.49.0.504.g3bcea36a83-goog In-Reply-To: <20250410001125.391820-1-namhyung@kernel.org> References: <20250410001125.391820-1-namhyung@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" To pick up the changes in: 2981557cb0408e14 x86,kcfi: Fix EXPORT_SYMBOL vs kCFI That required adding a copy of include/linux/cfi_types.h and its checking in tools/perf/check-headers.h. Addressing this perf tools build warning: Warning: Kernel ABI header differences: diff -u tools/arch/x86/lib/memset_64.S arch/x86/lib/memset_64.S Please see tools/include/uapi/README for further details. Cc: x86@kernel.org Signed-off-by: Namhyung Kim Acked-by: Ingo Molnar Tested-by: Venkat Rao Bagalkote --- tools/arch/x86/lib/memset_64.S | 3 ++- tools/include/linux/cfi_types.h | 45 +++++++++++++++++++++++++++++++++ tools/perf/check-headers.sh | 1 + 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 tools/include/linux/cfi_types.h diff --git a/tools/arch/x86/lib/memset_64.S b/tools/arch/x86/lib/memset_64.S index 0199d56cb479d88c..d66b710d628f8865 100644 --- a/tools/arch/x86/lib/memset_64.S +++ b/tools/arch/x86/lib/memset_64.S @@ -3,6 +3,7 @@ =20 #include #include +#include #include #include =20 @@ -28,7 +29,7 @@ * only for the return value that is the same as the source input, * which the compiler could/should do much better anyway. */ -SYM_FUNC_START(__memset) +SYM_TYPED_FUNC_START(__memset) ALTERNATIVE "jmp memset_orig", "", X86_FEATURE_FSRS =20 movq %rdi,%r9 diff --git a/tools/include/linux/cfi_types.h b/tools/include/linux/cfi_type= s.h new file mode 100644 index 0000000000000000..6b87136757655c05 --- /dev/null +++ b/tools/include/linux/cfi_types.h @@ -0,0 +1,45 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Clang Control Flow Integrity (CFI) type definitions. + */ +#ifndef _LINUX_CFI_TYPES_H +#define _LINUX_CFI_TYPES_H + +#ifdef __ASSEMBLY__ +#include + +#ifdef CONFIG_CFI_CLANG +/* + * Use the __kcfi_typeid_ type identifier symbol to + * annotate indirectly called assembly functions. The compiler emits + * these symbols for all address-taken function declarations in C + * code. + */ +#ifndef __CFI_TYPE +#define __CFI_TYPE(name) \ + .4byte __kcfi_typeid_##name +#endif + +#define SYM_TYPED_ENTRY(name, linkage, align...) \ + linkage(name) ASM_NL \ + align ASM_NL \ + __CFI_TYPE(name) ASM_NL \ + name: + +#define SYM_TYPED_START(name, linkage, align...) \ + SYM_TYPED_ENTRY(name, linkage, align) + +#else /* CONFIG_CFI_CLANG */ + +#define SYM_TYPED_START(name, linkage, align...) \ + SYM_START(name, linkage, align) + +#endif /* CONFIG_CFI_CLANG */ + +#ifndef SYM_TYPED_FUNC_START +#define SYM_TYPED_FUNC_START(name) \ + SYM_TYPED_START(name, SYM_L_GLOBAL, SYM_A_ALIGN) +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* _LINUX_CFI_TYPES_H */ diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh index a4499e5a6f9cb00c..857f6646cc23e949 100755 --- a/tools/perf/check-headers.sh +++ b/tools/perf/check-headers.sh @@ -20,6 +20,7 @@ FILES=3D( "include/uapi/linux/stat.h" "include/linux/bits.h" "include/vdso/bits.h" + "include/linux/cfi_types.h" "include/linux/const.h" "include/vdso/const.h" "include/vdso/unaligned.h" --=20 2.49.0.504.g3bcea36a83-goog