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)
Fri, Apr 19, 4:46 PM
Unknown Object (File)
Sat, Apr 6, 2:06 AM
Unknown Object (File)
Mar 20 2024, 12:43 PM
Unknown Object (File)
Mar 2 2024, 2:24 AM
Unknown Object (File)
Feb 4 2024, 8:07 AM
Unknown Object (File)
Dec 20 2023, 8:26 AM
Unknown Object (File)
Dec 10 2023, 11:51 PM
Unknown Object (File)
Nov 28 2023, 9:50 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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 43653
Build 40541: arc lint + arc unit

Event Timeline

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

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.

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

That is these conditions could become KASSERTs in the future?

sys/kern/kern_exec.c
1634

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