Re: [PATCH v1] elf, uapi: Remove struct tag 'dynamic'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 29, 2023 at 08:51:22PM +0200, Alejandro Colomar wrote:
> Such a generic struct tag shouldn't have been exposed in a public
> header.  Since it's undocumented, we can assume it's a historical
> accident.  And since no software (at least on Debian) relies on this
> tag, we can safely remove it.
> 
> Here are the results of a Debian Code Search[1]:
> 
> $ # packages that contain 'include [<"]linux/elf\.h[">]'
> $ curl -s https://codesearch.debian.net/results/e5e7c74dfcdae609/packages.txt > include
> $ # packages that contain '\bstruct dynamic\b'
> $ curl -s https://codesearch.debian.net/results/b23577e099048c6a/packages.txt > struct
> $ cat struct include | sort | uniq -d
> chromium
> hurd
> linux
> qemu
> qt6-webengine
> qtwebengine-opensource-src
> $ # chromium: Seems to hold a copy of the UAPI header.  No uses of the tag.
> $ # hurd:     Same thing as chromium.
> $ # linux:    :)
> $ # qemu:     Same thing as chromium.
> $ # qt6-webengine:  Same thing as all.
> $ # qtwebengine-opensource-src:  Yet another copy.
> 
> Link: [1] <https://codesearch.debian.net/>
> Link: <https://lore.kernel.org/linux-mm/87wmxdokum.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/T/>
> Cc: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>
> Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx>
> Cc: David Howells <dhowells@xxxxxxxxxx>
> Cc: Kees Cook <keescook@xxxxxxxxxxxx>
> Cc: Rolf Eike Beer <eb@xxxxxxxxx>
> Cc: Arnd Bergmann <arnd@xxxxxxxx>
> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Cc: "Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx>
> Signed-off-by: Alejandro Colomar <alx@xxxxxxxxxx>

[fixed Cc: list for linux-mm]
[fixed link reference]

Applied to for-next/execve tree. Thanks!

https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?h=for-next/execve&id=d113624679391d9088d0e8fd06797711eb1285ac

-Kees

> ---
>  include/uapi/linux/elf.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h
> index e0e159138331..342bd7f2e025 100644
> --- a/include/uapi/linux/elf.h
> +++ b/include/uapi/linux/elf.h
> @@ -140,7 +140,7 @@ typedef __s64	Elf64_Sxword;
>  #define ELF64_ST_BIND(x)	ELF_ST_BIND(x)
>  #define ELF64_ST_TYPE(x)	ELF_ST_TYPE(x)
>  
> -typedef struct dynamic {
> +typedef struct {
>    Elf32_Sword d_tag;
>    union {
>      Elf32_Sword	d_val;
> -- 
> 2.40.1
> 

-- 
Kees Cook




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux