<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/boot/compressed, branch linux-3.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-02-06T16:34:52Z</updated>
<entry>
<title>x86/kaslr: Fix incorrect i8254 outb() parameters</title>
<updated>2019-02-06T16:34:52Z</updated>
<author>
<name>Daniel Drake</name>
</author>
<published>2019-01-07T03:40:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=444fc5b3c8040ec3b50b8df83f73184b6496d5e7'/>
<id>urn:sha1:444fc5b3c8040ec3b50b8df83f73184b6496d5e7</id>
<content type='text'>
commit 7e6fc2f50a3197d0e82d1c0e86282976c9e6c8a4 upstream.

The outb() function takes parameters value and port, in that order.  Fix
the parameters used in the kalsr i8254 fallback code.

Fixes: 5bfce5ef55cb ("x86, kaslr: Provide randomness functions")
Signed-off-by: Daniel Drake &lt;drake@endlessm.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: bp@alien8.de
Cc: hpa@zytor.com
Cc: linux@endlessm.com
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20190107034024.15005-1-drake@endlessm.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>efi: Avoid potential crashes, fix the 'struct efi_pci_io_protocol_32' definition for mixed mode</title>
<updated>2018-05-25T08:54:54Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2018-05-04T05:59:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=56bd8525fd87605462f8090d25ccfdf4e1d68065'/>
<id>urn:sha1:56bd8525fd87605462f8090d25ccfdf4e1d68065</id>
<content type='text'>
commit 0b3225ab9407f557a8e20f23f37aa7236c10a9b1 upstream.

Mixed mode allows a kernel built for x86_64 to interact with 32-bit
EFI firmware, but requires us to define all struct definitions carefully
when it comes to pointer sizes.

'struct efi_pci_io_protocol_32' currently uses a 'void *' for the
'romimage' field, which will be interpreted as a 64-bit field
on such kernels, potentially resulting in bogus memory references
and subsequent crashes.

Tested-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Matt Fleming &lt;matt@codeblueprint.co.uk&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20180504060003.19618-13-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>x86-64: Handle PC-relative relocations on per-CPU data</title>
<updated>2017-09-02T05:05:46Z</updated>
<author>
<name>Jan Beulich</name>
</author>
<published>2014-11-04T08:50:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=edb9d2d5e647e7a8521b0d35f8452deb02dfd138'/>
<id>urn:sha1:edb9d2d5e647e7a8521b0d35f8452deb02dfd138</id>
<content type='text'>
commit 6d24c5f72dfb26e5fa7f02fa9266dfdbae41adba upstream.

This is in preparation of using RIP-relative addressing in many of the
per-CPU accesses.

Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Link: http://lkml.kernel.org/r/5458A15A0200007800044A9A@mail.emea.novell.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>x86/boot: Add CONFIG_PARAVIRT_SPINLOCKS quirk to arch/x86/boot/compressed/misc.h</title>
<updated>2017-02-08T08:43:05Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2012-11-23T18:19:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5e471aea29514fac89871bc23eff49d62f0d8adc'/>
<id>urn:sha1:5e471aea29514fac89871bc23eff49d62f0d8adc</id>
<content type='text'>
commit 927392d73a97d8d235bb65400e2e3c7f0bec2b6f upstream.

Linus reported the following new warning on x86 allmodconfig with GCC 5.1:

  &gt; ./arch/x86/include/asm/spinlock.h: In function ‘arch_spin_lock’:
  &gt; ./arch/x86/include/asm/spinlock.h:119:3: warning: implicit declaration
  &gt; of function ‘__ticket_lock_spinning’ [-Wimplicit-function-declaration]
  &gt;    __ticket_lock_spinning(lock, inc.tail);
  &gt;    ^

This warning triggers because of these hacks in misc.h:

  /*
   * we have to be careful, because no indirections are allowed here, and
   * paravirt_ops is a kind of one. As it will only run in baremetal anyway,
   * we just keep it from happening
   */
  #undef CONFIG_PARAVIRT
  #undef CONFIG_KASAN

But these hacks were not updated when CONFIG_PARAVIRT_SPINLOCKS was added,
and eventually (with the introduction of queued paravirt spinlocks in
recent kernels) this created an invalid Kconfig combination and broke
the build.

So add a CONFIG_PARAVIRT_SPINLOCKS #undef line as well.

Also remove the _ASM_X86_DESC_H quirk: that undocumented quirk
was originally added ages ago, in:

  099e1377269a ("x86: use ELF format in compressed images.")

and I went back to that kernel (and fixed up the main Makefile
which didn't build anymore) and checked what failure it
avoided: it avoided an include file dependencies related
build failure related to our old x86-platforms code.

That old code is long gone, the header dependencies got cleaned
up, and the build does not fail anymore with the totality of
asm/desc.h included - so remove the quirk.

Reported-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>x86/efi: Use all 64 bit of efi_memmap in setup_e820()</title>
<updated>2015-08-27T17:25:49Z</updated>
<author>
<name>Dmitry Skorodumov</name>
</author>
<published>2015-07-28T14:38:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3c239f5a90855526c93c38687c1437a153d737eb'/>
<id>urn:sha1:3c239f5a90855526c93c38687c1437a153d737eb</id>
<content type='text'>
[ Upstream commit 7cc03e48965453b5df1cce5062c826189b04b960 ]

The efi_info structure stores low 32 bits of memory map
in efi_memmap and high 32 bits in efi_memmap_hi.

While constructing pointer in the setup_e820(), need
to take into account all 64 bit of the pointer.

It is because on 64bit machine the function
efi_get_memory_map() may return full 64bit pointer and before
the patch that pointer was truncated.

The issue is triggered on Parallles virtual machine and
fixed with this patch.

Signed-off-by: Dmitry Skorodumov &lt;sdmitry@parallels.com&gt;
Cc: Denis V. Lunev &lt;den@openvz.org&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>x86/efi: Store upper bits of command line buffer address in ext_cmd_line_ptr</title>
<updated>2015-06-28T17:39:26Z</updated>
<author>
<name>Roy Franz</name>
</author>
<published>2015-04-15T23:32:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c2c3964c8567d5d2b6bfa8534202850112de1d7d'/>
<id>urn:sha1:c2c3964c8567d5d2b6bfa8534202850112de1d7d</id>
<content type='text'>
[ Upstream commit 98b228f55014870092c15d7d168fecac69f2f12a ]

Until now, the EFI stub was only setting the 32 bit cmd_line_ptr in
the setup_header structure, so on 64 bit platforms this could be truncated.
This patch adds setting the upper bits of the buffer address in
ext_cmd_line_ptr.  This case was likely never hit, as the allocation
for this buffer is done at the lowest available address.  Only
x86_64 kernels have this problem, as the 1-1 mapping mandated
by EFI ensures that all memory is 32 bit addressable on 32 bit
platforms.  The EFI stub does not support mixed mode, so the
32 bit kernel on 64 bit firmware case does not need to be handled.

Signed-off-by: Roy Franz &lt;roy.franz@linaro.org&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>x86/efi: Avoid triple faults during EFI mixed mode calls</title>
<updated>2015-03-06T22:53:06Z</updated>
<author>
<name>Matt Fleming</name>
</author>
<published>2015-01-13T15:25:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=55c0226ff05f539b49b0cbc8b9f1ddc0856f0429'/>
<id>urn:sha1:55c0226ff05f539b49b0cbc8b9f1ddc0856f0429</id>
<content type='text'>
commit 96738c69a7fcdbf0d7c9df0c8a27660011e82a7b upstream.

Andy pointed out that if an NMI or MCE is received while we're in the
middle of an EFI mixed mode call a triple fault will occur. This can
happen, for example, when issuing an EFI mixed mode call while running
perf.

The reason for the triple fault is that we execute the mixed mode call
in 32-bit mode with paging disabled but with 64-bit kernel IDT handlers
installed throughout the call.

At Andy's suggestion, stop playing the games we currently do at runtime,
such as disabling paging and installing a 32-bit GDT for __KERNEL_CS. We
can simply switch to the __KERNEL32_CS descriptor before invoking
firmware services, and run in compatibility mode. This way, if an
NMI/MCE does occur the kernel IDT handler will execute correctly, since
it'll jump to __KERNEL_CS automatically.

However, this change is only possible post-ExitBootServices(). Before
then the firmware "owns" the machine and expects for its 32-bit IDT
handlers to be left intact to service interrupts, etc.

So, we now need to distinguish between early boot and runtime
invocations of EFI services. During early boot, we need to restore the
GDT that the firmware expects to be present. We can only jump to the
__KERNEL32_CS code segment for mixed mode calls after ExitBootServices()
has been invoked.

A liberal sprinkling of comments in the thunking code should make the
differences in early and late environments more apparent.

Reported-by: Andy Lutomirski &lt;luto@amacapital.net&gt;
Tested-by: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>x86, build: replace Perl script with Shell script</title>
<updated>2015-02-06T06:36:00Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2015-01-26T20:58:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=179ac907a28e4d890314757f921880121642e3e5'/>
<id>urn:sha1:179ac907a28e4d890314757f921880121642e3e5</id>
<content type='text'>
commit d69911a68c865b152a067feaa45e98e6bb0f655b upstream.

Commit e6023367d779 ("x86, kaslr: Prevent .bss from overlaping initrd")
added Perl to the required build environment.  This reimplements in
shell the Perl script used to find the size of the kernel with bss and
brk added.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reported-by: Rob Landley &lt;rob@landley.net&gt;
Acked-by: Rob Landley &lt;rob@landley.net&gt;
Cc: Anca Emanuel &lt;anca.emanuel@gmail.com&gt;
Cc: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Cc: Junjie Mao &lt;eternal.n08@gmail.com&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>x86, boot: Skip relocs when load address unchanged</title>
<updated>2015-01-30T01:40:45Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2015-01-16T00:51:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c546e47591d7c8b4fa3dc2d9dae14c127f0c3b22'/>
<id>urn:sha1:c546e47591d7c8b4fa3dc2d9dae14c127f0c3b22</id>
<content type='text'>
commit f285f4a21c3253887caceed493089ece17579d59 upstream.

On 64-bit, relocation is not required unless the load address gets
changed. Without this, relocations do unexpected things when the kernel
is above 4G.

Reported-by: Baoquan He &lt;bhe@redhat.com&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Tested-by: Thomas D. &lt;whissi@whissi.de&gt;
Cc: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Cc: Jan Beulich &lt;JBeulich@suse.com&gt;
Cc: Junjie Mao &lt;eternal.n08@gmail.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Link: http://lkml.kernel.org/r/20150116005146.GA4212@www.outflux.net
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>x86: Use $(OBJDUMP) instead of plain objdump</title>
<updated>2014-11-23T20:21:53Z</updated>
<author>
<name>Chris Clayton</name>
</author>
<published>2014-11-22T09:51:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e2e68ae688b0a3766cd75aedf4ed4e39be402009'/>
<id>urn:sha1:e2e68ae688b0a3766cd75aedf4ed4e39be402009</id>
<content type='text'>
commit e6023367d779 'x86, kaslr: Prevent .bss from overlaping initrd'
broke the cross compile of x86. It added a objdump invocation, which
invokes the host native objdump and ignores an active cross tool
chain.

Use $(OBJDUMP) instead which takes the CROSS_COMPILE prefix into
account.

[ tglx: Massage changelog and use $(OBJDUMP) ]

Fixes: e6023367d779 'x86, kaslr: Prevent .bss from overlaping initrd'
Signed-off-by: Chris Clayton &lt;chris2553@googlemail.com&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Borislav Petkov &lt;bp@suse.de&gt;
Cc: Junjie Mao &lt;eternal.n08@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/54705C8E.1080400@googlemail.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
</feed>
