Re: [PATCH v1 3/7] perf syscalltbl: Remove struct syscalltbl

2025-02-04 Thread Howard Chu
Hello Ian, On Fri, Jan 31, 2025 at 11:15 PM Ian Rogers wrote: > > The syscalltbl held entries of system call name and number pairs, > generated from a native syscalltbl at start up. As there are gaps in > the system call number there is a notion of index into the > table. Going forward we want th

Re: [PATCH v1 2/7] perf trace: Reorganize syscalls

2025-02-04 Thread Howard Chu
Hello Ian, Thanks for doing this. On Fri, Jan 31, 2025 at 11:15 PM Ian Rogers wrote: > > Identify struct syscall information in the syscalls table by a machine > type and syscall number, not just system call number. Having the > machine type means that 32-bit system calls can be differentiated f

Re: [PATCH v1 6/7] perf syscalltbl: Use lookup table containing multiple architectures

2025-02-04 Thread Howard Chu
Hello, On Fri, Jan 31, 2025 at 11:15 PM Ian Rogers wrote: > > Switch to use the lookup table containing all architectures rather > than tables matching the perf binary. > > This fixes perf trace when executed on a 32-bit i386 binary on an > x86-64 machine. Note in the following the system call na

Re: [PATCH v1 2/7] perf trace: Reorganize syscalls

2025-02-04 Thread Ian Rogers
On Tue, Feb 4, 2025 at 4:12 PM Howard Chu wrote: > > Hello Ian, > > Thanks for doing this. > > On Fri, Jan 31, 2025 at 11:15 PM Ian Rogers wrote: [snip] > > @@ -2104,11 +2123,12 @@ static int trace__read_syscall_info(struct trace > > *trace, int id) > > */ > > if (IS_ERR(sc->tp_

Re: [PATCH v1 3/7] perf syscalltbl: Remove struct syscalltbl

2025-02-04 Thread Ian Rogers
On Tue, Feb 4, 2025 at 4:18 PM Howard Chu wrote: > > Hello Ian, > > On Fri, Jan 31, 2025 at 11:15 PM Ian Rogers wrote: > > > > The syscalltbl held entries of system call name and number pairs, > > generated from a native syscalltbl at start up. As there are gaps in > > the system call number ther

Re: [PATCH v1 6/7] perf syscalltbl: Use lookup table containing multiple architectures

2025-02-04 Thread Ian Rogers
On Tue, Feb 4, 2025 at 4:24 PM Howard Chu wrote: > > Hello, > > On Fri, Jan 31, 2025 at 11:15 PM Ian Rogers wrote: > > > > Switch to use the lookup table containing all architectures rather > > than tables matching the perf binary. > > > > This fixes perf trace when executed on a 32-bit i386 bina

[PATCH v3 05/18] vdso: Add generic time data storage

2025-02-04 Thread Thomas Weißschuh
Historically each architecture defined their own way to store the vDSO data page. Add a generic mechanism to provide storage for that page. Furthermore this generic storage will be extended to also provide uniform storage for *non*-time-related data, like the random state or architecture-specific

[PATCH v3 03/18] vdso: Introduce vdso/align.h

2025-02-04 Thread Thomas Weißschuh
The vDSO implementation can only include headers from the vdso/ namespace. To enable the usage of the ALIGN() macro from the vDSO, move linux/align.h to vdso/align.h wholly. As the only dependency linux/const.h is only a wrapper around vdso/const.h anyways adapt that dependency. Also provide a com

[PATCH v3 00/18] vDSO: Introduce generic data storage

2025-02-04 Thread Thomas Weißschuh
Currently each architecture defines the setup of the vDSO data page on its own, mostly through copy-and-paste from some other architecture. Extend the existing generic vDSO implementation to also provide generic data storage. This removes duplicated code and paves the way for further changes to the

[PATCH v3 02/18] parisc: Remove unused symbol vdso_data

2025-02-04 Thread Thomas Weißschuh
The symbol vdso_data is and has been unused. Remove it. Signed-off-by: Thomas Weißschuh --- arch/parisc/include/asm/vdso.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/parisc/include/asm/vdso.h b/arch/parisc/include/asm/vdso.h index 2a2dc11b5545fc642a7ae4596dc174111433e948..5f581c1

[PATCH v3 01/18] x86/vdso: Fix latent bug in vclock_pages calculation

2025-02-04 Thread Thomas Weißschuh
The vclock pages are *after* the non-vclock pages. Currently there are both two vclock and two non-vclock pages so the existing logic works by accident. As soon as the number of pages changes it will break however. This will be the case with the introduction of the generic vDSO data storage. Use a

[PATCH v3 07/18] vdso: Add generic architecture-specific data storage

2025-02-04 Thread Thomas Weißschuh
Some architectures need to architecture-specific data to the vDSO. Enable the generic vDSO storage mechanism to both store and map this data. Some architectures require more than a single page, like LoongArch, so prepare for that usecase, too. Signed-off-by: Thomas Weißschuh --- arch/Kconfig

[PATCH v3 06/18] vdso: Add generic random data storage

2025-02-04 Thread Thomas Weißschuh
Extend the generic vDSO data storage with a page for the random state data. The random state data is stored in a dedicated page, as the existing storage page is only meant for time-related, time-namespace-aware data. This simplifies to access logic to not need to handle time namespaces anymore and

[PATCH v3 10/18] LoongArch: vDSO: Switch to generic storage implementation

2025-02-04 Thread Thomas Weißschuh
The generic storage implementation provides the same features as the custom one. However it can be shared between architectures, making maintenance easier. Co-developed-by: Nam Cao Signed-off-by: Nam Cao Signed-off-by: Thomas Weißschuh --- arch/loongarch/Kconfig | 2 +

[PATCH v3 09/18] riscv: vdso: Switch to generic storage implementation

2025-02-04 Thread Thomas Weißschuh
The generic storage implementation provides the same features as the custom one. However it can be shared between architectures, making maintenance easier. Co-developed-by: Nam Cao Signed-off-by: Nam Cao Signed-off-by: Thomas Weißschuh --- arch/riscv/Kconfig |

[PATCH v3 13/18] MIPS: vdso: Switch to generic storage implementation

2025-02-04 Thread Thomas Weißschuh
The generic storage implementation provides the same features as the custom one. However it can be shared between architectures, making maintenance easier. Co-developed-by: Nam Cao Signed-off-by: Nam Cao Signed-off-by: Thomas Weißschuh --- arch/mips/Kconfig | 1 + arch

[PATCH v3 11/18] arm: vdso: Switch to generic storage implementation

2025-02-04 Thread Thomas Weißschuh
The generic storage implementation provides the same features as the custom one. However it can be shared between architectures, making maintenance easier. Co-developed-by: Nam Cao Signed-off-by: Nam Cao Signed-off-by: Thomas Weißschuh --- arch/arm/include/asm/vdso.h | 2 ++ arch

[PATCH v3 04/18] vdso: Rename included Makefile

2025-02-04 Thread Thomas Weißschuh
As the Makefile is included into other Makefiles it can not be used to define objects to be built from the current source directory. However the generic datastore will introduce such a local source file. Rename the included Makefile so it is clear how it is to be used and to make room for a regular

[PATCH v3 08/18] arm64: vdso: Switch to generic storage implementation

2025-02-04 Thread Thomas Weißschuh
The generic storage implementation provides the same features as the custom one. However it can be shared between architectures, making maintenance easier. This switch also moves the random state data out of the time data page. The currently used hardcoded __VDSO_RND_DATA_OFFSET does not take into

[PATCH v3 12/18] s390/vdso: Switch to generic storage implementation

2025-02-04 Thread Thomas Weißschuh
The generic storage implementation provides the same features as the custom one. However it can be shared between architectures, making maintenance easier. Co-developed-by: Nam Cao Signed-off-by: Nam Cao Signed-off-by: Thomas Weißschuh Acked-by: Heiko Carstens --- arch/s390/Kconfig

[PATCH v3 17/18] vdso: Remove remnants of architecture-specific random state storage

2025-02-04 Thread Thomas Weißschuh
All users of the random vDSO are using the generic storage implementation. Remove the now unnecessary compatibility accessor functions and symbols. Co-developed-by: Nam Cao Signed-off-by: Nam Cao Signed-off-by: Thomas Weißschuh --- include/asm-generic/vdso/vsyscall.h | 5 - include/vdso/da

[PATCH v3 14/18] powerpc/vdso: Switch to generic storage implementation

2025-02-04 Thread Thomas Weißschuh
The generic storage implementation provides the same features as the custom one. However it can be shared between architectures, making maintenance easier. Co-developed-by: Nam Cao Signed-off-by: Nam Cao Signed-off-by: Thomas Weißschuh --- arch/powerpc/Kconfig | 2 +

[PATCH v3 18/18] vdso: Remove remnants of architecture-specific time storage

2025-02-04 Thread Thomas Weißschuh
All users of the random vDSO are using the generic storage implementation. Remove the now unnecessary compatibility accessor functions and symbols. Co-developed-by: Nam Cao Signed-off-by: Nam Cao Signed-off-by: Thomas Weißschuh --- include/asm-generic/vdso/vsyscall.h | 20 +++ incl

[PATCH v3 15/18] x86/vdso: Switch to generic storage implementation

2025-02-04 Thread Thomas Weißschuh
The generic storage implementation provides the same features as the custom one. However it can be shared between architectures, making maintenance easier. This switch also moves the random state data out of the time data page. The currently used hardcoded __VDSO_RND_DATA_OFFSET does not take into

[PATCH v3 16/18] x86/vdso/vdso2c: Remove page handling

2025-02-04 Thread Thomas Weißschuh
The values are not used anymore. Also the sanity checks performed by vdso2c can never trigger as they only validate invariants already enforced by the linker script. Signed-off-by: Thomas Weißschuh --- arch/x86/entry/vdso/vdso-layout.lds.S | 4 arch/x86/entry/vdso/vdso2c.c | 21 --

Re: [PATCH v1 0/7] perf: Support multiple system call tables in the build

2025-02-04 Thread Charlie Jenkins
On Mon, Feb 03, 2025 at 05:58:29PM -0800, Ian Rogers wrote: > On Mon, Feb 3, 2025 at 3:02 PM Charlie Jenkins wrote: > > On Mon, Feb 03, 2025 at 12:54:59PM -0800, Ian Rogers wrote: > [snip] > > > I think it makes sense in the kernel, as the built binary doesn't have > > > cross-platform concerns. T

Re: [PATCH v1 0/7] perf: Support multiple system call tables in the build

2025-02-04 Thread Ian Rogers
On Tue, Feb 4, 2025 at 11:05 AM Charlie Jenkins wrote: > > On Mon, Feb 03, 2025 at 05:58:29PM -0800, Ian Rogers wrote: > > On Mon, Feb 3, 2025 at 3:02 PM Charlie Jenkins wrote: > > > On Mon, Feb 03, 2025 at 12:54:59PM -0800, Ian Rogers wrote: > > [snip] > > > > I think it makes sense in the kerne