Re: 'struct dynamic': struct tag leak in UAPI headers

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

 



On Tue, Aug 29, 2023 at 02:08:45PM +0200, Alejandro Colomar wrote:
> It seems we should blame an automated script :)
> 
> $ git blame -- ./include/uapi/linux/elf.h | grep 'struct dynamic';
> 23a7aea5faf65 (Rolf Eike Beer        2022-10-04 12:25:40 +0200 143) typedef struct dynamic {
> 
> $ git blame 23a7aea5faf65^ -- ./include/uapi/linux/elf.h | grep 'struct dynamic';
> 607ca46e97a1b (David Howells         2012-10-13 10:46:48 +0100 143) typedef struct dynamic{
> 
> $ git log -1 607ca46e97a1b
> commit 607ca46e97a1b6594b29647d98a32d545c24bdff
> Author: David Howells <dhowells@xxxxxxxxxx>
> Date:   Sat Oct 13 10:46:48 2012 +0100
> 
>     UAPI: (Scripted) Disintegrate include/linux

Sure, but that didn't introduce it, it just moved it.

It was introduced before git, so trawling through linux-fullhistory ....

Linux 1.1.54:

-struct dynamic{
+typedef struct dynamic{
   int d_tag;
   union{
     int d_val;
     char * d_ptr;
   } d_un;
-};
+} Elf32_Dyn;

Before that, 0.99.13 added linux/elf.h and it included:

+struct dynamic{
+  int d_tag;
+  union{
+    int d_val;
+    char * d_ptr;
+  } d_un;
+};

So anybody who's included linux/elf.h since 1993 has had this definition,
and maybe the risk of breaking something is greater than the desire to
allow new code to use 'struct dynamic'?





[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