* [PATCH] Dropped audit_log_abend()
@ 2013-11-08 4:27 Paul Davies C
2013-11-08 15:44 ` Eric Paris
0 siblings, 1 reply; 3+ messages in thread
From: Paul Davies C @ 2013-11-08 4:27 UTC (permalink / raw)
To: linux-audit, eparis, viro, sgrubb
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 <pauldaviesc@gmail.com>
---
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);
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] Dropped audit_log_abend()
2013-11-08 4:27 [PATCH] Dropped audit_log_abend() Paul Davies C
@ 2013-11-08 15:44 ` Eric Paris
2013-11-11 18:51 ` Richard Guy Briggs
0 siblings, 1 reply; 3+ messages in thread
From: Eric Paris @ 2013-11-08 15:44 UTC (permalink / raw)
To: Paul Davies C; +Cc: rgb, linux-audit, viro
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 <pauldaviesc@gmail.com>
Acked-by: Eric Paris <eparis@redhat.com>
> ---
> 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);
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] Dropped audit_log_abend()
2013-11-08 15:44 ` Eric Paris
@ 2013-11-11 18:51 ` Richard Guy Briggs
0 siblings, 0 replies; 3+ messages in thread
From: Richard Guy Briggs @ 2013-11-11 18:51 UTC (permalink / raw)
To: Eric Paris; +Cc: linux-audit
On Fri, Nov 08, 2013 at 10:44:53AM -0500, Eric Paris wrote:
> 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 <pauldaviesc@gmail.com>
>
> Acked-by: Eric Paris <eparis@redhat.com>
Looks fine to me. I'll queue it.
> > ---
> > 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);
> > }
> >
- RGB
--
Richard Guy Briggs <rbriggs@redhat.com>
Senior Software Engineer, Kernel Security, AMER ENG Base Operating Systems, Red Hat
Remote, Ottawa, Canada
Voice: +1.647.777.2635, Internal: (81) 32635, Alt: +1.613.693.0684x3545
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-11-11 18:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-08 4:27 [PATCH] Dropped audit_log_abend() Paul Davies C
2013-11-08 15:44 ` Eric Paris
2013-11-11 18:51 ` Richard Guy Briggs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox