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]
Date:	Mon, 30 Nov 2015 11:48:01 +0000
From:	Qais Yousef <qais.yousef@...tec.com>
To:	Thomas Gleixner <tglx@...utronix.de>
CC:	<linux-kernel@...r.kernel.org>, <jason@...edaemon.net>,
	<marc.zyngier@....com>, <jiang.liu@...ux.intel.com>,
	<ralf@...ux-mips.org>, <linux-mips@...ux-mips.org>
Subject: Re: [PATCH v2 04/19] genirq: Add new struct ipi_mask and helper
 functions

On 11/30/2015 11:20 AM, Thomas Gleixner wrote:
> On Wed, 25 Nov 2015, Qais Yousef wrote:
>> cpumask is limited to NR_CPUS. Introduce ipi_mask which allows us to address
>> cpu range that is higher than NR_CPUS which is required for drivers to send
>> IPIs for coprocessor that are outside Linux CPU range.
> I have second thoughts on this.
>
> cpumask is indeed limited to NR_CPUS or in case of CPUMASK_ON_STACK
> limited to nr_cpu_ids.
>
> But, that's not an issue for that coprocessor case. Let's assume you
> have 16 Linux CPUs and 4 coprocessors. So you set the number of
> possible cpus (NR_CPUS) to 20. That makes the cpumask sizeof 20.
>
> The boot-process sets the number of available cpus to 16. So the
> Linux side will never try to access anything beyond cpu15.
>
> But you can spare that extra mask magic and simply use cpumask. Sorry
> that I did not think about that earlier.
>
>


Yes it would be much better to reuse it but wouldn't the runtime checks 
against nr_cpu_ids create problems especially when CPUMASK_ON_STACK is 
defined?

Thanks,
Qais
--
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