Linux Security Modules development
 help / color / mirror / Atom feed
From: Mirsad Goran Todorovac <mirsad.goran.todorovac@alu.hr>
To: linux-kernel@vger.kernel.org
Cc: linux-integrity@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Mimi Zohar" <zohar@linux.ibm.com>,
	"Thomas Weißschuh" <linux@weissschuh.net>,
	"Paul Moore" <paul@paul-moore.com>,
	"Casey Schaufler" <casey@schaufler-ca.com>,
	"Christian Göttsche" <cgzones@googlemail.com>,
	"Mickaël Salaün" <mic@digikod.net>,
	"Frederick Lawler" <fred@cloudflare.com>
Subject: [PATCH v1 1/2] Add release hook to LSM
Date: Fri, 10 Mar 2023 20:42:00 +0100	[thread overview]
Message-ID: <20230310194159.GB528@domac.alu.hr> (raw)


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

             reply	other threads:[~2023-03-10 19:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10 19:42 Mirsad Goran Todorovac [this message]
2023-03-10 19:47 ` [PATCH v1 1/2] Add release hook to LSM 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230310194159.GB528@domac.alu.hr \
    --to=mirsad.goran.todorovac@alu.hr \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=casey@schaufler-ca.com \
    --cc=cgzones@googlemail.com \
    --cc=fred@cloudflare.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=mic@digikod.net \
    --cc=paul@paul-moore.com \
    --cc=zohar@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox