Re: [Patch v7 2/4] KEYS: Use common tpm_buf for trusted and asymmetric keys

2019-10-11 Thread Jerry Snitselaar
On Mon Oct 07 19, Sumit Garg wrote: Switch to utilize common heap based tpm_buf code for TPM based trusted and asymmetric keys rather than using stack based tpm1_buf code. Also, remove tpm1_buf code. Suggested-by: Jarkko Sakkinen Signed-off-by: Sumit Garg --- Reviewed-by: Jerry Snitselaar

Re: [Patch v7 1/4] tpm: Move tpm_buf code to include/linux/

2019-10-11 Thread Jerry Snitselaar
struct tpm1_buf *tb; int ret; tb = kzalloc(sizeof *tb, GFP_KERNEL); @@ -696,7 +696,7 @@ static int key_seal(struct trusted_key_payload *p, static int key_unseal(struct trusted_key_payload *p, struct trusted_key_options *o) { - struct tpm_buf *tb;

Re: [Patch v7 0/4] Create and consolidate trusted keys subsystem

2019-10-11 Thread Jerry Snitselaar
On Fri Oct 11 19, Jarkko Sakkinen wrote: On Mon, Oct 07, 2019 at 10:55:31AM +0530, Sumit Garg wrote: This patch-set does restructuring of trusted keys code to create and consolidate trusted keys subsystem. Also, patch #2 replaces tpm1_buf code used in security/keys/trusted.c and crypto/asymmert

Re: [PATCH] KEYS: asym_tpm: Switch to get_random_bytes()

2019-10-04 Thread Jerry Snitselaar
On Fri Oct 04 19, Jerry Snitselaar wrote: On Fri Oct 04 19, James Bottomley wrote: On Fri, 2019-10-04 at 11:33 -0700, Jerry Snitselaar wrote: On Fri Oct 04 19, James Bottomley wrote: On Fri, 2019-10-04 at 21:22 +0300, Jarkko Sakkinen wrote: > On Thu, Oct 03, 2019 at 04:59:37PM -0700, Ja

Re: [PATCH] KEYS: asym_tpm: Switch to get_random_bytes()

2019-10-04 Thread Jerry Snitselaar
On Fri Oct 04 19, James Bottomley wrote: On Fri, 2019-10-04 at 11:33 -0700, Jerry Snitselaar wrote: On Fri Oct 04 19, James Bottomley wrote: > On Fri, 2019-10-04 at 21:22 +0300, Jarkko Sakkinen wrote: > > On Thu, Oct 03, 2019 at 04:59:37PM -0700, James Bottomley wrote: > >

Re: [PATCH] KEYS: asym_tpm: Switch to get_random_bytes()

2019-10-04 Thread Jerry Snitselaar
On Fri Oct 04 19, James Bottomley wrote: On Fri, 2019-10-04 at 21:22 +0300, Jarkko Sakkinen wrote: On Thu, Oct 03, 2019 at 04:59:37PM -0700, James Bottomley wrote: > I think the principle of using multiple RNG sources for strong keys > is a sound one, so could I propose a compromise: We have a

Re: [PATCH] KEYS: asym_tpm: Switch to get_random_bytes()

2019-09-28 Thread Jerry Snitselaar
On Thu Sep 26 19, Jarkko Sakkinen wrote: Only the kernel random pool should be used for generating random numbers. TPM contributes to that pool among the other sources of entropy. In here it is not, agreed, absolutely critical because TPM is what is trusted anyway but in order to remove tpm_get_r