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
F83068864: D15467.diff
Sun, May 5, 8:54 PM
Unknown Object (File)
Jan 7 2024, 11:24 AM
Unknown Object (File)
Jan 7 2024, 11:24 AM
Unknown Object (File)
Jan 7 2024, 11:23 AM
Unknown Object (File)
Jan 7 2024, 11:19 AM
Unknown Object (File)
Jan 7 2024, 10:46 AM
Unknown Object (File)
Dec 20 2023, 7:58 AM
Unknown Object (File)
Sep 7 2023, 3:23 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 16654
Build 16559: 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?

769–770

are there any alignment requirements for ucp?

803

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.

769–770

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

803

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.