Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'upstream' of git://git.infradead.org/users/pcmoore/audit

Pull audit updates from Paul Moore:
"Two small patches from the audit next branch; only one of which has
any real significant code changes, the other is simply a MAINTAINERS
update for audit.

The single code patch is pretty small and rather straightforward, it
changes the audit "version" number reported to userspace from an
integer to a bitmap which is used to indicate the functionality of the
running kernel. This really doesn't have much impact on the kernel,
but it will make life easier for the audit userspace folks.

Thankfully we were still on a version number which allowed us to do
this without breaking userspace"

* 'upstream' of git://git.infradead.org/users/pcmoore/audit:
audit: convert status version to a feature bitmap
audit: add Paul Moore to the MAINTAINERS entry

+17 -7
+3 -2
MAINTAINERS
··· 1801 1801 F: drivers/scsi/esas2r 1802 1802 1803 1803 AUDIT SUBSYSTEM 1804 + M: Paul Moore <paul@paul-moore.com> 1804 1805 M: Eric Paris <eparis@redhat.com> 1805 - L: linux-audit@redhat.com (subscribers-only) 1806 + L: linux-audit@redhat.com (moderated for non-subscribers) 1806 1807 W: http://people.redhat.com/sgrubb/audit/ 1807 - T: git git://git.infradead.org/users/eparis/audit.git 1808 + T: git git://git.infradead.org/users/pcmoore/audit 1808 1809 S: Maintained 1809 1810 F: include/linux/audit.h 1810 1811 F: include/uapi/linux/audit.h
+13 -4
include/uapi/linux/audit.h
··· 322 322 #define AUDIT_STATUS_BACKLOG_LIMIT 0x0010 323 323 #define AUDIT_STATUS_BACKLOG_WAIT_TIME 0x0020 324 324 325 - #define AUDIT_VERSION_BACKLOG_LIMIT 1 326 - #define AUDIT_VERSION_BACKLOG_WAIT_TIME 2 327 - #define AUDIT_VERSION_LATEST AUDIT_VERSION_BACKLOG_WAIT_TIME 325 + #define AUDIT_FEATURE_BITMAP_BACKLOG_LIMIT 0x00000001 326 + #define AUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME 0x00000002 327 + #define AUDIT_FEATURE_BITMAP_ALL (AUDIT_FEATURE_BITMAP_BACKLOG_LIMIT | \ 328 + AUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME) 329 + 330 + /* deprecated: AUDIT_VERSION_* */ 331 + #define AUDIT_VERSION_LATEST AUDIT_FEATURE_BITMAP_ALL 332 + #define AUDIT_VERSION_BACKLOG_LIMIT AUDIT_FEATURE_BITMAP_BACKLOG_LIMIT 333 + #define AUDIT_VERSION_BACKLOG_WAIT_TIME AUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME 328 334 329 335 /* Failure-to-log actions */ 330 336 #define AUDIT_FAIL_SILENT 0 ··· 410 404 __u32 backlog_limit; /* waiting messages limit */ 411 405 __u32 lost; /* messages lost */ 412 406 __u32 backlog; /* messages waiting in queue */ 413 - __u32 version; /* audit api version number */ 407 + union { 408 + __u32 version; /* deprecated: audit api version num */ 409 + __u32 feature_bitmap; /* bitmap of kernel audit features */ 410 + }; 414 411 __u32 backlog_wait_time;/* message queue wait timeout */ 415 412 }; 416 413
+1 -1
kernel/audit.c
··· 833 833 s.backlog_limit = audit_backlog_limit; 834 834 s.lost = atomic_read(&audit_lost); 835 835 s.backlog = skb_queue_len(&audit_skb_queue); 836 - s.version = AUDIT_VERSION_LATEST; 836 + s.feature_bitmap = AUDIT_FEATURE_BITMAP_ALL; 837 837 s.backlog_wait_time = audit_backlog_wait_time; 838 838 audit_send_reply(skb, seq, AUDIT_GET, 0, 0, &s, sizeof(s)); 839 839 break;