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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'audit-pr-20250725' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit

Pull audit update from Paul Moore:
"A single audit patch that restores logging of an audit event in the
module load failure case"

* tag 'audit-pr-20250725' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit:
audit,module: restore audit logging in load failure case

+10 -9
+4 -5
include/linux/audit.h
··· 417 417 extern void __audit_log_capset(const struct cred *new, const struct cred *old); 418 418 extern void __audit_mmap_fd(int fd, int flags); 419 419 extern void __audit_openat2_how(struct open_how *how); 420 - extern void __audit_log_kern_module(char *name); 420 + extern void __audit_log_kern_module(const char *name); 421 421 extern void __audit_fanotify(u32 response, struct fanotify_response_info_audit_rule *friar); 422 422 extern void __audit_tk_injoffset(struct timespec64 offset); 423 423 extern void __audit_ntp_log(const struct audit_ntp_data *ad); ··· 519 519 __audit_openat2_how(how); 520 520 } 521 521 522 - static inline void audit_log_kern_module(char *name) 522 + static inline void audit_log_kern_module(const char *name) 523 523 { 524 524 if (!audit_dummy_context()) 525 525 __audit_log_kern_module(name); ··· 677 677 static inline void audit_openat2_how(struct open_how *how) 678 678 { } 679 679 680 - static inline void audit_log_kern_module(char *name) 681 - { 682 - } 680 + static inline void audit_log_kern_module(const char *name) 681 + { } 683 682 684 683 static inline void audit_fanotify(u32 response, struct fanotify_response_info_audit_rule *friar) 685 684 { }
+1 -1
kernel/audit.h
··· 200 200 int argc; 201 201 } execve; 202 202 struct { 203 - char *name; 203 + const char *name; 204 204 } module; 205 205 struct { 206 206 struct audit_ntp_data ntp_data;
+1 -1
kernel/auditsc.c
··· 2864 2864 context->type = AUDIT_OPENAT2; 2865 2865 } 2866 2866 2867 - void __audit_log_kern_module(char *name) 2867 + void __audit_log_kern_module(const char *name) 2868 2868 { 2869 2869 struct audit_context *context = audit_context(); 2870 2870
+4 -2
kernel/module/main.c
··· 3373 3373 3374 3374 module_allocated = true; 3375 3375 3376 - audit_log_kern_module(mod->name); 3376 + audit_log_kern_module(info->name); 3377 3377 3378 3378 /* Reserve our place in the list. */ 3379 3379 err = add_unformed_module(mod); ··· 3537 3537 * failures once the proper module was allocated and 3538 3538 * before that. 3539 3539 */ 3540 - if (!module_allocated) 3540 + if (!module_allocated) { 3541 + audit_log_kern_module(info->name ? info->name : "?"); 3541 3542 mod_stat_bump_becoming(info, flags); 3543 + } 3542 3544 free_copy(info, flags); 3543 3545 return err; 3544 3546 }