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: <CAJhHMCAORzK4Yc-DrEmFxwwyWwxWTCQzv1WKd1M6+YiEn9HKiA@mail.gmail.com>
Date:	Tue, 9 Dec 2014 15:36:26 -0500
From:	Pranith Kumar <bobby.prani@...il.com>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	Ingo Molnar <mingo@...hat.com>, "H. Peter Anvin" <hpa@...or.com>,
	"maintainer:X86 ARCHITECTURE..." <x86@...nel.org>,
	Toshi Kani <toshi.kani@...com>,
	Igor Mammedov <imammedo@...hat.com>,
	David Rientjes <rientjes@...gle.com>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	Lan Tianyu <tianyu.lan@...el.com>,
	"open list:X86 ARCHITECTURE..." <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH] smpboot: Check for successfull allocation of cpumask vars

On Tue, Dec 9, 2014 at 3:10 PM, Thomas Gleixner <tglx@...utronix.de> wrote:
> On Tue, 9 Dec 2014, Pranith Kumar wrote:
>> zalloc_cpumask_var() can return 0 on allocation failure when
>> CONFIG_CPUMASK_OFFSTACK is set. Check for the return value and WARN() on failure
>> of an allocation in such cases.
>
> And that warning helps in which way?
>
> It just prints a completely useless backtrace and breaks out of the
> loop, but it does not prevent that later on code will trip over the
> non allocated per cpu data.
>

I agree. May be just a pr_warn() saying that an allocation failed perhaps?

To prevent further accesses, we can clear the cpu bit from the cpu
masks(online/possible/present) for the failed cpu and continue trying
to allocate for other cpus. We don't break out of the loop. Removing
the cpu from the cpu masks will disable accesses of the non allocated
per cpu data.

What do you suggest we do in such cases?
-- 
Pranith
--
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