From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Paris Subject: Re: [PATCH] Dropped audit_log_abend() Date: Fri, 08 Nov 2013 10:44:53 -0500 Message-ID: <1383925493.2247.0.camel@flatline.rdu.redhat.com> References: <20131108042739.GA3531@pauldc-Inspiron-1470> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20131108042739.GA3531@pauldc-Inspiron-1470> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: Paul Davies C Cc: rgb@redhat.com, linux-audit@redhat.com, viro@zeniv.linux.org.uk List-Id: linux-audit@redhat.com On Fri, 2013-11-08 at 09:57 +0530, Paul Davies C wrote: > The audit_log_abend() is used only by the audit_core_dumps(). Thus there is no > need of maintaining the audit_log_abend() as a separate function. > > This patch drops the audit_log_abend() and pushes its functionalities back to > the audit_core_dumps(). Apart from that the "reason" field is also dropped > from being logged since the reason can be deduced from the signal number. > > Signed-off-by: Paul Davies C Acked-by: Eric Paris > --- > kernel/auditsc.c | 10 ++-------- > 1 file changed, 2 insertions(+), 8 deletions(-) > > diff --git a/kernel/auditsc.c b/kernel/auditsc.c > index 9845cb3..f2aa62a 100644 > --- a/kernel/auditsc.c > +++ b/kernel/auditsc.c > @@ -2368,13 +2368,6 @@ static void audit_log_task(struct audit_buffer *ab) > audit_log_untrustedstring(ab, current->comm); > } > > -static void audit_log_abend(struct audit_buffer *ab, char *reason, long signr) > -{ > - audit_log_task(ab); > - audit_log_format(ab, " reason="); > - audit_log_string(ab, reason); > - audit_log_format(ab, " sig=%ld", signr); > -} > /** > * audit_core_dumps - record information about processes that end abnormally > * @signr: signal value > @@ -2395,7 +2388,8 @@ void audit_core_dumps(long signr) > ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_ANOM_ABEND); > if (unlikely(!ab)) > return; > - audit_log_abend(ab, "memory violation", signr); > + audit_log_task(ab); > + audit_log_format(ab, " sig=%ld", signr); > audit_log_end(ab); > } >