From: Joel Fernandes <joel@joelfernandes.org>
To: James Morris <jmorris@namei.org>
Cc: linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
rostedt@goodmis.org, primiano@google.com, rsavitski@google.com,
jeffv@google.com, kernel-team@android.com,
Alexei Starovoitov <ast@kernel.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
bpf@vger.kernel.org, Daniel Borkmann <daniel@iogearbox.net>,
Ingo Molnar <mingo@redhat.com>, Jiri Olsa <jolsa@redhat.com>,
Kees Cook <keescook@chromium.org>,
linux-security-module@vger.kernel.org,
Matthew Garrett <matthewgarrett@google.com>,
Namhyung Kim <namhyung@kernel.org>,
selinux@vger.kernel.org, Song Liu <songliubraving@fb.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<x86@kernel.org>, Yonghong Song <yhs@fb.com>
Subject: Re: [PATCH RFC] perf_event: Add support for LSM and SELinux checks
Date: Wed, 9 Oct 2019 20:43:53 -0400 [thread overview]
Message-ID: <20191010004353.GD96813@google.com> (raw)
In-Reply-To: <alpine.LRH.2.21.1910100908260.29840@namei.org>
On Thu, Oct 10, 2019 at 09:11:39AM +1100, James Morris wrote:
> On Wed, 9 Oct 2019, Joel Fernandes (Google) wrote:
>
> >
> > +#ifdef CONFIG_SECURITY
> > + err = security_perf_event_alloc(event);
> > + if (err)
> > + goto err_security;
> > +#endif
>
> You should not need this ifdef.
Fixed.
> > diff --git a/security/security.c b/security/security.c
> > index 1bc000f834e2..7639bca1db59 100644
> > --- a/security/security.c
> > +++ b/security/security.c
> > @@ -2373,26 +2373,32 @@ int security_bpf(int cmd, union bpf_attr *attr, unsigned int size)
> > {
> > return call_int_hook(bpf, 0, cmd, attr, size);
> > }
> > +
> > int security_bpf_map(struct bpf_map *map, fmode_t fmode)
> > {
> > return call_int_hook(bpf_map, 0, map, fmode);
> > }
> > +
> > int security_bpf_prog(struct bpf_prog *prog)
> > {
> > return call_int_hook(bpf_prog, 0, prog);
> > }
> > +
> > int security_bpf_map_alloc(struct bpf_map *map)
> > {
> > return call_int_hook(bpf_map_alloc_security, 0, map);
> > }
> > +
> > int security_bpf_prog_alloc(struct bpf_prog_aux *aux)
> > {
> > return call_int_hook(bpf_prog_alloc_security, 0, aux);
> > }
> > +
> > void security_bpf_map_free(struct bpf_map *map)
> > {
> > call_void_hook(bpf_map_free_security, map);
> > }
> > +
> > void security_bpf_prog_free(struct bpf_prog_aux *aux)
> > {
> > call_void_hook(bpf_prog_free_security, aux);
> > @@ -2404,3 +2410,30 @@ int security_locked_down(enum lockdown_reason what)
> > return call_int_hook(locked_down, 0, what);
> > }
> > EXPORT_SYMBOL(security_locked_down);
>
> Please avoid unrelated whitespace changes.
The author of the BPF security hooks forgot to add a newline between function
definitions and I was just cleaning the style issue since it is very close to
the parts I touched. But I will drop it from the patch per your suggestion.
thanks,
- Joel
next prev parent reply other threads:[~2019-10-10 0:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-09 20:36 [PATCH RFC] perf_event: Add support for LSM and SELinux checks Joel Fernandes (Google)
2019-10-09 21:55 ` Casey Schaufler
2019-10-09 22:14 ` James Morris
2019-10-09 22:41 ` Casey Schaufler
2019-10-10 0:40 ` Joel Fernandes
2019-10-10 0:53 ` Casey Schaufler
2019-10-10 2:44 ` James Morris
2019-10-10 18:12 ` Casey Schaufler
2019-10-10 19:41 ` James Morris
2019-10-09 22:11 ` James Morris
2019-10-10 0:43 ` Joel Fernandes [this message]
2019-10-10 7:23 ` Alexey Budankov
2019-10-10 8:12 ` Peter Zijlstra
2019-10-10 15:13 ` Joel Fernandes
2019-10-10 17:09 ` Peter Zijlstra
2019-10-10 18:31 ` Joel Fernandes
2019-10-11 7:05 ` Peter Zijlstra
2019-10-11 15:47 ` Joel Fernandes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191010004353.GD96813@google.com \
--to=joel@joelfernandes.org \
--cc=acme@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=jeffv@google.com \
--cc=jmorris@namei.org \
--cc=jolsa@redhat.com \
--cc=keescook@chromium.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=matthewgarrett@google.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=primiano@google.com \
--cc=rostedt@goodmis.org \
--cc=rsavitski@google.com \
--cc=selinux@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=x86@kernel.org \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).