Re: [PATCH] Document that PF_KTHREAD _is_ ABI

2021-04-01 Thread Stefan Metzmacher
Am 31.03.21 um 21:23 schrieb Alexey Dobriyan: > On Mon, Mar 22, 2021 at 07:53:10AM +, Christoph Hellwig wrote: >> On Sat, Mar 20, 2021 at 10:23:12AM -0700, Andy Lutomirski wrote: https://github.com/systemd/systemd/blob/main/src/basic/process-util.c#L354

Re: [PATCH] Document that PF_KTHREAD _is_ ABI

2021-03-31 Thread Alexey Dobriyan
On Mon, Mar 22, 2021 at 07:53:10AM +, Christoph Hellwig wrote: > On Sat, Mar 20, 2021 at 10:23:12AM -0700, Andy Lutomirski wrote: > > > https://github.com/systemd/systemd/blob/main/src/basic/process-util.c#L354 > > > src/basic/process-util.c:is_kernel_thread() > > > > Eww. > > > > Could we

Re: [PATCH] Document that PF_KTHREAD _is_ ABI

2021-03-22 Thread Christoph Hellwig
On Sat, Mar 20, 2021 at 10:23:12AM -0700, Andy Lutomirski wrote: > > https://github.com/systemd/systemd/blob/main/src/basic/process-util.c#L354 > > src/basic/process-util.c:is_kernel_thread() > > Eww. > > Could we fix it differently and more permanently by modifying the proc > code to display

Re: [PATCH] Document that PF_KTHREAD _is_ ABI

2021-03-20 Thread Florian Weimer
* Alexey Dobriyan: > Some aren't -- PF_FORKNOEXEC. However it is silly for userspace to query it > because programs knows if it forked but didn't exec without external help. Libraries typically lack that knowledge, and may have reasons to detect forks. But there are probably better ways than

Re: [PATCH] Document that PF_KTHREAD _is_ ABI

2021-03-20 Thread Alexey Dobriyan
On Sat, Mar 20, 2021 at 10:23:12AM -0700, Andy Lutomirski wrote: > > On Mar 20, 2021, at 9:31 AM, Alexey Dobriyan wrote: > > > > PF_KTHREAD value is visible via field number 9 of /proc/*/stat > > > >$ sudo cat /proc/2/stat > >2 (kthreadd) S 0 0 0 0 -1 2129984 0 ... > >

Re: [PATCH] Document that PF_KTHREAD _is_ ABI

2021-03-20 Thread Andy Lutomirski
> On Mar 20, 2021, at 9:31 AM, Alexey Dobriyan wrote: > > PF_KTHREAD value is visible via field number 9 of /proc/*/stat > >$ sudo cat /proc/2/stat >2 (kthreadd) S 0 0 0 0 -1 2129984 0 ... > ^^^ > > It is used by at least systemd to check for kernel-threadness: >

[PATCH] Document that PF_KTHREAD _is_ ABI

2021-03-20 Thread Alexey Dobriyan
PF_KTHREAD value is visible via field number 9 of /proc/*/stat $ sudo cat /proc/2/stat 2 (kthreadd) S 0 0 0 0 -1 2129984 0 ... ^^^ It is used by at least systemd to check for kernel-threadness: