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, 13 Feb 2021 13:17:11 -0500
From:   Pavel Tatashin <pasha.tatashin@...een.com>
To:     Tyler Hicks <tyhicks@...ux.microsoft.com>
Cc:     James Morris <jmorris@...ei.org>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Anshuman Khandual <anshuman.khandual@....com>,
        Mike Rapoport <rppt@...nel.org>,
        Logan Gunthorpe <logang@...tatee.com>, ardb@...nel.org,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] arm64: mm: correct the start of physical address in
 linear map

> We're ignoring the portion from the linear mapping's start PA to the
> point of wraparound. Could the start and end of the hot plugged memory
> fall within this range and, as a result, the hot plug operation be
> incorrectly blocked?

Hi Tyler,

Thank you for looking at this fix. The maximum addressable PA's can be
seen in this function: id_aa64mmfr0_parange_to_phys_shift(). For
example for PA shift 32, the linear map must be able to cover any
physical addresses from 0 to "1 << 32". Therefore, 0 to __pa(PAGE_END
- 1); must include 0 to "1<<32".

The randomization of the linear map tries to hide where exactly within
the linear map the [0 to max_phys] addresses are located by changing
PHYS_OFFSET (linear map space is usually much bigger than PA space).
Therefore, the beginning or end of a linear map can actually convert
to completely bagus high PA addresses, but this is normal.

Thank you,
Pasha

>
> Tyler
>
> > +
> >       /*
> >        * Linear mapping region is the range [PAGE_OFFSET..(PAGE_END - 1)]
> >        * accommodating both its ends but excluding PAGE_END. Max physical
> >        * range which can be mapped inside this linear mapping range, must
> >        * also be derived from its end points.
> >        */
> > -     return start >= __pa(_PAGE_OFFSET(vabits_actual)) &&
> > -            (start + size - 1) <= __pa(PAGE_END - 1);
> > +     return start >= start_linear_pa && (start + size - 1) <= end_linear_pa;
> >  }
> >
> >  int arch_add_memory(int nid, u64 start, u64 size,
> > --
> > 2.25.1
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ