[Bug 230082] bhyve doesn't set process title
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230082 --- Comment #15 from Nikita Olenets --- I'm confirming that it is working now. Thank you, Mariusz! -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-virtualization@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
[Bug 230082] bhyve doesn't set process title
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230082 --- Comment #14 from Mariusz Zaborski --- Yes :) -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-virtualization@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
[Bug 230082] bhyve doesn't set process title
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230082 --- Comment #13 from commit-h...@freebsd.org --- A commit references this bug: Author: oshogbo Date: Fri Aug 10 14:47:17 UTC 2018 New revision: 337575 URL: https://svnweb.freebsd.org/changeset/base/337575 Log: MFC r337189: bhyve: set title before entering capability mode PR: 230082 Submitted by: Yuichiro NAITO Changes: _U stable/11/ stable/11/usr.sbin/bhyve/bhyverun.c -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-virtualization@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
[Bug 230082] bhyve doesn't set process title
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230082 --- Comment #12 from Nikita Olenets --- Hi Mariusz, Was this patch added to the 11? Thank you. -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-virtualization@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
[Bug 230082] bhyve doesn't set process title
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230082 --- Comment #11 from Mariusz Zaborski --- This wasn't integrated yet to the 11. I will do this today. Thanks. -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-virtualization@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
[Bug 230082] bhyve doesn't set process title
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230082 Nikita Olenets changed: What|Removed |Added CC||z...@zeon.kiev.ua --- Comment #10 from Nikita Olenets --- (In reply to Yuichiro NAITO from comment #9) Hello, Looks like the issue is exist still. 09:27:34)27[root@host ~]# ps wwax | grep Test01 3148 0 Is+ 0:00,04 /bin/sh /usr/local/sbin/vm -tf _run Test01 5531 0 SC+ 1:43,20 bhyve -c 1 -m 2G -AHP -U 7f86c10b-d8c9-11e7-ae5d-f04da2090b7b -u -s 0,hostbridge -s 31,lpc -s 4:0,virtio-blk,/usr/local/VM/ Test01 /disk0.img -s 5:0,virtio-net,tap1102,mac=58:9c:fc:07:1a:8b -l com1,stdio Test01 (09:27:40)27[root@host ~]# uname -a FreeBSD host.local.org 11.2-STABLE FreeBSD 11.2-STABLE #18 r337452: Wed Aug 8 15:06:59 EEST 2018 r...@host.local.org:/usr/obj/usr/src/sys/CUSTOM amd64 = OLDER BEHAVIOR = Comparing to the older system ( r335977 ) (09:31:30)4[root@bohus docs]# ps wwax | grep Ubuntu 5053 1 IC+115:04,09 bhyve: Ubuntu (bhyve) (09:31:37)4[root@bohus docs]# uname -a FreeBSD bohus 11.2-STABLE FreeBSD 11.2-STABLE #7 r335977: Fri Jul 6 06:58:35 EEST 2018 root@bohus:/usr/obj/usr/src/sys/CUSTOM amd64 -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-virtualization@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
Re: [Bug 230082] bhyve doesn't set process title
Hello, Looks like the issue is exist still. 09:27:34)27[root@host ~]# ps wwax | grep Test01 3148 0 Is+ 0:00,04 /bin/sh /usr/local/sbin/vm -tf _run Test01 5531 0 SC+ 1:43,20 bhyve -c 1 -m 2G -AHP -U 7f86c10b-d8c9-11e7-ae5d-f04da2090b7b -u -s 0,hostbridge -s 31,lpc -s 4:0,virtio-blk,/usr/local/VM/ Test01 /disk0.img -s 5:0,virtio-net,tap1102,mac=58:9c:fc:07:1a:8b -l com1,stdio Test01 (09:27:40)27[root@host ~]# uname -a FreeBSD host.local.org 11.2-STABLE FreeBSD 11.2-STABLE #18 r337452: Wed Aug 8 15:06:59 EEST 2018 r...@host.local.org:/usr/obj/usr/src/sys/CUSTOM amd64 = Comparing to the older system ( r335977 ) (09:31:30)4[root@bohus docs]# ps wwax | grep Ubuntu 5053 1 IC+115:04,09 bhyve: Ubuntu (bhyve) (09:31:37)4[root@bohus docs]# uname -a FreeBSD bohus 11.2-STABLE FreeBSD 11.2-STABLE #7 r335977: Fri Jul 6 06:58:35 EEST 2018 root@bohus:/usr/obj/usr/src/sys/CUSTOM amd64 On Fri, Aug 3, 2018 at 8:25 AM, wrote: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230082 > > Yuichiro NAITO changed: > >What|Removed |Added > > > Status|In Progress |Closed > Resolution|--- |FIXED > > --- Comment #9 from Yuichiro NAITO --- > (In reply to Mariusz Zaborski from comment #7) > > The setproctitle(3) looks fine with me - I will commit it. > > Thanks for the commit. > > > With the ps_string the problem is a little more complicated. > > In my opinion the title is a part of a global namespace so we should not > be ab\ > le to change it but I would like to discussed this. > > I misunderstood sysctl behavior. > > I saw that original (before r335939) setproctitle(3) calls sysctl like > this. > > ``` > sysctl([CTL_KERN, KERN_PROC, KEN_PROC_ARGS, getpid()], ...) > ``` > > This code works in capability mode all the time (independent of r335939). > I thought calling sysctl("kern.ps_strings") was also safe in capability > mode. > But, the sysctl is allowed to write only... > > > In this bug report can we only focus on the bhyve title issue? > > Yes, I don't see any other problems for now. > I will close this PR. > > Thank you! > > -- > You are receiving this mail because: > You are the assignee for the bug. > ___ > freebsd-virtualization@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization- > unsubscr...@freebsd.org" > -- Nikita Olenets ___ freebsd-virtualization@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
[Bug 230082] bhyve doesn't set process title
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230082 Yuichiro NAITO changed: What|Removed |Added Status|In Progress |Closed Resolution|--- |FIXED --- Comment #9 from Yuichiro NAITO --- (In reply to Mariusz Zaborski from comment #7) > The setproctitle(3) looks fine with me - I will commit it. Thanks for the commit. > With the ps_string the problem is a little more complicated. > In my opinion the title is a part of a global namespace so we should not be > ab\ le to change it but I would like to discussed this. I misunderstood sysctl behavior. I saw that original (before r335939) setproctitle(3) calls sysctl like this. ``` sysctl([CTL_KERN, KERN_PROC, KEN_PROC_ARGS, getpid()], ...) ``` This code works in capability mode all the time (independent of r335939). I thought calling sysctl("kern.ps_strings") was also safe in capability mode. But, the sysctl is allowed to write only... > In this bug report can we only focus on the bhyve title issue? Yes, I don't see any other problems for now. I will close this PR. Thank you! -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-virtualization@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
[Bug 230082] bhyve doesn't set process title
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230082 Mariusz Zaborski changed: What|Removed |Added Status|New |In Progress -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-virtualization@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
[Bug 230082] bhyve doesn't set process title
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230082 --- Comment #8 from commit-h...@freebsd.org --- A commit references this bug: Author: oshogbo Date: Thu Aug 2 21:54:35 UTC 2018 New revision: 337189 URL: https://svnweb.freebsd.org/changeset/base/337189 Log: bhyve: set title before entering capability mode PR: 230082 Submitted by: Yuichiro NAITO Changes: head/usr.sbin/bhyve/bhyverun.c -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-virtualization@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
[Bug 230082] bhyve doesn't set process title
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230082 --- Comment #7 from Mariusz Zaborski --- The setproctitle(3) looks fine with me - I will commit it. With the ps_string the problem is a little more complicated. In my opinion the title is a part of a global namespace so we should not be able to change it but I would like to discussed this. In this bug report can we only focus on the bhyve title issue? -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-virtualization@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
[Bug 230082] bhyve doesn't set process title
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230082 Rodney W. Grimes changed: What|Removed |Added CC||ema...@freebsd.org, ||rgri...@freebsd.org --- Comment #6 from Rodney W. Grimes --- Adding emaste@ to this as a Capsicum expert. -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-virtualization@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
[Bug 230082] bhyve doesn't set process title
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230082 --- Comment #5 from Yuichiro NAITO --- 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. ___ freebsd-virtualization@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
[Bug 230082] bhyve doesn't set process title
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230082 --- Comment #4 from Yuichiro NAITO --- Created attachment 195754 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=195754&action=edit kern.patch -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-virtualization@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
[Bug 230082] bhyve doesn't set process title
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230082 Mark Linimon changed: What|Removed |Added Keywords||patch Assignee|b...@freebsd.org|virtualizat...@freebsd.org -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-virtualization@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"