[00/10] vdso: Misc cleanups and prevent code duplication

Message ID 20240219153939.75719-1-anna-maria@linutronix.de
Headers
Series vdso: Misc cleanups and prevent code duplication |

Message

Anna-Maria Behnsen Feb. 19, 2024, 3:39 p.m. UTC
  Hi,

the vdso related cleanup queue contains two parts:

- Patch 1-3: Misc cleanups related to a comment, a superfluous header
	     include and ifdeffery

- Patch 4-10: The union vdso_data_store is defined in seven
  	      architectures. Make this union available in a generic vdso
  	      header file to prevent code duplication and fix the
  	      architectures one by one to use the generic vdso_data_store.

Thanks,

	Anna-Maria


Anna-Maria Behnsen (10):
  vdso/helpers: Fix grammar in comments
  s390/vdso/data: Drop unnecessary header include
  csky/vdso: Remove superfluous ifdeffery
  vdso/arm: make union vdso_data_store available for all
  arm64/vdso: Use generic union vdso_data_store
  riscv/vdso: Use generic union vdso_data_store
  s390/vdso: Use generic union vdso_data_store
  loongarch/vdso: Use generic union vdso_data_store
  mips/vdso: Use generic union vdso_data_store
  csky/vdso: Use generic union vdso_data_store

 arch/arm/include/asm/elf.h           |  1 -
 arch/arm/include/asm/vdso_datapage.h | 26 --------------------------
 arch/arm/kernel/asm-offsets.c        |  4 +++-
 arch/arm/kernel/vdso.c               |  4 ----
 arch/arm64/kernel/vdso.c             |  5 +----
 arch/csky/include/asm/vdso.h         |  5 -----
 arch/csky/kernel/vdso.c              | 14 ++------------
 arch/loongarch/kernel/vdso.c         |  6 ++----
 arch/mips/include/asm/vdso.h         |  5 -----
 arch/mips/kernel/vdso.c              |  2 +-
 arch/riscv/kernel/vdso.c             |  8 +-------
 arch/s390/include/asm/vdso/data.h    |  1 -
 arch/s390/kernel/vdso.c              |  5 +----
 include/vdso/datapage.h              | 10 ++++++++++
 include/vdso/helpers.h               |  8 ++++----
 15 files changed, 25 insertions(+), 79 deletions(-)
 delete mode 100644 arch/arm/include/asm/vdso_datapage.h
  

Comments

Kees Cook Feb. 20, 2024, 12:26 a.m. UTC | #1
On Mon, Feb 19, 2024 at 04:39:29PM +0100, Anna-Maria Behnsen wrote:
> Hi,
> 
> the vdso related cleanup queue contains two parts:
> 
> - Patch 1-3: Misc cleanups related to a comment, a superfluous header
> 	     include and ifdeffery
> 
> - Patch 4-10: The union vdso_data_store is defined in seven
>   	      architectures. Make this union available in a generic vdso
>   	      header file to prevent code duplication and fix the
>   	      architectures one by one to use the generic vdso_data_store.
> 
> Thanks,
> 
> 	Anna-Maria

I do love a good clean-up! Thanks for this, I looked through all the
patches and they seem correct to me; removed definitions are all
identical, and __page_aligned_data is kept where needed.

Reviewed-by: Kees Cook <keescook@chromium.org>

-Kees
  
Anna-Maria Behnsen Feb. 20, 2024, 9:50 a.m. UTC | #2
Kees Cook <keescook@chromium.org> writes:

> On Mon, Feb 19, 2024 at 04:39:29PM +0100, Anna-Maria Behnsen wrote:
>> Hi,
>> 
>> the vdso related cleanup queue contains two parts:
>> 
>> - Patch 1-3: Misc cleanups related to a comment, a superfluous header
>> 	     include and ifdeffery
>> 
>> - Patch 4-10: The union vdso_data_store is defined in seven
>>   	      architectures. Make this union available in a generic vdso
>>   	      header file to prevent code duplication and fix the
>>   	      architectures one by one to use the generic vdso_data_store.
>> 
>> Thanks,
>> 
>> 	Anna-Maria
>
> I do love a good clean-up! Thanks for this, I looked through all the
> patches and they seem correct to me;

Thank you! I had a mistake in there and already posted a new version for
this single patch - I forgot to update this patch before posting...

> removed definitions are all
> identical, and __page_aligned_data is kept where needed.
>
> Reviewed-by: Kees Cook <keescook@chromium.org>
>
> -Kees

Thanks,

	Anna-Maria
  
Vincenzo Frascino Feb. 20, 2024, 2:48 p.m. UTC | #3
On 19/02/2024 15:39, Anna-Maria Behnsen wrote:
> Hi,
> 
> the vdso related cleanup queue contains two parts:
> 
> - Patch 1-3: Misc cleanups related to a comment, a superfluous header
> 	     include and ifdeffery
> 
> - Patch 4-10: The union vdso_data_store is defined in seven
>   	      architectures. Make this union available in a generic vdso
>   	      header file to prevent code duplication and fix the
>   	      architectures one by one to use the generic vdso_data_store.
> 
> Thanks,
> 
> 	Anna-Maria
> 
> 

Really good cleanup. Thank you for this.

Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>

> Anna-Maria Behnsen (10):
>   vdso/helpers: Fix grammar in comments
>   s390/vdso/data: Drop unnecessary header include
>   csky/vdso: Remove superfluous ifdeffery
>   vdso/arm: make union vdso_data_store available for all
>   arm64/vdso: Use generic union vdso_data_store
>   riscv/vdso: Use generic union vdso_data_store
>   s390/vdso: Use generic union vdso_data_store
>   loongarch/vdso: Use generic union vdso_data_store
>   mips/vdso: Use generic union vdso_data_store
>   csky/vdso: Use generic union vdso_data_store
> 
>  arch/arm/include/asm/elf.h           |  1 -
>  arch/arm/include/asm/vdso_datapage.h | 26 --------------------------
>  arch/arm/kernel/asm-offsets.c        |  4 +++-
>  arch/arm/kernel/vdso.c               |  4 ----
>  arch/arm64/kernel/vdso.c             |  5 +----
>  arch/csky/include/asm/vdso.h         |  5 -----
>  arch/csky/kernel/vdso.c              | 14 ++------------
>  arch/loongarch/kernel/vdso.c         |  6 ++----
>  arch/mips/include/asm/vdso.h         |  5 -----
>  arch/mips/kernel/vdso.c              |  2 +-
>  arch/riscv/kernel/vdso.c             |  8 +-------
>  arch/s390/include/asm/vdso/data.h    |  1 -
>  arch/s390/kernel/vdso.c              |  5 +----
>  include/vdso/datapage.h              | 10 ++++++++++
>  include/vdso/helpers.h               |  8 ++++----
>  15 files changed, 25 insertions(+), 79 deletions(-)
>  delete mode 100644 arch/arm/include/asm/vdso_datapage.h
>