<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/arm64/include/asm/fixmap.h, branch linux-4.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-03-23T08:10:43Z</updated>
<entry>
<title>arm64: entry: Allow the trampoline text to occupy multiple pages</title>
<updated>2022-03-23T08:10:43Z</updated>
<author>
<name>James Morse</name>
</author>
<published>2022-03-18T17:48:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=22fdfcf1c2cea8e6dc383d46cbbe59d476d24a96'/>
<id>urn:sha1:22fdfcf1c2cea8e6dc383d46cbbe59d476d24a96</id>
<content type='text'>
commit a9c406e6462ff14956d690de7bbe5131a5677dc9 upstream.

Adding a second set of vectors to .entry.tramp.text will make it
larger than a single 4K page.

Allow the trampoline text to occupy up to three pages by adding two
more fixmap slots. Previous changes to tramp_valias allowed it to reach
beyond a single page.

Reviewed-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: James Morse &lt;james.morse@arm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>arm64: entry: Move the trampoline data page before the text page</title>
<updated>2022-03-23T08:10:42Z</updated>
<author>
<name>James Morse</name>
</author>
<published>2022-03-18T17:48:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=266b1ef1368e06ac4c5a89eb9774ef2bbaa54e19'/>
<id>urn:sha1:266b1ef1368e06ac4c5a89eb9774ef2bbaa54e19</id>
<content type='text'>
commit c091fb6ae059cda563b2a4d93fdbc548ef34e1d6 upstream.

The trampoline code has a data page that holds the address of the vectors,
which is unmapped when running in user-space. This ensures that with
CONFIG_RANDOMIZE_BASE, the randomised address of the kernel can't be
discovered until after the kernel has been mapped.

If the trampoline text page is extended to include multiple sets of
vectors, it will be larger than a single page, making it tricky to
find the data page without knowing the size of the trampoline text
pages, which will vary with PAGE_SIZE.

Move the data page to appear before the text page. This allows the
data page to be found without knowing the size of the trampoline text
pages. 'tramp_vectors' is used to refer to the beginning of the
.entry.tramp.text section, do that explicitly.

Reviewed-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Reviewed-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: James Morse &lt;james.morse@arm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>arm64: kaslr: Put kernel vectors address in separate data page</title>
<updated>2017-12-11T13:41:20Z</updated>
<author>
<name>Will Deacon</name>
</author>
<published>2017-12-06T11:24:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6c27c4082f4f70b9f41df4d0adf51128b40351df'/>
<id>urn:sha1:6c27c4082f4f70b9f41df4d0adf51128b40351df</id>
<content type='text'>
The literal pool entry for identifying the vectors base is the only piece
of information in the trampoline page that identifies the true location
of the kernel.

This patch moves it into a page-aligned region of the .rodata section
and maps this adjacent to the trampoline text via an additional fixmap
entry, which protects against any accidental leakage of the trampoline
contents.

Suggested-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Tested-by: Laura Abbott &lt;labbott@redhat.com&gt;
Tested-by: Shanker Donthineni &lt;shankerd@codeaurora.org&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64: mm: Map entry trampoline into trampoline and kernel page tables</title>
<updated>2017-12-11T13:40:50Z</updated>
<author>
<name>Will Deacon</name>
</author>
<published>2017-11-14T14:14:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=51a0048beb449682d632d0af52a515adb9f9882e'/>
<id>urn:sha1:51a0048beb449682d632d0af52a515adb9f9882e</id>
<content type='text'>
The exception entry trampoline needs to be mapped at the same virtual
address in both the trampoline page table (which maps nothing else)
and also the kernel page table, so that we can swizzle TTBR1_EL1 on
exceptions from and return to EL0.

This patch maps the trampoline at a fixed virtual address in the fixmap
area of the kernel virtual address space, which allows the kernel proper
to be randomized with respect to the trampoline when KASLR is enabled.

Reviewed-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Tested-by: Laura Abbott &lt;labbott@redhat.com&gt;
Tested-by: Shanker Donthineni &lt;shankerd@codeaurora.org&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
</content>
</entry>
<entry>
<title>ACPI / APEI: Replace ioremap_page_range() with fixmap</title>
<updated>2017-11-07T11:12:44Z</updated>
<author>
<name>James Morse</name>
</author>
<published>2017-11-06T18:44:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4f89fa286f6729312e227e7c2d764e8e7b9d340e'/>
<id>urn:sha1:4f89fa286f6729312e227e7c2d764e8e7b9d340e</id>
<content type='text'>
Replace ghes_io{re,un}map_pfn_{nmi,irq}()s use of ioremap_page_range()
with __set_fixmap() as ioremap_page_range() may sleep to allocate a new
level of page-table, even if its passed an existing final-address to
use in the mapping.

The GHES driver can only be enabled for architectures that select
HAVE_ACPI_APEI: Add fixmap entries to both x86 and arm64.

clear_fixmap() does the TLB invalidation in __set_fixmap() for arm64
and __set_pte_vaddr() for x86. In each case its the same as the
respective arch_apei_flush_tlb_one().

Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Suggested-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: James Morse &lt;james.morse@arm.com&gt;
Reviewed-by: Borislav Petkov &lt;bp@suse.de&gt;
Tested-by: Tyler Baicar &lt;tbaicar@codeaurora.org&gt;
Tested-by: Toshi Kani &lt;toshi.kani@hpe.com&gt;
[ For the arm64 bits: ]
Acked-by: Will Deacon &lt;will.deacon@arm.com&gt;
[ For the x86 bits: ]
Acked-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Cc: All applicable &lt;stable@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>arm64: Remove fixmap include fragility</title>
<updated>2016-02-26T15:22:53Z</updated>
<author>
<name>Mark Rutland</name>
</author>
<published>2016-02-26T14:31:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3eca86e75ec7a7d4b9a9c8091b11676f7bd2a39f'/>
<id>urn:sha1:3eca86e75ec7a7d4b9a9c8091b11676f7bd2a39f</id>
<content type='text'>
The asm-generic fixmap.h depends on each architecture's fixmap.h to pull
in the definition of PAGE_KERNEL_RO, if this exists. In the absence of
this, FIXMAP_PAGE_RO will not be defined. In mm/early_ioremap.c the
definition of early_memremap_ro is predicated on FIXMAP_PAGE_RO being
defined.

Currently, the arm64 fixmap.h doesn't include pgtable.h for the
definition of PAGE_KERNEL_RO, and as a knock-on effect early_memremap_ro
is not always defined, leading to link-time failures when it is used.
This has been observed with defconfig on next-20160226.

Unfortunately, as pgtable.h includes fixmap.h, adding the include
introduces a circular dependency, which is just as fragile.

Instead, this patch factors out PAGE_KERNEL_RO and other prot
definitions into a new pgtable-prot header which can be included by poth
pgtable.h and fixmap.h, avoiding the  circular dependency, and ensuring
that early_memremap_ro is alwyas defined where it is used.

Signed-off-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Reported-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Acked-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64: mm: add functions to walk tables in fixmap</title>
<updated>2016-02-16T15:10:46Z</updated>
<author>
<name>Mark Rutland</name>
</author>
<published>2016-01-25T11:45:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=961faac114819a01e627fe9c9c82b830bb3849d4'/>
<id>urn:sha1:961faac114819a01e627fe9c9c82b830bb3849d4</id>
<content type='text'>
As a preparatory step to allow us to allocate early page tables from
unmapped memory using memblock_alloc, add new p??_{set,clear}_fixmap*
functions which can be used to walk page tables outside of the linear
mapping by using fixmap slots.

Signed-off-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Reviewed-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Tested-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Reviewed-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Tested-by: Jeremy Linton &lt;jeremy.linton@arm.com&gt;
Cc: Laura Abbott &lt;labbott@fedoraproject.org&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64: Simplify NR_FIX_BTMAPS calculation</title>
<updated>2015-10-19T16:54:07Z</updated>
<author>
<name>Mark Rutland</name>
</author>
<published>2015-10-19T13:19:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e25781e3dea914cc4c34c946bae5fa3d4516516f'/>
<id>urn:sha1:e25781e3dea914cc4c34c946bae5fa3d4516516f</id>
<content type='text'>
We choose NR_FIX_BTMAPS such that each slot (NR_FIX_BTMAPS * PAGE_SIZE)
can address 256K.

Use division to derive NR_FIX_BTMAPS rather than defining it for each
page size.

Signed-off-by:  Mark Rutland &lt;mark.rutland@arm.com&gt;
Signed-off-by:  Suzuki K. Poulose &lt;suzuki.poulose@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64: Fix source code file path in comments</title>
<updated>2015-08-24T09:18:11Z</updated>
<author>
<name>Alexander Kuleshov</name>
</author>
<published>2015-08-23T13:24:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5d3c2c352998fdefdc62795249cfc7311cf36df9'/>
<id>urn:sha1:5d3c2c352998fdefdc62795249cfc7311cf36df9</id>
<content type='text'>
Architecture specific code for i386 and x86_64 was unified and merged to
the arch/x86. This patch fix old path of x86 architecture in a comment
from the arch/arm64/include/asm/fixmap.h.

Signed-off-by: Alexander Kuleshov &lt;kuleshovmail@gmail.com&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
</content>
</entry>
<entry>
<title>arm64: use fixmap region for permanent FDT mapping</title>
<updated>2015-06-02T15:31:33Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2015-06-01T11:40:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=61bd93ce801bb6df36eda257a9d2d16c02863cdd'/>
<id>urn:sha1:61bd93ce801bb6df36eda257a9d2d16c02863cdd</id>
<content type='text'>
Currently, the FDT blob needs to be in the same 512 MB region as
the kernel, so that it can be mapped into the kernel virtual memory
space very early on using a minimal set of statically allocated
translation tables.

Now that we have early fixmap support, we can relax this restriction,
by moving the permanent FDT mapping to the fixmap region instead.
This way, the FDT blob may be anywhere in memory.

This also moves the vetting of the FDT to mmu.c, since the early
init code in head.S does not handle mapping of the FDT anymore.
At the same time, fix up some comments in head.S that have gone stale.

Reviewed-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Tested-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
</feed>
