Page MenuHomeFreeBSD

elf_aux_info: Add support for AT_EXECPATH.
ClosedPublic

Authored by brooks on Nov 13 2019, 9:28 PM.
Tags
None
Referenced Files
F118749163: D22353.diff
Sun, Jun 1, 12:44 PM
F118741107: D22353.diff
Sun, Jun 1, 10:33 AM
Unknown Object (File)
Thu, May 22, 9:11 AM
Unknown Object (File)
Fri, May 16, 7:35 PM
Unknown Object (File)
Mon, May 12, 2:06 PM
Unknown Object (File)
May 1 2025, 12:10 AM
Unknown Object (File)
Apr 24 2025, 3:15 PM
Unknown Object (File)
Apr 22 2025, 9:57 AM
Subscribers

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sef added a subscriber: sef.
sef added inline comments.
lib/libc/gen/auxv.c
158 ↗(On Diff #64286)

Just a clarification on my part: kernel interfaces return EFAULT, but user returning EINVAL is correct, right?

sys/sys/param.h
63 ↗(On Diff #64286)

Is that supposed to be here?

This revision is now accepted and ready to land.Nov 13 2019, 9:32 PM
emaste added inline comments.
lib/libc/gen/auxv.c
161 ↗(On Diff #64286)

looks like other cases (incorrectly?) return ENOENT for a too-small buffer, but this seems fine

sys/sys/param.h
63 ↗(On Diff #64286)

I asked for a bump so I can put a conditional in llvm, https://reviews.llvm.org/D70198

sys/sys/param.h
63 ↗(On Diff #64286)

Ok, that makes sense.

`

lib/libc/gen/auxv.c
158 ↗(On Diff #64286)

The kernel returns EFAULT on NULL pointers because it potentially takes a fault in copyout. The AT_CANARY code above crashes which seems gratuitous.

161 ↗(On Diff #64286)

I followed the documentation here.

[EINVAL]           The provided buffer was not the right size for the
                   requested item.

Above, I considered buf=NULL to be a degenerate case of not-the-right-size.

This revision was automatically updated to reflect the committed changes.
brooks marked 2 inline comments as done.