lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTimrIOLiX3m3rFsdakHn8PRhkfSHCCmYUlw6rkFz@mail.gmail.com>
Date:	Thu, 10 Jun 2010 21:01:28 -0700
From:	Ryan Davis <iconoclasmandheresy@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: PROBLEM: Off-by-one bug on sun4u SMP

On Thu, Jun 10, 2010 at 5:37 PM, David Miller <davem@...emloft.net> wrote:
> From: Ryan Davis <iconoclasmandheresy@...il.com>
> Date: Thu, 10 Jun 2010 11:05:09 -0700
>
>> On at least some sun4u machines, the CPU numbering starts at one not 0.
>> This causes an off-by-one bug as other parts of the code assume
>> zero-based numbering.
>>
>> If you set max-cpus in the kernel config to the actual number of CPUs,
>> the last CPU will be ignored and unused.
>> This is because the CPU numbering starts at 1 but the code to check
>> against max-cpus assumes a zero-based numbering.
>>
>> On my computer: Sun Ultra 60 2x450mhz Ultrasparc.
>> Building with max-cpus of 2 ignores the second cpu because 2 (one
>> based cpu number) >= 2 (zero based max cpus)
>> Rebuilding with a larger max-cpus is a workaround but non optimal.
>
> max-cpus means "one larger than the maximum PHYSICAL cpu number", not
> the number of cpus.  That's what this setting means, at least on
> sparc64.
>

OK... so there are no kernel data structures allocated for CPU #0
which is not present? It is my understanding that this is not the case
but I could be wrong. If this is true, then a chunk of kernel memory
is wasted tor the phantom CPU #0.

If this is the desired behavior then the semantics of the setting are
questionable, since a kernel compiled for 2 cpus will only run on 1...

A quick search was unable to find documentation on this quirk. Perhaps
you could point me at some?


---
Those who will not reason, are bigots, those who cannot, are fools,
and those who dare not, are slaves.
  -- Lord Byron
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ