Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1560612
| From | Paul Moore <paul@paul-moore.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V2] audit: log 32-bit socketcalls |
| Date | 2017-01-17 15:10 +0100 |
| Message-ID | <t0CCu-84W-29@gated-at.bofh.it> (permalink) |
| References | <sZ6Or-7I1-33@gated-at.bofh.it> <sZbl0-23t-35@gated-at.bofh.it> <t0lLk-5zl-7@gated-at.bofh.it> <t0t6a-1IC-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Jan 16, 2017 at 10:53 PM, Richard Guy Briggs <rgb@redhat.com> wrote:
> On 2017-01-16 15:04, Paul Moore wrote:
>> On Fri, Jan 13, 2017 at 9:42 AM, Eric Paris <eparis@redhat.com> wrote:
>> > On Fri, 2017-01-13 at 04:51 -0500, Richard Guy Briggs wrote:
>> >> diff --git a/include/linux/audit.h b/include/linux/audit.h
>> >> index 9d4443f..43d8003 100644
>> >> --- a/include/linux/audit.h
>> >> +++ b/include/linux/audit.h
>> >> @@ -387,6 +387,18 @@ static inline int audit_socketcall(int nargs,
>> >> unsigned long *args)
>> >> return __audit_socketcall(nargs, args);
>> >> return 0;
>> >> }
>> >> +static inline int audit_socketcall_compat(int nargs, u32 *args)
>> >> +{
>> >> + if (unlikely(!audit_dummy_context())) {
>> >
>> > I've always hated these likely/unlikely. Mostly because I think they
>> > are so often wrong. I believe this says that you compiled audit in but
>> > you expect it to be explicitly disabled. While that is (recently) true
>> > in Fedora I highly doubt that's true on the vast majority of systems
>> > that have audit compiled in.
>>
>> Richard and I have talked about the likely/unlikely optimization
>> before and I know Richard likes to use them, but I don't for the
>> reasons Eric has already mentioned. Richard, since you're respinning
>> the patch, go ahead and yank out the unlikely() call.
>
> I don't "like to use them". I'm simply following the use and style of
> existing code and the arguments of others in places of critical
> performance.
Okay that's a reasonable reason for why you continued the tradition,
however I'm asking you (for the second time now) not to use it in
audit_socketcall_compat().
> If I "fix" that one, then I would feel compelled to yank
> out the one in the function immediately above, audit_socketcall() for
> consistency to ease my conscience. Eric conceded that argument.
I'll be very clear on what I want to see in this patch: don't use
likely/unlikely in audit_socketcall_compat() and don't touch it's use
in the other functions at this point in time.
--
paul moore
www.paul-moore.com
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH V2] audit: log 32-bit socketcalls Paul Moore <paul@paul-moore.com> - 2017-01-16 21:10 +0100
Re: [PATCH V2] audit: log 32-bit socketcalls Richard Guy Briggs <rgb@redhat.com> - 2017-01-17 05:00 +0100
Re: [PATCH V2] audit: log 32-bit socketcalls Paul Moore <paul@paul-moore.com> - 2017-01-17 15:10 +0100
csiph-web