mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
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:
@@ -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
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user