Re: d_path() truncates at front of path?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 30, 2024 at 12:46 PM Daniel Xu <dxu@xxxxxxxxx> wrote:
>
> Hi,
>
> I was poking around bpftrace test suite and noticed that our d_path()
> wrapper is truncating at the beginning of the path. See [0] for an
> example.
>
> bpftrace codegen doesn't do anything fancy here. And I see in the kernel
> d_path() implementation there's some prepend logic going on.
>
> I wanted to confirm this is the expected behavior. And if so, whether it
> should be documented.

This is expected behavior when the buffer is too small.
bpftrace may react to the -ENAMETOOLONG error code in such a case.





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux