All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm: kdump: add invalid value check for 'crashkernel='
@ 2022-03-30 11:07 ` Austin Kim
  0 siblings, 0 replies; 6+ messages in thread
From: Austin Kim @ 2022-03-30 11:07 UTC (permalink / raw)
  To: linux, rmk+kernel, arnd
  Cc: linux-arm-kernel, linux-kernel, austin.kim, p4ranlee

From: Austin Kim <austin.kim@lge.com>

Add invalid value check expression when no crashkernel= or invalid value 
specified using kdump.

Signed-off-by: Austin Kim <austin.kim@lge.com>
---
 arch/arm/kernel/setup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 039feb7cd590..8018d71ccaed 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -1004,7 +1004,8 @@ static void __init reserve_crashkernel(void)
 	total_mem = get_total_mem();
 	ret = parse_crashkernel(boot_command_line, total_mem,
 				&crash_size, &crash_base);
-	if (ret)
+	/* no crashkernel= or invalid value specified */
+	if (ret || !crash_size)
 		return;
 
 	if (crash_base <= 0) {
-- 
2.20.1


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

* [PATCH] arm: kdump: add invalid value check for 'crashkernel='
@ 2022-03-30 11:07 ` Austin Kim
  0 siblings, 0 replies; 6+ messages in thread
From: Austin Kim @ 2022-03-30 11:07 UTC (permalink / raw)
  To: linux, rmk+kernel, arnd
  Cc: linux-arm-kernel, linux-kernel, austin.kim, p4ranlee

From: Austin Kim <austin.kim@lge.com>

Add invalid value check expression when no crashkernel= or invalid value 
specified using kdump.

Signed-off-by: Austin Kim <austin.kim@lge.com>
---
 arch/arm/kernel/setup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 039feb7cd590..8018d71ccaed 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -1004,7 +1004,8 @@ static void __init reserve_crashkernel(void)
 	total_mem = get_total_mem();
 	ret = parse_crashkernel(boot_command_line, total_mem,
 				&crash_size, &crash_base);
-	if (ret)
+	/* no crashkernel= or invalid value specified */
+	if (ret || !crash_size)
 		return;
 
 	if (crash_base <= 0) {
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm: kdump: add invalid value check for 'crashkernel='
  2022-03-30 11:07 ` Austin Kim
@ 2022-03-31  7:10   ` Russell King (Oracle)
  -1 siblings, 0 replies; 6+ messages in thread
From: Russell King (Oracle) @ 2022-03-31  7:10 UTC (permalink / raw)
  To: Austin Kim; +Cc: arnd, linux-arm-kernel, linux-kernel, austin.kim, p4ranlee

On Wed, Mar 30, 2022 at 12:07:15PM +0100, Austin Kim wrote:
> From: Austin Kim <austin.kim@lge.com>
> 
> Add invalid value check expression when no crashkernel= or invalid value 
> specified using kdump.

Hi,

I think you mean when "crashkernel=0" is specified, as other invalid
input should result in -EINVAL being returned. Please update the
patch description and comment.

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

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

* Re: [PATCH] arm: kdump: add invalid value check for 'crashkernel='
@ 2022-03-31  7:10   ` Russell King (Oracle)
  0 siblings, 0 replies; 6+ messages in thread
From: Russell King (Oracle) @ 2022-03-31  7:10 UTC (permalink / raw)
  To: Austin Kim; +Cc: arnd, linux-arm-kernel, linux-kernel, austin.kim, p4ranlee

On Wed, Mar 30, 2022 at 12:07:15PM +0100, Austin Kim wrote:
> From: Austin Kim <austin.kim@lge.com>
> 
> Add invalid value check expression when no crashkernel= or invalid value 
> specified using kdump.

Hi,

I think you mean when "crashkernel=0" is specified, as other invalid
input should result in -EINVAL being returned. Please update the
patch description and comment.

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm: kdump: add invalid value check for 'crashkernel='
  2022-03-31  7:10   ` Russell King (Oracle)
@ 2022-03-31  9:49     ` Austin Kim
  -1 siblings, 0 replies; 6+ messages in thread
From: Austin Kim @ 2022-03-31  9:49 UTC (permalink / raw)
  To: Russell King (Oracle)
  Cc: Arnd Bergmann, linux-arm-kernel, Linux Kernel Mailing List,
	김동현,
	Paran Lee

2022년 3월 31일 (목) 오후 4:10, Russell King (Oracle) <linux@armlinux.org.uk>님이 작성:
>
> On Wed, Mar 30, 2022 at 12:07:15PM +0100, Austin Kim wrote:
> > From: Austin Kim <austin.kim@lge.com>
> >
> > Add invalid value check expression when no crashkernel= or invalid value
> > specified using kdump.
>
> Hi,
>
> I think you mean when "crashkernel=0" is specified, as other invalid
> input should result in -EINVAL being returned. Please update the
> patch description and comment.

Thanks for feedback.
Let me resend the patch with updated commit description and comment soon.

BR,
Austin Kim

>
> Thanks.
>
> --
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

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

* Re: [PATCH] arm: kdump: add invalid value check for 'crashkernel='
@ 2022-03-31  9:49     ` Austin Kim
  0 siblings, 0 replies; 6+ messages in thread
From: Austin Kim @ 2022-03-31  9:49 UTC (permalink / raw)
  To: Russell King (Oracle)
  Cc: Arnd Bergmann, linux-arm-kernel, Linux Kernel Mailing List,
	김동현,
	Paran Lee

2022년 3월 31일 (목) 오후 4:10, Russell King (Oracle) <linux@armlinux.org.uk>님이 작성:
>
> On Wed, Mar 30, 2022 at 12:07:15PM +0100, Austin Kim wrote:
> > From: Austin Kim <austin.kim@lge.com>
> >
> > Add invalid value check expression when no crashkernel= or invalid value
> > specified using kdump.
>
> Hi,
>
> I think you mean when "crashkernel=0" is specified, as other invalid
> input should result in -EINVAL being returned. Please update the
> patch description and comment.

Thanks for feedback.
Let me resend the patch with updated commit description and comment soon.

BR,
Austin Kim

>
> Thanks.
>
> --
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-03-31  9:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-30 11:07 [PATCH] arm: kdump: add invalid value check for 'crashkernel=' Austin Kim
2022-03-30 11:07 ` Austin Kim
2022-03-31  7:10 ` Russell King (Oracle)
2022-03-31  7:10   ` Russell King (Oracle)
2022-03-31  9:49   ` Austin Kim
2022-03-31  9:49     ` Austin Kim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.