lkml.org 
[lkml]   [2011]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 3/5] x86: add a sysctl parameter to panic on stack overflow
On Thu, Nov 17, 2011 at 04:11:07PM +0900, HAYASAKA Mitsuo wrote:
> Hi Konrad,
>
> >> diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c
> >> index 530cfd0..d720813 100644
> >> --- a/arch/x86/kernel/irq_64.c
> >> +++ b/arch/x86/kernel/irq_64.c
> >> @@ -20,6 +20,8 @@
> >> #include <asm/idle.h>
> >> #include <asm/apic.h>
> >>
> >> +int sysctl_panic_on_stackoverflow;
> > __read_mostly
>
> I don't mind if I add __read_mostly here, but I think it's not
> necessary because this variable is seldom read as well.

The definition of __read_mostly is that it moves this variable to a cold cache area.
Which is what you want.

>
>
> >> diff --git a/kernel/sysctl_binary.c b/kernel/sysctl_binary.c
> >> index 6318b51..24fc654 100644
> >> --- a/kernel/sysctl_binary.c
> >> +++ b/kernel/sysctl_binary.c
> >> @@ -137,6 +137,7 @@ static const struct bin_table bin_kern_table[] = {
> >> { CTL_INT, KERN_COMPAT_LOG, "compat-log" },
> >> { CTL_INT, KERN_MAX_LOCK_DEPTH, "max_lock_depth" },
> >> { CTL_INT, KERN_PANIC_ON_NMI, "panic_on_unrecovered_nmi" },
> >> + { CTL_INT, KERN_PANIC_ON_STACKOVERFLOW, "panic_on_stackoverflow" },
> > This shouldn't be wrapped in the #ifdef?
> >
>
> It seems that we do not need to add this entry to bin_kern_table[]
> according to the following information and patch series:
>
> [Removing binary sysctl]
> http://lwn.net/Articles/361453/
>
> [Removal of binary sysctl support]
> http://lwn.net/Articles/361001/
>
> So, I'm going to remove this changes for sysctl.h and sysctl_binary.c.

<nods>


\
 
 \ /
  Last update: 2011-11-17 17:03    [from the cache]
©2003-2011 Jasper Spaans