Skip to content

audit boot parameter cleanups

Greg Edwards linux-audit 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2audit: move processing of "audit" boot param to audit_init()kernel/audit.c+31 -1710 replies
2/2audit: add "on"/"off" as valid boot parameter valuesDocumentation/admin-guide/kernel-parameters.txt kernel/audit.c+12 -110 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] audit boot parameter cleanups

One of our CI tests was booting upstream kernels with the "audit=off" kernel parameter. This was our error; it should have been "audit=0". However, in 4.15 the verification of the boot parameter got more strict in 80ab4df62706 ("audit: don't use simple_strtol() anymore"), and our errant boot parameter value starting panic'ing the system.

The problem is this happens so early in boot, the console isn't initialized yet and you don't see the panic message. You have no idea what the problem is unless you add an "earlyprintk" boot option, e.g. earlyprintk=serial,ttyS0,115200n8.

Fix this by having the boot parameter setup function just save the boot parameter value, and process it later from a call in audit_init(). The console is initialized by this point, and you can see any panic messages without having to use an earlyprintk option.

Additionally, add "on" and "off" as valid audit boot parameter values.

Greg Edwards (2):
audit: move processing of "audit" boot param to audit_init()
audit: add "on"/"off" as valid boot parameter values

 Documentation/admin-guide/kernel-parameters.txt | 14 +++----
 kernel/audit.c                                  | 49 ++++++++++++++++---------
 2 files changed, 39 insertions(+), 24 deletions(-)
Signature · 1 line
2.14.3