* [patch 1/5] x86: ACPI - add checking for NULL early param
[not found] <20080705115334.892720771@gmail.com>
@ 2008-07-05 11:53 ` Cyrill Gorcunov
2008-07-22 9:53 ` Andrew Morton
2008-07-05 11:53 ` [patch 2/5] x86: idle process " Cyrill Gorcunov
` (3 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Cyrill Gorcunov @ 2008-07-05 11:53 UTC (permalink / raw)
To: mingo, akpm, hpa, tglx, andi; +Cc: linux-kernel, Cyrill Gorcunov
[-- Attachment #1: ep-acpi --]
[-- Type: text/plain, Size: 532 bytes --]
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
Index: linux-2.6.git/drivers/acpi/tables.c
====================================================================
--- linux-2.6.git.orig/drivers/acpi/tables.c 2008-01-21 23:14:47.000000000 +0300
+++ linux-2.6.git/drivers/acpi/tables.c 2008-07-05 12:24:16.000000000 +0400
@@ -300,6 +300,8 @@ int __init acpi_table_init(void)
static int __init acpi_parse_apic_instance(char *str)
{
+ if (!str)
+ return -EINVAL;
acpi_apic_instance = simple_strtoul(str, NULL, 0);
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* [patch 2/5] x86: idle process - add checking for NULL early param
[not found] <20080705115334.892720771@gmail.com>
2008-07-05 11:53 ` [patch 1/5] x86: ACPI - add checking for NULL early param Cyrill Gorcunov
@ 2008-07-05 11:53 ` Cyrill Gorcunov
2008-07-05 11:53 ` [patch 3/5] x86: io delay " Cyrill Gorcunov
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Cyrill Gorcunov @ 2008-07-05 11:53 UTC (permalink / raw)
To: mingo, akpm, hpa, tglx, andi; +Cc: linux-kernel, Cyrill Gorcunov
[-- Attachment #1: ep-idle --]
[-- Type: text/plain, Size: 581 bytes --]
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
Index: linux-2.6.git/arch/x86/kernel/process.c
====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/process.c 2008-06-28 21:15:44.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/process.c 2008-07-05 12:34:02.000000000 +0400
@@ -325,6 +325,9 @@ void __cpuinit select_idle_routine(const
static int __init idle_setup(char *str)
{
+ if (!str)
+ return -EINVAL;
+
if (!strcmp(str, "poll")) {
printk("using polling idle threads.\n");
pm_idle = poll_idle;
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* [patch 3/5] x86: io delay - add checking for NULL early param
[not found] <20080705115334.892720771@gmail.com>
2008-07-05 11:53 ` [patch 1/5] x86: ACPI - add checking for NULL early param Cyrill Gorcunov
2008-07-05 11:53 ` [patch 2/5] x86: idle process " Cyrill Gorcunov
@ 2008-07-05 11:53 ` Cyrill Gorcunov
2008-07-05 11:53 ` [patch 4/5] x86: smpboot maxcpus " Cyrill Gorcunov
2008-07-05 11:53 ` [patch 5/5] x86: e820 memmap " Cyrill Gorcunov
4 siblings, 0 replies; 7+ messages in thread
From: Cyrill Gorcunov @ 2008-07-05 11:53 UTC (permalink / raw)
To: mingo, akpm, hpa, tglx, andi; +Cc: linux-kernel, Cyrill Gorcunov
[-- Attachment #1: ep-io-delay --]
[-- Type: text/plain, Size: 580 bytes --]
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
Index: linux-2.6.git/arch/x86/kernel/io_delay.c
====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/io_delay.c 2008-06-23 22:30:14.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/io_delay.c 2008-07-05 12:49:06.000000000 +0400
@@ -103,6 +103,9 @@ void __init io_delay_init(void)
static int __init io_delay_param(char *s)
{
+ if (!s)
+ return -EINVAL;
+
if (!strcmp(s, "0x80"))
io_delay_type = CONFIG_IO_DELAY_TYPE_0X80;
else if (!strcmp(s, "0xed"))
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* [patch 4/5] x86: smpboot maxcpus - add checking for NULL early param
[not found] <20080705115334.892720771@gmail.com>
` (2 preceding siblings ...)
2008-07-05 11:53 ` [patch 3/5] x86: io delay " Cyrill Gorcunov
@ 2008-07-05 11:53 ` Cyrill Gorcunov
2008-07-05 11:53 ` [patch 5/5] x86: e820 memmap " Cyrill Gorcunov
4 siblings, 0 replies; 7+ messages in thread
From: Cyrill Gorcunov @ 2008-07-05 11:53 UTC (permalink / raw)
To: mingo, akpm, hpa, tglx, andi; +Cc: linux-kernel, Cyrill Gorcunov
[-- Attachment #1: ep-maxcpus --]
[-- Type: text/plain, Size: 593 bytes --]
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
Index: linux-2.6.git/arch/x86/kernel/smpboot.c
====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/smpboot.c 2008-06-28 21:15:44.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/smpboot.c 2008-07-05 12:53:28.000000000 +0400
@@ -1383,7 +1383,8 @@ static int __init parse_maxcpus(char *ar
{
extern unsigned int maxcpus;
- maxcpus = simple_strtoul(arg, NULL, 0);
+ if (arg)
+ maxcpus = simple_strtoul(arg, NULL, 0);
return 0;
}
early_param("maxcpus", parse_maxcpus);
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* [patch 5/5] x86: e820 memmap - add checking for NULL early param
[not found] <20080705115334.892720771@gmail.com>
` (3 preceding siblings ...)
2008-07-05 11:53 ` [patch 4/5] x86: smpboot maxcpus " Cyrill Gorcunov
@ 2008-07-05 11:53 ` Cyrill Gorcunov
4 siblings, 0 replies; 7+ messages in thread
From: Cyrill Gorcunov @ 2008-07-05 11:53 UTC (permalink / raw)
To: mingo, akpm, hpa, tglx, andi; +Cc: linux-kernel, Cyrill Gorcunov
[-- Attachment #1: ep-memmap --]
[-- Type: text/plain, Size: 534 bytes --]
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
Index: linux-2.6.git/arch/x86/kernel/e820.c
====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/e820.c 2008-06-28 21:15:44.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/e820.c 2008-07-05 12:55:55.000000000 +0400
@@ -1131,6 +1131,9 @@ static int __init parse_memmap_opt(char
char *oldp;
u64 start_at, mem_size;
+ if (!p)
+ return -EINVAL;
+
if (!strcmp(p, "exactmap")) {
#ifdef CONFIG_CRASH_DUMP
/*
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch 1/5] x86: ACPI - add checking for NULL early param
2008-07-05 11:53 ` [patch 1/5] x86: ACPI - add checking for NULL early param Cyrill Gorcunov
@ 2008-07-22 9:53 ` Andrew Morton
2008-07-22 10:19 ` Cyrill Gorcunov
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2008-07-22 9:53 UTC (permalink / raw)
To: Cyrill Gorcunov
Cc: mingo, hpa, tglx, andi, linux-kernel, linux-acpi, Andi Kleen
On Sat, 05 Jul 2008 15:53:35 +0400 Cyrill Gorcunov <gorcunov@gmail.com> wrote:
> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
> ---
>
> Index: linux-2.6.git/drivers/acpi/tables.c
> ====================================================================
> --- linux-2.6.git.orig/drivers/acpi/tables.c 2008-01-21 23:14:47.000000000 +0300
> +++ linux-2.6.git/drivers/acpi/tables.c 2008-07-05 12:24:16.000000000 +0400
> @@ -300,6 +300,8 @@ int __init acpi_table_init(void)
>
> static int __init acpi_parse_apic_instance(char *str)
> {
> + if (!str)
> + return -EINVAL;
>
> acpi_apic_instance = simple_strtoul(str, NULL, 0);
>
Could you please explain this patch?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch 1/5] x86: ACPI - add checking for NULL early param
2008-07-22 9:53 ` Andrew Morton
@ 2008-07-22 10:19 ` Cyrill Gorcunov
0 siblings, 0 replies; 7+ messages in thread
From: Cyrill Gorcunov @ 2008-07-22 10:19 UTC (permalink / raw)
To: Andrew Morton; +Cc: mingo, hpa, tglx, andi, linux-kernel, linux-acpi
[Andrew Morton - Tue, Jul 22, 2008 at 02:53:32AM -0700]
| On Sat, 05 Jul 2008 15:53:35 +0400 Cyrill Gorcunov <gorcunov@gmail.com> wrote:
|
| > Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| > ---
| >
| > Index: linux-2.6.git/drivers/acpi/tables.c
| > ====================================================================
| > --- linux-2.6.git.orig/drivers/acpi/tables.c 2008-01-21 23:14:47.000000000 +0300
| > +++ linux-2.6.git/drivers/acpi/tables.c 2008-07-05 12:24:16.000000000 +0400
| > @@ -300,6 +300,8 @@ int __init acpi_table_init(void)
| >
| > static int __init acpi_parse_apic_instance(char *str)
| > {
| > + if (!str)
| > + return -EINVAL;
| >
| > acpi_apic_instance = simple_strtoul(str, NULL, 0);
| >
|
| Could you please explain this patch?
|
we could get NULL deref here - if you start kernel as
qemu-system-x86_64 -kernel arch/x86/boot/bzImage -append "root=/dev/sda acpi_apic_instance" ../images/root-j
so user was not carried about correct boot option and the kernel respond by
hang - which is not good I think. Actually - by the patch we easy protect
ourself from user-madness :)
- Cyrill -
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-07-22 10:20 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20080705115334.892720771@gmail.com>
2008-07-05 11:53 ` [patch 1/5] x86: ACPI - add checking for NULL early param Cyrill Gorcunov
2008-07-22 9:53 ` Andrew Morton
2008-07-22 10:19 ` Cyrill Gorcunov
2008-07-05 11:53 ` [patch 2/5] x86: idle process " Cyrill Gorcunov
2008-07-05 11:53 ` [patch 3/5] x86: io delay " Cyrill Gorcunov
2008-07-05 11:53 ` [patch 4/5] x86: smpboot maxcpus " Cyrill Gorcunov
2008-07-05 11:53 ` [patch 5/5] x86: e820 memmap " Cyrill Gorcunov
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).