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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20171216235025.4e0e637ad4689728d8bf1901@kernel.org>
Date:   Sat, 16 Dec 2017 23:50:25 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     guzhifeng <guzhifeng@...s.chinamobile.com>
Cc:     ananth@...ux.vnet.ibm.com, anil.s.keshavamurthy@...el.com,
        davem@...emloft.net, linux-kernel@...r.kernel.org,
        Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH] kernel/kprobes: kprobes_built_in can be boolean

On Fri, 15 Dec 2017 14:41:12 +0800
guzhifeng <guzhifeng@...s.chinamobile.com> wrote:

> This patch makes kprobes_built_in return bool due to this
> particular function only using either one or zero as its return
> value.
> 
> No functional change.

This seems OK to me.

Acked-by: Masami Hiramatsu <mhiramat@...nel.org>

Thank you,

> 
> Signed-off-by: guzhifeng <guzhifeng@...s.chinamobile.com>
> ---
>  include/linux/kprobes.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
> index 9440a2f..8d0d910 100644
> --- a/include/linux/kprobes.h
> +++ b/include/linux/kprobes.h
> @@ -219,9 +219,9 @@ struct kprobe_blacklist_entry {
>  /*
>   * For #ifdef avoidance:
>   */
> -static inline int kprobes_built_in(void)
> +static inline bool kprobes_built_in(void)
>  {
> -	return 1;
> +	return true;
>  }
>  
>  #ifdef CONFIG_KRETPROBES
> @@ -409,9 +409,9 @@ static inline struct kprobe_ctlblk *get_kprobe_ctlblk(void)
>  
>  #else /* !CONFIG_KPROBES: */
>  
> -static inline int kprobes_built_in(void)
> +static inline bool kprobes_built_in(void)
>  {
> -	return 0;
> +	return false;
>  }
>  static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr)
>  {
> -- 
> 1.8.3.1
> 
> 
> 


-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ