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
Unknown Object (File)
Mon, Apr 8, 8:57 AM
Unknown Object (File)
Feb 10 2024, 5:38 PM
Unknown Object (File)
Jan 11 2024, 10:47 PM
Unknown Object (File)
Dec 20 2023, 6:19 AM
Unknown Object (File)
Dec 6 2023, 8:04 PM
Unknown Object (File)
Nov 14 2023, 3:34 AM
Unknown Object (File)
Oct 15 2023, 8:30 AM
Unknown Object (File)
Oct 15 2023, 8:30 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.