All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Christian Brauner <brauner@kernel.org>
Cc: Jann Horn <jannh@google.com>,
	Linus Torvalds <torvalds@linuxfoundation.org>,
	"David Hildenbrand (Arm)" <david@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Qualys Security Advisory <qsa@qualys.com>,
	Kees Cook <kees@kernel.org>, Minchan Kim <minchan@kernel.org>,
	linux-mm@kvack.org, Suren Baghdasaryan <surenb@google.com>,
	Lorenzo Stoakes <ljs@kernel.org>,
	"Liam R. Howlett" <liam@infradead.org>,
	Vlastimil Babka <vbabka@kernel.org>,
	Mike Rapoport <rppt@kernel.org>, Michal Hocko <mhocko@suse.com>
Subject: Re: [PATCH RFC v3 2/4] exec: introduce struct task_exec_state
Date: Tue, 26 May 2026 10:17:30 +0200	[thread overview]
Message-ID: <ahVXGuXiJywtSv90@redhat.com> (raw)
In-Reply-To: <20260526-halbieren-badeverbot-maler-d4bf1a6ea119@brauner>

On 05/26, Christian Brauner wrote:
>
> On Fri, May 22, 2026 at 05:00:10PM +0200, Oleg Nesterov wrote:
> >
> > Can't we (later) move exec_state into signal_struct?
> >
> > AFAICS, the only complication is that task_still_dumpable/etc can't use
> > tsk->signal->exec_state if tsk was alredy reaped (another thread can do
> > exec_mmap() after that). But perhaps we can rely on pid_alive() check
> > and return an error if the task has already passed __unhash_process() ?
>
> So Jann pointed out a problem with this in
> https://lore.kernel.org/CAG48ez0Gz_GghVeVzaixAQRNYBdWHYEj3K6FXBSzc+8WNsFxtA@mail.gmail.com

Aha, thanks. This is basically what I have said above.

> I quote:
>
>     I think signal_struct is not unshared on exec; so in this sequence of events:
>
>      - task T1 is a non-dumpable task
>      - task T1 creates another thread T2
>      - T2 exits
>      - T1 goes through execve and becomes dumpable

Note that T1 can call exec_mmap/etc only after T2 is already reaped, that
is why I said we need to use something like pid_alive() check.

OK, lets forget it for now, this needs some changes in release_task() path,
perhaps makes no sense.

FWIW, your series + additional fixlets you sent in reply to 0/4 look good to me,
I see nothing wrong.

Oleg.



  reply	other threads:[~2026-05-26  8:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-20 21:48 [PATCH RFC v3 0/4] exec: introduce task_exec_state for exec-time metadata Christian Brauner (Amutable)
2026-05-20 21:48 ` [PATCH RFC v3 1/4] sched/coredump: introduce enum task_dumpable Christian Brauner (Amutable)
2026-05-22 22:14   ` David Hildenbrand (Arm)
2026-05-20 21:48 ` [PATCH RFC v3 2/4] exec: introduce struct task_exec_state Christian Brauner (Amutable)
2026-05-22 15:00   ` Oleg Nesterov
2026-05-26  7:16     ` Christian Brauner
2026-05-26  8:17       ` Oleg Nesterov [this message]
2026-05-22 22:21   ` David Hildenbrand (Arm)
2026-05-20 21:48 ` [PATCH RFC v3 3/4] ptrace: add ptracer_access_allowed() Christian Brauner (Amutable)
2026-05-22 15:08   ` Oleg Nesterov
2026-05-22 22:32   ` David Hildenbrand (Arm)
2026-05-20 21:48 ` [PATCH RFC v3 4/4] exec_state: relocate dumpable information Christian Brauner (Amutable)
2026-05-21 10:05   ` Christian Brauner
2026-05-21 11:16   ` Jann Horn
2026-05-21 13:08     ` Christian Brauner
2026-05-26 13:07   ` David Hildenbrand (Arm)

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=ahVXGuXiJywtSv90@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=david@kernel.org \
    --cc=jannh@google.com \
    --cc=kees@kernel.org \
    --cc=liam@infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=minchan@kernel.org \
    --cc=qsa@qualys.com \
    --cc=rppt@kernel.org \
    --cc=surenb@google.com \
    --cc=torvalds@linuxfoundation.org \
    --cc=vbabka@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.