mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 21:21:09 +00:00
arm64: kprobes: Remove unneeded RODATA check
Remove unneeded RODATA check from arch_prepare_kprobe(). Since check_kprobe_address_safe() already ensured that the probe address is in kernel text, we don't need to check whether the address in RODATA or not. That must be always false. Acked-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
This commit is contained in:
parent
a872fc8bf0
commit
b5586163de
1 changed files with 0 additions and 6 deletions
|
@ -91,8 +91,6 @@ static void __kprobes arch_simulate_insn(struct kprobe *p, struct pt_regs *regs)
|
||||||
int __kprobes arch_prepare_kprobe(struct kprobe *p)
|
int __kprobes arch_prepare_kprobe(struct kprobe *p)
|
||||||
{
|
{
|
||||||
unsigned long probe_addr = (unsigned long)p->addr;
|
unsigned long probe_addr = (unsigned long)p->addr;
|
||||||
extern char __start_rodata[];
|
|
||||||
extern char __end_rodata[];
|
|
||||||
|
|
||||||
if (probe_addr & 0x3)
|
if (probe_addr & 0x3)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -106,10 +104,6 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)
|
||||||
if (search_exception_tables(probe_addr))
|
if (search_exception_tables(probe_addr))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (probe_addr >= (unsigned long) __start_rodata &&
|
|
||||||
probe_addr <= (unsigned long) __end_rodata)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
/* decode instruction */
|
/* decode instruction */
|
||||||
switch (arm_kprobe_decode_insn(p->addr, &p->ainsn)) {
|
switch (arm_kprobe_decode_insn(p->addr, &p->ainsn)) {
|
||||||
case INSN_REJECTED: /* insn not supported */
|
case INSN_REJECTED: /* insn not supported */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue