Project

General

Profile

Bug #9798

exec_init() should be able to handle a 64bit init process

Added by Hans Rosenfeld about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Category:
-
Start date:
2018-09-04
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

Currently exec_init() assumes the init process is 32bit. If the init process is 64bit (as is the case when bhyve is re-exec'ed) it will truncate addresses to 32bit, leading EFAULT in copyout() of the argument vector.

History

#1

Updated by Hans Rosenfeld about 1 year ago

Testing: I've been running with this change for a while. I've verified the system still boots and init gets all supplied arguments. I have also verified that zones of various brands still work (smartos, LX, bhyve), so the existing 32bit support still works as it did before. The 64bit case was tested in conjunction with bhyve zones on SmartOS, bhyve can be re-exec'd as expected when a VM is rebooted from within.

#2

Updated by Electric Monk about 1 year ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 35b5a2ef2c05b7c6ccdf28298cd7c084c454649d

commit  35b5a2ef2c05b7c6ccdf28298cd7c084c454649d
Author: Hans Rosenfeld <hans.rosenfeld@joyent.com>
Date:   2018-09-26T19:30:14.000Z

    9798 exec_init() should be able to handle a 64bit init process
    Reviewed by: John Levon <john.levon@joyent.com>
    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Andy Fiddaman <omnios@citrus-it.net>
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Approved by: Garrett D'Amore <garrett@damore.org>

Also available in: Atom PDF