linux-stable/arch/mips/kernel
Steven Rostedt (Red Hat) b35f549df1 syscalls: Remove start and number from syscall_get_arguments() args
At Linux Plumbers, Andy Lutomirski approached me and pointed out that the
function call syscall_get_arguments() implemented in x86 was horribly
written and not optimized for the standard case of passing in 0 and 6 for
the starting index and the number of system calls to get. When looking at
all the users of this function, I discovered that all instances pass in only
0 and 6 for these arguments. Instead of having this function handle
different cases that are never used, simply rewrite it to return the first 6
arguments of a system call.

This should help out the performance of tracing system calls by ptrace,
ftrace and perf.

Link: http://lkml.kernel.org/r/20161107213233.754809394@goodmis.org

Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Dave Martin <dave.martin@arm.com>
Cc: "Dmitry V. Levin" <ldv@altlinux.org>
Cc: x86@kernel.org
Cc: linux-snps-arc@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-c6x-dev@linux-c6x.org
Cc: uclinux-h8-devel@lists.sourceforge.jp
Cc: linux-hexagon@vger.kernel.org
Cc: linux-ia64@vger.kernel.org
Cc: linux-mips@vger.kernel.org
Cc: nios2-dev@lists.rocketboards.org
Cc: openrisc@lists.librecores.org
Cc: linux-parisc@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-riscv@lists.infradead.org
Cc: linux-s390@vger.kernel.org
Cc: linux-sh@vger.kernel.org
Cc: sparclinux@vger.kernel.org
Cc: linux-um@lists.infradead.org
Cc: linux-xtensa@linux-xtensa.org
Cc: linux-arch@vger.kernel.org
Acked-by: Paul Burton <paul.burton@mips.com> # MIPS parts
Acked-by: Max Filippov <jcmvbkbc@gmail.com> # For xtensa changes
Acked-by: Will Deacon <will.deacon@arm.com> # For the arm64 bits
Reviewed-by: Thomas Gleixner <tglx@linutronix.de> # for x86
Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
Reported-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2019-04-05 09:26:43 -04:00
..
syscalls y2038: add 64-bit time_t syscalls to all 32-bit architectures 2019-02-07 00:13:28 +01:00
.gitignore
8250-platform.c
asm-offsets.c MIPS: Remove struct task_struct fpu state when CONFIG_MIPS_FP_SUPPORT=n 2018-11-09 10:23:19 -08:00
binfmt_elfn32.c y2038: globally rename compat_time to old_time32 2018-08-27 14:48:48 +02:00
binfmt_elfo32.c y2038: globally rename compat_time to old_time32 2018-08-27 14:48:48 +02:00
bmips_5xxx_init.S MIPS: BCM5xxx: Remove dead init_fpu code 2018-11-08 11:20:57 -08:00
bmips_vec.S MIPS: BMIPS: Add Whirlwind (BMIPS5200) initialization code 2016-05-09 12:00:01 +02:00
branch.c mips: annotate implicit fall throughs 2018-12-03 13:42:38 -08:00
cacheinfo.c MIPS: Fix cacheinfo overflow 2017-02-13 18:57:34 +00:00
cevt-bcm1480.c MIPS: clockevent drivers: Set ->min_delta_ticks and ->max_delta_ticks 2017-04-14 13:11:16 -07:00
cevt-ds1287.c MIPS: clockevent drivers: Set ->min_delta_ticks and ->max_delta_ticks 2017-04-14 13:11:16 -07:00
cevt-gt641xx.c MIPS: clockevent drivers: Set ->min_delta_ticks and ->max_delta_ticks 2017-04-14 13:11:16 -07:00
cevt-r4k.c MIPS: cevt-r4k: Fix out-of-bounds array access 2017-04-10 13:31:12 +02:00
cevt-sb1250.c MIPS: clockevent drivers: Set ->min_delta_ticks and ->max_delta_ticks 2017-04-14 13:11:16 -07:00
cevt-txx9.c MIPS: clockevent drivers: Set ->min_delta_ticks and ->max_delta_ticks 2017-04-14 13:11:16 -07:00
cmpxchg.c MIPS: fix truncation in __cmpxchg_small for short values 2019-02-11 12:02:08 -08:00
cps-vec-ns16550.S Update MIPS email addresses 2017-11-03 09:02:30 -07:00
cps-vec.S MIPS: CPS: Fix MIPS_ISA_LEVEL_RAW fallout 2018-02-05 11:53:06 +00:00
cpu-bugs64.c MIPS: Remove GCC_IMM_ASM & GCC_REG_ACCUM macros 2018-11-07 16:25:30 -08:00
cpu-probe.c MIPS: MemoryMapID (MMID) Support 2019-02-04 10:56:41 -08:00
crash.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
crash_dump.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
csrc-bcm1480.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
csrc-ioasic.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
csrc-r4k.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
csrc-sb1250.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
early_printk.c mips: unify prom_putchar() declarations 2018-07-17 09:40:17 -07:00
early_printk_8250.c mips: unify prom_putchar() declarations 2018-07-17 09:40:17 -07:00
elf.c MIPS: Avoid FP ELF checks when CONFIG_MIPS_FP_SUPPORT=n 2018-11-09 10:23:18 -08:00
entry.S MIPS: Add syscall detection for restartable sequences 2018-06-19 21:13:56 -07:00
ftrace.c get rid of legacy 'get_ds()' function 2019-03-04 10:50:14 -08:00
genex.S MIPS: Avoid using .set mips0 to restore ISA 2018-11-09 10:23:19 -08:00
gpio_txx9.c MIPS: txx9: switch to gpiochip_add_data() 2016-02-19 09:51:44 +01:00
head.S MIPS/head: Store ELF appended dtb in a global variable too 2018-09-25 16:27:24 -07:00
i8253.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
idle.c MIPS: Loongson: Add Loongson-3A R2.1 basic support 2018-11-19 15:20:31 -08:00
irq-gt641xx.c
irq-msc01.c
irq-rm7000.c
irq.c MIPS: irq: Allocate accurate order pages for irq stack 2019-02-19 12:45:01 -08:00
irq_txx9.c
jump_label.c jump_label: move 'asm goto' support test to Kconfig 2019-01-06 09:46:51 +09:00
kgdb.c get rid of legacy 'get_ds()' function 2019-03-04 10:50:14 -08:00
kprobes.c bpf/error-inject/kprobes: Clear current_kprobe and enable preempt in kprobe 2018-06-21 12:33:19 +02:00
linux32.c MIPS: Delete unused code in linux32.c 2018-08-01 13:20:27 -07:00
machine_kexec.c MIPS: kdump: Mark cpu back online before rebooting 2018-09-28 10:09:03 -07:00
Makefile mips: rename scall64-64.S to scall64-n64.S 2018-12-14 11:19:01 -08:00
mcount.S mips: ftrace: fix static function graph tracing 2018-06-19 15:00:12 -07:00
mips-cm.c Here's the main MIPS pull request for v5.1: 2019-03-05 11:28:25 -08:00
mips-cpc.c MIPS: CPC: Map registers using DT in mips_cpc_default_phys_base() 2018-02-08 14:02:01 +00:00
mips-mt-fpaff.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mips-mt.c MIPS: MT: Remove norps command line parameter 2018-11-26 22:49:14 -08:00
mips-r2-to-r6-emul.c mips: kernel: no need to check return value of debugfs_create functions 2019-01-22 11:17:20 -08:00
mips_machine.c
module.c Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2017-07-15 10:59:54 -07:00
octeon_switch.S Kbuild: rename CC_STACKPROTECTOR[_STRONG] config variables 2018-06-14 12:21:18 +09:00
perf_event.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task_stack.h> 2017-03-02 08:42:36 +01:00
perf_event_mipsxx.c MIPS: perf: Fix perf with MT counting other threads 2018-05-15 15:53:44 +01:00
pm-cps.c MIPS: pm-cps: Block system suspend when a JTAG probe is present 2018-03-09 13:53:26 +00:00
pm.c MIPS: Fix watchpoint restoration 2016-05-09 12:00:02 +02:00
probes-common.h MIPS: Update email address for Marcin Nowakowski 2017-11-02 10:58:43 +00:00
proc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
process.c MIPS: Remove function size check in get_frame_info() 2019-02-04 15:15:34 -08:00
prom.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
ptrace.c syscalls: Remove start and number from syscall_get_arguments() args 2019-04-05 09:26:43 -04:00
ptrace32.c MIPS: ptrace: Remove FP support when CONFIG_MIPS_FP_SUPPORT=n 2018-11-09 10:23:17 -08:00
r4k_fpu.S MIPS: Simplify FP context initialization 2018-11-09 10:23:13 -08:00
r4k_switch.S Kbuild: rename CC_STACKPROTECTOR[_STRONG] config variables 2018-06-14 12:21:18 +09:00
r2300_fpu.S MIPS: Simplify FP context initialization 2018-11-09 10:23:13 -08:00
r2300_switch.S Kbuild: rename CC_STACKPROTECTOR[_STRONG] config variables 2018-06-14 12:21:18 +09:00
relocate.c MIPS: Remove no-op/identity casts 2018-08-31 11:49:20 -07:00
relocate_kernel.S MIPS: kexec: fix typos 2018-06-24 09:26:01 -07:00
reset.c MIPS: Hang more efficiently on halt/powerdown/restart 2018-03-09 11:22:43 +00:00
rtlx-cmp.c
rtlx-mt.c
rtlx.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
scall32-o32.S mips: generate uapi header and system call table files 2018-12-14 11:19:02 -08:00
scall64-n32.S mips: generate uapi header and system call table files 2018-12-14 11:19:02 -08:00
scall64-n64.S mips: generate uapi header and system call table files 2018-12-14 11:19:02 -08:00
scall64-o32.S mips: generate uapi header and system call table files 2018-12-14 11:19:02 -08:00
segment.c mips: kernel: no need to check return value of debugfs_create functions 2019-01-22 11:17:20 -08:00
setup.c treewide: add checks for the return value of memblock_alloc*() 2019-03-12 10:04:02 -07:00
signal-common.h
signal.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
signal32.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
signal_n32.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
signal_o32.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
smp-bmips.c MIPS: kexec: Make a framework for both jumping and halting on nonboot CPUs 2018-09-22 10:31:50 -07:00
smp-cmp.c MIPS: smp-cmp: Fix vpe_id build error 2017-11-01 23:23:00 +00:00
smp-cps.c MIPS: kexec: CPS systems to halt nonboot CPUs 2018-09-22 10:32:33 -07:00
smp-mt.c MIPS: Use mips_gic_present() in place of gic_present 2017-09-04 13:53:14 +02:00
smp-up.c MIPS: SMP: Allow boot_secondary SMP op to return errors 2017-08-30 00:57:27 +02:00
smp.c MIPS: SGI-IP27: do boot CPU init later 2019-02-19 12:46:03 -08:00
spinlock_test.c mips: kernel: no need to check return value of debugfs_create functions 2019-01-22 11:17:20 -08:00
spram.c MIPS: Add P6600 cases to CPU switch statements 2016-05-13 14:01:52 +02:00
stacktrace.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task_stack.h> 2017-03-02 08:42:36 +01:00
sync-r4k.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
syscall.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
sysrq.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
time.c MIPS: Convert update_persistent_clock() to update_persistent_clock64() 2018-05-14 23:58:23 +01:00
topology.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
traps.c treewide: add checks for the return value of memblock_alloc*() 2019-03-12 10:04:02 -07:00
unaligned.c MIPS: MemoryMapID (MMID) Support 2019-02-04 10:56:41 -08:00
uprobes.c Uprobe: Additional argument arch_uprobe to uprobe_write_opcode() 2018-08-13 20:08:33 -04:00
vdso.c MIPS: math-emu: Write-protect delay slot emulation pages 2018-12-20 10:00:01 -08:00
vmlinux.lds.S MIPS: Ensure ELF appended dtb is relocated 2019-03-11 11:08:31 -07:00
vpe-cmp.c
vpe-mt.c
vpe.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
watch.c mips: annotate implicit fall throughs 2018-12-03 13:42:38 -08:00