1. 24 2月, 2021 4 次提交
  2. 22 2月, 2021 2 次提交
  3. 17 2月, 2021 7 次提交
  4. 16 2月, 2021 7 次提交
  5. 15 2月, 2021 2 次提交
  6. 13 2月, 2021 3 次提交
    • J
      um: remove process stub VMA · bfc58e2b
      Johannes Berg 提交于
      This mostly reverts the old commit 3963333f ("uml: cover stubs
      with a VMA") which had added a VMA to the existing PTEs. However,
      there's no real reason to have the PTEs in the first place and the
      VMA cannot be 'fixed' in place, which leads to bugs that userspace
      could try to unmap them and be forcefully killed, or such. Also,
      there's a bit of an ugly hole in userspace's address space.
      
      Simplify all this: just install the stub code/page at the top of
      the (inner) address space, i.e. put it just above TASK_SIZE. The
      pages are simply hard-coded to be mapped in the userspace process
      we use to implement an mm context, and they're out of reach of the
      inner mmap/munmap/mprotect etc. since they're above TASK_SIZE.
      
      Getting rid of the VMA also makes vma_merge() no longer hit one of
      the VM_WARN_ON()s there because we installed a VMA while the code
      assumes the stack VMA is the first one.
      
      It also removes a lockdep warning about mmap_sem usage since we no
      longer have uml_setup_stubs() and thus no longer need to do any
      manipulation that would require mmap_sem in activate_mm().
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      bfc58e2b
    • J
      um: rework userspace stubs to not hard-code stub location · 9f0b4807
      Johannes Berg 提交于
      The userspace stacks mostly have a stack (and in the case of the
      syscall stub we can just set their stack pointer) that points to
      the location of the stub data page already.
      
      Rework the stubs to use the stack pointer to derive the start of
      the data page, rather than requiring it to be hard-coded.
      
      In the clone stub, also integrate the int3 into the stack remap,
      since we really must not use the stack while we remap it.
      
      This prepares for putting the stub at a variable location that's
      not part of the normal address space of the userspace processes
      running inside the UML machine.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      9f0b4807
    • J
      um: separate child and parent errors in clone stub · 84b2789d
      Johannes Berg 提交于
      If the two are mixed up, then it looks as though the parent
      returned an error if the child failed (before) the mmap(),
      and then the resulting process never gets killed. Fix this
      by splitting the child and parent errors, reporting and
      using them appropriately.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      84b2789d
  7. 11 2月, 2021 15 次提交