<div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, Aug 29, 2025 at 2:43 PM Vulturus <<a href="mailto:vulturus@vulturus.xyz">vulturus@vulturus.xyz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">Dear kernelnewbies subscribers,<br>
<br>
I was reading the kernel source tree in an<br>
attempt to understand how the chroot syscall workes.<br>
(I was using the linux-6.17-rc3 tarball from <a href="http://kernel.org" rel="noreferrer" target="_blank">kernel.org</a>.)<br>
<br>
At line 1429 of the fs/open.c file, inside the<br>
definition of the do_sys_openat2() function getname() is called.<br>
<br>
I am having trouble finding its definition.<br>
<br>
In particular,<br>
$ grep -rn 'getname' fs<br>
doesn't return a line like 'struct file *getname (args)'<br>
or similar, as I would expect.<br>
<br>
Can someone point me to the file/line where getname() is defined?<br>
<br>
Thank you,<br>
Vulturus<br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org" target="_blank">Kernelnewbies@kernelnewbies.org</a><br>
<a href="https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" rel="noreferrer" target="_blank">https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)" dir="auto"></blockquote><div dir="auto"><br></div><div dir="auto">Looks like it's an inline function defined in a header in /include/linux/fs.h: <div><a href="https://elixir.bootlin.com/linux/v6.17-rc3/source/include/linux/fs.h#L2916">https://elixir.bootlin.com/linux/v6.17-rc3/source/include/linux/fs.h#L2916</a></div><div dir="auto"><br></div><div dir="auto">Bootlin is a fantastic tool to find where things are defined in the kernel. </div><div dir="auto"><br></div><div dir="auto">-Daniel</div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)" dir="auto"><br>
</blockquote></div></div>