[haiku-bugs] Re: [Haiku] #12916: [Debugger] Handle retrieving image paths for chrooted teams

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Thu, 22 Oct 2020 11:12:31 -0000

#12916: [Debugger] Handle retrieving image paths for chrooted teams
------------------------------------+----------------------------
  Reporter:  anevilyak              |      Owner:  anevilyak
      Type:  bug                    |     Status:  new
  Priority:  normal                 |  Milestone:  Unscheduled
 Component:  Applications/Debugger  |    Version:  R1/Development
Resolution:                         |   Keywords:
Blocked By:                         |   Blocking:
  Platform:  All                    |
------------------------------------+----------------------------
Comment (by korli):

 image_info->name is filled up by the runtime_loader, which runs in the
 io_context of the current team. Switching a path to the io_context of the
 team which does the syscall can be expensive:
 * resolve image->name to a vnode in io_context of team image
 (path_to_vnode),
 * then resolve the vnode in io_context of another team (vnode_to_path).

 I would favor another approach, that is register_image() could for
 chrooted images adjust the name to the kernel io context (imply that the
 notifications and get_next_image_info() are  correct for non-chrooted
 processes). A chrooted get_next_image_info() call could check the
 io_context root to filter the absolute path (especially for paths out of
 the chroot).
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/12916#comment:1>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: