<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/boot/Makefile, branch linux-3.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.17.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.17.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2014-05-05T22:23:35Z</updated>
<entry>
<title>x86, build: Don't get confused by local symbols</title>
<updated>2014-05-05T22:23:35Z</updated>
<author>
<name>H. Peter Anvin</name>
</author>
<published>2014-05-05T22:23:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ac008fe0a3236729751ccde655c215b436dfdaeb'/>
<id>urn:sha1:ac008fe0a3236729751ccde655c215b436dfdaeb</id>
<content type='text'>
arch/x86/crypto/sha1_avx2_x86_64_asm.S introduced _end as a local
symbol, which broke the build under certain circumstances.  Although
the wisdom of _end as a local symbol can definitely be questioned, the
build should not break for that reason.

Thus, filter the output of nm to only get global symbols of
appropriate type.

Reported-by: Andy Lutomirski &lt;luto@amacapital.net&gt;
Cc: Chandramouli Narayanan &lt;mouli@linux.intel.com&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
Link: http://lkml.kernel.org/n/tip-uxm3j3w3odglcwhafwq5tjqu@git.kernel.org
</content>
</entry>
<entry>
<title>x86/efi: Firmware agnostic handover entry points</title>
<updated>2014-03-04T21:25:06Z</updated>
<author>
<name>Matt Fleming</name>
</author>
<published>2014-01-10T15:54:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b8ff87a6158886771677e6dc8139bac6e3cba717'/>
<id>urn:sha1:b8ff87a6158886771677e6dc8139bac6e3cba717</id>
<content type='text'>
The EFI handover code only works if the "bitness" of the firmware and
the kernel match, i.e. 64-bit firmware and 64-bit kernel - it is not
possible to mix the two. This goes against the tradition that a 32-bit
kernel can be loaded on a 64-bit BIOS platform without having to do
anything special in the boot loader. Linux distributions, for one thing,
regularly run only 32-bit kernels on their live media.

Despite having only one 'handover_offset' field in the kernel header,
EFI boot loaders use two separate entry points to enter the kernel based
on the architecture the boot loader was compiled for,

    (1) 32-bit loader: handover_offset
    (2) 64-bit loader: handover_offset + 512

Since we already have two entry points, we can leverage them to infer
the bitness of the firmware we're running on, without requiring any boot
loader modifications, by making (1) and (2) valid entry points for both
CONFIG_X86_32 and CONFIG_X86_64 kernels.

To be clear, a 32-bit boot loader will always use (1) and a 64-bit boot
loader will always use (2). It's just that, if a single kernel image
supports (1) and (2) that image can be used with both 32-bit and 64-bit
boot loaders, and hence both 32-bit and 64-bit EFI.

(1) and (2) must be 512 bytes apart at all times, but that is already
part of the boot ABI and we could never change that delta without
breaking existing boot loaders anyhow.

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge commit 'f4bcd8ccddb02833340652e9f46f5127828eb79d' into x86/build</title>
<updated>2014-01-29T17:07:00Z</updated>
<author>
<name>H. Peter Anvin</name>
</author>
<published>2014-01-29T17:07:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4064e0ea3c0e9427e6c22392c4b69b4bfa1b7125'/>
<id>urn:sha1:4064e0ea3c0e9427e6c22392c4b69b4bfa1b7125</id>
<content type='text'>
Bring in upstream merge of x86/kaslr for future patches.

Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>x86: Remove duplication of 16-bit CFLAGS</title>
<updated>2014-01-22T12:21:45Z</updated>
<author>
<name>David Woodhouse</name>
</author>
<published>2014-01-08T11:21:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1c678da3bd1339299ab667af68cad5032367fb1c'/>
<id>urn:sha1:1c678da3bd1339299ab667af68cad5032367fb1c</id>
<content type='text'>
Define them once in arch/x86/Makefile instead of twice.

Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Link: http://lkml.kernel.org/r/1389180083-23249-1-git-send-email-David.Woodhouse@intel.com
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'x86-kaslr-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2014-01-20T22:45:50Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2014-01-20T22:45:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f4bcd8ccddb02833340652e9f46f5127828eb79d'/>
<id>urn:sha1:f4bcd8ccddb02833340652e9f46f5127828eb79d</id>
<content type='text'>
Pull x86 kernel address space randomization support from Peter Anvin:
 "This enables kernel address space randomization for x86"

* 'x86-kaslr-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, kaslr: Clarify RANDOMIZE_BASE_MAX_OFFSET
  x86, kaslr: Remove unused including &lt;linux/version.h&gt;
  x86, kaslr: Use char array to gain sizeof sanity
  x86, kaslr: Add a circular multiply for better bit diffusion
  x86, kaslr: Mix entropy sources together as needed
  x86/relocs: Add percpu fixup for GNU ld 2.23
  x86, boot: Rename get_flags() and check_flags() to *_cpuflags()
  x86, kaslr: Raise the maximum virtual address to -1 GiB on x86_64
  x86, kaslr: Report kernel offset on panic
  x86, kaslr: Select random position from e820 maps
  x86, kaslr: Provide randomness functions
  x86, kaslr: Return location from decompress_kernel
  x86, boot: Move CPU flags out of cpucheck
  x86, relocs: Add more per-cpu gold special cases
</content>
</entry>
<entry>
<title>x86, build: Pass in additional -mno-mmx, -mno-sse options</title>
<updated>2013-12-09T23:52:39Z</updated>
<author>
<name>H. Peter Anvin</name>
</author>
<published>2013-12-09T23:43:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8b3b005d675726e38bc504d2e35a991e55819155'/>
<id>urn:sha1:8b3b005d675726e38bc504d2e35a991e55819155</id>
<content type='text'>
In checkin

    5551a34e5aea x86-64, build: Always pass in -mno-sse

we unconditionally added -mno-sse to the main build, to keep newer
compilers from generating SSE instructions from autovectorization.
However, this did not extend to the special environments
(arch/x86/boot, arch/x86/boot/compressed, and arch/x86/realmode/rm).
Add -mno-sse to the compiler command line for these environments, and
add -mno-mmx to all the environments as well, as we don't want a
compiler to generate MMX code either.

This patch also removes a $(cc-option) call for -m32, since we have
long since stopped supporting compilers too old for the -m32 option,
and in fact hardcode it in other places in the Makefiles.

Reported-by: Kevin B. Smith &lt;kevin.b.smith@intel.com&gt;
Cc: Sunil K. Pandey &lt;sunil.k.pandey@intel.com&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
Cc: H. J. Lu &lt;hjl.tools@gmail.com&gt;
Link: http://lkml.kernel.org/n/tip-j21wzqv790q834n7yc6g80j1@git.kernel.org
Cc: &lt;stable@vger.kernel.org&gt; # build fix only
</content>
</entry>
<entry>
<title>x86, boot: Move CPU flags out of cpucheck</title>
<updated>2013-10-13T10:12:02Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2013-10-11T00:18:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dd78b97367bd575918204cc89107c1479d3fc1a7'/>
<id>urn:sha1:dd78b97367bd575918204cc89107c1479d3fc1a7</id>
<content type='text'>
Refactor the CPU flags handling out of the cpucheck routines so that
they can be reused by the future ASLR routines (in order to detect CPU
features like RDRAND and RDTSC).

This reworks has_eflag() and has_fpu() to be used on both 32-bit and
64-bit, and refactors the calls to cpuid to make them PIC-safe on 32-bit.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: http://lkml.kernel.org/r/1381450698-28710-2-git-send-email-keescook@chromium.org
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>x86, build: move build output statistics away from stderr</title>
<updated>2013-09-26T21:05:41Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2013-09-06T18:15:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=809373e29a183e4d4f0e4f56ef8b211c6219123c'/>
<id>urn:sha1:809373e29a183e4d4f0e4f56ef8b211c6219123c</id>
<content type='text'>
When building on x86, the final image building step always emits stats
to stderr, even though this information is neither a warning nor an error:

  BUILD   arch/x86/boot/bzImage
Setup is 16188 bytes (padded to 16384 bytes).
System is 6368 kB
CRC cbe50c61

Validating automated builds would be cleaner if stderr did not have to
filter out these lines. Instead, change how tools/build is called, and
make the zoffset header unconditional, and write to a specified file
instead of to stdout, which can then be used for statistics, leaving
stderr open for legitimate warnings and errors, like the output from
die().

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: http://lkml.kernel.org/r/20130906181532.GA31260@www.outflux.net
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>x86, build: Dynamically find entry points in compressed startup code</title>
<updated>2013-01-28T04:19:37Z</updated>
<author>
<name>David Woodhouse</name>
</author>
<published>2013-01-10T14:31:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=99f857db8857aff691c51302f93648263ed07eb1'/>
<id>urn:sha1:99f857db8857aff691c51302f93648263ed07eb1</id>
<content type='text'>
We have historically hard-coded entry points in head.S just so it's easy
to build the executable/bzImage headers with references to them.

Unfortunately, this leads to boot loaders abusing these "known" addresses
even when they are *explicitly* told that they "should look at the ELF
header to find this address, as it may change in the future". And even
when the address in question *has* actually been changed in the past,
without fanfare or thought to compatibility.

Thus we have bootloaders doing stunningly broken things like jumping
to offset 0x200 in the kernel startup code in 64-bit mode, *hoping*
that startup_64 is still there (it has moved at least once
before). And hoping that it's actually a 64-bit kernel despite the
fact that we don't give them any indication of that fact.

This patch should hopefully remove the temptation to abuse internal
addresses in future, where sternly worded comments have not sufficed.
Instead of having hard-coded addresses and saying "please don't abuse
these", we actually pull the addresses out of the ELF payload into
zoffset.h, and make build.c shove them back into the right places in
the bzImage header.

Rather than including zoffset.h into build.c and thus having to rebuild
the tool for every kernel build, we parse it instead. The parsing code
is small and simple.

This patch doesn't actually move any of the interesting entry points, so
any offending bootloader will still continue to "work" after this patch
is applied. For some version of "work" which includes jumping into the
compressed payload and crashing, if the bzImage it's given is a 32-bit
kernel. No change there then.

[ hpa: some of the issues in the description are addressed or
  retconned by the 2.12 boot protocol.  This patch has been edited to
  only remove fixed addresses that were *not* thus retconned. ]

Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Link: http://lkml.kernel.org/r/1358513837.2397.247.camel@shinybook.infradead.org
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
Cc: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
</entry>
<entry>
<title>x86, boot: Explicitly include autoconf.h for hostprogs</title>
<updated>2012-10-14T19:41:28Z</updated>
<author>
<name>Matt Fleming</name>
</author>
<published>2012-10-12T10:19:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b6eea87fc6850d3531a64a27d2323a4498cd4e43'/>
<id>urn:sha1:b6eea87fc6850d3531a64a27d2323a4498cd4e43</id>
<content type='text'>
The hostprogs need access to the CONFIG_* symbols found in
include/generated/autoconf.h.  But commit abbf1590de22 ("UAPI: Partition
the header include path sets and add uapi/ header directories") replaced
$(LINUXINCLUDE) with $(USERINCLUDE) which doesn't contain the necessary
include paths.

This has the undesirable effect of breaking the EFI boot stub because
the #ifdef CONFIG_EFI_STUB code in arch/x86/boot/tools/build.c is
never compiled.

It should also be noted that because $(USERINCLUDE) isn't exported by
the top-level Makefile it's actually empty in arch/x86/boot/Makefile.

Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
