This pull request contains the following bug fixes for UML:
- Various fixes for build warnings - Fix default kernel command line -----BEGIN PGP SIGNATURE----- iQJKBAABCAA0FiEEdgfidid8lnn52cLTZvlZhesYu8EFAmMrPKIWHHJpY2hhcmRA c2lnbWEtc3Rhci5hdAAKCRBm+VmF6xi7wcRjEADAOOc0pJmVvydnuNpMMF0X2Zxf UbIMLsZXx/yvabS5U9JsnmfTE2nWn/xTW/z/NEN9CyoZ4GGVbTts44y9EbqQekyv d/otx6+2Cnp5ejocZgqzkWDpjZ7WRbFRPtrY3OQS50WdCH/fMw1sMo4U6OucHyGv 8hUwrn+UnZouQXpuuSMKZ1kf8LLEdhyIGBmTfZfA0IleIJVWWzWnv1XxnyVMRT2s q6eryXJ5Ik8md3Rh71uNutAdJ7LEkpmxyOke6agUF5oXeFKf5io1pFGxBdIEGGQ6 9uRxZHG3rNxRH60s4DE0AAh3sp3SbkobHHpT0pX7WPURiBQMq4YD0qqLBkRzw68H dDQS943C6RqFl55a+MdMcu0V9hdi6Sg8bQOSae3AMRUeIdXjBMHAMN3eG9zK0uSX xCyweiA/uLm6+bnHEeh+o+jR3YoQ20ykBxhWRGf/9tq6NYA6L+FZKK9n5dfJzOlJ oC4M5LXij8y+D0HEgWNn5X3IWlkleg7ngZqUWDzKP8D0J/Pfo0XQbAxsyqFxC+H+ tbSTq0MfWwnD+yTBDAzM6+XI4eby8nqMPHxK2Fxa0F7KlZ4P9J1l1mquOl2ly1rQ 2nTm2ly3makjGlc1Xg3jEkUpk2JrFMxNENXchhqRZKbfpuYsBdqupw/chc/Tx8d+ b1z7CgR+mal5n+hutA== =iNUZ -----END PGP SIGNATURE----- Merge tag 'for-linus-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux Pull UML fixes from Richard Weinberger: - Various fixes for build warnings - Fix default kernel command line * tag 'for-linus-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux: arch: um: Mark the stack non-executable to fix a binutils warning um: Prevent KASAN splats in dump_stack() um: fix default console kernel parameter um: Cleanup compiler warning in arch/x86/um/tls_32.c um: Cleanup syscall_handler_t cast in syscalls_32.h
This commit is contained in:
commit
dc164f4fb0
6 changed files with 14 additions and 12 deletions
|
|
@ -132,10 +132,18 @@ export LDS_ELF_FORMAT := $(ELF_FORMAT)
|
||||||
# The wrappers will select whether using "malloc" or the kernel allocator.
|
# The wrappers will select whether using "malloc" or the kernel allocator.
|
||||||
LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc
|
LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc
|
||||||
|
|
||||||
|
# Avoid binutils 2.39+ warnings by marking the stack non-executable and
|
||||||
|
# ignorning warnings for the kallsyms sections.
|
||||||
|
LDFLAGS_EXECSTACK = -z noexecstack
|
||||||
|
ifeq ($(CONFIG_LD_IS_BFD),y)
|
||||||
|
LDFLAGS_EXECSTACK += $(call ld-option,--no-warn-rwx-segments)
|
||||||
|
endif
|
||||||
|
|
||||||
LD_FLAGS_CMDLINE = $(foreach opt,$(KBUILD_LDFLAGS),-Wl,$(opt))
|
LD_FLAGS_CMDLINE = $(foreach opt,$(KBUILD_LDFLAGS),-Wl,$(opt))
|
||||||
|
|
||||||
# Used by link-vmlinux.sh which has special support for um link
|
# Used by link-vmlinux.sh which has special support for um link
|
||||||
export CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS) $(LD_FLAGS_CMDLINE)
|
export CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS) $(LD_FLAGS_CMDLINE)
|
||||||
|
export LDFLAGS_vmlinux := $(LDFLAGS_EXECSTACK)
|
||||||
|
|
||||||
# When cleaning we don't include .config, so we don't include
|
# When cleaning we don't include .config, so we don't include
|
||||||
# TT or skas makefiles and don't clean skas_ptregs.h.
|
# TT or skas makefiles and don't clean skas_ptregs.h.
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,8 @@ void show_stack(struct task_struct *task, unsigned long *stack,
|
||||||
break;
|
break;
|
||||||
if (i && ((i % STACKSLOTS_PER_LINE) == 0))
|
if (i && ((i % STACKSLOTS_PER_LINE) == 0))
|
||||||
pr_cont("\n");
|
pr_cont("\n");
|
||||||
pr_cont(" %08lx", *stack++);
|
pr_cont(" %08lx", READ_ONCE_NOCHECK(*stack));
|
||||||
|
stack++;
|
||||||
}
|
}
|
||||||
|
|
||||||
printk("%sCall Trace:\n", loglvl);
|
printk("%sCall Trace:\n", loglvl);
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
#include "um_arch.h"
|
#include "um_arch.h"
|
||||||
|
|
||||||
#define DEFAULT_COMMAND_LINE_ROOT "root=98:0"
|
#define DEFAULT_COMMAND_LINE_ROOT "root=98:0"
|
||||||
#define DEFAULT_COMMAND_LINE_CONSOLE "console=tty"
|
#define DEFAULT_COMMAND_LINE_CONSOLE "console=tty0"
|
||||||
|
|
||||||
/* Changed in add_arg and setup_arch, which run before SMP is started */
|
/* Changed in add_arg and setup_arch, which run before SMP is started */
|
||||||
static char __initdata command_line[COMMAND_LINE_SIZE] = { 0 };
|
static char __initdata command_line[COMMAND_LINE_SIZE] = { 0 };
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,9 @@
|
||||||
#include <asm/unistd.h>
|
#include <asm/unistd.h>
|
||||||
#include <sysdep/ptrace.h>
|
#include <sysdep/ptrace.h>
|
||||||
|
|
||||||
typedef long syscall_handler_t(struct pt_regs);
|
typedef long syscall_handler_t(struct syscall_args);
|
||||||
|
|
||||||
extern syscall_handler_t *sys_call_table[];
|
extern syscall_handler_t *sys_call_table[];
|
||||||
|
|
||||||
#define EXECUTE_SYSCALL(syscall, regs) \
|
#define EXECUTE_SYSCALL(syscall, regs) \
|
||||||
((long (*)(struct syscall_args)) \
|
((*sys_call_table[syscall]))(SYSCALL_ARGS(®s->regs))
|
||||||
(*sys_call_table[syscall]))(SYSCALL_ARGS(®s->regs))
|
|
||||||
|
|
|
||||||
|
|
@ -65,9 +65,6 @@ static int get_free_idx(struct task_struct* task)
|
||||||
struct thread_struct *t = &task->thread;
|
struct thread_struct *t = &task->thread;
|
||||||
int idx;
|
int idx;
|
||||||
|
|
||||||
if (!t->arch.tls_array)
|
|
||||||
return GDT_ENTRY_TLS_MIN;
|
|
||||||
|
|
||||||
for (idx = 0; idx < GDT_ENTRY_TLS_ENTRIES; idx++)
|
for (idx = 0; idx < GDT_ENTRY_TLS_ENTRIES; idx++)
|
||||||
if (!t->arch.tls_array[idx].present)
|
if (!t->arch.tls_array[idx].present)
|
||||||
return idx + GDT_ENTRY_TLS_MIN;
|
return idx + GDT_ENTRY_TLS_MIN;
|
||||||
|
|
@ -240,9 +237,6 @@ static int get_tls_entry(struct task_struct *task, struct user_desc *info,
|
||||||
{
|
{
|
||||||
struct thread_struct *t = &task->thread;
|
struct thread_struct *t = &task->thread;
|
||||||
|
|
||||||
if (!t->arch.tls_array)
|
|
||||||
goto clear;
|
|
||||||
|
|
||||||
if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX)
|
if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ quiet_cmd_vdso = VDSO $@
|
||||||
-Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) && \
|
-Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) && \
|
||||||
sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@'
|
sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@'
|
||||||
|
|
||||||
VDSO_LDFLAGS = -fPIC -shared -Wl,--hash-style=sysv
|
VDSO_LDFLAGS = -fPIC -shared -Wl,--hash-style=sysv -z noexecstack
|
||||||
GCOV_PROFILE := n
|
GCOV_PROFILE := n
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue