[RESEND PATCH] x86/sgx: Use vmalloc_array() instead of vmalloc()

2024-11-12 Thread Thorsten Blum
Use vmalloc_array() instead of vmalloc() to calculate the number of bytes to allocate. Reviewed-by: Jarkko Sakkinen Acked-by: Kai Huang Signed-off-by: Thorsten Blum --- arch/x86/kernel/cpu/sgx/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/sgx/ma

Re: [RESEND PATCH] x86/sgx: Use vmalloc_array() instead of vmalloc()

2024-10-28 Thread Huang, Kai
On 29/10/2024 11:47 am, Thorsten Blum wrote: On 28. Oct 2024, at 23:29, Huang, Kai wrote: On 27/10/2024 12:32 am, Thorsten Blum wrote: Use vmalloc_array() instead of vmalloc() to calculate the number of bytes to allocate. This says nothing about _why_. Is it because we want to take advant

Re: [RESEND PATCH] x86/sgx: Use vmalloc_array() instead of vmalloc()

2024-10-28 Thread Huang, Kai
On 27/10/2024 12:32 am, Thorsten Blum wrote: Use vmalloc_array() instead of vmalloc() to calculate the number of bytes to allocate. This says nothing about _why_. Is it because we want to take advantage of the multiplication overflow check inside the vmalloc_array()? I don't know whether

Re: [RESEND PATCH] x86/sgx: Use vmalloc_array() instead of vmalloc()

2024-10-28 Thread Thorsten Blum
On 28. Oct 2024, at 23:29, Huang, Kai wrote: > On 27/10/2024 12:32 am, Thorsten Blum wrote: >> Use vmalloc_array() instead of vmalloc() to calculate the number of >> bytes to allocate. > > This says nothing about _why_. Is it because we want to take advantage of > the multiplication overflow che

[RESEND PATCH] x86/sgx: Use vmalloc_array() instead of vmalloc()

2024-10-26 Thread Thorsten Blum
Use vmalloc_array() instead of vmalloc() to calculate the number of bytes to allocate. Reviewed-by: Jarkko Sakkinen Signed-off-by: Thorsten Blum --- arch/x86/kernel/cpu/sgx/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/sgx/main.c b/arch/x86/kerne

Re: [PATCH] x86/sgx: Use vmalloc_array() instead of vmalloc()

2024-10-07 Thread Jarkko Sakkinen
On Sun, 2024-09-29 at 12:56 +0200, Thorsten Blum wrote: > Use vmalloc_array() instead of vmalloc() to calculate the number of > bytes to allocate. > > Signed-off-by: Thorsten Blum > --- >  arch/x86/kernel/cpu/sgx/main.c | 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arc

[PATCH] x86/sgx: Use vmalloc_array() instead of vmalloc()

2024-09-29 Thread Thorsten Blum
Use vmalloc_array() instead of vmalloc() to calculate the number of bytes to allocate. Signed-off-by: Thorsten Blum --- arch/x86/kernel/cpu/sgx/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/sgx/main.c b/arch/x86/kernel/cpu/sgx/main.c index 9ace844