[PATCH] Fix 100% CPU usage (again) due to log rotate

2019-10-25 Thread Steven Rostedt (VMware)
If the num_logs is set to 0 and keep_logs is set, we go back into a loop of MAX_INT! in rotate_logs(). commit 9145e97c ("Do not rotate logs when num_logs < 2.") fixed the issue with not going further if num_logs is less than 2, because if num_logs is zero, we trigger this bug because of the loop:

Re: [PATCH ghak90 V7 05/21] audit: log drop of contid on exit of last task

2019-10-25 Thread Richard Guy Briggs
On 2019-10-10 20:38, Paul Moore wrote: > On Wed, Sep 18, 2019 at 9:24 PM Richard Guy Briggs wrote: > > Since we are tracking the life of each audit container indentifier, we > > can match the creation event with the destruction event. Log the > > destruction of the audit container identifier when

Re: [PATCH ghak90 V7 06/21] audit: contid limit of 32k imposed to avoid DoS

2019-10-25 Thread Richard Guy Briggs
On 2019-09-27 08:51, Neil Horman wrote: > On Wed, Sep 18, 2019 at 09:22:23PM -0400, Richard Guy Briggs wrote: > > Set an arbitrary limit on the number of audit container identifiers to > > limit abuse. > > > > Signed-off-by: Richard Guy Briggs > > --- > > kernel/audit.c | 8 > > kernel/

Re: [PATCH ghak90 V7 04/21] audit: convert to contid list to check for orch/engine ownership

2019-10-25 Thread Richard Guy Briggs
On 2019-10-10 20:38, Paul Moore wrote: > On Wed, Sep 18, 2019 at 9:24 PM Richard Guy Briggs wrote: > > Store the audit container identifier in a refcounted kernel object that > > is added to the master list of audit container identifiers. This will > > allow multiple container orchestrators/engin

Re: [PATCH ghak90 V7 04/21] audit: convert to contid list to check for orch/engine ownership

2019-10-25 Thread Richard Guy Briggs
On 2019-09-26 10:46, Neil Horman wrote: > On Wed, Sep 18, 2019 at 09:22:21PM -0400, Richard Guy Briggs wrote: > > Store the audit container identifier in a refcounted kernel object that > > is added to the master list of audit container identifiers. This will > > allow multiple container orchestra

Re: [PATCH ghak90 V7 08/21] audit: add contid support for signalling the audit daemon

2019-10-25 Thread Richard Guy Briggs
On 2019-10-10 20:39, Paul Moore wrote: > On Wed, Sep 18, 2019 at 9:25 PM Richard Guy Briggs wrote: > > Add audit container identifier support to the action of signalling the > > audit daemon. > > > > Since this would need to add an element to the audit_sig_info struct, > > a new record type AUDIT_

Re: [PATCH] audit: remove redundant condition check in kauditd_thread()

2019-10-25 Thread Paul Moore
On Fri, Oct 25, 2019 at 3:14 AM Yunfeng Ye wrote: > On 2019/10/25 13:43, Paul Moore wrote: > > On October 23, 2019 3:27:50 PM Yunfeng Ye wrote: > >> Warning is found by the code analysis tool: > >> "the condition 'if(ac && rc < 0)' is redundant: ac" > >> > >> > >> The @ac variable has been check

Re: [Kgdb-bugreport] [PATCH] kernel: convert switch/case fallthrough comments to fallthrough;

2019-10-25 Thread Joe Perches
On Mon, 2019-10-21 at 10:09 +0100, Daniel Thompson wrote: > On Fri, Oct 18, 2019 at 09:35:08AM -0700, Joe Perches wrote: > > Use the new pseudo keyword "fallthrough;" and not the > > various /* fallthrough */ style comments. > > > > Signed-off-by: Joe Perches > > --- > > > > This is a single pat

Re: [Kgdb-bugreport] [PATCH] kernel: convert switch/case fallthrough comments to fallthrough;

2019-10-25 Thread Jens Axboe
On 10/23/19 12:49 PM, Joe Perches wrote: > On Mon, 2019-10-21 at 10:09 +0100, Daniel Thompson wrote: >> On Fri, Oct 18, 2019 at 09:35:08AM -0700, Joe Perches wrote: >>> Use the new pseudo keyword "fallthrough;" and not the >>> various /* fallthrough */ style comments. >>> >>> Signed-off-by: Joe Per

Re: [PATCH] audit: remove redundant condition check in kauditd_thread()

2019-10-25 Thread Yunfeng Ye
On 2019/10/25 13:43, Paul Moore wrote: > On October 23, 2019 3:27:50 PM Yunfeng Ye wrote: >> Warning is found by the code analysis tool: >> "the condition 'if(ac && rc < 0)' is redundant: ac" >> >> >> The @ac variable has been checked before. It can't be a null pointer >> here, so remove the r

[PATCH] audit: remove redundant condition check in kauditd_thread()

2019-10-25 Thread Yunfeng Ye
Warning is found by the code analysis tool: "the condition 'if(ac && rc < 0)' is redundant: ac" The @ac variable has been checked before. It can't be a null pointer here, so remove the redundant condition check. Signed-off-by: Yunfeng Ye --- kernel/audit.c | 4 ++-- 1 file changed, 2 insertio