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: <1536696339-15204-5-git-send-email-atish.patra@wdc.com>
Date:   Tue, 11 Sep 2018 13:05:31 -0700
From:   Atish Patra <atish.patra@....com>
To:     palmer@...ive.com, linux-riscv@...ts.infradead.org
Cc:     mark.rutland@....com, hch@...radead.org, anup@...infault.org,
        atish.patra@....com, tglx@...utronix.de,
        linux-kernel@...r.kernel.org, Damien.LeMoal@....com,
        marc.zyngier@....com, jeremy.linton@....com,
        gregkh@...uxfoundation.org, jason@...edaemon.net,
        catalin.marinas@....com, dmitriy@...-tech.org,
        ard.biesheuvel@...aro.org
Subject: [PATCH v4 04/12] RISC-V: Comment on the TLB flush in smp_callin()

From: Palmer Dabbelt <palmer@...ive.com>

This isn't readily apparent from reading the code.

Signed-off-by: Palmer Dabbelt <palmer@...ive.com>
[Atish: code comment formatting update]
Signed-off-by: Atish Patra <atish.patra@....com>
Reviewed-by: Christoph Hellwig <hch@....de>
---
 arch/riscv/kernel/smpboot.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c
index 56abab6a..712e9ca8 100644
--- a/arch/riscv/kernel/smpboot.c
+++ b/arch/riscv/kernel/smpboot.c
@@ -106,6 +106,10 @@ asmlinkage void __init smp_callin(void)
 	trap_init();
 	notify_cpu_starting(smp_processor_id());
 	set_cpu_online(smp_processor_id(), 1);
+	/*
+	 * Remote TLB flushes are ignored while the CPU is offline, so emit
+	 * a local TLB flush right now just in case.
+	 */
 	local_flush_tlb_all();
 	local_irq_enable();
 	preempt_disable();
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ