public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH net-next] security: bpf: replace include of linux/bpf.h with forward declarations
@ 2017-11-01 18:48 Jakub Kicinski
  2017-11-01 18:50 ` Alexei Starovoitov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jakub Kicinski @ 2017-11-01 18:48 UTC (permalink / raw)
  To: netdev; +Cc: oss-drivers, alexei.starovoitov, daniel, Chenbo Feng,
	Jakub Kicinski

Touching linux/bpf.h makes us rebuild a surprisingly large
portion of the kernel.  Remove the unnecessary dependency
from security.h, it only needs forward declarations.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome•com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome•com>
---
 include/linux/security.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/linux/security.h b/include/linux/security.h
index 18800b0911e5..73f1ef625d40 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -31,7 +31,6 @@
 #include <linux/string.h>
 #include <linux/mm.h>
 #include <linux/fs.h>
-#include <linux/bpf.h>
 
 struct linux_binprm;
 struct cred;
@@ -1732,6 +1731,10 @@ static inline void securityfs_remove(struct dentry *dentry)
 #endif
 
 #ifdef CONFIG_BPF_SYSCALL
+union bpf_attr;
+struct bpf_map;
+struct bpf_prog;
+struct bpf_prog_aux;
 #ifdef CONFIG_SECURITY
 extern int security_bpf(int cmd, union bpf_attr *attr, unsigned int size);
 extern int security_bpf_map(struct bpf_map *map, fmode_t fmode);
-- 
2.14.1

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

* Re: [PATCH net-next] security: bpf: replace include of linux/bpf.h with forward declarations
  2017-11-01 18:48 [PATCH net-next] security: bpf: replace include of linux/bpf.h with forward declarations Jakub Kicinski
@ 2017-11-01 18:50 ` Alexei Starovoitov
  2017-11-01 20:28 ` Daniel Borkmann
  2017-11-02  7:50 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Alexei Starovoitov @ 2017-11-01 18:50 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: netdev, oss-drivers, daniel, Chenbo Feng

On Wed, Nov 01, 2017 at 11:48:00AM -0700, Jakub Kicinski wrote:
> Touching linux/bpf.h makes us rebuild a surprisingly large
> portion of the kernel.  Remove the unnecessary dependency
> from security.h, it only needs forward declarations.
> 
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome•com>
> Reviewed-by: Quentin Monnet <quentin.monnet@netronome•com>

Acked-by: Alexei Starovoitov <ast@kernel•org>

thanks for fixing! I noticed larger rebuilds as well.

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

* Re: [PATCH net-next] security: bpf: replace include of linux/bpf.h with forward declarations
  2017-11-01 18:48 [PATCH net-next] security: bpf: replace include of linux/bpf.h with forward declarations Jakub Kicinski
  2017-11-01 18:50 ` Alexei Starovoitov
@ 2017-11-01 20:28 ` Daniel Borkmann
  2017-11-02  7:50 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Daniel Borkmann @ 2017-11-01 20:28 UTC (permalink / raw)
  To: Jakub Kicinski, netdev; +Cc: oss-drivers, alexei.starovoitov, Chenbo Feng

On 11/01/2017 07:48 PM, Jakub Kicinski wrote:
> Touching linux/bpf.h makes us rebuild a surprisingly large
> portion of the kernel.  Remove the unnecessary dependency
> from security.h, it only needs forward declarations.
>
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome•com>
> Reviewed-by: Quentin Monnet <quentin.monnet@netronome•com>

Acked-by: Daniel Borkmann <daniel@iogearbox•net>

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

* Re: [PATCH net-next] security: bpf: replace include of linux/bpf.h with forward declarations
  2017-11-01 18:48 [PATCH net-next] security: bpf: replace include of linux/bpf.h with forward declarations Jakub Kicinski
  2017-11-01 18:50 ` Alexei Starovoitov
  2017-11-01 20:28 ` Daniel Borkmann
@ 2017-11-02  7:50 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-11-02  7:50 UTC (permalink / raw)
  To: jakub.kicinski; +Cc: netdev, oss-drivers, alexei.starovoitov, daniel, fengc

From: Jakub Kicinski <jakub.kicinski@netronome•com>
Date: Wed,  1 Nov 2017 11:48:00 -0700

> Touching linux/bpf.h makes us rebuild a surprisingly large
> portion of the kernel.  Remove the unnecessary dependency
> from security.h, it only needs forward declarations.
> 
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome•com>
> Reviewed-by: Quentin Monnet <quentin.monnet@netronome•com>

Applied.

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

end of thread, other threads:[~2017-11-02  7:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-01 18:48 [PATCH net-next] security: bpf: replace include of linux/bpf.h with forward declarations Jakub Kicinski
2017-11-01 18:50 ` Alexei Starovoitov
2017-11-01 20:28 ` Daniel Borkmann
2017-11-02  7:50 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox