* [PATCH] bpf: constify bpf_verifier_ops structure
@ 2015-12-11 17:35 Julia Lawall
2015-12-11 18:12 ` Steven Rostedt
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Julia Lawall @ 2015-12-11 17:35 UTC (permalink / raw)
To: Steven Rostedt; +Cc: kernel-janitors, Ingo Molnar, linux-kernel
This bpf_verifier_ops structure is never modified, like the other
bpf_verifier_ops structures, so declare it as const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
kernel/trace/bpf_trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
index 4228fd3..45dd798 100644
--- a/kernel/trace/bpf_trace.c
+++ b/kernel/trace/bpf_trace.c
@@ -316,7 +316,7 @@ static bool kprobe_prog_is_valid_access(int off, int size, enum bpf_access_type
return true;
}
-static struct bpf_verifier_ops kprobe_prog_ops = {
+static const struct bpf_verifier_ops kprobe_prog_ops = {
.get_func_proto = kprobe_prog_func_proto,
.is_valid_access = kprobe_prog_is_valid_access,
};
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] bpf: constify bpf_verifier_ops structure
2015-12-11 17:35 [PATCH] bpf: constify bpf_verifier_ops structure Julia Lawall
@ 2015-12-11 18:12 ` Steven Rostedt
2015-12-11 18:19 ` Alexei Starovoitov
2015-12-11 18:18 ` Daniel Borkmann
2015-12-11 18:18 ` Alexei Starovoitov
2 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2015-12-11 18:12 UTC (permalink / raw)
To: Julia Lawall; +Cc: kernel-janitors, Ingo Molnar, linux-kernel
On Fri, 11 Dec 2015 18:35:59 +0100
Julia Lawall <Julia.Lawall@lip6.fr> wrote:
> This bpf_verifier_ops structure is never modified, like the other
> bpf_verifier_ops structures, so declare it as const.
>
> Done with the help of Coccinelle.
Thanks, I'll add this to my 4.5 queue.
-- Steve
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> ---
> kernel/trace/bpf_trace.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
> index 4228fd3..45dd798 100644
> --- a/kernel/trace/bpf_trace.c
> +++ b/kernel/trace/bpf_trace.c
> @@ -316,7 +316,7 @@ static bool kprobe_prog_is_valid_access(int off, int size, enum bpf_access_type
> return true;
> }
>
> -static struct bpf_verifier_ops kprobe_prog_ops = {
> +static const struct bpf_verifier_ops kprobe_prog_ops = {
> .get_func_proto = kprobe_prog_func_proto,
> .is_valid_access = kprobe_prog_is_valid_access,
> };
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] bpf: constify bpf_verifier_ops structure
2015-12-11 18:12 ` Steven Rostedt
@ 2015-12-11 18:19 ` Alexei Starovoitov
0 siblings, 0 replies; 5+ messages in thread
From: Alexei Starovoitov @ 2015-12-11 18:19 UTC (permalink / raw)
To: Steven Rostedt; +Cc: Julia Lawall, kernel-janitors, Ingo Molnar, linux-kernel
On Fri, Dec 11, 2015 at 01:12:56PM -0500, Steven Rostedt wrote:
> On Fri, 11 Dec 2015 18:35:59 +0100
> Julia Lawall <Julia.Lawall@lip6.fr> wrote:
>
> > This bpf_verifier_ops structure is never modified, like the other
> > bpf_verifier_ops structures, so declare it as const.
> >
> > Done with the help of Coccinelle.
>
> Thanks, I'll add this to my 4.5 queue.
emails crossed. this is also fine with me.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] bpf: constify bpf_verifier_ops structure
2015-12-11 17:35 [PATCH] bpf: constify bpf_verifier_ops structure Julia Lawall
2015-12-11 18:12 ` Steven Rostedt
@ 2015-12-11 18:18 ` Daniel Borkmann
2015-12-11 18:18 ` Alexei Starovoitov
2 siblings, 0 replies; 5+ messages in thread
From: Daniel Borkmann @ 2015-12-11 18:18 UTC (permalink / raw)
To: Julia Lawall, Steven Rostedt; +Cc: kernel-janitors, Ingo Molnar, linux-kernel
On 12/11/2015 06:35 PM, Julia Lawall wrote:
> This bpf_verifier_ops structure is never modified, like the other
> bpf_verifier_ops structures, so declare it as const.
>
> Done with the help of Coccinelle.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Thanks Julia!
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] bpf: constify bpf_verifier_ops structure
2015-12-11 17:35 [PATCH] bpf: constify bpf_verifier_ops structure Julia Lawall
2015-12-11 18:12 ` Steven Rostedt
2015-12-11 18:18 ` Daniel Borkmann
@ 2015-12-11 18:18 ` Alexei Starovoitov
2 siblings, 0 replies; 5+ messages in thread
From: Alexei Starovoitov @ 2015-12-11 18:18 UTC (permalink / raw)
To: Julia Lawall; +Cc: Steven Rostedt, kernel-janitors, Ingo Molnar, linux-kernel
On Fri, Dec 11, 2015 at 06:35:59PM +0100, Julia Lawall wrote:
> This bpf_verifier_ops structure is never modified, like the other
> bpf_verifier_ops structures, so declare it as const.
>
> Done with the help of Coccinelle.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Ingo, can you take it into tip ? Thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-12-11 18:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-11 17:35 [PATCH] bpf: constify bpf_verifier_ops structure Julia Lawall
2015-12-11 18:12 ` Steven Rostedt
2015-12-11 18:19 ` Alexei Starovoitov
2015-12-11 18:18 ` Daniel Borkmann
2015-12-11 18:18 ` Alexei Starovoitov
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).