Linux Security Modules development
 help / color / mirror / Atom feed
* [PATCH v1 1/2] Add release hook to LSM
@ 2023-03-10 19:42 Mirsad Goran Todorovac
  2023-03-10 19:47 ` Andy Shevchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Mirsad Goran Todorovac @ 2023-03-10 19:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-integrity, linux-security-module, Greg Kroah-Hartman,
	Andy Shevchenko, Mimi Zohar, Thomas Weißschuh, Paul Moore,
	Casey Schaufler, Christian Göttsche,
	Mickaël Salaün, Frederick Lawler


Add release() hook to the definition of the LSM modules, to enable calling
destructors and deallocating allocated resources cleanly.

Signed-off-by: Mirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mimi Zohar <zohar@linux.ibm.com>
Cc: Paul Moore <paul@paul-moore.com>
Cc: Thomas Weißschuh <linux@weissschuh.net>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

---
 include/linux/lsm_hooks.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h
index 6e156d2acffc..d5a6ab9b5eb2 100644
--- a/include/linux/lsm_hooks.h
+++ b/include/linux/lsm_hooks.h
@@ -1724,6 +1724,7 @@ struct lsm_info {
 	unsigned long flags;	/* Optional: flags describing LSM */
 	int *enabled;		/* Optional: controlled by CONFIG_LSM */
 	int (*init)(void);	/* Required. */
+	int (*release)(void);	/* Release associated resources */
 	struct lsm_blob_sizes *blobs; /* Optional: for blob sharing. */
 };
 

--
Mirsad Goran Todorovac
Sistem inženjer
Grafički fakultet | Akademija likovnih umjetnosti
Sveučilište u Zagrebu
 
System engineer
Faculty of Graphic Arts | Academy of Fine Arts
University of Zagreb, Republic of Croatia
The European Union

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-03-10 23:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-10 19:42 [PATCH v1 1/2] Add release hook to LSM Mirsad Goran Todorovac
2023-03-10 19:47 ` Andy Shevchenko
2023-03-10 19:52   ` Mirsad Goran Todorovac
2023-03-10 20:12     ` Andy Shevchenko
2023-03-10 20:46       ` Mirsad Goran Todorovac
2023-03-10 23:23       ` Mirsad Goran Todorovac
2023-03-10 20:02   ` Mirsad Goran Todorovac
2023-03-10 20:14     ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox