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: <20250130143754.1b8bb87bfb15175dd434529b@linux-foundation.org>
Date: Thu, 30 Jan 2025 14:37:54 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
Cc: Christian Brauner <christian@...uner.io>, Shuah Khan <shuah@...nel.org>,
 "Liam R . Howlett" <Liam.Howlett@...cle.com>, Suren Baghdasaryan
 <surenb@...gle.com>, Vlastimil Babka <vbabka@...e.cz>,
 pedro.falcato@...il.com, linux-kselftest@...r.kernel.org,
 linux-mm@...ck.org, linux-fsdevel@...r.kernel.org,
 linux-api@...r.kernel.org, linux-kernel@...r.kernel.org, Oliver Sang
 <oliver.sang@...el.com>, John Hubbard <jhubbard@...dia.com>, Tejun Heo
 <tj@...nel.org>, Johannes Weiner <hannes@...xchg.org>, Michal Koutny
 <mkoutny@...e.com>, Shakeel Butt <shakeel.butt@...ux.dev>
Subject: Re: [PATCH v7 0/6] introduce PIDFD_SELF* sentinels

On Thu, 30 Jan 2025 20:40:25 +0000 Lorenzo Stoakes <lorenzo.stoakes@...cle.com> wrote:

> If you wish to utilise a pidfd interface to refer to the current process or
> thread it is rather cumbersome, requiring something like:
> 
> 	int pidfd = pidfd_open(getpid(), 0 or PIDFD_THREAD);
> 
> 	...
> 
> 	close(pidfd);
> 
> Or the equivalent call opening /proc/self. It is more convenient to use a
> sentinel value to indicate to an interface that accepts a pidfd that we
> simply wish to refer to the current process thread.
> 

The above code sequence doesn't seem at all onerous.  I'm not
understanding why it's worth altering the kernel to permit this little
shortcut?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ