Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1267699
| From | "Kirill A. Shutemov" <kirill@shutemov.name> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] x86/mm: fix regression with huge pages on PAE |
| Date | 2015-11-12 09:00 +0100 |
| Message-ID | <qtUXw-62X-17@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <qtipc-6iz-3@gated-at.bofh.it> <qtiIx-6FU-5@gated-at.bofh.it> <qtkAG-7SL-19@gated-at.bofh.it> <qtAm6-14M-5@gated-at.bofh.it> <qtUNQ-5ZA-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Nov 12, 2015 at 08:48:54AM +0100, Ingo Molnar wrote:
>
> * Borislav Petkov <bp@alien8.de> wrote:
>
> > --- a/arch/x86/include/asm/pgtable_types.h
> > +++ b/arch/x86/include/asm/pgtable_types.h
> > @@ -279,17 +279,14 @@ static inline pmdval_t native_pmd_val(pmd_t pmd)
> > static inline pudval_t pud_pfn_mask(pud_t pud)
> > {
> > if (native_pud_val(pud) & _PAGE_PSE)
> > - return PUD_PAGE_MASK & PHYSICAL_PAGE_MASK;
> > + return ~((1ULL << PUD_SHIFT) - 1) & PHYSICAL_PAGE_MASK;
> > else
> > return PTE_PFN_MASK;
> > }
>
> > static inline pmdval_t pmd_pfn_mask(pmd_t pmd)
> > {
> > if (native_pmd_val(pmd) & _PAGE_PSE)
> > - return PMD_PAGE_MASK & PHYSICAL_PAGE_MASK;
> > + return ~((1ULL << PMD_SHIFT) - 1) & PHYSICAL_PAGE_MASK;
> > else
> > return PTE_PFN_MASK;
> > }
>
> So instead of uglifying the code, why not fix the real bug: change the
> PMD_PAGE_MASK/PUD_PAGE_MASK definitions to be 64-bit everywhere?
*PAGE_MASK are usually applied to virtual addresses. I don't think it
should anything but 'unsigned long'. This is odd use case really.
--
Kirill A. Shutemov
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] x86/mm: fix regression with huge pages on PAE "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-11-10 00:20 +0100
Re: [PATCH] x86/mm: fix regression with huge pages on PAE Toshi Kani <toshi.kani@hpe.com> - 2015-11-10 00:50 +0100
Re: [PATCH] x86/mm: fix regression with huge pages on PAE "Kirill A. Shutemov" <kirill@shutemov.name> - 2015-11-10 01:00 +0100
Re: [PATCH] x86/mm: fix regression with huge pages on PAE Toshi Kani <toshi.kani@hpe.com> - 2015-11-10 01:20 +0100
Re: [PATCH] x86/mm: fix regression with huge pages on PAE Borislav Petkov <bp@alien8.de> - 2015-11-10 13:50 +0100
Re: [PATCH] x86/mm: fix regression with huge pages on PAE "Kirill A. Shutemov" <kirill@shutemov.name> - 2015-11-10 15:00 +0100
Re: [PATCH] x86/mm: fix regression with huge pages on PAE Borislav Petkov <bp@alien8.de> - 2015-11-10 15:50 +0100
Re: [PATCH] x86/mm: fix regression with huge pages on PAE "Kirill A. Shutemov" <kirill@shutemov.name> - 2015-11-10 16:10 +0100
Re: [PATCH] x86/mm: fix regression with huge pages on PAE Borislav Petkov <bp@alien8.de> - 2015-11-10 18:10 +0100
Re: [PATCH] x86/mm: fix regression with huge pages on PAE Borislav Petkov <bp@alien8.de> - 2015-11-11 11:00 +0100
Re: [PATCH] x86/mm: fix regression with huge pages on PAE Ingo Molnar <mingo@kernel.org> - 2015-11-12 08:50 +0100
Re: [PATCH] x86/mm: fix regression with huge pages on PAE "Kirill A. Shutemov" <kirill@shutemov.name> - 2015-11-12 09:00 +0100
Re: [PATCH] x86/mm: fix regression with huge pages on PAE Ingo Molnar <mingo@kernel.org> - 2015-11-12 09:10 +0100
Re: [PATCH] x86/mm: fix regression with huge pages on PAE "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-11-12 09:50 +0100
Re: [PATCH] x86/mm: fix regression with huge pages on PAE Ingo Molnar <mingo@kernel.org> - 2015-11-12 10:00 +0100
Re: [PATCH] x86/mm: fix regression with huge pages on PAE "Kirill A. Shutemov" <kirill@shutemov.name> - 2015-11-12 10:10 +0100
Re: [PATCH] x86/mm: fix regression with huge pages on PAE Ingo Molnar <mingo@kernel.org> - 2015-11-12 14:40 +0100
Re: [PATCH] x86/mm: fix regression with huge pages on PAE Ingo Molnar <mingo@kernel.org> - 2015-11-12 10:00 +0100
Re: [PATCH] x86/mm: fix regression with huge pages on PAE Linus Torvalds <torvalds@linux-foundation.org> - 2015-11-12 20:30 +0100
Re: [PATCH] x86/mm: fix regression with huge pages on PAE Dan Williams <dan.j.williams@gmail.com> - 2015-11-13 10:10 +0100
csiph-web