android_kernel_xiaomi_sm8350/arch
Tejun Heo 9281acea6a kallsyms: make KSYM_NAME_LEN include space for trailing '\0'
KSYM_NAME_LEN is peculiar in that it does not include the space for the
trailing '\0', forcing all users to use KSYM_NAME_LEN + 1 when allocating
buffer.  This is nonsense and error-prone.  Moreover, when the caller
forgets that it's very likely to subtly bite back by corrupting the stack
because the last position of the buffer is always cleared to zero.

This patch increments KSYM_NAME_LEN by one and updates code accordingly.

* off-by-one bug in asm-powerpc/kprobes.h::kprobe_lookup_name() macro
  is fixed.

* Where MODULE_NAME_LEN and KSYM_NAME_LEN were used together,
  MODULE_NAME_LEN was treated as if it didn't include space for the
  trailing '\0'.  Fix it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Acked-by: Paulo Marques <pmarques@grupopie.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-17 10:23:03 -07:00
..
alpha PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
arm PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
arm26 PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
avr32 PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
blackfin Blackfin arch: add missing CONFIG_LARGE_ALLOCS when upstream merging 2007-07-12 14:55:05 +08:00
cris PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
frv PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
h8300 PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
i386 PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
ia64 Report that kernel is tainted if there was an OOPS 2007-07-17 10:23:02 -07:00
m32r PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
m68k PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
m68knommu PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
mips sb1250-duart.c: SB1250 DUART serial support 2007-07-17 10:23:03 -07:00
parisc kallsyms: make KSYM_NAME_LEN include space for trailing '\0' 2007-07-17 10:23:03 -07:00
powerpc PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
ppc Report that kernel is tainted if there was an OOPS 2007-07-17 10:23:02 -07:00
s390 PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
sh PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
sh64 PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
sparc Report that kernel is tainted if there was an OOPS 2007-07-17 10:23:02 -07:00
sparc64 Report that kernel is tainted if there was an OOPS 2007-07-17 10:23:02 -07:00
um PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
v850 PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
x86_64 PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
xtensa PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00