Page MenuHomeFreeBSD

exec: Simplify sv_copyout_strings implementations a bit
ClosedPublic

Authored by markj on Dec 30 2021, 10:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jan 13, 11:28 AM
Unknown Object (File)
Dec 12 2024, 3:13 AM
Unknown Object (File)
Dec 7 2024, 6:32 PM
Unknown Object (File)
Nov 23 2024, 1:11 PM
Unknown Object (File)
Nov 11 2024, 9:16 PM
Unknown Object (File)
Oct 27 2024, 10:34 AM
Unknown Object (File)
Oct 8 2024, 5:27 AM
Unknown Object (File)
Oct 3 2024, 8:56 AM
Subscribers

Details

Summary

Simplify control flow around handling of the execpath length and signal
trampoline. Cache the sysentvec pointer in a local variable.

No functional change intended.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib added inline comments.
sys/kern/kern_exec.c
1634–1635

I suspect this code can be removed, but lets keep it for now. This variant is only for ABIs without shared page, and I think native FreeBSD ABI uses shared page on all arches.

1676–1677

szps can be eliminated. Initialize imgp->pagesizelen in place of szps, and substract it from destp

This revision is now accepted and ready to land.Dec 31 2021, 12:40 AM
sys/kern/kern_exec.c
1634–1635

That is these conditions could become KASSERTs in the future?

sys/kern/kern_exec.c
1634–1635

It would naturally traps on NULL access.

markj marked an inline comment as done.

Eliminate szps.

This revision now requires review to proceed.Dec 31 2021, 3:21 AM
This revision is now accepted and ready to land.Dec 31 2021, 4:03 PM