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:   Wed, 19 Apr 2017 09:20:27 -0700
From:   Andrei Vagin <avagin@...tuozzo.com>
To:     Keith Busch <keith.busch@...el.com>
CC:     <linux-kernel@...r.kernel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Xiaolong Ye <xiaolong.ye@...el.com>
Subject: Re: irq/affinity: Fix extra vecs calculation

Hi,

Something is wrong with this patch. We run CRIU tests for upstream kernels.
And we found that a kernel with this patch can't be booted.

https://travis-ci.org/avagin/linux/builds/223557750

We don't have access to console logs and I can't reproduce this issue on
my nodes. I tired to revert this patch and everything works as expected.

https://travis-ci.org/avagin/linux/builds/223594172

Here is another report about this patch
https://lkml.org/lkml/2017/4/16/344

Thanks,
Andrei

On Thu, Apr 13, 2017 at 01:28:12PM -0400, Keith Busch wrote:
> This fixes a math error calculating the extra_vecs. The error assumed
> only 1 cpu per vector, but the value needs to account for the actual
> number of cpus per vector in order to get the correct remainder for
> extra CPU assignment.
> 
> Fixes: 7bf8222b9bd0 ("irq/affinity: Fix CPU spread for unbalanced nodes")
> Reported-by: Xiaolong Ye <xiaolong.ye@...el.com>
> Signed-off-by: Keith Busch <keith.busch@...el.com>
> ---
>  kernel/irq/affinity.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c
> index dc52911..d052947 100644
> --- a/kernel/irq/affinity.c
> +++ b/kernel/irq/affinity.c
> @@ -108,7 +108,7 @@ irq_create_affinity_masks(int nvecs, const struct irq_affinity *affd)
>  		vecs_to_assign = min(vecs_per_node, ncpus);
>  
>  		/* Account for rounding errors */
> -		extra_vecs = ncpus - vecs_to_assign;
> +		extra_vecs = ncpus - vecs_to_assign * (ncpus / vecs_to_assign);
>  
>  		for (v = 0; curvec < last_affv && v < vecs_to_assign;
>  		     curvec++, v++) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ