lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <EE08E47B-ABCD-4C4B-BE5A-5C81740E03FB@oracle.com>
Date: Mon, 14 Oct 2024 15:52:13 +0000
From: Anjali Kulkarni <anjali.k.kulkarni@...cle.com>
To: Peter Zijlstra <peterz@...radead.org>
CC: "davem@...emloft.net" <davem@...emloft.net>,
        Liam Howlett
	<liam.howlett@...cle.com>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "juri.lelli@...hat.com"
	<juri.lelli@...hat.com>,
        "vincent.guittot@...aro.org"
	<vincent.guittot@...aro.org>,
        "dietmar.eggemann@....com"
	<dietmar.eggemann@....com>,
        "rostedt@...dmis.org" <rostedt@...dmis.org>,
        "bsegall@...gle.com" <bsegall@...gle.com>,
        "mgorman@...e.de"
	<mgorman@...e.de>,
        "vschneid@...hat.com" <vschneid@...hat.com>,
        "jiri@...nulli.us" <jiri@...nulli.us>,
        "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>,
        "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>,
        "akpm@...ux-foundation.org"
	<akpm@...ux-foundation.org>,
        "shuah@...nel.org" <shuah@...nel.org>,
        "linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
        Pei Li
	<peili.io@...cle.com>
Subject: Re: [PATCH net-next v1 1/3] connector/cn_proc: Add hash table for
 threads



On 10/14/24, 1:28 AM, "Peter Zijlstra" <peterz@...radead.org <mailto:peterz@...radead.org>> wrote:


On Sun, Oct 13, 2024 at 10:06:15AM -0700, Anjali Kulkarni wrote:


> + if (unlikely(task->flags & PF_EXIT_NOTIFY)) {
> + task_lock(task);
> + task->flags &= ~PF_EXIT_NOTIFY;
> + task_unlock(task);
> +


> @@ -413,6 +440,15 @@ static void cn_proc_mcast_ctl(struct cn_msg *msg,
> if (msg->len == sizeof(*pinput)) {
> pinput = (struct proc_input *)msg->data;
> mc_op = pinput->mcast_op;
> + if (mc_op == PROC_CN_MCAST_NOTIFY) {
> + pr_debug("%s: Received PROC_CN_MCAST_NOTIFY, pid %d\n",
> + __func__, current->pid);
> + task_lock(current);
> + current->flags |= PF_EXIT_NOTIFY;
> + task_unlock(current);
> + err = cn_add_elem(pinput->uexit_code, current->pid);
> + return;
> + }


You seem to think that task_lock protects task->flags ? Why?

ANJALI> Missed this earlier, but it should actually not be needed, as both paths which modify the flags are via a syscall? I will go ahead and remove the locking, and send out in my next revision (if I missed anything let me know). 



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ