This message generated a parse failure. Raw output follows here. Please use 'back' to navigate. From devnull@lkml.org Wed May 29 08:55:11 2024 Received: from nic-e.funet.fi (nic-e.funet.fi [193.166.0.145]) by herbie.ucs.indiana.edu (8.9.3/8.9.3) with ESMTP id DAA08115 for ; Sat, 23 Oct 1999 03:01:59 -0500 (EST) Received: from vger.rutgers.edu ([128.6.190.2]:12806 "EHLO vger.rutgers.edu") by nic2.funet.fi with ESMTP id ; Sat, 23 Oct 1999 11:01:20 +0300 Received: by vger.rutgers.edu via listexpand id ; Sat, 23 Oct 1999 04:00:19 -0400 Received: by vger.rutgers.edu id ; Sat, 23 Oct 1999 03:59:50 -0400 Received: from colorfullife.com ([216.156.138.34]:3606 "EHLO colorfullife.com") by vger.rutgers.edu with ESMTP id ; Sat, 23 Oct 1999 03:59:39 -0400 Received: from colorfullife.com (localhost [127.0.0.1]) by colorfullife.com (8.9.3/8.9.3) with ESMTP id EAA28456; Sat, 23 Oct 1999 04:03:10 -0400 Message-Id: <38116A17.88AD0285@colorfullife.com> Date: Sat, 23 Oct 1999 09:56:07 +0200 From: Manfred Spraul X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.13 i686) X-Accept-Language: en Mime-Version: 1.0 To: linux-kernel@vger.rutgers.edu, Linus Torvalds Subject: mm->cpu_vm_mask: speculative TLB reads could cause random memory corruptions Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-linux-kernel@vger.rutgers.edu Precedence: bulk X-Loop: majordomo@vger.rutgers.edu X-Orcpt: rfc822;linux-kernel-outgoing-dig I think the new lazy TLB flushing code is too optimistic: The CPU carries out speculative read operations, and I assume that it could carry out speculative TLB reads. This means that the CPU could load TLB entries for user mode pages although there are no intentional accesses to user mode. CPU1: thread A CPU2: kernel thread, lazy mm context A start: mmA->cpu_vm_mask=3;  flush_tlb_mm() __local_flush_tlb() mmA->cpu_vm_mask=1 __local_flush_tlb() cpu_vm_mask remains 1> flush_tlb_mm() __local_flush_tlb() mmA->cpu_vm_mask=1 I think the TLB flush could be postponed until switch_mm(). [but for flush_tlb_all(), it must be carried out immediately] -- Manfred - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/