lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 10 Jun 2021 09:37:39 +0900 From: Masami Hiramatsu <mhiramat@...nel.org> To: Punit Agrawal <punitagrawal@...il.com> Cc: naveen.n.rao@...ux.ibm.com, anil.s.keshavamurthy@...el.com, davem@...emloft.net, linux-kernel@...r.kernel.org, guoren@...nel.org, linux-csky@...r.kernel.org Subject: Re: [RFC PATCH 5/5] kprobes: Make arch_check_ftrace_location static On Wed, 9 Jun 2021 19:50:19 +0900 Punit Agrawal <punitagrawal@...il.com> wrote: > arch_check_ftrace_location() was introduced as a weak function in > f7f242ff0044 ("kprobes: introduce weak arch_check_ftrace_location() > helper function") to allow architectures to handle kprobes call site > on their own. > > Recently, the only architecture (csky) to implement > arch_check_ftrace_location() was migrated to using the common > version. > > As a result, further cleanup the code to drop the weak attribute and > rename the function to remove the architecture specific > implementation. > Looks good to me. Acked-by: Masami Hiramatsu <mhiramat@...nel.org> Thanks! > Signed-off-by: Punit Agrawal <punitagrawal@...il.com> > --- > include/linux/kprobes.h | 2 -- > kernel/kprobes.c | 4 ++-- > 2 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h > index 771013bab18a..beea9ecee187 100644 > --- a/include/linux/kprobes.h > +++ b/include/linux/kprobes.h > @@ -369,8 +369,6 @@ static inline int arch_prepare_kprobe_ftrace(struct kprobe *p) > } > #endif > > -int arch_check_ftrace_location(struct kprobe *p); > - > /* Get the kprobe at this addr (if any) - called with preemption disabled */ > struct kprobe *get_kprobe(void *addr); > > diff --git a/kernel/kprobes.c b/kernel/kprobes.c > index 54d37d4ab897..b12ae6cc8dc3 100644 > --- a/kernel/kprobes.c > +++ b/kernel/kprobes.c > @@ -1531,7 +1531,7 @@ static inline int warn_kprobe_rereg(struct kprobe *p) > return ret; > } > > -int __weak arch_check_ftrace_location(struct kprobe *p) > +static int check_ftrace_location(struct kprobe *p) > { > unsigned long ftrace_addr; > > @@ -1554,7 +1554,7 @@ static int check_kprobe_address_safe(struct kprobe *p, > { > int ret; > > - ret = arch_check_ftrace_location(p); > + ret = check_ftrace_location(p); > if (ret) > return ret; > jump_label_lock(); > -- > 2.30.2 > -- Masami Hiramatsu <mhiramat@...nel.org>
Powered by blists - more mailing lists