linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: linux-integrity@vger.kernel.org
Cc: Peter Huewe <peterhuewe@gmx.de>, Jason Gunthorpe <jgg@ziepe.ca>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tpm: use kmemdup() to copy the EFI event log
Date: Tue, 20 Feb 2018 16:58:23 +0200	[thread overview]
Message-ID: <1519138703.26293.2.camel@linux.intel.com> (raw)
In-Reply-To: <20180219121026.14304-1-jarkko.sakkinen@linux.intel.com>

Send an updated version with corresponding change also to
tpm_eventlog_of.c

/Jarkko

On Mon, 2018-02-19 at 14:10 +0200, Jarkko Sakkinen wrote:
> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> ---
>  drivers/char/tpm/tpm_eventlog_efi.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/char/tpm/tpm_eventlog_efi.c
> b/drivers/char/tpm/tpm_eventlog_efi.c
> index e3f9ffd341d2..57c8b3cc46be 100644
> --- a/drivers/char/tpm/tpm_eventlog_efi.c
> +++ b/drivers/char/tpm/tpm_eventlog_efi.c
> @@ -50,10 +50,9 @@ int tpm_read_log_efi(struct tpm_chip *chip)
>  	}
>  
>  	/* malloc EventLog space */
> -	log->bios_event_log = kmalloc(log_size, GFP_KERNEL);
> +	log->bios_event_log = kmemdup(log_tbl->log, log_size,
> GFP_KERNEL);
>  	if (!log->bios_event_log)
>  		goto err_memunmap;
> -	memcpy(log->bios_event_log, log_tbl->log, log_size);
>  	log->bios_event_log_end = log->bios_event_log + log_size;
>  
>  	tpm_log_version = log_tbl->version;

      reply	other threads:[~2018-02-20 14:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-19 12:10 [PATCH] tpm: use kmemdup() to copy the EFI event log Jarkko Sakkinen
2018-02-20 14:58 ` Jarkko Sakkinen [this message]

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=1519138703.26293.2.camel@linux.intel.com \
    --to=jarkko.sakkinen@linux.intel.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    /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).