<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/tools, 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-12-06T23:57:15Z</updated>
<entry>
<title>x86, kaslr: Handle Gold linker for finding bss/brk</title>
<updated>2014-12-06T23:57:15Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2014-11-18T00:16:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7b58b42442f7e5e8194e23f22e9cedd9543f8354'/>
<id>urn:sha1:7b58b42442f7e5e8194e23f22e9cedd9543f8354</id>
<content type='text'>
commit 70b61e362187b5fccac206506d402f3424e3e749 upstream.

When building with the Gold linker, the .bss and .brk areas of vmlinux
are shown as consecutive instead of having the same file offset. Allow
for either state, as long as things add up correctly.

Fixes: e6023367d779 ("x86, kaslr: Prevent .bss from overlaping initrd")
Reported-by: Markus Trippelsdorf &lt;markus@trippelsdorf.de&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Junjie Mao &lt;eternal.n08@gmail.com&gt;
Link: http://lkml.kernel.org/r/20141118001604.GA25045@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, kaslr: Prevent .bss from overlaping initrd</title>
<updated>2014-11-21T17:23:13Z</updated>
<author>
<name>Junjie Mao</name>
</author>
<published>2014-10-31T13:40:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=664653016626d15d3e898aabd0785f1b785f6400'/>
<id>urn:sha1:664653016626d15d3e898aabd0785f1b785f6400</id>
<content type='text'>
commit e6023367d779060fddc9a52d1f474085b2b36298 upstream.

When choosing a random address, the current implementation does not take into
account the reversed space for .bss and .brk sections. Thus the relocated kernel
may overlap other components in memory. Here is an example of the overlap from a
x86_64 kernel in qemu (the ranges of physical addresses are presented):

 Physical Address

    0x0fe00000                  --+--------------------+  &lt;-- randomized base
                               /  |  relocated kernel  |
                   vmlinux.bin    | (from vmlinux.bin) |
    0x1336d000    (an ELF file)   +--------------------+--
                               \  |                    |  \
    0x1376d870                  --+--------------------+   |
                                  |    relocs table    |   |
    0x13c1c2a8                    +--------------------+   .bss and .brk
                                  |                    |   |
    0x13ce6000                    +--------------------+   |
                                  |                    |  /
    0x13f77000                    |       initrd       |--
                                  |                    |
    0x13fef374                    +--------------------+

The initrd image will then be overwritten by the memset during early
initialization:

[    1.655204] Unpacking initramfs...
[    1.662831] Initramfs unpacking failed: junk in compressed archive

This patch prevents the above situation by requiring a larger space when looking
for a random kernel base, so that existing logic can effectively avoids the
overlap.

[kees: switched to perl to avoid hex translation pain in mawk vs gawk]
[kees: calculated overlap without relocs table]

Fixes: 82fa9637a2 ("x86, kaslr: Select random position from e820 maps")
Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Junjie Mao &lt;eternal.n08@gmail.com&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Josh Triplett &lt;josh@joshtriplett.org&gt;
Cc: Matt Fleming &lt;matt.fleming@intel.com&gt;
Cc: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Cc: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Link: http://lkml.kernel.org/r/1414762838-13067-1-git-send-email-eternal.n08@gmail.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/build: Supress "Nothing to be done for ..." messages</title>
<updated>2014-04-14T09:44:36Z</updated>
<author>
<name>Masahiro Yamada</name>
</author>
<published>2014-04-10T01:35:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e6bcd1a8974fab74e9fd679fb64462b2a8deff41'/>
<id>urn:sha1:e6bcd1a8974fab74e9fd679fb64462b2a8deff41</id>
<content type='text'>
When we build an already built kernel again, arch/x86/syscalls/Makefile
and arch/x86/tools/Makefile emits "Nothing to be done for ..."
messages.

Here is the command log:

  $ make defconfig
     [ snip ]
  $ make
     [ snip ]
  $ make
  make[1]: Nothing to be done for `all'.            &lt;-----
  make[1]: Nothing to be done for `relocs'.         &lt;-----
    CHK     include/config/kernel.release
    CHK     include/generated/uapi/linux/version.h

Besides not emitting those, "all" and "relocs" should be added to PHONY as well.

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Acked-by: Peter Foley &lt;pefoley2@pefoley.com&gt;
Acked-by: Michal Marek &lt;mmarek@suse.cz&gt;
Link: http://lkml.kernel.org/r/1397093742-11144-1-git-send-email-yamada.m@jp.panasonic.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>x86, vdso: Make vsyscall_gtod_data handling x86 generic</title>
<updated>2014-03-18T19:51:52Z</updated>
<author>
<name>Stefani Seibold</name>
</author>
<published>2014-03-17T22:22:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d2312e3379d581d2c3603357a0181046448e1de3'/>
<id>urn:sha1:d2312e3379d581d2c3603357a0181046448e1de3</id>
<content type='text'>
This patch move the vsyscall_gtod_data handling out of vsyscall_64.c
into an additonal file vsyscall_gtod.c to make the functionality
available for x86 32 bit kernel.

It also adds a new vsyscall_32.c which setup the VVAR page.

Reviewed-by: Andy Lutomirski &lt;luto@amacapital.net&gt;
Signed-off-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Link: http://lkml.kernel.org/r/1395094933-14252-2-git-send-email-stefani@seibold.net
Signed-off-by: H. Peter Anvin &lt;hpa@linux.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, relocs: Add manual debug mode</title>
<updated>2014-01-22T12:21:45Z</updated>
<author>
<name>Michael Davidson</name>
</author>
<published>2014-01-21T20:32:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=214a88768d34079b70e0f2ba37b91a3b717fddbb'/>
<id>urn:sha1:214a88768d34079b70e0f2ba37b91a3b717fddbb</id>
<content type='text'>
Improve the debuggability of relocations output. When trying to compare
the output between different linkers, it's handy to be able to see the
section names in output.

Signed-off-by: Michael Davidson &lt;md@google.com&gt;
Link: http://lkml.kernel.org/r/20140121203223.GA12649@www.outflux.net
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>x86/relocs: Add percpu fixup for GNU ld 2.23</title>
<updated>2013-10-18T06:45:09Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2013-10-16T06:43:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aec58bafaf89279522c44ec8ca9211eabb2b6976'/>
<id>urn:sha1:aec58bafaf89279522c44ec8ca9211eabb2b6976</id>
<content type='text'>
The GNU linker tries to put __per_cpu_load into the percpu area,
resulting in a lack of its relocation. Force this symbol to be
relocated. Seen starting with GNU ld 2.23 and later.

Reported-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Michael Davidson &lt;md@google.com&gt;
Cc: Cong Ding &lt;dinggnu@gmail.com&gt;
Link: http://lkml.kernel.org/r/20131016064314.GA2739@www.outflux.net
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>x86, relocs: Add more per-cpu gold special cases</title>
<updated>2013-10-13T10:11:57Z</updated>
<author>
<name>Michael Davidson</name>
</author>
<published>2013-10-11T01:39:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d751c169e9a6f0f853346f1184881422bd10b3c2'/>
<id>urn:sha1:d751c169e9a6f0f853346f1184881422bd10b3c2</id>
<content type='text'>
The "gold" linker doesn't seem to put some additional per-cpu cases in
the right place. Add these to the per-cpu check. Without this, the kASLR
patch series fails to correctly apply relocations, and fails to boot.

Signed-off-by: Michael Davidson &lt;md@google.com&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: http://lkml.kernel.org/r/20131011013954.GA28902@www.outflux.net
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2013-09-04T15:39:38Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2013-09-04T15:39:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3d7e5fc37f91c3ad4974262e173d9ba36139652a'/>
<id>urn:sha1:3d7e5fc37f91c3ad4974262e173d9ba36139652a</id>
<content type='text'>
Pull x86/asm changes from Ingo Molnar:
 "Main changes:

   - Apply low level mutex optimization on x86-64, by Wedson Almeida
     Filho.

   - Change bitops to be naturally 'long', by H Peter Anvin.

   - Add TSX-NI opcodes support to the x86 (instrumentation) decoder, by
     Masami Hiramatsu.

   - Add clang compatibility adjustments/workarounds, by Jan-Simon
     Möller"

* 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, doc: Update uaccess.h comment to reflect clang changes
  x86, asm: Fix a compilation issue with clang
  x86, asm: Extend definitions of _ASM_* with a raw format
  x86, insn: Add new opcodes as of June, 2013
  x86/ia32/asm: Remove unused argument in macro
  x86, bitops: Change bitops to be native operand size
  x86: Use asm-goto to implement mutex fast path on x86-64
</content>
</entry>
<entry>
<title>x86, insn: Add new opcodes as of June, 2013</title>
<updated>2013-08-06T15:08:47Z</updated>
<author>
<name>Masami Hiramatsu</name>
</author>
<published>2013-08-06T07:37:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3e21bb092d07e6d394e6d754057d4ff2d363d318'/>
<id>urn:sha1:3e21bb092d07e6d394e6d754057d4ff2d363d318</id>
<content type='text'>
Add TSX-NI related instructions and new instructions to
x86-opcode-map.txt according to the Intel(R) 64 and IA-32
Architectures Software Developer's Manual Vol2C (June, 2013).
This also includes below updates.
 - Fix a typo of MWAIT (the lack of (11B)).
 - Change NOP Ev to prefetchw Ev
 - Add CRC32 new prefix style (66&amp;F2)
 - Add ADCX, ADOX, RDSEED, CLAC and STAC instructions

Signed-off-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Link: http://lkml.kernel.org/r/20130806073750.4049.12365.stgit@udc4-manage.rcp.hitachi.co.jp
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
</feed>
