[Bug 230082] bhyve doesn't set process title

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Aug 2 06:16:31 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230082

--- Comment #5 from Yuichiro NAITO <naito.yuichiro at gmail.com> ---
I noticed this is caused by capability mode.

Since r335939, calling sysctlbyname("kern.ps_strings") become important.
A user proccess writes process title to the memory address returned from
sysctlbyname("kern.ps_strings"). But sysctlbyname("kern.ps_strings") is not
allowed in capability mode.

My `bhyverun.patch` calls setproctitle(3) before cap_enter(2),
so it works.

In my opinion, "kern.ps_string" can be read in capability mode
because the returned address is in its own process.

I wrote a small patch that allows to read "kern.ps_string" for my kernel.
Attached `kern.patch` works for me.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-virtualization mailing list