<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in fd-003-kthread.c</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>0387662d - selftests: fix warning: &quot;_GNU_SOURCE&quot; redefined</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/testing/selftests/proc/fd-003-kthread.c#0387662d</link>
        <description>selftests: fix warning: &quot;_GNU_SOURCE&quot; redefinedMakefile contains -D_GNU_SOURCE. remove define &quot;_GNU_SOURCE&quot;in c files.Signed-off-by: Peng Hao &lt;peng.hao2@zte.com.cn&gt;Signed-off-by: Shuah Khan (Samsung OSG) &lt;shuah@kernel.org&gt;

            List of files:
            /linux-6.15/tools/testing/selftests/proc/fd-003-kthread.c</description>
        <pubDate>Thu, 11 Oct 2018 19:53:50 +0000</pubDate>
        <dc:creator>Peng Hao &lt;peng.hao2@zte.com.cn&gt;</dc:creator>
    </item>
<item>
        <title>b2f5de03 - tools/testing/selftests/proc: test /proc/*/fd a bit (+ PF_KTHREAD is ABI!)</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/testing/selftests/proc/fd-003-kthread.c#b2f5de03</link>
        <description>tools/testing/selftests/proc: test /proc/*/fd a bit (+ PF_KTHREAD is ABI!)* Test lookup in /proc/self/fd.  &quot;map_files&quot; lookup story showed that lookup is not that simple.* Test that all those symlinks open the same file.  Check with (st_dev, st_info).* Test that kernel threads do not have anything in their /proc/*/fd/  directory.Now this is where things get interesting.First, kernel threads aren&apos;t pinned by /proc/self or equivalent,thus some &quot;atomicity&quot; is required.Second, -&gt;comm can contain whitespace and &apos;)&apos;.No, they are not escaped.Third, the only reliable way to check if process is kernel threadappears to be field #9 in /proc/*/stat.This field is struct task_struct::flags in decimal!Check is done by testing PF_KTHREAD flags like we do in kernel.	PF_KTREAD value is a part of userspace ABI !!!Other methods for determining kernel threadness are not reliable:* RSS can be 0 if everything is swapped, even while reading  from /proc/self.* -&gt;total_vm CAN BE ZERO if process is finishing	munmap(NULL, whole address space);* /proc/*/maps and similar files can be empty because unmapping  everything works. Read returning 0 can&apos;t distinguish between  kernel thread and such suicide process.Link: http://lkml.kernel.org/r/20180505000414.GA15090@avx2Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/tools/testing/selftests/proc/fd-003-kthread.c</description>
        <pubDate>Fri, 08 Jun 2018 00:10:20 +0000</pubDate>
        <dc:creator>Alexey Dobriyan &lt;adobriyan@gmail.com&gt;</dc:creator>
    </item>
</channel>
</rss>
