[PATCH v7 22/25] x86: Add support for generic vDSO

2019-06-21 Thread Vincenzo Frascino
The x86 vDSO library requires some adaptations to take advantage of the newly introduced generic vDSO library. Introduce the following changes: - Modification of vdso.c to be compliant with the common vdso datapage - Use of lib/vdso for gettimeofday Cc: Thomas Gleixner Signed-off-by: Vincenzo

[PATCH v7 19/25] mips: Add support for generic vDSO

2019-06-21 Thread Vincenzo Frascino
-off-by: Vincenzo Frascino --- arch/mips/Kconfig | 2 + arch/mips/include/asm/vdso.h | 78 +-- arch/mips/include/asm/vdso/gettimeofday.h | 151 ++ arch/mips/{ => include/asm}/vdso/vdso.h | 6 +- arch/mips/include/asm/v

[PATCH v7 20/25] mips: Add clock_getres entry point

2019-06-21 Thread Vincenzo Frascino
The generic vDSO library provides an implementation of clock_getres() that can be leveraged by each architecture. Add clock_getres() entry point on mips. Cc: Ralf Baechle Cc: Paul Burton Signed-off-by: Vincenzo Frascino --- arch/mips/include/asm/vdso/gettimeofday.h | 26

[PATCH v7 18/25] arm: Add clock_gettime64 entry point

2019-06-21 Thread Vincenzo Frascino
exposing the clock_gettime64 entry point. Cc: Russell King Signed-off-by: Vincenzo Frascino --- arch/arm/vdso/vdso.lds.S | 1 + arch/arm/vdso/vgettimeofday.c | 6 ++ 2 files changed, 7 insertions(+) diff --git a/arch/arm/vdso/vdso.lds.S b/arch/arm/vdso/vdso.lds.S index 1d81e8c3acf6

[PATCH v7 21/25] mips: Add clock_gettime64 entry point

2019-06-21 Thread Vincenzo Frascino
exposing the clock_gettime64 entry point. Cc: Ralf Baechle Cc: Paul Burton Signed-off-by: Vincenzo Frascino --- arch/mips/vdso/vdso.lds.S | 3 +++ arch/mips/vdso/vgettimeofday.c | 6 ++ 2 files changed, 9 insertions(+) diff --git a/arch/mips/vdso/vdso.lds.S b/arch/mips/vdso/vdso.lds.S

[PATCH v7 12/25] arm64: compat: vDSO setup for compat layer

2019-06-21 Thread Vincenzo Frascino
If CONFIG_GENERIC_COMPAT_VDSO is enabled, compat vDSO are installed in a compat (32 bit) process instead of sigpage. Add the necessary code to setup the vDSO required pages. Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Vincenzo Frascino Tested-by: Shijith Thotton Tested-by: Andre

[PATCH v7 03/25] kernel: Unify update_vsyscall implementation

2019-06-21 Thread Vincenzo Frascino
that takes advantage of the unified vDSO library. Signed-off-by: Vincenzo Frascino Tested-by: Shijith Thotton Tested-by: Andre Przywara --- include/asm-generic/vdso/vsyscall.h | 56 include/linux/timekeeper_internal.h | 9 ++ include/vdso/vsyscall.h | 11 +++ kernel

[PATCH v7 14/25] arm64: compat: Get sigreturn trampolines from vDSO

2019-06-21 Thread Vincenzo Frascino
When the compat vDSO is enabled, the sigreturn trampolines are not anymore available through [sigpage] but through [vdso]. Add the relevant code the enable the feature. Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Vincenzo Frascino Tested-by: Shijith Thotton Tested-by: Andre Przywara

[PATCH v7 09/25] lib: vdso: Add compat support

2019-06-21 Thread Vincenzo Frascino
Some 64 bit architectures have support for 32 bit applications that require a separate version of the vDSOs. Add support to the generic code for compat fallback functions. Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Vincenzo Frascino Tested-by: Shijith Thotton Tested-by: Andre

[PATCH v7 11/25] arm64: Refactor vDSO code

2019-06-21 Thread Vincenzo Frascino
). Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Vincenzo Frascino Tested-by: Shijith Thotton Tested-by: Andre Przywara --- arch/arm64/kernel/vdso.c | 215 ++- 1 file changed, 144 insertions(+), 71 deletions(-) diff --git a/arch/arm64/kernel/vdso.c b/arch

[PATCH v7 04/25] arm64: Substitute gettimeofday with C implementation

2019-06-21 Thread Vincenzo Frascino
: Will Deacon Signed-off-by: Vincenzo Frascino Tested-by: Shijith Thotton Tested-by: Andre Przywara --- arch/arm64/Kconfig | 2 + arch/arm64/include/asm/vdso/gettimeofday.h | 86 ++ arch/arm64/include/asm/vdso/vsyscall.h | 53 arch/arm64/include/asm

[PATCH v7 16/25] arm: Add support for generic vDSO

2019-06-21 Thread Vincenzo Frascino
: Russell King Signed-off-by: Vincenzo Frascino --- arch/arm/Kconfig | 3 + arch/arm/include/asm/vdso/gettimeofday.h | 74 +++ arch/arm/include/asm/vdso/vsyscall.h | 71 +++ arch/arm/include/asm/vdso_datapage.h | 29 +-- arch/arm/kernel/vdso.c

[PATCH v7 10/25] arm64: compat: Add vDSO

2019-06-21 Thread Vincenzo Frascino
. Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Vincenzo Frascino Tested-by: Shijith Thotton Tested-by: Andre Przywara --- arch/arm64/include/asm/vdso/compat_barrier.h | 51 + .../include/asm/vdso/compat_gettimeofday.h| 110 +++ arch/arm64/kernel/vdso32/.gitignore

[PATCH v7 13/25] arm64: elf: vDSO code page discovery

2019-06-21 Thread Vincenzo Frascino
Signed-off-by: Vincenzo Frascino Tested-by: Shijith Thotton Tested-by: Andre Przywara --- arch/arm64/include/asm/elf.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h index 355d120b78cb..34cabaf78011 100644 --- a/arch

[PATCH v7 07/25] arm64: compat: Expose signal related structures

2019-06-21 Thread Vincenzo Frascino
The compat signal data structures are required as part of the compat vDSO implementation in order to provide the unwinding information for the sigreturn trampolines. Expose the mentioned data structures as part of signal32.h. Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Vincenzo Frascino

[PATCH v7 08/25] arm64: compat: Generate asm offsets for signals

2019-06-21 Thread Vincenzo Frascino
Update asm-offsets for arm64 to generate the correct offsets for compat signals. They will be useful for the implementation of the compat sigreturn trampolines in vDSO context. Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Vincenzo Frascino Tested-by: Shijith Thotton Tested-by: Andre

[PATCH v7 06/25] arm64: compat: Add missing syscall numbers

2019-06-21 Thread Vincenzo Frascino
vDSO requires gettimeofday and clock_gettime syscalls to implement the fallback mechanism. Add the missing syscall numbers to unistd.h for arm64. Cc: Catalin Marinas Cc: Will Deacon Cc: Arnd Bergmann Signed-off-by: Vincenzo Frascino Tested-by: Shijith Thotton Tested-by: Andre Przywara

[PATCH v7 05/25] arm64: Build vDSO with -ffixed-x18

2019-06-21 Thread Vincenzo Frascino
/ Signed-off-by: Peter Collingbourne Signed-off-by: Vincenzo Frascino Tested-by: Shijith Thotton Tested-by: Andre Przywara Cc: Mark Salyzyn Cc: Will Deacon Cc: linux-arm-ker...@lists.infradead.org --- arch/arm64/kernel/vdso/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v7 02/25] kernel: Define gettimeofday vdso common code

2019-06-21 Thread Vincenzo Frascino
duplication. Signed-off-by: Vincenzo Frascino Tested-by: Shijith Thotton Tested-by: Andre Przywara --- include/linux/hrtimer.h | 15 +-- include/linux/hrtimer_defs.h | 25 include/vdso/helpers.h | 56 + lib/Kconfig | 5 + lib/vdso/Kconfig | 36

[PATCH v7 01/25] kernel: Standardize vdso_datapage

2019-06-21 Thread Vincenzo Frascino
includes (include/vdso). Cc: Arnd Bergmann Signed-off-by: Vincenzo Frascino Tested-by: Shijith Thotton Tested-by: Andre Przywara --- include/vdso/datapage.h | 93 + 1 file changed, 93 insertions(+) create mode 100644 include/vdso/datapage.h diff --git

[PATCH v7 00/25] Unify vDSOs across more architectures

2019-06-21 Thread Vincenzo Frascino
as Gleixner Cc: Mark Salyzyn Cc: Peter Collingbourne Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454...@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Cc: Shijith Thotton Cc: Andre Przywara Signed-off-by: Vincenzo Frascino Tested-by: Shijith Thotton Tested-by: Andre Przywara Performa

Re: [PATCH v6 00/19] Unify vDSOs across more architectures

2019-06-21 Thread Vincenzo Frascino
On 20/06/2019 17:27, Andre Przywara wrote: > On Thu, 30 May 2019 15:15:12 +0100 > Vincenzo Frascino wrote: > > Hi, > >> vDSO (virtual dynamic shared object) is a mechanism that the Linux >> kernel provides as an alternative to system calls to reduce where >&g

Re: [PATCH v6 00/19] Unify vDSOs across more architectures

2019-06-20 Thread Vincenzo Frascino
Hi Shijith, ... > Observed good improvement for some APIs with the patch. > Looks good. Thanks for testing the set, I will add your tag to my patches. > Tested-by: Shijith Thotton > > Thanks, > Shijith > -- Regards, Vincenzo

[PATCH] fib_semantics: Fix warning in fib_check_nh_v4_gw

2019-06-17 Thread Vincenzo Frascino
) { ^~ Initialize err to 0 to fix the warning. Cc: "David S. Miller" Cc: Alexey Kuznetsov Cc: Hideaki YOSHIFUJI Signed-off-by: Vincenzo Frascino --- net/ipv4/fib_semantics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/fib_semantics.c

Re: [PATCH v6 03/19] kernel: Unify update_vsyscall implementation

2019-06-14 Thread Vincenzo Frascino
On 6/14/19 1:19 PM, Thomas Gleixner wrote: > On Fri, 14 Jun 2019, Vincenzo Frascino wrote: >> On 6/14/19 12:10 PM, Thomas Gleixner wrote: >>> On Thu, 30 May 2019, Vincenzo Frascino wrote: >>>> + >>>> + if (__arch_use_vsyscall(vdata)) { >&g

Re: [PATCH v6 00/19] Unify vDSOs across more architectures

2019-06-14 Thread Vincenzo Frascino
On 6/14/19 1:16 PM, Thomas Gleixner wrote: > On Tue, 4 Jun 2019, Vincenzo Frascino wrote: >> On 31/05/2019 09:46, Arnd Bergmann wrote: >>> One open question I touched in my review is whether we want to >>> have a vdso version of clock_getres() in all architectures or n

Re: [PATCH v6 03/19] kernel: Unify update_vsyscall implementation

2019-06-14 Thread Vincenzo Frascino
Hi Thomas, On 6/14/19 12:10 PM, Thomas Gleixner wrote: > On Thu, 30 May 2019, Vincenzo Frascino wrote: >> + >> +if (__arch_use_vsyscall(vdata)) { >> +vdata[CS_HRES_COARSE].cycle_last= >> +

Re: [PATCH v17 03/15] arm64: Introduce prctl() options to control the tagged user addresses ABI

2019-06-13 Thread Vincenzo Frascino
On 13/06/2019 16:57, Catalin Marinas wrote: > On Thu, Jun 13, 2019 at 04:45:54PM +0100, Vincenzo Frascino wrote: >> On 13/06/2019 16:35, Catalin Marinas wrote: >>> On Thu, Jun 13, 2019 at 12:16:59PM +0100, Dave P Martin wrote: >>>> On Wed, Jun 12, 2019 at 01:43:20PM

[PATCH v5 1/2] arm64: Define Documentation/arm64/tagged-address-abi.txt

2019-06-13 Thread Vincenzo Frascino
combination to allow the userspace to opt-in this feature. Cc: Catalin Marinas Cc: Will Deacon CC: Andrey Konovalov Signed-off-by: Vincenzo Frascino --- Documentation/arm64/tagged-address-abi.txt | 134 + 1 file changed, 134 insertions(+) create mode 100644 Documentation/arm64

[PATCH v5 2/2] arm64: Relax Documentation/arm64/tagged-pointers.txt

2019-06-13 Thread Vincenzo Frascino
Konovalov Signed-off-by: Vincenzo Frascino --- Documentation/arm64/tagged-pointers.txt | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/Documentation/arm64/tagged-pointers.txt b/Documentation/arm64/tagged-pointers.txt index a25a99e82bb1..e33af14478e3

Re: [PATCH v17 03/15] arm64: Introduce prctl() options to control the tagged user addresses ABI

2019-06-13 Thread Vincenzo Frascino
On 13/06/2019 16:35, Catalin Marinas wrote: > On Thu, Jun 13, 2019 at 12:16:59PM +0100, Dave P Martin wrote: >> On Wed, Jun 12, 2019 at 01:43:20PM +0200, Andrey Konovalov wrote: >>> From: Catalin Marinas >>> >>> It is not desirable to relax the ABI to allow tagged user addresses into >>> the ke

Re: [PATCH v4 1/2] arm64: Define Documentation/arm64/tagged-address-abi.txt

2019-06-13 Thread Vincenzo Frascino
12, 2019 at 03:21:10PM +0100, Vincenzo Frascino wrote: >> diff --git a/Documentation/arm64/tagged-address-abi.txt >> b/Documentation/arm64/tagged-address-abi.txt >> new file mode 100644 >> index ..96e149e2c55c >> --- /dev/null >> +++ b/Documentation/ar

Re: [PATCH v4 1/2] arm64: Define Documentation/arm64/tagged-address-abi.txt

2019-06-13 Thread Vincenzo Frascino
On 13/06/2019 16:32, Szabolcs Nagy wrote: > On 13/06/2019 15:03, Vincenzo Frascino wrote: >> On 13/06/2019 13:28, Szabolcs Nagy wrote: >>> On 13/06/2019 12:16, Vincenzo Frascino wrote: >>>> On 13/06/2019 11:14, Szabolcs Nagy wrote: >>>>> On 13/06/201

Re: [PATCH v4 1/2] arm64: Define Documentation/arm64/tagged-address-abi.txt

2019-06-13 Thread Vincenzo Frascino
Hi Szabolcs, thank you for your review. On 13/06/2019 11:14, Szabolcs Nagy wrote: > On 13/06/2019 10:20, Catalin Marinas wrote: >> Hi Szabolcs, >> >> On Wed, Jun 12, 2019 at 05:30:34PM +0100, Szabolcs Nagy wrote: >>> On 12/06/2019 15:21, Vincenzo Frascino wrote: >

Re: [PATCH v17 02/15] lib, arm64: untag user pointers in strn*_user

2019-06-12 Thread Vincenzo Frascino
ters to perform > validity checks, but then uses them as is to perform user memory accesses. > > Reviewed-by: Khalid Aziz > Acked-by: Kees Cook > Reviewed-by: Catalin Marinas > Signed-off-by: Andrey Konovalov Reviewed-by: Vincenzo Frascino > --- > lib/strncpy_from_use

Re: [PATCH v6 01/19] kernel: Standardize vdso_datapage

2019-06-10 Thread Vincenzo Frascino
Hi Huw, On 10/06/2019 11:31, Huw Davies wrote: > On Mon, Jun 10, 2019 at 11:17:48AM +0100, Vincenzo Frascino wrote: >> On 10/06/2019 10:27, Huw Davies wrote: >>> On Thu, May 30, 2019 at 03:15:13PM +0100, Vincenzo Frascino wrote: >>>> --- /dev/null >>>>

Re: [PATCH v6 03/19] kernel: Unify update_vsyscall implementation

2019-06-10 Thread Vincenzo Frascino
On 10/06/2019 10:34, Huw Davies wrote: > On Thu, May 30, 2019 at 03:15:15PM +0100, Vincenzo Frascino wrote: >> With the definition of the unified vDSO library the implementations of >> update_vsyscall and update_vsyscall_tz became quite similar across >> architectures. &

Re: [PATCH v6 02/19] kernel: Define gettimeofday vdso common code

2019-06-10 Thread Vincenzo Frascino
On 10/06/2019 10:31, Huw Davies wrote: > On Thu, May 30, 2019 at 03:15:14PM +0100, Vincenzo Frascino wrote: >> In the last few years we assisted to an explosion of vdso >> implementations that mostly share similar code. > > This doesn't make much sense. Perhaps:

Re: [PATCH v6 01/19] kernel: Standardize vdso_datapage

2019-06-10 Thread Vincenzo Frascino
Hi Huw, thank you for your review. On 10/06/2019 10:27, Huw Davies wrote: > On Thu, May 30, 2019 at 03:15:13PM +0100, Vincenzo Frascino wrote: >> --- /dev/null >> +++ b/include/vdso/datapage.h >> @@ -0,0 +1,91 @@ >> +/* SPDX-License-Identifier: GPL-2.0 */ &g

Re: [PATCH v6 00/19] Unify vDSOs across more architectures

2019-06-05 Thread Vincenzo Frascino
On 6/4/19 1:12 PM, Arnd Bergmann wrote: > On Tue, Jun 4, 2019 at 2:05 PM Vincenzo Frascino > wrote: >> On 31/05/2019 09:46, Arnd Bergmann wrote: >>> On Thu, May 30, 2019 at 4:15 PM Vincenzo Frascino >>> wrote: >>> One open question I touched in my revie

Re: [PATCH v6 18/19] x86: Add support for generic vDSO

2019-06-04 Thread Vincenzo Frascino
Hi Michael, On 30/05/2019 16:41, Michael Kelley wrote: > From: Vincenzo Frascino On Thursday, May 30, 2019 > 7:16 AM >> >> The x86 vDSO library requires some adaptations to take advantage of the >> newly introduced generic vDSO library. >> >> Introduce the f

Re: [PATCH v6 15/19] arm64: Add vDSO compat support

2019-06-04 Thread Vincenzo Frascino
Hi Catalin, thank you for testing my patches and providing the scripts you used to reproduce the issue. On 01/06/2019 10:38, Catalin Marinas wrote: > On Thu, May 30, 2019 at 03:15:27PM +0100, Vincenzo Frascino wrote: >> Add vDSO compat support to the arm64 building system. >>

Re: [PATCH v6 02/19] kernel: Define gettimeofday vdso common code

2019-06-04 Thread Vincenzo Frascino
On 31/05/2019 09:19, Arnd Bergmann wrote: > On Thu, May 30, 2019 at 4:15 PM Vincenzo Frascino > wrote: > >> + >> +static __always_inline notrace void vdso_write_end(struct vdso_data *vd) >> +{ > > Rather than marking every single function in here as "notr

Re: [PATCH v6 01/19] kernel: Standardize vdso_datapage

2019-06-04 Thread Vincenzo Frascino
On 31/05/2019 09:16, Arnd Bergmann wrote: > On Thu, May 30, 2019 at 4:15 PM Vincenzo Frascino > wrote: > >> + * vdso_data will be accessed by 64 bit and compat code at the same time >> + * so we should be careful before modifying this structure. >> + */ >> +

Re: [PATCH v6 00/19] Unify vDSOs across more architectures

2019-06-04 Thread Vincenzo Frascino
Hi Arnd, thank you for your review. On 31/05/2019 09:46, Arnd Bergmann wrote: > On Thu, May 30, 2019 at 4:15 PM Vincenzo Frascino > wrote: >> >> vDSO (virtual dynamic shared object) is a mechanism that the Linux >> kernel provides as an alternative to system calls to

Re: [PATCH 2/3] x86/vdso: Allow clock specific mult and shift values

2019-05-30 Thread Vincenzo Frascino
Hi Huw, On 15/04/2019 13:14, Huw Davies wrote: > On Mon, Apr 15, 2019 at 11:15:56AM +0100, Vincenzo Frascino wrote: >> On 15/04/2019 10:51, Thomas Gleixner wrote: >>> On Mon, 15 Apr 2019, Huw Davies wrote: >>>> On Sun, Apr 14, 2019 at 12:53:32PM +0200, Th

[PATCH v6 08/19] arm64: compat: Generate asm offsets for signals

2019-05-30 Thread Vincenzo Frascino
Update asm-offsets for arm64 to generate the correct offsets for compat signals. They will be useful for the implementation of the compat sigreturn trampolines in vDSO context. Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Vincenzo Frascino --- arch/arm64/kernel/asm-offsets.c | 6

[PATCH v6 19/19] kselftest: Extend vDSO selftest

2019-05-30 Thread Vincenzo Frascino
-off-by: Vincenzo Frascino --- tools/testing/selftests/vDSO/Makefile | 2 + tools/testing/selftests/vDSO/vdso_full_test.c | 261 ++ 2 files changed, 263 insertions(+) create mode 100644 tools/testing/selftests/vDSO/vdso_full_test.c diff --git a/tools/testing/selftests

[PATCH v6 10/19] arm64: compat: Add vDSO

2019-05-30 Thread Vincenzo Frascino
. Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Vincenzo Frascino --- arch/arm64/include/asm/vdso/compat_barrier.h | 51 + .../include/asm/vdso/compat_gettimeofday.h| 108 ++ arch/arm64/kernel/vdso32/.gitignore | 2 + arch/arm64/kernel/vdso32/Makefile

[PATCH v6 16/19] arm: Add support for generic vDSO

2019-05-30 Thread Vincenzo Frascino
: Russell King Signed-off-by: Vincenzo Frascino --- arch/arm/Kconfig | 3 + arch/arm/include/asm/vdso/gettimeofday.h | 96 arch/arm/include/asm/vdso/vsyscall.h | 71 ++ arch/arm/include/asm/vdso_datapage.h | 29 +-- arch/arm/kernel/vdso.c

[PATCH v6 18/19] x86: Add support for generic vDSO

2019-05-30 Thread Vincenzo Frascino
The x86 vDSO library requires some adaptations to take advantage of the newly introduced generic vDSO library. Introduce the following changes: - Modification of vdso.c to be compliant with the common vdso datapage - Use of lib/vdso for gettimeofday Cc: Thomas Gleixner Signed-off-by: Vincenzo

[PATCH v6 17/19] mips: Add support for generic vDSO

2019-05-30 Thread Vincenzo Frascino
-off-by: Vincenzo Frascino --- arch/mips/Kconfig | 2 + arch/mips/include/asm/vdso.h | 78 +-- arch/mips/include/asm/vdso/gettimeofday.h | 175 ++ arch/mips/{ => include/asm}/vdso/vdso.h | 6 +- arch/mips/include/asm/vdso/vsyscal

[PATCH v6 13/19] arm64: elf: vDSO code page discovery

2019-05-30 Thread Vincenzo Frascino
Signed-off-by: Vincenzo Frascino --- arch/arm64/include/asm/elf.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h index 355d120b78cb..34cabaf78011 100644 --- a/arch/arm64/include/asm/elf.h +++ b/arch/arm64/include/asm

[PATCH v6 14/19] arm64: compat: Get sigreturn trampolines from vDSO

2019-05-30 Thread Vincenzo Frascino
When the compat vDSO is enabled, the sigreturn trampolines are not anymore available through [sigpage] but through [vdso]. Add the relevant code the enable the feature. Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Vincenzo Frascino --- arch/arm64/include/asm/vdso.h | 3 +++ arch/arm64

[PATCH v6 15/19] arm64: Add vDSO compat support

2019-05-30 Thread Vincenzo Frascino
Add vDSO compat support to the arm64 building system. Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Vincenzo Frascino --- arch/arm64/Kconfig | 1 + arch/arm64/Makefile| 23 +-- arch/arm64/kernel/Makefile | 6 +- 3 files changed, 27 insertions

[PATCH v6 06/19] arm64: compat: Add missing syscall numbers

2019-05-30 Thread Vincenzo Frascino
vDSO requires gettimeofday and clock_gettime syscalls to implement the fallback mechanism. Add the missing syscall numbers to unistd.h for arm64. Cc: Catalin Marinas Cc: Will Deacon Cc: Arnd Bergmann Signed-off-by: Vincenzo Frascino --- arch/arm64/include/asm/unistd.h | 5 + 1 file

[PATCH v6 12/19] arm64: compat: vDSO setup for compat layer

2019-05-30 Thread Vincenzo Frascino
If CONFIG_GENERIC_COMPAT_VDSO is enabled, compat vDSO are installed in a compat (32 bit) process instead of sigpage. Add the necessary code to setup the vDSO required pages. Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Vincenzo Frascino --- arch/arm64/kernel/vdso.c | 90

[PATCH v6 11/19] arm64: Refactor vDSO code

2019-05-30 Thread Vincenzo Frascino
). Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Vincenzo Frascino --- arch/arm64/kernel/vdso.c | 215 ++- 1 file changed, 144 insertions(+), 71 deletions(-) diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c index 23c38303a52a..aa1fb25a9fe4

[PATCH v6 09/19] lib: vdso: Add compat support

2019-05-30 Thread Vincenzo Frascino
Some 64 bit architectures have support for 32 bit applications that require a separate version of the vDSOs. Add support to the generic code for compat fallback functions. Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Vincenzo Frascino --- lib/vdso/gettimeofday.c | 4 1 file

[PATCH v6 07/19] arm64: compat: Expose signal related structures

2019-05-30 Thread Vincenzo Frascino
The compat signal data structures are required as part of the compat vDSO implementation in order to provide the unwinding information for the sigreturn trampolines. Expose the mentioned data structures as part of signal32.h. Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Vincenzo Frascino

[PATCH v6 05/19] arm64: Build vDSO with -ffixed-x18

2019-05-30 Thread Vincenzo Frascino
/ Signed-off-by: Peter Collingbourne Signed-off-by: Vincenzo Frascino Cc: Mark Salyzyn Cc: Will Deacon Cc: linux-arm-ker...@lists.infradead.org --- arch/arm64/kernel/vdso/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel

[PATCH v6 03/19] kernel: Unify update_vsyscall implementation

2019-05-30 Thread Vincenzo Frascino
takes advantage of the unified vDSO library. Signed-off-by: Vincenzo Frascino --- include/asm-generic/vdso/vsyscall.h | 56 +++ include/linux/timekeeper_internal.h | 9 ++ include/vdso/vsyscall.h | 11 +++ kernel/Makefile | 1 + kernel/vdso/Makefile

[PATCH v6 04/19] arm64: Substitute gettimeofday with C implementation

2019-05-30 Thread Vincenzo Frascino
: Will Deacon Signed-off-by: Vincenzo Frascino --- arch/arm64/Kconfig | 2 + arch/arm64/include/asm/vdso/gettimeofday.h | 84 ++ arch/arm64/include/asm/vdso/vsyscall.h | 53 arch/arm64/include/asm/vdso_datapage.h | 48 --- arch/arm64/kernel/asm-offsets.c

[PATCH v6 02/19] kernel: Define gettimeofday vdso common code

2019-05-30 Thread Vincenzo Frascino
duplication. Signed-off-by: Vincenzo Frascino --- include/linux/hrtimer.h | 15 +-- include/linux/hrtimer_defs.h | 25 include/vdso/helpers.h | 56 + lib/Kconfig | 5 + lib/vdso/Kconfig | 36 ++ lib/vdso/Makefile| 22 lib

[PATCH v6 01/19] kernel: Standardize vdso_datapage

2019-05-30 Thread Vincenzo Frascino
includes (include/vdso). Cc: Arnd Bergmann Signed-off-by: Vincenzo Frascino --- include/vdso/datapage.h | 91 + 1 file changed, 91 insertions(+) create mode 100644 include/vdso/datapage.h diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h new

[PATCH v6 00/19] Unify vDSOs across more architectures

2019-05-30 Thread Vincenzo Frascino
afonov <0x7f454...@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Signed-off-by: Vincenzo Frascino Performance Numbers: Linux 5.2.0-rc2 - Xeon Gold 5120T == Unified vDSO: - clock-gettime-monotonic: syscall: 342 nsec/call

Re: [PATCH 2/3] x86/vdso: Allow clock specific mult and shift values

2019-04-15 Thread Vincenzo Frascino
Hi Thomas, On 15/04/2019 10:51, Thomas Gleixner wrote: > On Mon, 15 Apr 2019, Huw Davies wrote: > >> On Sun, Apr 14, 2019 at 12:53:32PM +0200, Thomas Gleixner wrote: >>> So it stays in the same cache line, but as we move the VDSO to generic >>> code, the mask field needs to stay and this will mak

Re: [PATCH 2/5] kasan, kmemleak: pass tagged pointers to kmemleak

2019-02-12 Thread Vincenzo Frascino
On 11/02/2019 21:59, Andrey Konovalov wrote: > Right now we call kmemleak hooks before assigning tags to pointers in > KASAN hooks. As a result, when an objects gets allocated, kmemleak sees > a differently tagged pointer, compared to the one it sees when the object > gets freed. Fix it by calling

Re: [RFC][PATCH 2/3] arm64: Define Documentation/arm64/elf_at_flags.txt

2019-01-09 Thread Vincenzo Frascino
On 12/12/2018 17:34, Dave Martin wrote: > On Mon, Dec 10, 2018 at 02:30:43PM +0000, Vincenzo Frascino wrote: >> On arm64 the TCR_EL1.TBI0 bit has been set since Linux 3.x hence >> the userspace (EL0) is allowed to set a non-zero value in the >> top byte but the resulting poi

Re: [PATCH v3 1/3] kasan, arm64: use ARCH_SLAB_MINALIGN instead of manual aligning

2019-01-09 Thread Vincenzo Frascino
On 03/01/2019 18:45, Andrey Konovalov wrote: > Instead of changing cache->align to be aligned to KASAN_SHADOW_SCALE_SIZE > in kasan_cache_create() we can reuse the ARCH_SLAB_MINALIGN macro. > > Suggested-by: Vincenzo Frascino > Signed-off-by: Andrey Konovalov > --- >

Re: [PATCH v13 19/25] kasan: add hooks implementation for tag-based mode

2018-12-14 Thread Vincenzo Frascino
On 12/12/18 3:04 PM, Andrey Konovalov wrote: > On Tue, Dec 11, 2018 at 5:22 PM Vincenzo Frascino > wrote: >> >> Hi Andrey, >> >> On 06/12/2018 12:24, Andrey Konovalov wrote: >>> This commit adds tag-based KASAN specific hooks implementation and >>>

Re: [PATCH v13 19/25] kasan: add hooks implementation for tag-based mode

2018-12-11 Thread Vincenzo Frascino
Hi Andrey, On 06/12/2018 12:24, Andrey Konovalov wrote: > This commit adds tag-based KASAN specific hooks implementation and > adjusts common generic and tag-based KASAN ones. > > 1. When a new slab cache is created, tag-based KASAN rounds up the size of >the objects in this cache to KASAN_SH

[RFC][PATCH 2/3] arm64: Define Documentation/arm64/elf_at_flags.txt

2018-12-10 Thread Vincenzo Frascino
can be used to advertise this feature to the userspace. Cc: Catalin Marinas Cc: Will Deacon CC: Andrey Konovalov Signed-off-by: Vincenzo Frascino --- Documentation/arm64/elf_at_flags.txt | 111 +++ 1 file changed, 111 insertions(+) create mode 100644 Documentation

[RFC][PATCH 3/3] arm64: elf: Advertise relaxed ABI

2018-12-10 Thread Vincenzo Frascino
advertise the relaxation of the ABI to the userspace. Cc: Catalin Marinas Cc: Will Deacon CC: Andrey Konovalov Signed-off-by: Vincenzo Frascino --- arch/arm64/include/asm/atflags.h | 7 +++ arch/arm64/include/asm/elf.h | 5 + arch/arm64/include/uapi/asm/atflags.h | 8

[RFC][PATCH 0/3] arm64 relaxed ABI

2018-12-10 Thread Vincenzo Frascino
ith Cc: Kostya Serebryany Cc: Dmitry Vyukov , Cc: Ramana Radhakrishnan Cc: Luc Van Oostenryck Cc: Evgeniy Stepanov CC: Alexander Viro Signed-off-by: Vincenzo Frascino Vincenzo Frascino (3): elf: Make AT_FLAGS arch configurable arm64: Define Documentation/arm64/elf_at_flags.txt arm64

[RFC][PATCH 1/3] elf: Make AT_FLAGS arch configurable

2018-12-10 Thread Vincenzo Frascino
. Cc: Catalin Marinas Cc: Will Deacon CC: Andrey Konovalov CC: Alexander Viro Signed-off-by: Vincenzo Frascino --- fs/binfmt_elf.c| 6 +- fs/binfmt_elf_fdpic.c | 6 +- fs/compat_binfmt_elf.c | 5 + 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/fs

Re: [PATCH v4 13/17] khwasan: add hooks implementation

2018-07-25 Thread Vincenzo Frascino@Foss
On 06/26/2018 02:15 PM, Andrey Konovalov wrote: @@ -325,18 +341,41 @@ void kasan_init_slab_obj(struct kmem_cache *cache, const void *object) void *kasan_slab_alloc(struct kmem_cache *cache, void *object, gfp_t flags) { - return kasan_kmalloc(cache, object, cache->object_size, flag

<    1   2   3   4   5   6