Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1434954
| From | Dave Hansen <dave@sr71.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 6/6] x86: Fix stray A/D bit setting into non-present PTEs |
| Date | 2016-07-01 04:00 +0200 |
| Message-ID | <rPVUl-m1-1@gated-at.bofh.it> (permalink) |
| References | <rPUlz-7QC-3@gated-at.bofh.it> <rPUlz-7QC-1@gated-at.bofh.it> <rPVUl-m1-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 06/30/2016 06:50 PM, Nadav Amit wrote:
> Dave Hansen <dave@sr71.net> wrote:
>> +pte_t ptep_clear_flush(struct vm_area_struct *vma, unsigned long address,
>> + pte_t *ptep)
>> +{
>> + struct mm_struct *mm = vma->vm_mm;
>> + pte_t pte;
>> +
>> + pte = ptep_get_and_clear(mm, address, ptep);
>> + if (pte_accessible(mm, pte)) {
>> + flush_tlb_page(vma, address);
>> + /*
>> + * Ensure that the compiler orders our set_pte()
>> + * after the flush_tlb_page() no matter what.
>> + */
>> + barrier();
>
> I don’t think such a barrier (after remote TLB flush) is needed.
> Eventually, if a remote flush takes place, you get csd_lock_wait() to be
> called, and then smp_rmb() is called (which is essentially a barrier()
> call on x86).
Andi really wanted to make sure this got in here. He said there was a
bug that bit him really badly once where a function got reordered.
Granted, a call _should_ be sufficient to keep the compiler from
reordering things, but this makes double sure.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 6/6] x86: Fix stray A/D bit setting into non-present PTEs Dave Hansen <dave@sr71.net> - 2016-07-01 02:20 +0200
Re: [PATCH 6/6] x86: Fix stray A/D bit setting into non-present PTEs Dave Hansen <dave@sr71.net> - 2016-07-01 04:00 +0200
Re: [PATCH 6/6] x86: Fix stray A/D bit setting into non-present PTEs Nadav Amit <nadav.amit@gmail.com> - 2016-07-01 04:10 +0200
Re: [PATCH 6/6] x86: Fix stray A/D bit setting into non-present PTEs Linus Torvalds <torvalds@linux-foundation.org> - 2016-07-01 05:00 +0200
Re: [PATCH 6/6] x86: Fix stray A/D bit setting into non-present PTEs Brian Gerst <brgerst@gmail.com> - 2016-07-01 05:10 +0200
Re: [PATCH 6/6] x86: Fix stray A/D bit setting into non-present PTEs Dave Hansen <dave@sr71.net> - 2016-07-03 19:20 +0200
Re: [PATCH 6/6] x86: Fix stray A/D bit setting into non-present PTEs Dave Hansen <dave@sr71.net> - 2016-07-01 06:50 +0200
Re: [PATCH 6/6] x86: Fix stray A/D bit setting into non-present PTEs Linus Torvalds <torvalds@linux-foundation.org> - 2016-07-01 08:00 +0200
Re: [PATCH 6/6] x86: Fix stray A/D bit setting into non-present PTEs ebiederm@xmission.com (Eric W. Biederman) - 2016-07-01 17:40 +0200
Re: [PATCH 6/6] x86: Fix stray A/D bit setting into non-present PTEs Dave Hansen <dave@sr71.net> - 2016-07-01 18:00 +0200
Re: [PATCH 6/6] x86: Fix stray A/D bit setting into non-present PTEs ebiederm@xmission.com (Eric W. Biederman) - 2016-07-01 20:30 +0200
Re: [PATCH 6/6] x86: Fix stray A/D bit setting into non-present PTEs Linus Torvalds <torvalds@linux-foundation.org> - 2016-07-01 18:10 +0200
Re: [PATCH 6/6] x86: Fix stray A/D bit setting into non-present PTEs Dave Hansen <dave@sr71.net> - 2016-07-01 18:20 +0200
Re: [PATCH 6/6] x86: Fix stray A/D bit setting into non-present PTEs Linus Torvalds <torvalds@linux-foundation.org> - 2016-07-01 18:30 +0200
csiph-web