linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Alejandro Colomar <alx@kernel.org>
Cc: David Howells <dhowells@redhat.com>,
	Eric Biederman <ebiederm@xmission.com>,
	Kees Cook <keescook@chromium.org>,
	linux-mm@kvack.org, Rolf Eike Beer <eb@emlix.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Dave Jones <davej@redhat.com>
Subject: Re: 'struct dynamic': struct tag leak in UAPI headers
Date: Tue, 29 Aug 2023 13:24:34 +0100	[thread overview]
Message-ID: <ZO3jgjMQ/bY6EWwG@casper.infradead.org> (raw)
In-Reply-To: <926f8e5c-40bd-dae0-2492-f6e6dbd6c96e@kernel.org>

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@redhat.com>
> 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'?



  reply	other threads:[~2023-08-29 12:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-29 12:08 Alejandro Colomar
2023-08-29 12:24 ` Matthew Wilcox [this message]
2023-08-29 13:27   ` Alejandro Colomar
2023-08-29 14:17     ` Matthew Wilcox
2023-08-29 14:20       ` Alejandro Colomar
2023-08-29 16:48         ` Eric W. Biederman
2023-08-29 17:46           ` Alejandro Colomar
     [not found] ` <20230829185121.326228-1-alx@kernel.org>
     [not found]   ` <6bd4800d-5e99-48a0-a407-2213112f4fb2@kernel.org>
     [not found]     ` <202309220940.B2730B3B@keescook>
2023-09-22 16:44       ` Ping: [PATCH v1] elf, uapi: Remove struct tag 'dynamic' Kees Cook
2023-09-22 17:01         ` Alejandro Colomar
2023-09-22 17:03   ` Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZO3jgjMQ/bY6EWwG@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=alx@kernel.org \
    --cc=arnd@arndb.de \
    --cc=davej@redhat.com \
    --cc=dhowells@redhat.com \
    --cc=eb@emlix.com \
    --cc=ebiederm@xmission.com \
    --cc=keescook@chromium.org \
    --cc=linux-mm@kvack.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox