lkml.org 
[lkml]   [2011]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: NUMA x86: add constraints check for nid parameters
On Thu, 01 Dec 2011, Andrew Morton wrote:

> Date: Thu, 1 Dec 2011 13:34:51 -0800
> From: Andrew Morton <akpm@linux-foundation.org>
> To: Petr Holasek <pholasek@redhat.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>,
> "H. Peter Anvin" <hpa@zytor.com>, linux-kernel@vger.kernel.org, Anton
> Arapov <anton@redhat.com>
> Subject: Re: [PATCH RESEND] NUMA x86: add constraints check for nid
> parameters
>
> On Thu, 1 Dec 2011 12:45:07 +0100
> Petr Holasek <pholasek@redhat.com> wrote:
>
> > This patch adds constraints checks into __node_distance() and
> > numa_set_distance() functions. If from or to parameters are
> > lower than zero, it results into oops now.
>
> Passing negative numbers into __node_distance() sounds like a bug in
> the caller, and this patch will remove our means of detecting that bug.

That's true, but upper boundary is checked now, so why not to check lower?
Seems inconsistent to me - from this point of view even don't check anything
would be better for detecting bug in the caller.

>
> Perhaps we need to be told more about this patch. Is the bug
> user-triggerable? If so, how? How was this fault triggered?
> Etcetera.
>

AFAIK, neither __node_distance() nor numa_set_distance() aren't in any
path from user-space inputs. Their paramaters are based on ACPI tables
provided by HW vendors.


\
 
 \ /
  Last update: 2011-12-02 00:17    [W:0.043 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site