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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c0473294-bf14-f9b8-325c-bc860361733a@intel.com>
Date:   Tue, 25 Jun 2019 14:58:35 -0700
From:   Dave Hansen <dave.hansen@...el.com>
To:     Nadav Amit <namit@...are.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Andy Lutomirski <luto@...nel.org>
Cc:     linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
        Borislav Petkov <bp@...en8.de>, x86@...nel.org,
        Thomas Gleixner <tglx@...utronix.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>
Subject: Re: [PATCH 9/9] x86/apic: Use non-atomic operations when possible

> diff --git a/arch/x86/kernel/apic/x2apic_cluster.c b/arch/x86/kernel/apic/x2apic_cluster.c
> index 7685444a106b..609e499387a1 100644
> --- a/arch/x86/kernel/apic/x2apic_cluster.c
> +++ b/arch/x86/kernel/apic/x2apic_cluster.c
> @@ -50,7 +50,7 @@ __x2apic_send_IPI_mask(const struct cpumask *mask, int vector, int apic_dest)
>  	cpumask_copy(tmpmsk, mask);
>  	/* If IPI should not be sent to self, clear current CPU */
>  	if (apic_dest != APIC_DEST_ALLINC)
> -		cpumask_clear_cpu(smp_processor_id(), tmpmsk);
> +		__cpumask_clear_cpu(smp_processor_id(), tmpmsk);

tmpmsk is on-stack, but it's a pointer to a per-cpu variable:

        tmpmsk = this_cpu_cpumask_var_ptr(ipi_mask);

So this one doesn't appear as obviously correct as a mask which itself
is on the stack.  The other three look obviously OK, though.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ