linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/speculation: Add missing prototype for unpriv_ebpf_notify()
@ 2022-04-25 23:40 Josh Poimboeuf
  2022-04-26  8:46 ` Borislav Petkov
  2022-04-28  9:50 ` [tip: x86/cpu] " tip-bot2 for Josh Poimboeuf
  0 siblings, 2 replies; 5+ messages in thread
From: Josh Poimboeuf @ 2022-04-25 23:40 UTC (permalink / raw)
  To: x86; +Cc: linux-kernel, Borislav Petkov, Thomas Gleixner, kernel test robot

Fix the following warnings seen with "make W=1":

  kernel/sysctl.c:183:13: warning: no previous prototype for ‘unpriv_ebpf_notify’ [-Wmissing-prototypes]
    183 | void __weak unpriv_ebpf_notify(int new_state)
        |             ^~~~~~~~~~~~~~~~~~

  arch/x86/kernel/cpu/bugs.c:659:6: warning: no previous prototype for ‘unpriv_ebpf_notify’ [-Wmissing-prototypes]
    659 | void unpriv_ebpf_notify(int new_state)
        |      ^~~~~~~~~~~~~~~~~~

Fixes: 44a3918c8245 ("x86/speculation: Include unprivileged eBPF status in Spectre v2 mitigation reporting")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
---
 include/linux/bpf.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index bdb5298735ce..ecc3d3ec41cf 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -2085,6 +2085,8 @@ void bpf_offload_dev_netdev_unregister(struct bpf_offload_dev *offdev,
 				       struct net_device *netdev);
 bool bpf_offload_dev_match(struct bpf_prog *prog, struct net_device *netdev);
 
+void unpriv_ebpf_notify(int new_state);
+
 #if defined(CONFIG_NET) && defined(CONFIG_BPF_SYSCALL)
 int bpf_prog_offload_init(struct bpf_prog *prog, union bpf_attr *attr);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86/speculation: Add missing prototype for unpriv_ebpf_notify()
  2022-04-25 23:40 [PATCH] x86/speculation: Add missing prototype for unpriv_ebpf_notify() Josh Poimboeuf
@ 2022-04-26  8:46 ` Borislav Petkov
  2022-04-26 23:36   ` Alexei Starovoitov
  2022-04-28  9:50 ` [tip: x86/cpu] " tip-bot2 for Josh Poimboeuf
  1 sibling, 1 reply; 5+ messages in thread
From: Borislav Petkov @ 2022-04-26  8:46 UTC (permalink / raw)
  To: Josh Poimboeuf, bpf; +Cc: x86, linux-kernel, Thomas Gleixner, kernel test robot

+ bpf@vger.kernel.org

Let's sync with bpf folks on who takes this. I could route it through tip ...

On Mon, Apr 25, 2022 at 04:40:02PM -0700, Josh Poimboeuf wrote:
> Fix the following warnings seen with "make W=1":
> 
>   kernel/sysctl.c:183:13: warning: no previous prototype for ‘unpriv_ebpf_notify’ [-Wmissing-prototypes]
>     183 | void __weak unpriv_ebpf_notify(int new_state)
>         |             ^~~~~~~~~~~~~~~~~~
> 
>   arch/x86/kernel/cpu/bugs.c:659:6: warning: no previous prototype for ‘unpriv_ebpf_notify’ [-Wmissing-prototypes]
>     659 | void unpriv_ebpf_notify(int new_state)
>         |      ^~~~~~~~~~~~~~~~~~
> 
> Fixes: 44a3918c8245 ("x86/speculation: Include unprivileged eBPF status in Spectre v2 mitigation reporting")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
> ---
>  include/linux/bpf.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/linux/bpf.h b/include/linux/bpf.h
> index bdb5298735ce..ecc3d3ec41cf 100644
> --- a/include/linux/bpf.h
> +++ b/include/linux/bpf.h
> @@ -2085,6 +2085,8 @@ void bpf_offload_dev_netdev_unregister(struct bpf_offload_dev *offdev,
>  				       struct net_device *netdev);
>  bool bpf_offload_dev_match(struct bpf_prog *prog, struct net_device *netdev);
>  
> +void unpriv_ebpf_notify(int new_state);
> +
>  #if defined(CONFIG_NET) && defined(CONFIG_BPF_SYSCALL)
>  int bpf_prog_offload_init(struct bpf_prog *prog, union bpf_attr *attr);
>  
> -- 

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86/speculation: Add missing prototype for unpriv_ebpf_notify()
  2022-04-26  8:46 ` Borislav Petkov
@ 2022-04-26 23:36   ` Alexei Starovoitov
  2022-04-28  9:12     ` Borislav Petkov
  0 siblings, 1 reply; 5+ messages in thread
From: Alexei Starovoitov @ 2022-04-26 23:36 UTC (permalink / raw)
  To: Borislav Petkov, Daniel Borkmann, Andrii Nakryiko
  Cc: Josh Poimboeuf, bpf, X86 ML, LKML, Thomas Gleixner, kernel test robot

On Tue, Apr 26, 2022 at 6:36 AM Borislav Petkov <bp@alien8.de> wrote:
>
> + bpf@vger.kernel.org
>
> Let's sync with bpf folks on who takes this. I could route it through tip ...

I don't remember seeing the original patch on the bpf list.
I'm guessing it was done in private as part of bhb series?
Feel free to land it via tip.
Hopefully there will be no conflicts.

> On Mon, Apr 25, 2022 at 04:40:02PM -0700, Josh Poimboeuf wrote:
> > Fix the following warnings seen with "make W=1":
> >
> >   kernel/sysctl.c:183:13: warning: no previous prototype for ‘unpriv_ebpf_notify’ [-Wmissing-prototypes]
> >     183 | void __weak unpriv_ebpf_notify(int new_state)
> >         |             ^~~~~~~~~~~~~~~~~~
> >
> >   arch/x86/kernel/cpu/bugs.c:659:6: warning: no previous prototype for ‘unpriv_ebpf_notify’ [-Wmissing-prototypes]
> >     659 | void unpriv_ebpf_notify(int new_state)
> >         |      ^~~~~~~~~~~~~~~~~~
> >
> > Fixes: 44a3918c8245 ("x86/speculation: Include unprivileged eBPF status in Spectre v2 mitigation reporting")
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
> > ---
> >  include/linux/bpf.h | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/include/linux/bpf.h b/include/linux/bpf.h
> > index bdb5298735ce..ecc3d3ec41cf 100644
> > --- a/include/linux/bpf.h
> > +++ b/include/linux/bpf.h
> > @@ -2085,6 +2085,8 @@ void bpf_offload_dev_netdev_unregister(struct bpf_offload_dev *offdev,
> >                                      struct net_device *netdev);
> >  bool bpf_offload_dev_match(struct bpf_prog *prog, struct net_device *netdev);
> >
> > +void unpriv_ebpf_notify(int new_state);
> > +
> >  #if defined(CONFIG_NET) && defined(CONFIG_BPF_SYSCALL)
> >  int bpf_prog_offload_init(struct bpf_prog *prog, union bpf_attr *attr);
> >
> > --
>
> --
> Regards/Gruss,
>     Boris.
>
> https://people.kernel.org/tglx/notes-about-netiquette

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86/speculation: Add missing prototype for unpriv_ebpf_notify()
  2022-04-26 23:36   ` Alexei Starovoitov
@ 2022-04-28  9:12     ` Borislav Petkov
  0 siblings, 0 replies; 5+ messages in thread
From: Borislav Petkov @ 2022-04-28  9:12 UTC (permalink / raw)
  To: Alexei Starovoitov
  Cc: Daniel Borkmann, Andrii Nakryiko, Josh Poimboeuf, bpf, X86 ML,
	LKML, Thomas Gleixner, kernel test robot

On Tue, Apr 26, 2022 at 04:36:08PM -0700, Alexei Starovoitov wrote:
> I don't remember seeing the original patch on the bpf list.
> I'm guessing it was done in private as part of bhb series?

Yap.

> Feel free to land it via tip.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [tip: x86/cpu] x86/speculation: Add missing prototype for unpriv_ebpf_notify()
  2022-04-25 23:40 [PATCH] x86/speculation: Add missing prototype for unpriv_ebpf_notify() Josh Poimboeuf
  2022-04-26  8:46 ` Borislav Petkov
@ 2022-04-28  9:50 ` tip-bot2 for Josh Poimboeuf
  1 sibling, 0 replies; 5+ messages in thread
From: tip-bot2 for Josh Poimboeuf @ 2022-04-28  9:50 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: kernel test robot, Josh Poimboeuf, Borislav Petkov, x86, linux-kernel

The following commit has been merged into the x86/cpu branch of tip:

Commit-ID:     2147c438fde135d6c145a96e373d9348e7076f7f
Gitweb:        https://git.kernel.org/tip/2147c438fde135d6c145a96e373d9348e7076f7f
Author:        Josh Poimboeuf <jpoimboe@redhat.com>
AuthorDate:    Mon, 25 Apr 2022 16:40:02 -07:00
Committer:     Borislav Petkov <bp@suse.de>
CommitterDate: Thu, 28 Apr 2022 11:12:17 +02:00

x86/speculation: Add missing prototype for unpriv_ebpf_notify()

Fix the following warnings seen with "make W=1":

  kernel/sysctl.c:183:13: warning: no previous prototype for ‘unpriv_ebpf_notify’ [-Wmissing-prototypes]
    183 | void __weak unpriv_ebpf_notify(int new_state)
        |             ^~~~~~~~~~~~~~~~~~

  arch/x86/kernel/cpu/bugs.c:659:6: warning: no previous prototype for ‘unpriv_ebpf_notify’ [-Wmissing-prototypes]
    659 | void unpriv_ebpf_notify(int new_state)
        |      ^~~~~~~~~~~~~~~~~~

Fixes: 44a3918c8245 ("x86/speculation: Include unprivileged eBPF status in Spectre v2 mitigation reporting")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/5689d065f739602ececaee1e05e68b8644009608.1650930000.git.jpoimboe@redhat.com
---
 include/linux/bpf.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index bdb5298..ecc3d3e 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -2085,6 +2085,8 @@ void bpf_offload_dev_netdev_unregister(struct bpf_offload_dev *offdev,
 				       struct net_device *netdev);
 bool bpf_offload_dev_match(struct bpf_prog *prog, struct net_device *netdev);
 
+void unpriv_ebpf_notify(int new_state);
+
 #if defined(CONFIG_NET) && defined(CONFIG_BPF_SYSCALL)
 int bpf_prog_offload_init(struct bpf_prog *prog, union bpf_attr *attr);
 

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-04-28 10:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-25 23:40 [PATCH] x86/speculation: Add missing prototype for unpriv_ebpf_notify() Josh Poimboeuf
2022-04-26  8:46 ` Borislav Petkov
2022-04-26 23:36   ` Alexei Starovoitov
2022-04-28  9:12     ` Borislav Petkov
2022-04-28  9:50 ` [tip: x86/cpu] " tip-bot2 for Josh Poimboeuf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).