mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christian Brauner <christian.brauner@ubuntu.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Dominique Martinet <asmadeus@codewreck.org>,
	Alexander Kapshuk <alexander.kapshuk@gmail.com>,
	linux-kernel@vger.kernel.org, ebiederm@xmission.com,
	akpm@linux-foundation.org, liuzhiqiang26@huawei.com,
	joel@joelfernandes.org, paulmck@linux.vnet.ibm.com,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] kernel/signal.c: Export symbol __lock_task_sighand
Date: Mon, 22 Jun 2020 15:04:01 +0200	[thread overview]
Message-ID: <20200622130401.obopyfdqpdnc5ydt@wittgenstein> (raw)
In-Reply-To: <20200622130155.GE6516@redhat.com>

On Mon, Jun 22, 2020 at 03:01:55PM +0200, Oleg Nesterov wrote:
> On 06/22, Christian Brauner wrote:
> >
> > It is a supported case however unlikely. I just tried to answer
> > Dominique's specific question pointing out that even in that unlikely
> > case sighand_struct is stable.
> 
> I too tried to say this, but apparently just added more confusion ;)
> 
> > Just as an fyi, CLONE_SIGHAND with CLONE_VM but without CLONE_THREAD is
> > actually used quite a bit, e.g. in newlib, in stress-ng, and in criu.
> 
> OK,
> 
> > you'd want CLONE_VM which enforces
> > CLONE_SIGHAND so that would be another use-case afaict.
> 
> Cough no ;) CLONE_SIGHAND requires CLONE_VM, not vice versa.

Oh, you're right. I was thinking of ksys_unshare() here. :)

	/*
	 * If unsharing vm, must also unshare signal handlers.
	 */
	if (unshare_flags & CLONE_VM)
		unshare_flags |= CLONE_SIGHAND;

Thanks!
Christian

      reply	other threads:[~2020-06-22 13:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-21 13:37 Alexander Kapshuk
2020-06-21 13:54 ` Dominique Martinet
2020-06-22  8:39   ` Christian Brauner
2020-06-22  8:50     ` Alexander Kapshuk
2020-06-22  6:25 ` Oleg Nesterov
2020-06-22  8:39   ` Christian Brauner
2020-06-22 10:24     ` Dominique Martinet
2020-06-22 11:31       ` Oleg Nesterov
2020-06-22 11:36       ` Christian Brauner
2020-06-22 12:03         ` Oleg Nesterov
2020-06-22 12:29           ` Christian Brauner
2020-06-22 13:01             ` Oleg Nesterov
2020-06-22 13:04               ` Christian Brauner [this message]

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=20200622130401.obopyfdqpdnc5ydt@wittgenstein \
    --to=christian.brauner@ubuntu.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.kapshuk@gmail.com \
    --cc=asmadeus@codewreck.org \
    --cc=ebiederm@xmission.com \
    --cc=joel@joelfernandes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuzhiqiang26@huawei.com \
    --cc=lkp@intel.com \
    --cc=oleg@redhat.com \
    --cc=paulmck@linux.vnet.ibm.com \
    /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

all inboxes | Powered by JetHome®