From: R Nageswara Sastry <rnsastry@linux.ibm.com>
To: Nayna Jain <nayna@linux.ibm.com>, linux-integrity@vger.kernel.org
Cc: Mimi Zohar <zohar@linux.ibm.com>,
Jarkko Sakkinen <jarkko@kernel.org>,
Eric Snowberg <eric.snowberg@oracle.com>,
Paul Moore <paul@paul-moore.com>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
linux-security-module@vger.kernel.org,
inux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 3/6] integrity: remove global variable from machine_keyring.c
Date: Wed, 16 Aug 2023 20:11:17 +0530 [thread overview]
Message-ID: <f72a385f-b7aa-9c73-057d-0bfb8cd413dc@linux.ibm.com> (raw)
In-Reply-To: <20230815112722.1591829-4-nayna@linux.ibm.com>
On 15/08/23 4:57 pm, Nayna Jain wrote:
> trust_mok variable is accessed within a single function locally.
>
> Change trust_mok from global to local static variable.
>
> Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
> Reviewed-and-tested-by: Mimi Zohar <zohar@linux.ibm.com>
> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Tested with trustedcadb, moduledb scenarios
Tested-by: Nageswara R Sastry <rnsastry@linux.ibm.com>
> ---
> security/integrity/platform_certs/machine_keyring.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/security/integrity/platform_certs/machine_keyring.c b/security/integrity/platform_certs/machine_keyring.c
> index 389a6e7c9245..9482e16cb2ca 100644
> --- a/security/integrity/platform_certs/machine_keyring.c
> +++ b/security/integrity/platform_certs/machine_keyring.c
> @@ -8,8 +8,6 @@
> #include <linux/efi.h>
> #include "../integrity.h"
>
> -static bool trust_mok;
> -
> static __init int machine_keyring_init(void)
> {
> int rc;
> @@ -65,9 +63,11 @@ static __init bool uefi_check_trust_mok_keys(void)
> bool __init trust_moklist(void)
> {
> static bool initialized;
> + static bool trust_mok;
>
> if (!initialized) {
> initialized = true;
> + trust_mok = false;
>
> if (uefi_check_trust_mok_keys())
> trust_mok = true;
--
Thanks and Regards
R.Nageswara Sastry
next prev parent reply other threads:[~2023-08-16 14:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-15 11:27 [PATCH v4 0/6] Enable loading local and third party keys on PowerVM guest Nayna Jain
2023-08-15 11:27 ` [PATCH v4 1/6] integrity: PowerVM support for loading CA keys on machine keyring Nayna Jain
2023-08-16 14:40 ` R Nageswara Sastry
2023-08-16 20:34 ` Jarkko Sakkinen
2023-08-15 11:27 ` [PATCH v4 2/6] integrity: ignore keys failing CA restrictions on non-UEFI platform Nayna Jain
2023-08-16 14:41 ` R Nageswara Sastry
2023-08-15 11:27 ` [PATCH v4 3/6] integrity: remove global variable from machine_keyring.c Nayna Jain
2023-08-16 14:41 ` R Nageswara Sastry [this message]
2023-08-15 11:27 ` [PATCH v4 4/6] integrity: check whether imputed trust is enabled Nayna Jain
2023-08-16 14:41 ` R Nageswara Sastry
2023-08-15 11:27 ` [PATCH v4 5/6] integrity: PowerVM machine keyring enablement Nayna Jain
2023-08-16 14:42 ` R Nageswara Sastry
2023-08-15 11:27 ` [PATCH v4 6/6] integrity: PowerVM support for loading third party code signing keys Nayna Jain
2023-08-15 20:30 ` Mimi Zohar
2023-08-16 14:42 ` R Nageswara Sastry
2023-08-16 20:36 ` Jarkko Sakkinen
2023-08-16 21:06 ` Mimi Zohar
2023-08-16 21:11 ` Jarkko Sakkinen
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=f72a385f-b7aa-9c73-057d-0bfb8cd413dc@linux.ibm.com \
--to=rnsastry@linux.ibm.com \
--cc=eric.snowberg@oracle.com \
--cc=inux-kernel@vger.kernel.org \
--cc=jarkko@kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=nayna@linux.ibm.com \
--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;
as well as URLs for NNTP newsgroup(s).