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:   Sat, 30 Dec 2017 20:41:13 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
cc:     Dominik Brodowski <linux@...inikbrodowski.net>,
        Andy Lutomirski <luto@...nel.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        LKML <linux-kernel@...r.kernel.org>,
        the arch/x86 maintainers <x86@...nel.org>
Subject: Re: x86/pti: smp_processor_id() called while preemptible in
 resume-from-sleep

On Sat, 30 Dec 2017, Linus Torvalds wrote:
> On Sat, Dec 30, 2017 at 10:20 AM, Thomas Gleixner <tglx@...utronix.de> wrote:
> So I'd suggest moving the preempt_disable() up to the top of that
> function, regardless of whether we could then remove that seemingly
> stale TLB flush in that crazy
> smpboot_setup/restore_warm_reset_vector() dance...

Regardless of the other bogosity, I did some digging and had to go back
into the 2.1 aera to find the reason for this local_flush_tlb(). That old
code manipulated swapper_pg_dir in do_boot_cpu.

+       local_flush_tlb();
+       SMP_PRINTK(("1.\n"));
+       *((volatile unsigned short *) phys_to_virt(0x469)) = ((unsigned long)stack)>>4;
+       SMP_PRINTK(("2.\n"));
+       *((volatile unsigned short *) phys_to_virt(0x467)) = 0;
+       SMP_PRINTK(("3.\n"));
+
+       maincfg=swapper_pg_dir[0];
+       ((unsigned long *)swapper_pg_dir)[0]=0x102007;

	.....

+       swapper_pg_dir[0]=maincfg;
+       local_flush_tlb();

That pagetable fiddling dissappeared long ago, but the flush stayed around
forever.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ