Commit 830601da authored by Stephen Rothwell's avatar Stephen Rothwell

Merge branch 'akpm/master'

parents 02bf9bc1 e5a18af2
......@@ -6,8 +6,7 @@
# 2) Generate timeconst.h
# 3) Generate asm-offsets.h (may need bounds.h and timeconst.h)
# 4) Check for missing system calls
# 5) check atomics headers are up-to-date
# 6) Generate constants.py (may need bounds.h)
# 5) Generate constants.py (may need bounds.h)
#####
# 1) Generate bounds.h
......@@ -60,20 +59,7 @@ missing-syscalls: scripts/checksyscalls.sh $(offsets-file) FORCE
$(call cmd,syscalls)
#####
# 5) Check atomic headers are up-to-date
#
always += old-atomics
targets += old-atomics
quiet_cmd_atomics = CALL $<
cmd_atomics = $(CONFIG_SHELL) $<
old-atomics: scripts/atomic/check-atomics.sh FORCE
$(call cmd,atomics)
#####
# 6) Generate constants for Python GDB integration
# 5) Generate constants for Python GDB integration
#
extra-$(CONFIG_GDB_SCRIPTS) += build_constants_py
......
......@@ -234,7 +234,7 @@ clean-targets := %clean mrproper cleandocs
no-dot-config-targets := $(clean-targets) \
cscope gtags TAGS tags help% %docs check% coccicheck \
$(version_h) headers_% archheaders archscripts \
%asm-generic kernelversion %src-pkg
%asm-generic genheader kernelversion %src-pkg
no-sync-config-targets := $(no-dot-config-targets) install %install \
kernelrelease
......@@ -1080,7 +1080,7 @@ endif
# prepare2 creates a makefile if using a separate output directory.
# From this point forward, .config has been reprocessed, so any rules
# that need to depend on updated CONFIG_* values can be checked here.
prepare2: prepare3 outputmakefile asm-generic
prepare2: prepare3 outputmakefile asm-generic genheader
prepare1: prepare2 $(version_h) $(autoksyms_h) include/generated/utsrelease.h
$(cmd_crmodverdir)
......@@ -1103,6 +1103,10 @@ asm-generic: uapi-asm-generic
uapi-asm-generic:
$(Q)$(MAKE) $(asm-generic)=arch/$(SRCARCH)/include/generated/uapi/asm
PHONY += genheader
genheader:
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.genheader obj=include/generated
PHONY += prepare-objtool
prepare-objtool: $(objtool_target)
ifeq ($(SKIP_STACK_VALIDATION),1)
......
......@@ -166,7 +166,7 @@
#define arch_atomic64_dec_if_positive arch_atomic64_dec_if_positive
#include <asm-generic/atomic-instrumented.h>
#include <generated/atomic-instrumented.h>
#endif
#endif
......@@ -262,6 +262,6 @@ static inline int arch_atomic_fetch_xor(int i, atomic_t *v)
# include <asm/atomic64_64.h>
#endif
#include <asm-generic/atomic-instrumented.h>
#include <generated/atomic-instrumented.h>
#endif /* _ASM_X86_ATOMIC_H */
......@@ -175,8 +175,8 @@ int delta_ipc_open(struct delta_ctx *pctx, const char *name,
msg.ipc_buf_size = ipc_buf_size;
msg.ipc_buf_paddr = ctx->ipc_buf->paddr;
memcpy(msg.name, name, sizeof(msg.name));
msg.name[sizeof(msg.name) - 1] = 0;
memset(msg.name, 0, sizeof(msg.name));
strcpy(msg.name, name);
msg.param_size = param->size;
memcpy(ctx->ipc_buf->vaddr, param->data, msg.param_size);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -71,8 +71,8 @@
__ret; \
})
#include <linux/atomic-fallback.h>
#include <generated/atomic-fallback.h>
#include <asm-generic/atomic-long.h>
#include <generated/atomic-long.h>
#endif /* _LINUX_ATOMIC_H */
......@@ -270,17 +270,18 @@ static inline int signal_group_exit(const struct signal_struct *sig)
extern void flush_signals(struct task_struct *);
extern void ignore_signals(struct task_struct *);
extern void flush_signal_handlers(struct task_struct *, int force_default);
extern int dequeue_signal(struct task_struct *tsk, sigset_t *mask, kernel_siginfo_t *info);
extern int dequeue_signal(struct task_struct *task,
sigset_t *mask, kernel_siginfo_t *info);
static inline int kernel_dequeue_signal(void)
{
struct task_struct *tsk = current;
struct task_struct *task = current;
kernel_siginfo_t __info;
int ret;
spin_lock_irq(&tsk->sighand->siglock);
ret = dequeue_signal(tsk, &tsk->blocked, &__info);
spin_unlock_irq(&tsk->sighand->siglock);
spin_lock_irq(&task->sighand->siglock);
ret = dequeue_signal(task, &task->blocked, &__info);
spin_unlock_irq(&task->sighand->siglock);
return ret;
}
......@@ -418,18 +419,18 @@ static inline void set_restore_sigmask(void)
WARN_ON(!test_thread_flag(TIF_SIGPENDING));
}
static inline void clear_tsk_restore_sigmask(struct task_struct *tsk)
static inline void clear_tsk_restore_sigmask(struct task_struct *task)
{
clear_tsk_thread_flag(tsk, TIF_RESTORE_SIGMASK);
clear_tsk_thread_flag(task, TIF_RESTORE_SIGMASK);
}
static inline void clear_restore_sigmask(void)
{
clear_thread_flag(TIF_RESTORE_SIGMASK);
}
static inline bool test_tsk_restore_sigmask(struct task_struct *tsk)
static inline bool test_tsk_restore_sigmask(struct task_struct *task)
{
return test_tsk_thread_flag(tsk, TIF_RESTORE_SIGMASK);
return test_tsk_thread_flag(task, TIF_RESTORE_SIGMASK);
}
static inline bool test_restore_sigmask(void)
{
......@@ -448,9 +449,9 @@ static inline void set_restore_sigmask(void)
current->restore_sigmask = true;
WARN_ON(!test_thread_flag(TIF_SIGPENDING));
}
static inline void clear_tsk_restore_sigmask(struct task_struct *tsk)
static inline void clear_tsk_restore_sigmask(struct task_struct *task)
{
tsk->restore_sigmask = false;
task->restore_sigmask = false;
}
static inline void clear_restore_sigmask(void)
{
......@@ -460,9 +461,9 @@ static inline bool test_restore_sigmask(void)
{
return current->restore_sigmask;
}
static inline bool test_tsk_restore_sigmask(struct task_struct *tsk)
static inline bool test_tsk_restore_sigmask(struct task_struct *task)
{
return tsk->restore_sigmask;
return task->restore_sigmask;
}
static inline bool test_and_clear_restore_sigmask(void)
{
......@@ -616,9 +617,9 @@ static inline struct pid *task_session(struct task_struct *task)
return task->signal->pids[PIDTYPE_SID];
}
static inline int get_nr_threads(struct task_struct *tsk)
static inline int get_nr_threads(struct task_struct *task)
{
return tsk->signal->nr_threads;
return task->signal->nr_threads;
}
static inline bool thread_group_leader(struct task_struct *p)
......@@ -657,35 +658,35 @@ static inline int thread_group_empty(struct task_struct *p)
#define delay_group_leader(p) \
(thread_group_leader(p) && !thread_group_empty(p))
extern struct sighand_struct *__lock_task_sighand(struct task_struct *tsk,
extern struct sighand_struct *__lock_task_sighand(struct task_struct *task,
unsigned long *flags);
static inline struct sighand_struct *lock_task_sighand(struct task_struct *tsk,
static inline struct sighand_struct *lock_task_sighand(struct task_struct *task,
unsigned long *flags)
{
struct sighand_struct *ret;
ret = __lock_task_sighand(tsk, flags);
(void)__cond_lock(&tsk->sighand->siglock, ret);
ret = __lock_task_sighand(task, flags);
(void)__cond_lock(&task->sighand->siglock, ret);
return ret;
}
static inline void unlock_task_sighand(struct task_struct *tsk,
static inline void unlock_task_sighand(struct task_struct *task,
unsigned long *flags)
{
spin_unlock_irqrestore(&tsk->sighand->siglock, *flags);
spin_unlock_irqrestore(&task->sighand->siglock, *flags);
}
static inline unsigned long task_rlimit(const struct task_struct *tsk,
static inline unsigned long task_rlimit(const struct task_struct *task,
unsigned int limit)
{
return READ_ONCE(tsk->signal->rlim[limit].rlim_cur);
return READ_ONCE(task->signal->rlim[limit].rlim_cur);
}
static inline unsigned long task_rlimit_max(const struct task_struct *tsk,
static inline unsigned long task_rlimit_max(const struct task_struct *task,
unsigned int limit)
{
return READ_ONCE(tsk->signal->rlim[limit].rlim_max);
return READ_ONCE(task->signal->rlim[limit].rlim_max);
}
static inline unsigned long rlimit(unsigned int limit)
......
......@@ -77,7 +77,6 @@
#include <linux/blkdev.h>
#include <linux/fs_struct.h>
#include <linux/magic.h>
#include <linux/sched/mm.h>
#include <linux/perf_event.h>
#include <linux/posix-timers.h>
#include <linux/user-return-notifier.h>
......
# SPDX-License-Identifier: GPL-2.0
#
# Generate common headers under include/generated/
include scripts/Kbuild.include
atomics-dir := $(srctree)/scripts/atomic
atomic-tbl := $(atomics-dir)/atomics.tbl
.PHONY: all
targets += atomic-fallback.h
targets += atomic-instrumented.h
targets += atomic-long.h
all: $(addprefix $(obj)/,$(targets))
quiet_cmd_genheader = GENHDR $@
cmd_genheader = $(CONFIG_SHELL) $^ >$@
$(obj)/atomic-%.h: $(atomics-dir)/gen-atomic-%.sh $(atomic-tbl)
$(call if_changed,genheader)
......@@ -13,7 +13,7 @@ gen-atomic-long.sh asm-generic/atomic-long.h
gen-atomic-fallback.sh linux/atomic-fallback.h
EOF
while read script header; do
if ! (${ATOMICDIR}/${script} ${ATOMICTBL} | diff - ${LINUXDIR}/include/${header} > /dev/null); then
if ! (/bin/sh ${ATOMICDIR}/${script} ${ATOMICTBL} | diff - ${LINUXDIR}/include/${header} > /dev/null); then
printf "warning: include/${header} is out-of-date.\n"
fi
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment