This will also fix the warnings like:
warning: no previous prototype for ‘fork_handler’ [-Wmissing-prototypes]
140 | void fork_handler(void)
| ^~~~
Signed-off-by: Tiwei Bie
---
arch/um/drivers/pcap_kern.c | 4 ++--
arch/um/drivers/ubd_user.c | 2
The definition of vfree has changed since commit b3bdda02aa54
("vmalloc: add const to void* parameters"). Update the declaration
of vfree in um_malloc.h to match the latest definition.
Signed-off-by: Tiwei Bie
---
arch/um/include/shared/um_malloc.h | 2 +-
1 file changed, 1 inser
‘copy_to_user_proc’ [-Wmissing-prototypes]
arch/um/kernel/process.c:263:5: warning: no previous prototype for
‘clear_user_proc’ [-Wmissing-prototypes]
arch/um/kernel/tlb.c:579:6: warning: no previous prototype for
‘flush_tlb_mm_range’ [-Wmissing-prototypes]
Signed-off-by: Tiwei Bie
---
arch/um/kernel
Make it match the declaration in asm-generic/switch_to.h. And
also include the header to allow the compiler to check it.
Signed-off-by: Tiwei Bie
---
arch/um/kernel/process.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/um/kernel/process.c b/arch/um/kernel
A series of minor fixes and cleanups for UML.
Tiwei Bie (5):
um: Make local functions and variables static
um: Fix the declaration of vfree
um: Remove unused functions
um: Fix the return type of __switch_to
um: Add missing headers
arch/um/drivers/pcap_kern.c | 4
for ‘arch_fixup’
[-Wmissing-prototypes]
arch/x86/um/os-Linux/mcontext.c:7:6: warning: no previous prototype for
‘get_regs_from_mc’ [-Wmissing-prototypes]
Signed-off-by: Tiwei Bie
---
arch/um/kernel/mem.c| 2 ++
arch/um/kernel/process.c| 2 ++
arch/um/kernel/reboot.c
The definition of vfree has changed since commit b3bdda02aa54
("vmalloc: add const to void* parameters"). Update the declaration
of vfree in um_malloc.h to match the latest definition.
Signed-off-by: Tiwei Bie
---
arch/um/include/shared/um_malloc.h | 2 +-
1 file changed, 1 inser
‘copy_to_user_proc’ [-Wmissing-prototypes]
arch/um/kernel/process.c:263:5: warning: no previous prototype for
‘clear_user_proc’ [-Wmissing-prototypes]
arch/um/kernel/tlb.c:579:6: warning: no previous prototype for
‘flush_tlb_mm_range’ [-Wmissing-prototypes]
Signed-off-by: Tiwei Bie
---
arch/um/kernel
A series of minor fixes and cleanups for UML.
Changes since v1:
https://lore.kernel.org/lkml/20240123110347.1274217-1-tiwei@antgroup.com/
- Add "um: Stop tracking host PID in cpu_tasks";
- Add missing headers for i386;
Tiwei Bie (6):
um: Make local functions and variables static
The host PID tracked in 'cpu_tasks' is no longer used. Stopping
tracking it will also save some cycles.
Signed-off-by: Tiwei Bie
---
arch/um/include/shared/as-layout.h | 1 -
arch/um/kernel/process.c | 12 ++--
arch/um/kernel/skas/process.c | 4
3 files
Make it match the declaration in asm-generic/switch_to.h. And
also include the header to allow the compiler to check it.
Signed-off-by: Tiwei Bie
---
arch/um/kernel/process.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/um/kernel/process.c b/arch/um/kernel
This will also fix the warnings like:
warning: no previous prototype for ‘fork_handler’ [-Wmissing-prototypes]
140 | void fork_handler(void)
| ^~~~
Signed-off-by: Tiwei Bie
---
arch/um/drivers/pcap_kern.c | 4 ++--
arch/um/drivers/ubd_user.c | 2
‘check_host_supports_tls’ [-Wmissing-prototypes]
Signed-off-by: Tiwei Bie
---
arch/um/kernel/mem.c| 2 ++
arch/um/kernel/process.c| 2 ++
arch/um/kernel/reboot.c | 1 +
arch/um/kernel/skas/mmu.c | 1 +
arch/um/kernel/skas/process.c | 1 +
arch/um/kernel/tlb.c
On 3/5/24 6:49 PM, Jani Nikula wrote:
> On Tue, 05 Mar 2024, Johannes Berg wrote:
>> On Tue, 2024-03-05 at 12:34 +0200, Jani Nikula wrote:
>>> We're seeing a lot of -Wmissing-prototypes warnings when building
>>> user-mode Linux. For example, our CI hits things like [1], and it's just
>>> extra no
On 3/5/24 9:45 PM, Jani Nikula wrote:
> On Tue, 05 Mar 2024, Tiwei Bie wrote:
>> Thanks for raising this topic!
>>
>> Indeed. To make it easier to review, the current series only addre
‘get_regs_from_mc’ [-Wmissing-prototypes]
arch/x86/um/os-Linux/tls.c:22:6: warning: no previous prototype for
‘check_host_supports_tls’ [-Wmissing-prototypes]
Signed-off-by: Tiwei Bie
---
arch/um/kernel/mem.c| 2 ++
arch/um/kernel/process.c| 2 ++
arch/um/kernel/reboot.c
ypes warnings for __warp_* and foo";
- Make do_set_thread_area() static;
- Add the missing header for calibrate_delay_is_known;
Tiwei Bie (9):
um: Make local functions and variables static
um: Fix the declaration of vfree
um: Remove unused functions
um: Fix the return type of __switch_to
/um/syscalls_64.c:48:6: warning: no previous prototype for
‘arch_switch_to’ [-Wmissing-prototypes]
arch/x86/um/tls_32.c:184:5: warning: no previous prototype for
‘arch_switch_tls’ [-Wmissing-prototypes]
Signed-off-by: Tiwei Bie
---
arch/um/include/asm/ptrace-generic.h | 3 +++
arch/um/include
‘copy_to_user_proc’ [-Wmissing-prototypes]
arch/um/kernel/process.c:263:5: warning: no previous prototype for
‘clear_user_proc’ [-Wmissing-prototypes]
arch/um/kernel/tlb.c:579:6: warning: no previous prototype for
‘flush_tlb_mm_range’ [-Wmissing-prototypes]
Signed-off-by: Tiwei Bie
---
arch/um/kernel
Make it match the declaration in asm-generic/switch_to.h. And
also include the header to allow the compiler to check it.
Signed-off-by: Tiwei Bie
---
arch/um/kernel/process.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/um/kernel/process.c b/arch/um/kernel
This will also fix the warnings like:
warning: no previous prototype for ‘fork_handler’ [-Wmissing-prototypes]
140 | void fork_handler(void)
| ^~~~
Signed-off-by: Tiwei Bie
---
arch/um/drivers/pcap_kern.c | 4 ++--
arch/um/drivers/ubd_user.c | 2
c:222:6: warning: no previous prototype for ‘__wrap_free’
[-Wmissing-prototypes]
arch/x86/um/user-offsets.c:17:6: warning: no previous prototype for ‘foo’
[-Wmissing-prototypes]
Signed-off-by: Tiwei Bie
---
arch/um/os-Linux/main.c| 5 +
arch/x86/um/shared/sysdep/k
The definition of vfree has changed since commit b3bdda02aa54
("vmalloc: add const to void* parameters"). Update the declaration
of vfree in um_malloc.h to match the latest definition.
Signed-off-by: Tiwei Bie
---
arch/um/include/shared/um_malloc.h | 2 +-
1 file changed, 1 inser
The host PID tracked in 'cpu_tasks' is no longer used. Stopping
tracking it will also save some cycles.
Signed-off-by: Tiwei Bie
---
arch/um/include/shared/as-layout.h | 1 -
arch/um/kernel/process.c | 12 ++--
arch/um/kernel/skas/process.c | 4
3 files
totype for ‘text_poke’
[-Wmissing-prototypes]
arch/um/kernel/um_arch.c:473:6: warning: no previous prototype for
‘text_poke_sync’ [-Wmissing-prototypes]
Signed-off-by: Tiwei Bie
---
arch/um/kernel/um_arch.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/um/kernel/um_arch.c b/arch
lly.
There is also a CI test report from patchw...@emeril.freedesktop.org:
https://lore.kernel.org/all/87bk7rzj70@intel.com/
Thanks,
Tiwei
On 3/6/24 6:19 PM, Tiwei Bie wrote:
> A series of minor fixes and cleanups for UML.
>
> Most changes in this series are very straightforwa
On 3/26/24 10:13 PM, Lucas De Marchi wrote:
> On Wed, Mar 06, 2024 at 06:19:24PM +0800, Tiwei Bie wrote:
>> The prototypes for text_poke* are declared in asm/text-patching.h
>> under arch/x86/include/. It's safe to include this header, as it's
>> UML-aware (by che
On 3/26/24 10:16 PM, Lucas De Marchi wrote:
> On Tue, Mar 26, 2024 at 08:27:25PM +0800, Tiwei Bie wrote:
>> Hi,
>>
>> Gentle ping.. Please take a look at this series if possible. The changes
>> in this series are very straightforward, so it shouldn't require mu
>
> - pid = userspace_pid[current_thread_info()->cpu];
> -
> #ifdef CONFIG_X86_32
> if (have_fpx_regs) {
> + int pid = userspace_pid[current_thread_info()->cpu];
> struct user_fxsr_struct fpx;
>
> err = save_fpx_registers(pid, (unsigned long *) &fpx);
For the series, feel free to add my Reviewed-by: Tiwei Bie
Regards,
Tiwei
On 3/29/24 3:50 AM, anton.iva...@cambridgegreys.com wrote:
[...]
> +
> +void kernel_fpu_begin(void)
> +{
> + preempt_disable();
> +
> + WARN_ON(this_cpu_read(in_kernel_fpu));
> +
> + this_cpu_write(in_kernel_fpu, true);
> +
> +#ifdef CONFIG_64BIT
> + if (likely(cpu_has(&boot_cpu_dat
On 4/15/24 5:19 AM, Ivan Orlov wrote:
> GCC 11.4.0 produces the following warning when compiling the kernel for
> UML architecture (with UML defconfig):
>
> arch/um/kernel/tlb.c:579:6: warning: no previous prototype for
> ‘flush_tlb_mm_range’ [-Wmissing-prototypes]
> 579 | void flush_tlb_mm_ran
Hello Benjamin,
On 4/18/24 5:23 PM, benja...@sipsolutions.net wrote:
> 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 r
On 4/18/24 5:23 PM, benja...@sipsolutions.net wrote:
> diff --git a/arch/um/include/asm/mmu.h b/arch/um/include/asm/mmu.h
> index 37eb6e89e79a..bf8da736609c 100644
> --- a/arch/um/include/asm/mmu.h
> +++ b/arch/um/include/asm/mmu.h
> @@ -10,6 +10,10 @@
>
> typedef struct mm_context {
> str
On 4/22/24 3:41 PM, Benjamin Berg wrote:
> On Mon, 2024-04-22 at 10:35 +0800, Tiwei Bie wrote:
>> On 4/18/24 5:23 PM, benja...@sipsolutions.net wrote:
>>> From: Benjamin Berg
>>>
>>> This patchset reworks the stub syscall handling and also redos how pa
;>>
>>> https://patchwork.ozlabs.org/project/linux-um/list/?series=393619
>>>
>>> But I haven't checked myself yet.
>>
>> Oh, nice, it certainly helps!
>>
>> But after applying that in my branch, I do still get a bunch of
>> warnings.
-prototypes]
Signed-off-by: Tiwei Bie
---
arch/x86/um/signal.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/x86/um/signal.c b/arch/x86/um/signal.c
index 263e1d08f216..48e87b45adba 100644
--- a/arch/x86/um/signal.c
+++ b/arch/x86/um/signal.c
@@ -8,6 +8,7
This is a follow-up series built on top of below series:
https://lore.kernel.org/linux-um/20240306101925.1088870-1-tiwei@antgroup.com/
Tiwei Bie (7):
um: Fix -Wmissing-prototypes warnings for (rt_)sigreturn
um: Fix the -Wmissing-prototypes warning for __switch_mm
um: Fix the -Wmissing
totypes]
39 | int do_get_thread_area(struct user_desc *info)
| ^~
The original author also had doubts about whether it should be used.
Considering that 18 years have passed, let's just remove it.
Signed-off-by: Tiwei Bie
---
arch/x86/um/tls_32.c | 17
The __switch_mm function is defined in the user code, and is called
by the kernel code. It should be declared in a shared header.
Fixes: 4dc706c2f292 ("um: take um_mmu.h to asm/mmu.h, clean asm/mmu_context.h a
bit")
Signed-off-by: Tiwei Bie
---
arch/um/include/asm/mmu.h |
The get_thread_reg function is defined in the user code, and is
called by the kernel code. It should be declared in a shared header.
Fixes: dbba7f704aa0 ("um: stop polluting the namespace with registers.h
contents")
Signed-off-by: Tiwei Bie
---
arch/um/include/asm/processor-gen
’ [-Wmissing-prototypes]
arch/um/os-Linux/skas/process.c:107:6: warning: no previous prototype for
‘wait_stub_done’ [-Wmissing-prototypes]
Signed-off-by: Tiwei Bie
---
arch/um/os-Linux/internal.h| 20
arch/um/os-Linux/main.c| 2 --
arch/um/os-Linux/skas/mem.c| 2
:57:1: warning: no previous prototype for
‘__vdso_getcpu’ [-Wmissing-prototypes]
Meanwhile, also fix the "WARNING: Prefer 'unsigned int *' to bare use
of 'unsigned *'" checkpatch warning.
Signed-off-by: Tiwei Bie
---
arch/x86/um/vdso/um_vdso.c | 10 --
1 file ch
Make it match its definition (size_t vs unsigned long). And declare
it in a shared header to fix the -Wmissing-prototypes warning, as it
is defined in the user code and called in the kernel code.
Fixes: 5b301409e8bc ("UML: add support for KASAN under x86_64")
Signed-off-by: Tiwei Bie
On 4/23/24 7:30 PM, Johannes Berg wrote:
> On Tue, 2024-04-23 at 19:24 +0800, Tiwei Bie wrote:
>>
>> $(USER_OBJS:.o=.%): \
>> -c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) -include
>> $(srctree)/include/linux/kern_levels.h -include user.h
>> $(CFLAGS_$(bas
On 4/23/24 7:29 PM, Johannes Berg wrote:
> On Tue, 2024-04-23 at 19:24 +0800, Tiwei Bie wrote:
>>
>> --- a/arch/um/include/shared/skas/mm_id.h
>> +++ b/arch/um/include/shared/skas/mm_id.h
>> @@ -15,4 +15,6 @@ struct mm_id {
>> int kill;
>> };
>&g
On 4/23/24 8:22 PM, Johannes Berg wrote:
> On Tue, 2024-04-23 at 20:09 +0800, Tiwei Bie wrote:
>> On 4/23/24 7:30 PM, Johannes Berg wrote:
>>> On Tue, 2024-04-23 at 19:24 +0800, Tiwei Bie wrote:
>>>>
>>>> $(USER_OBJS:.o=.%): \
>>>> -
totypes]
39 | int do_get_thread_area(struct user_desc *info)
| ^~
The original author also had doubts about whether it should be used.
Considering that 18 years have passed, let's just remove it.
Signed-off-by: Tiwei Bie
---
arch/x86/um/tls_32.c | 17
- drop the "extern" (Johannes);
Tiwei Bie (7):
um: Fix -Wmissing-prototypes warnings for (rt_)sigreturn
um: Fix the -Wmissing-prototypes warning for __switch_mm
um: Fix the -Wmissing-prototypes warning for get_thread_reg
um: Fix the declaration of kasan_map_memory
um: Add an in
-prototypes]
Signed-off-by: Tiwei Bie
---
arch/x86/um/signal.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/x86/um/signal.c b/arch/x86/um/signal.c
index 263e1d08f216..48e87b45adba 100644
--- a/arch/x86/um/signal.c
+++ b/arch/x86/um/signal.c
@@ -8,6 +8,7
The get_thread_reg function is defined in the user code, and is
called by the kernel code. It should be declared in a shared header.
Fixes: dbba7f704aa0 ("um: stop polluting the namespace with registers.h
contents")
Signed-off-by: Tiwei Bie
---
arch/um/include/asm/processor-gen
:57:1: warning: no previous prototype for
‘__vdso_getcpu’ [-Wmissing-prototypes]
While at it, also fix the "WARNING: Prefer 'unsigned int *' to bare
use of 'unsigned *'" checkpatch warning.
Signed-off-by: Tiwei Bie
---
arch/x86/um/vdso/um_vdso.c | 10 --
1 file ch
The __switch_mm function is defined in the user code, and is called
by the kernel code. It should be declared in a shared header.
Fixes: 4dc706c2f292 ("um: take um_mmu.h to asm/mmu.h, clean asm/mmu_context.h a
bit")
Signed-off-by: Tiwei Bie
---
arch/um/include/asm/mmu.h |
’ [-Wmissing-prototypes]
arch/um/os-Linux/skas/process.c:107:6: warning: no previous prototype for
‘wait_stub_done’ [-Wmissing-prototypes]
Signed-off-by: Tiwei Bie
---
arch/um/os-Linux/elf_aux.c | 1 +
arch/um/os-Linux/internal.h | 20
arch/um/os-Linux/main.c | 3
Make it match its definition (size_t vs unsigned long). And declare
it in a shared header to fix the -Wmissing-prototypes warning, as it
is defined in the user code and called in the kernel code.
Fixes: 5b301409e8bc ("UML: add support for KASAN under x86_64")
Signed-off-by: Tiwei Bie
Tiwei Bie (2):
um: Remove unused ncpus variable
um: Remove /proc/sysemu support code
arch/um/include/shared/kern_util.h | 1 -
arch/um/kernel/process.c | 67 --
arch/um/kernel/um_arch.c | 3 --
3 files changed, 71 deletions(-)
--
2.34.1
Currently /proc/sysemu will never be registered, as sysemu_supported
is initialized to zero implicitly and no code updates it. And there is
also nothing to configure via sysemu in UML anymore.
Signed-off-by: Tiwei Bie
---
arch/um/kernel/process.c | 67
1
It's no longer used. And uml_ncpus_setup doesn't exist anymore.
Signed-off-by: Tiwei Bie
---
arch/um/include/shared/kern_util.h | 1 -
arch/um/kernel/um_arch.c | 3 ---
2 files changed, 4 deletions(-)
diff --git a/arch/um/include/shared/kern_util.h
b/arch/um/incl
On 5/28/24 4:54 PM, benja...@sipsolutions.net wrote:
> From: Benjamin Berg
>
> Newer glibc versions are enabling rseq support by default. This remains
> enabled in the cloned child process, potentially causing the host kernel
> to write/read memory in the child.
>
> It appears that this was pure
Hi Benjamin,
On 5/28/24 6:30 PM, Benjamin Berg wrote:
> On Tue, 2024-05-28 at 18:16 +0800, Tiwei Bie wrote:
>> On 5/28/24 4:54 PM, benja...@sipsolutions.net wrote:
>>> From: Benjamin Berg
>>>
>>> Newer glibc versions are enabling rseq support by default. Th
On 5/28/24 7:57 PM, Johannes Berg wrote:
> On Tue, 2024-05-28 at 18:16 +0800, Tiwei Bie wrote:
>> On 5/28/24 4:54 PM, benja...@sipsolutions.net wrote:
>>> From: Benjamin Berg
>>>
>>> Newer glibc versions are enabling rseq support by default. This remains
>
On 5/28/24 10:13 PM, Tiwei Bie wrote:
> On 5/28/24 7:57 PM, Johannes Berg wrote:
>> On Tue, 2024-05-28 at 18:16 +0800, Tiwei Bie wrote:
>>> On 5/28/24 4:54 PM, benja...@sipsolutions.net wrote:
>>>> From: Benjamin Berg
>>>>
>>>> Newer gli
On 5/28/24 4:54 PM, benja...@sipsolutions.net wrote:
[...]
> diff --git a/arch/um/Kconfig b/arch/um/Kconfig
> index 93a5a8999b07..5d111fc8ccb7 100644
> --- a/arch/um/Kconfig
> +++ b/arch/um/Kconfig
> @@ -208,6 +208,7 @@ config MMAPPER
>
> config PGTABLE_LEVELS
> int
> + default 4 if 4_
On 5/30/24 4:54 PM, Benjamin Berg wrote:
> Hi,
>
> On Thu, 2024-05-30 at 10:54 +0800, Tiwei Bie wrote:
>> On 5/28/24 10:13 PM, Tiwei Bie wrote:
>>> On 5/28/24 7:57 PM, Johannes Berg wrote:
>>>> On Tue, 2024-05-28 at 18:16 +0800, Tiwei Bie wrote:
>>>>
On 6/19/24 11:34 PM, Benjamin Berg wrote:
> From: Benjamin Berg
>
> Using clone will not undo features that have been enabled by libc. An
> example of this already happening is rseq, which could cause the kernel
> to read/write memory of the userspace process. In the future the
> standard library
These fields are no longer used since the removal of tt mode.
Signed-off-by: Tiwei Bie
---
arch/um/include/asm/processor-generic.h | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/arch/um/include/asm/processor-generic.h
b/arch/um/include/asm/processor-generic.h
The two checks have been identical since commit ef714f15027c ("um:
remove force_flush_all from fork_handler"). And the inner one isn't
necessary anymore.
Signed-off-by: Tiwei Bie
---
arch/um/kernel/tlb.c | 17 +++--
1 file changed, 7 insertions(+), 10 deletions(-)
di
It's no longer used since the removal of the SKAS3/4 support.
Signed-off-by: Tiwei Bie
---
arch/um/include/shared/skas/mm_id.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/um/include/shared/skas/mm_id.h
b/arch/um/include/shared/skas/mm_id.h
index 1e76ba40feba..b3571a8afec9 1
This macro isn't defined by any supported sub-architectures in tree
since it was introduced by commit 1d3468a6643a ("[PATCH uml: move
_kern.c files").
Signed-off-by: Tiwei Bie
---
arch/um/kernel/exec.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/um/kernel/exec.c b
This macro has no users, and __flush_tlb_one doesn't exist either.
Signed-off-by: Tiwei Bie
---
arch/um/include/asm/pgtable.h | 7 ---
1 file changed, 7 deletions(-)
diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h
index 5bb397b65efb..83373c9963e7 100644
Tiwei Bie (6):
um: Remove unused kpte_clear_flush macro
um: Remove the redundant newpage check in update_pte_range
um: Remove unused fields from thread_struct
um: Remove unused mm_fd field from mm_id
um: Remove the call to SUBARCH_EXECVE1 macro
um: Remove declarations of undefined
The definitions of these functions do not exist anymore.
Signed-off-by: Tiwei Bie
---
arch/um/include/shared/skas/skas.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/um/include/shared/skas/skas.h
b/arch/um/include/shared/skas/skas.h
index ebaa116de30b..85c50122ab98 100644
--- a
Hi Benjamin,
On 2024/8/16 13:59, Benjamin Berg wrote:
> Hi Tiwei,
>
> On Fri, 2024-08-16 at 09:54 +0800, Tiwei Bie wrote:
>> It's no longer used since the removal of the SKAS3/4 support.
>>
>> Signed-off-by: Tiwei Bie
>> ---
>> arch/um/include/sha
This macro has no users, and __flush_tlb_one doesn't exist either.
Signed-off-by: Tiwei Bie
---
arch/um/include/asm/pgtable.h | 7 ---
1 file changed, 7 deletions(-)
diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h
index 5bb397b65efb..83373c9963e7 100644
Changes in v2:
- Remove the pointless union (suggested by Benjamin Berg);
- Minor tweaks on coding style;
v1:
https://lore.kernel.org/linux-um/20240816015447.320394-1-tiwei@antgroup.com/
Tiwei Bie (6):
um: Remove unused kpte_clear_flush macro
um: Remove the redundant newpage check in
These fields are no longer used since the removal of tt mode.
Signed-off-by: Tiwei Bie
---
arch/um/include/asm/processor-generic.h | 20 +---
arch/um/kernel/process.c| 8
arch/um/kernel/skas/process.c | 4 ++--
3 files changed, 11 insertions
The two checks have been identical since commit ef714f15027c ("um:
remove force_flush_all from fork_handler"). And the inner one isn't
necessary anymore.
Signed-off-by: Tiwei Bie
---
arch/um/kernel/tlb.c | 16 ++--
1 file changed, 6 insertions(+), 10 deletions(-)
di
This macro isn't defined by any supported sub-architectures in tree
since it was introduced by commit 1d3468a6643a ("[PATCH uml: move
_kern.c files").
Signed-off-by: Tiwei Bie
---
arch/um/kernel/exec.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/um/kernel/exec.c b
The definitions of these functions do not exist anymore.
Signed-off-by: Tiwei Bie
---
arch/um/include/shared/skas/skas.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/um/include/shared/skas/skas.h
b/arch/um/include/shared/skas/skas.h
index ebaa116de30b..85c50122ab98 100644
--- a
It's no longer used since the removal of the SKAS3/4 support.
Signed-off-by: Tiwei Bie
---
arch/um/include/shared/skas/mm_id.h | 5 +
arch/um/kernel/reboot.c | 2 +-
arch/um/kernel/skas/mmu.c | 12 ++--
arch/um/kernel/time.c | 2 +-
arch/
The two checks have been identical since commit ef714f15027c ("um:
remove force_flush_all from fork_handler"). And the inner one isn't
necessary anymore.
Signed-off-by: Tiwei Bie
---
arch/um/kernel/tlb.c | 16 ++--
1 file changed, 6 insertions(+), 10 deletions(-)
di
This header no longer serves a purpose after show_trace was removed
by commit 9d1ee8ce92e1 ("um: Rewrite show_stack()").
Signed-off-by: Tiwei Bie
---
arch/um/include/asm/sysrq.h | 8
arch/um/kernel/sysrq.c | 1 -
arch/x86/um/sysrq_32.c | 1 -
arch/x86/um/sysrq_64.
This macro has never been defined by any supported sub-architectures
in tree since it was introduced by commit 1d3468a6643a ("[PATCH uml:
move _kern.c files").
Signed-off-by: Tiwei Bie
---
arch/um/kernel/exec.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/um/kernel/exe
This function has never been defined since its declaration was
introduced by commit 1da177e4c3f4 ("Linux-2.6.12-rc2").
Signed-off-by: Tiwei Bie
---
arch/um/include/shared/skas/skas.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/um/include/shared/skas/skas.h
b/arch/um/incl
/20240816095953.638401-1-tiwei@antgroup.com/):
- Remove the pointless union (suggested by Benjamin Berg);
- Minor tweaks on coding style;
v1:
https://lore.kernel.org/linux-um/20240816015447.320394-1-tiwei@antgroup.com/
Tiwei Bie (7):
um: Remove unused kpte_clear_flush macro
um: Remove
These fields are no longer used since the removal of tt mode.
Signed-off-by: Tiwei Bie
---
arch/um/include/asm/processor-generic.h | 20 +---
arch/um/kernel/process.c| 8
arch/um/kernel/skas/process.c | 4 ++--
3 files changed, 11 insertions
It's no longer used since the removal of the SKAS3/4 support.
Signed-off-by: Tiwei Bie
---
arch/um/include/shared/skas/mm_id.h | 5 +
arch/um/kernel/reboot.c | 2 +-
arch/um/kernel/skas/mmu.c | 12 ++--
arch/um/kernel/time.c | 2 +-
arch/
This macro has no users, and __flush_tlb_one doesn't exist either.
Signed-off-by: Tiwei Bie
---
arch/um/include/asm/pgtable.h | 7 ---
1 file changed, 7 deletions(-)
diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h
index 5bb397b65efb..83373c9963e7 100644
This function is expected to return a boolean value, which should be
true on success and false on failure.
Fixes: d1254b12c93e ("uml: fix x86_64 core dump crash")
Signed-off-by: Tiwei Bie
---
arch/um/kernel/process.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
On 2024/9/13 02:51, Richard Weinberger wrote:
> - Ursprüngliche Mail -
>> Von: "Tiwei Bie"
>> An: "richard" , "anton ivanov"
>> , "Johannes Berg"
>>
>> CC: "linux-um" , "linux-kernel"
>>
This function is expected to return a boolean value, which should be
true on success and false on failure.
Fixes: d1254b12c93e ("uml: fix x86_64 core dump crash")
Signed-off-by: Tiwei Bie
---
v2:
- Drop the unnecessary new variable (suggested by Richard Weinberger);
arch/um/kernel
On 2024/9/13 16:22, Benjamin Berg wrote:
> From: Benjamin Berg
>
> When switching from userspace to the kernel, all registers including the
> FP registers are copied into the kernel and restored later on. As such,
> the true source for the FP register state is actually already in the
> kernel and
Currently physmem_size is defined as long long but declared locally
as unsigned long long before using it in separate .c files. Make them
match by defining physmem_size as unsigned long long and also move
the declaration to a common header to allow the compiler to check it.
Signed-off-by: Tiwei
Highmem was only supported on UML/i386. And the support has been
removed by commit a98a6d864d3b ("um: Remove broken highmem support").
Remove the leftovers and stop UML from trying to setup highmem when
the sum of physmem_size and iomem_size exceeds max_physmem.
Signed-off-by:
Tiwei Bie (3):
um: Remove the redundant declaration of high_physmem
um: Remove highmem leftovers
um: Fix the definition for physmem_size
arch/um/drivers/virtio_uml.c | 9 -
arch/um/include/shared/as-layout.h | 3 ++-
arch/um/include/shared/mem_user.h | 5 ++---
arch/um
high_physmem has already been declared in as-layout.h, so there is
no need to declare it explicitly in the .c file again.
While at it, group the declarations of __real_malloc and __real_free
together to make the code slightly more readable.
Signed-off-by: Tiwei Bie
---
arch/um/os-Linux/main.c
o too.
Regards,
Tiwei
>
> When I took a look at it for the 4-level page table support on 64 bit I
> got a bit confused. But I had not realized that highmem support had
> been removed.
>
> Benjamin
>
> On Fri, 2024-09-13 at 22:21 +0800, Tiwei Bie wrote:
>> Highmem wa
Highmem was only supported on UML/i386. And the support has been
removed by commit a98a6d864d3b ("um: Remove broken highmem support").
Remove the leftovers and stop UML from trying to setup highmem when
the sum of physmem_size and iomem_size exceeds max_physmem.
Signed-off-by:
Currently physmem_size is defined as long long but declared locally
as unsigned long long before using it in separate .c files. Make them
match by defining physmem_size as unsigned long long and also move
the declaration to a common header to allow the compiler to check it.
Signed-off-by: Tiwei
This issue happens when the real map size is greater than LONG_MAX,
which can be easily triggered on UML/i386.
Fixes: fe205bdd1321 ("um: Print minimum physical memory requirement")
Signed-off-by: Tiwei Bie
---
arch/um/kernel/physmem.c | 6 +++---
1 file changed, 3 insertions(+), 3
high_physmem has already been declared in as-layout.h, so there is
no need to declare it explicitly in the .c file again.
While at it, group the declarations of __real_malloc and __real_free
together to make the code slightly more readable.
Signed-off-by: Tiwei Bie
---
arch/um/os-Linux/main.c
1 - 100 of 252 matches
Mail list logo