On 03/07/2024 16:38, Johannes Berg wrote:
From: Johannes Berg
Otherwise we always get
reboot: Power off not available: System halted instead
which is really quite pointless.
Signed-off-by: Johannes Berg
---
arch/um/kernel/reboot.c | 15 +++
1 file changed, 15 insertions(
On 03/07/2024 16:22, Johannes Berg wrote:
From: Johannes Berg
The pointer isn't initialized by callers, but I have
encountered cases where it's still printed; initialize
it in all possible cases in setup_one_line().
Signed-off-by: Johannes Berg
---
arch/um/drivers/line.c | 2 ++
1 file
On 03/07/2024 16:20, Johannes Berg wrote:
From: Johannes Berg
We just removed the driver, but forgot the row in the
documentation table mentioning it. Remove that.
Signed-off-by: Johannes Berg
---
Documentation/virt/uml/user_mode_linux_howto_v2.rst | 2 --
1 file changed, 2 deletions(-)
On 03/07/2024 17:26, Johannes Berg wrote:
Lockdep reports a spinlock ordering problem: sometimes we take head_lock
first, sometimes tail_lock, so there's a classic ABBA deadlock possible.
It may not happen now because of UML being single-CPU and all that, but
perhaps with preempt?
You need both
From: Johannes Berg
If open fails, we have already set vp->opened, but it's
not reset so that any further attempts will just return
-ENXIO. Reset vp->opened even if close has nothing to do.
This helps e.g. with slirp4netns handling only a single
connection, you can then restart it and open the d
From: Johannes Berg
This lock is useless, all the places that are using
it for some locking will already hold the RTNL. Just
remove it.
Signed-off-by: Johannes Berg
---
v2: remove unused flags variables
---
arch/um/drivers/vector_kern.c | 16 +---
arch/um/drivers/vector_kern.h | 1
From: Johannes Berg
This lock is useless, all the places that are using
it for some locking will already hold the RTNL. Just
remove it.
Signed-off-by: Johannes Berg
---
arch/um/drivers/vector_kern.c | 14 +-
arch/um/drivers/vector_kern.h | 1 -
2 files changed, 1 insertion(+), 14
Lockdep reports a spinlock ordering problem: sometimes we take head_lock
first, sometimes tail_lock, so there's a classic ABBA deadlock possible.
It may not happen now because of UML being single-CPU and all that, but
perhaps with preempt?
Report:
=
From: Johannes Berg
Otherwise we always get
reboot: Power off not available: System halted instead
which is really quite pointless.
Signed-off-by: Johannes Berg
---
arch/um/kernel/reboot.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/arch/um/kernel/reboot.c b/arch/um
From: Johannes Berg
The pointer isn't initialized by callers, but I have
encountered cases where it's still printed; initialize
it in all possible cases in setup_one_line().
Signed-off-by: Johannes Berg
---
arch/um/drivers/line.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/um/dr
From: Johannes Berg
We just removed the driver, but forgot the row in the
documentation table mentioning it. Remove that.
Signed-off-by: Johannes Berg
---
Documentation/virt/uml/user_mode_linux_howto_v2.rst | 2 --
1 file changed, 2 deletions(-)
diff --git a/Documentation/virt/uml/user_mode_l
From: Benjamin Berg
There should be no need to flush the memory in flush_thread. Doing this
likely worked around some issue where memory was still incorrectly
mapped when creating or cloning an MM.
With the removal of the special clone path, that isn't relevant anymore.
However, add the flush in
From: Benjamin Berg
This patchset reworks the stub syscall handling and also redos how page
table updates are tracked and synchronized. Some of this originated in
the SECCOMP patchset, but it became clear that these refactorings make
sense independently as they result in a considerably fewer page
From: Benjamin Berg
Conceptually, we want the memory mappings to always be up to date and
represent whatever is in the TLB. To ensure that, we need to sync them
over in the userspace case and for the kernel we need to process the
mappings.
The kernel will call flush_tlb_* if page table entries t
From: Benjamin Berg
The HVC update was mostly used to compress consecutive calls into one.
This is mostly relevant for userspace where it is already handled by the
syscall stub code.
Simplify the whole logic and consolidate it for both kernel and
userspace. This does remove the sequential syscal
From: Benjamin Berg
The kernel flushes the memory ranges anyway for CoW and does not assume
that the userspace process has anything set up already. So, start with a
fresh process for the new mm context.
Signed-off-by: Benjamin Berg
---
arch/um/include/shared/os.h | 1 -
arch/um/i
Rework syscall handling to be platform independent. Also create a clean
split between queueing of syscalls and flushing them out, removing the
need to keep state in the code that triggers the syscalls.
The code adds syscall_data_len to the global mm_id structure. This will
be used later to allow s
From: Benjamin Berg
There should be no need for this. It may be that this used to work
around another issue where after a clone the MM was in a bad state.
Signed-off-by: Benjamin Berg
---
arch/um/include/asm/mmu_context.h | 2 --
arch/um/kernel/process.c | 2 --
arch/um/kernel/tlb.c
As running the syscalls is expensive due to context switches, we should
do so as late as possible in case more syscalls need to be queued later
on. This will also benefit a later move to a SECCOMP enabled userspace
as in that case the need for extra context switches is removed entirely.
Signed-off
When we switch to use seccomp, we need both the signal stack and other
data (i.e. syscall information) to co-exist in the stub data. To
facilitate this, start by defining separate memory areas for the stack
and syscall data.
This moves the signal stack onto a new page as the memory area is not
suf
Further commits will require values from common-offsets.h inside
stub-data.h. Resolve the possible circular dependency and simply use
offsetof() inside stub_32.h and stub_64.h.
Signed-off-by: Benjamin Berg
---
arch/um/include/shared/common-offsets.h | 5 -
arch/x86/um/shared/sysdep/stub_32.h
From: Benjamin Berg
The current LDT code has a few issues that mean it should be redone in a
different way once we always start with a fresh MM even when cloning.
In a new and better world, the kernel would just ensure its own LDT is
clear at startup. At that point, all that is needed is a simpl
This function will be used by the new syscall handling code.
Signed-off-by: Benjamin Berg
---
arch/x86/um/shared/sysdep/stub_32.h | 22 ++
arch/x86/um/shared/sysdep/stub_64.h | 16
2 files changed, 38 insertions(+)
diff --git a/arch/x86/um/shared/sysdep/stub
From: Benjamin Berg
To keep the number of syscalls that the stub has to do lower, compress
two consecutive syscalls of the same type if the second is just a
continuation of the first.
Signed-off-by: Benjamin Berg
---
arch/um/os-Linux/skas/mem.c | 39 +
1 fil
On Wed, 2024-07-03 at 11:45 +0200, Johannes Berg wrote:
> On Fri, 2024-05-24 at 23:37 +0200, benja...@sipsolutions.net wrote:
> > From: Benjamin Berg
> >
> > There should be no need for this.
>
> "should" ;-)
>
> This breaks things if glibc enables rseq. That might even be already
> broken in t
On Wed, 2024-06-26 at 15:53 +0200, Benjamin Berg wrote:
>
> +choice
> + prompt "Pagetable levels"
> + default 2_LEVEL_PGTABLES if !64BIT
> + default 4_LEVEL_PGTABLES if 64BIT
> +
> + config 2_LEVEL_PGTABLES
> + bool "Two-level pagetables" if !64BIT
> + depen
From: Johannes Berg
When signals are hard-blocked in order to do time-travel
socket processing, we set signals_blocked and then handle
SIGIO signals by setting the SIGIO bit in signals_pending.
When unblocking, we first set signals_blocked to 0, and
then handle all pending signals. We have to set
From: Johannes Berg
This function is unused and unneeded, remove it.
Signed-off-by: Johannes Berg
---
arch/um/kernel/time.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c
index d44eaad53d9d..47b9f5e63566 100644
--- a/arch/um/kernel/time.c
On Wed, 2024-07-03 at 12:08 +0200, Benjamin Berg wrote:
> On Wed, 2024-07-03 at 11:45 +0200, Johannes Berg wrote:
> > On Fri, 2024-05-24 at 23:37 +0200, benja...@sipsolutions.net wrote:
> > > From: Benjamin Berg
> > >
> > > There should be no need for this.
> >
> > "should" ;-)
>
> Hmm, I would
On Wed, 2024-07-03 at 11:45 +0200, Johannes Berg wrote:
> On Fri, 2024-05-24 at 23:37 +0200, benja...@sipsolutions.net wrote:
> > From: Benjamin Berg
> >
> > There should be no need for this.
>
> "should" ;-)
Hmm, I would have expected the previous patch is what breaks it.
i.e. this line that
On Fri, 2024-05-24 at 23:37 +0200, benja...@sipsolutions.net wrote:
> From: Benjamin Berg
>
> There should be no need for this.
"should" ;-)
This breaks things if glibc enables rseq. That might even be already
broken in the sense that it might corrupt memory that's put at the same
place the rse
31 matches
Mail list logo