linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/pseries/svm: Remove unwanted check for shared_lppaca_size
@ 2020-06-09 10:57 Satheesh Rajendran
  2020-06-09 12:25 ` Laurent Dufour
  2020-06-10  4:15 ` Thiago Jung Bauermann
  0 siblings, 2 replies; 4+ messages in thread
From: Satheesh Rajendran @ 2020-06-09 10:57 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: Sukadev Bhattiprolu, Ram Pai, linux-kernel, Satheesh Rajendran,
	Laurent Dufour, Thiago Jung Bauermann

Early secure guest boot hits the below crash while booting with
vcpus numbers aligned with page boundary for PAGE size of 64k
and LPPACA size of 1k i.e 64, 128 etc, due to the BUG_ON assert
for shared_lppaca_total_size equal to shared_lppaca_size,

 [    0.000000] Partition configured for 64 cpus.
 [    0.000000] CPU maps initialized for 1 thread per core
 [    0.000000] ------------[ cut here ]------------
 [    0.000000] kernel BUG at arch/powerpc/kernel/paca.c:89!
 [    0.000000] Oops: Exception in kernel mode, sig: 5 [#1]
 [    0.000000] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries

which is not necessary, let's remove it.

Cc: linux-kernel@vger.kernel.org
Cc: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Cc: Ram Pai <linuxram@us.ibm.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Laurent Dufour <ldufour@linux.ibm.com>
Signed-off-by: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
---
 arch/powerpc/kernel/paca.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c
index 949eceb25..10b7c54a7 100644
--- a/arch/powerpc/kernel/paca.c
+++ b/arch/powerpc/kernel/paca.c
@@ -86,7 +86,7 @@ static void *__init alloc_shared_lppaca(unsigned long size, unsigned long align,
 	 * This is very early in boot, so no harm done if the kernel crashes at
 	 * this point.
 	 */
-	BUG_ON(shared_lppaca_size >= shared_lppaca_total_size);
+	BUG_ON(shared_lppaca_size > shared_lppaca_total_size);
 
 	return ptr;
 }
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc/pseries/svm: Remove unwanted check for shared_lppaca_size
  2020-06-09 10:57 [PATCH] powerpc/pseries/svm: Remove unwanted check for shared_lppaca_size Satheesh Rajendran
@ 2020-06-09 12:25 ` Laurent Dufour
  2020-06-10  4:15 ` Thiago Jung Bauermann
  1 sibling, 0 replies; 4+ messages in thread
From: Laurent Dufour @ 2020-06-09 12:25 UTC (permalink / raw)
  To: Satheesh Rajendran, linuxppc-dev
  Cc: Sukadev Bhattiprolu, Ram Pai, linux-kernel, Thiago Jung Bauermann

Le 09/06/2020 à 12:57, Satheesh Rajendran a écrit :
> Early secure guest boot hits the below crash while booting with
> vcpus numbers aligned with page boundary for PAGE size of 64k
> and LPPACA size of 1k i.e 64, 128 etc, due to the BUG_ON assert
> for shared_lppaca_total_size equal to shared_lppaca_size,
> 
>   [    0.000000] Partition configured for 64 cpus.
>   [    0.000000] CPU maps initialized for 1 thread per core
>   [    0.000000] ------------[ cut here ]------------
>   [    0.000000] kernel BUG at arch/powerpc/kernel/paca.c:89!
>   [    0.000000] Oops: Exception in kernel mode, sig: 5 [#1]
>   [    0.000000] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries
> 
> which is not necessary, let's remove it.
> 

Reviewed-by: Laurent Dufour <ldufour@linux.ibm.com>

> Cc: linux-kernel@vger.kernel.org
> Cc: Thiago Jung Bauermann <bauerman@linux.ibm.com>
> Cc: Ram Pai <linuxram@us.ibm.com>
> Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
> Cc: Laurent Dufour <ldufour@linux.ibm.com>
> Signed-off-by: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
> ---
>   arch/powerpc/kernel/paca.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c
> index 949eceb25..10b7c54a7 100644
> --- a/arch/powerpc/kernel/paca.c
> +++ b/arch/powerpc/kernel/paca.c
> @@ -86,7 +86,7 @@ static void *__init alloc_shared_lppaca(unsigned long size, unsigned long align,
>   	 * This is very early in boot, so no harm done if the kernel crashes at
>   	 * this point.
>   	 */
> -	BUG_ON(shared_lppaca_size >= shared_lppaca_total_size);
> +	BUG_ON(shared_lppaca_size > shared_lppaca_total_size);
>   
>   	return ptr;
>   }
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc/pseries/svm: Remove unwanted check for shared_lppaca_size
  2020-06-09 10:57 [PATCH] powerpc/pseries/svm: Remove unwanted check for shared_lppaca_size Satheesh Rajendran
  2020-06-09 12:25 ` Laurent Dufour
@ 2020-06-10  4:15 ` Thiago Jung Bauermann
  1 sibling, 0 replies; 4+ messages in thread
From: Thiago Jung Bauermann @ 2020-06-10  4:15 UTC (permalink / raw)
  To: Satheesh Rajendran
  Cc: Ram Pai, Laurent Dufour, Sukadev Bhattiprolu, linuxppc-dev, linux-kernel


Satheesh Rajendran <sathnaga@linux.vnet.ibm.com> writes:

> Early secure guest boot hits the below crash while booting with
> vcpus numbers aligned with page boundary for PAGE size of 64k
> and LPPACA size of 1k i.e 64, 128 etc, due to the BUG_ON assert
> for shared_lppaca_total_size equal to shared_lppaca_size,
>
>  [    0.000000] Partition configured for 64 cpus.
>  [    0.000000] CPU maps initialized for 1 thread per core
>  [    0.000000] ------------[ cut here ]------------
>  [    0.000000] kernel BUG at arch/powerpc/kernel/paca.c:89!
>  [    0.000000] Oops: Exception in kernel mode, sig: 5 [#1]
>  [    0.000000] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries
>
> which is not necessary, let's remove it.
>
> Cc: linux-kernel@vger.kernel.org
> Cc: Thiago Jung Bauermann <bauerman@linux.ibm.com>
> Cc: Ram Pai <linuxram@us.ibm.com>
> Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
> Cc: Laurent Dufour <ldufour@linux.ibm.com>
> Signed-off-by: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
> ---
>  arch/powerpc/kernel/paca.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks for fixing this bug! I would only add:

Fixes: bd104e6db6f0 ("powerpc/pseries/svm: Use shared memory for LPPACA structures")

In any case:

Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>

-- 
Thiago Jung Bauermann
IBM Linux Technology Center

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc/pseries/svm: Remove unwanted check for shared_lppaca_size
       [not found] <20200609053827.363381-1-sathnaga@linux.vent.ibm.com>
@ 2020-06-09  7:23 ` Laurent Dufour
  0 siblings, 0 replies; 4+ messages in thread
From: Laurent Dufour @ 2020-06-09  7:23 UTC (permalink / raw)
  To: sathnaga, ltc-ultravisor
  Cc: Ram Pai, linuxppc-dev, Sukadev Bhattiprolu, Satheesh Rajendran,
	Thiago Jung Bauermann

Le 09/06/2020 à 07:38, sathnaga@linux.vent.ibm.com a écrit :
> From: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
> 
> Early secure guest boot hits the below crash while booting with
> vcpus numbers aligned with page boundary for PAGE size of 64k
> and LPPACA size of 1k i.e 64, 128 etc, due to the BUG_ON assert
> for shared_lppaca_total_size equal to shared_lppaca_size,
> 
>   [    0.000000] Partition configured for 64 cpus.
>   [    0.000000] CPU maps initialized for 1 thread per core
>   [    0.000000] ------------[ cut here ]------------
>   [    0.000000] kernel BUG at arch/powerpc/kernel/paca.c:89!
>   [    0.000000] Oops: Exception in kernel mode, sig: 5 [#1]
>   [    0.000000] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries
> 
> which is not necessary, let's remove it.

Reviewed-by: Laurent Dufour <ldufour@linux.ibm.com>

> Cc: linuxppc-dev@lists.ozlabs.org
> Cc: Thiago Jung Bauermann <bauerman@linux.ibm.com>
> Cc: Ram Pai <linuxram@us.ibm.com>
> Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
> Cc: Laurent Dufour <ldufour@linux.ibm.com>
> Signed-off-by: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
> ---
>   arch/powerpc/kernel/paca.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c
> index 949eceb25..10b7c54a7 100644
> --- a/arch/powerpc/kernel/paca.c
> +++ b/arch/powerpc/kernel/paca.c
> @@ -86,7 +86,7 @@ static void *__init alloc_shared_lppaca(unsigned long size, unsigned long align,
>   	 * This is very early in boot, so no harm done if the kernel crashes at
>   	 * this point.
>   	 */
> -	BUG_ON(shared_lppaca_size >= shared_lppaca_total_size);
> +	BUG_ON(shared_lppaca_size > shared_lppaca_total_size);
>   
>   	return ptr;
>   }
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-06-10  4:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-09 10:57 [PATCH] powerpc/pseries/svm: Remove unwanted check for shared_lppaca_size Satheesh Rajendran
2020-06-09 12:25 ` Laurent Dufour
2020-06-10  4:15 ` Thiago Jung Bauermann
     [not found] <20200609053827.363381-1-sathnaga@linux.vent.ibm.com>
2020-06-09  7:23 ` Laurent Dufour

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).