Page MenuHomeFreeBSD

Use strsep() to parse init_path in start_init().
ClosedPublic

Authored by brooks on May 17 2018, 8:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 5, 10:26 PM
Unknown Object (File)
Nov 16 2024, 1:40 AM
Unknown Object (File)
Oct 18 2024, 9:39 AM
Unknown Object (File)
Oct 1 2024, 8:18 PM
Unknown Object (File)
Oct 1 2024, 7:29 PM
Unknown Object (File)
Sep 26 2024, 8:04 PM
Unknown Object (File)
Sep 24 2024, 3:03 AM
Unknown Object (File)
Sep 17 2024, 12:01 AM
Subscribers
None

Details

Summary

This simplifies the use of the path variable by making it NUL
terminated. This is a prerequisite for further cleanups.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 16651
Build 16556: arc lint + arc unit

Event Timeline

Developed on CheriBSD (mips64), testing in an amd64 VM including verifying that single user mode works.

Once this and D15468 are in, I have another change to remove the temporary mapping in the stack region and just construct a struct image_args here for kern_execve().

Despite a couple grumbles, this looks good to my eye.

sys/kern/init_main.c
734

We don't have strdup?

771

are there any alignment requirements for ucp?

805

Kinda lame to free something just before panic :)

This revision is now accepted and ready to land.May 17 2018, 9:45 PM
sys/kern/init_main.c
734

Hmm, I was sure we didn't, but we do. I'll switch.

771

Nope, it's just a bunch of strings in a row.

805

I debated this, but concluded that leak checkers would probably be happier without a path with no free.

brooks marked 4 inline comments as done.
  • Use strdup().
This revision now requires review to proceed.May 17 2018, 10:38 PM

OK. Can't find anything else to argue with :)

This revision is now accepted and ready to land.May 17 2018, 10:49 PM
This revision was automatically updated to reflect the committed changes.