Skip to content
Snippets Groups Projects
  1. May 15, 2019
  2. May 14, 2019
  3. May 13, 2019
  4. May 12, 2019
  5. May 10, 2019
  6. May 09, 2019
  7. May 08, 2019
  8. May 07, 2019
    • Mauro Carvalho Chehab's avatar
      docs: livepatch: convert docs to ReST and rename to *.rst · 89e33ea7
      Mauro Carvalho Chehab authored
      
      Convert livepatch documentation to ReST format. The changes
      are mostly trivial, as the documents are already on a good
      shape. Just a few markup changes are needed for Sphinx to
      properly parse the docs.
      
      The conversion is actually:
        - add blank lines and identation in order to identify paragraphs;
        - fix tables markups;
        - add some lists markups;
        - mark literal blocks;
        - The in-file TOC becomes a comment, in order to skip it from the
          output, as Sphinx already generates an index there.
        - adjust title markups.
      
      At its new index.rst, let's add a :orphan: while this is not linked to
      the main index.rst file, in order to avoid build warnings.
      
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
      Acked-by: default avatarMiroslav Benes <mbenes@suse.cz>
      Acked-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Acked-by: default avatarJoe Lawrence <joe.lawrence@redhat.com>
      Reviewed-by: default avatarKamalesh Babulal <kamalesh@linux.vnet.ibm.com>
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      89e33ea7
    • Mathieu Desnoyers's avatar
      rseq/selftests: add -no-integrated-as for clang · fdeb89d8
      Mathieu Desnoyers authored
      Ongoing work for asm goto support from clang requires the
      -no-integrated-as compiler flag.
      
      This compiler flag is present in the toplevel kernel Makefile,
      but is not replicated for selftests. Add it specifically for
      the rseq selftest which requires asm goto.
      
      Link: https://reviews.llvm.org/D56571
      
      
      Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      CC: Nick Desaulniers <ndesaulniers@google.com>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Joel Fernandes <joelaf@google.com>
      CC: Peter Zijlstra <peterz@infradead.org>
      CC: Catalin Marinas <catalin.marinas@arm.com>
      CC: Dave Watson <davejwatson@fb.com>
      CC: Will Deacon <will.deacon@arm.com>
      CC: Shuah Khan <shuah@kernel.org>
      CC: Andi Kleen <andi@firstfloor.org>
      CC: linux-kselftest@vger.kernel.org
      CC: "H . Peter Anvin" <hpa@zytor.com>
      CC: Chris Lameter <cl@linux.com>
      CC: Russell King <linux@arm.linux.org.uk>
      CC: Michael Kerrisk <mtk.manpages@gmail.com>
      CC: "Paul E . McKenney" <paulmck@linux.vnet.ibm.com>
      CC: Paul Turner <pjt@google.com>
      CC: Boqun Feng <boqun.feng@gmail.com>
      CC: Josh Triplett <josh@joshtriplett.org>
      CC: Steven Rostedt <rostedt@goodmis.org>
      CC: Ben Maurer <bmaurer@fb.com>
      CC: linux-api@vger.kernel.org
      CC: Andy Lutomirski <luto@amacapital.net>
      CC: Andrew Morton <akpm@linux-foundation.org>
      CC: Linus Torvalds <torvalds@linux-foundation.org>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      fdeb89d8
    • Mathieu Desnoyers's avatar
      rseq/selftests: mips: use break instruction for RSEQ_SIG · 16b96b6e
      Mathieu Desnoyers authored
      
      Use break as guard instruction for the restartable sequence abort
      handler.
      
      Previously, the chosen signature was simply data, based on the
      assumption that it could always sit in a literal pool. However,
      some compilation environments favor disabling literal pool. Therefore,
      ensure the signature is a valid uncommon trap instruction.
      
      Suggested-by: default avatarPaul Burton <paul.burton@mips.com>
      Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      CC: Paul Burton <paul.burton@mips.com>
      CC: James Hogan <jhogan@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Boqun Feng <boqun.feng@gmail.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      16b96b6e
    • Mathieu Desnoyers's avatar
      rseq/selftests: powerpc code signature: generate valid instructions · 496fd0fc
      Mathieu Desnoyers authored
      
      Use "twui" as the guard instruction for the restartable sequence abort
      handler.
      
      Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: Paul Mackerras <paulus@samba.org>
      CC: Michael Ellerman <mpe@ellerman.id.au>
      CC: Boqun Feng <boqun.feng@gmail.com>
      CC: Peter Zijlstra <peterz@infradead.org>
      CC: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      CC: Alan Modra <amodra@gmail.com>
      CC: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      496fd0fc
    • Mathieu Desnoyers's avatar
      rseq/selftests: aarch64 code signature: handle big-endian environment · 7cd4ce2e
      Mathieu Desnoyers authored
      
      Handle compiling with -mbig-endian on aarch64, which generates binaries
      with mixed code vs data endianness (little endian code, big endian
      data).
      
      Else mismatch between code endianness for the generated signatures and
      data endianness for the RSEQ_SIG parameter passed to the rseq
      registration will trigger application segmentation faults when the
      kernel try to abort rseq critical sections.
      
      Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Acked-by: default avatarWill Deacon <will.deacon@arm.com>
      CC: Peter Zijlstra <peterz@infradead.org>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Joel Fernandes <joelaf@google.com>
      CC: Catalin Marinas <catalin.marinas@arm.com>
      CC: Dave Watson <davejwatson@fb.com>
      CC: Will Deacon <will.deacon@arm.com>
      CC: Shuah Khan <shuah@kernel.org>
      CC: Andi Kleen <andi@firstfloor.org>
      CC: linux-kselftest@vger.kernel.org
      CC: "H . Peter Anvin" <hpa@zytor.com>
      CC: Chris Lameter <cl@linux.com>
      CC: Russell King <linux@arm.linux.org.uk>
      CC: Michael Kerrisk <mtk.manpages@gmail.com>
      CC: "Paul E . McKenney" <paulmck@linux.vnet.ibm.com>
      CC: Paul Turner <pjt@google.com>
      CC: Boqun Feng <boqun.feng@gmail.com>
      CC: Josh Triplett <josh@joshtriplett.org>
      CC: Steven Rostedt <rostedt@goodmis.org>
      CC: Ben Maurer <bmaurer@fb.com>
      CC: linux-api@vger.kernel.org
      CC: Andy Lutomirski <luto@amacapital.net>
      CC: Andrew Morton <akpm@linux-foundation.org>
      CC: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      7cd4ce2e
    • Mathieu Desnoyers's avatar
      rseq/selftests: arm: use udf instruction for RSEQ_SIG · 2b845d4b
      Mathieu Desnoyers authored
      
      Use udf as the guard instruction for the restartable sequence abort
      handler.
      
      Previously, the chosen signature was not a valid instruction, based
      on the assumption that it could always sit in a literal pool. However,
      there are compilation environments in which literal pools are not
      available, for instance execute-only code. Therefore, we need to
      choose a signature value that is also a valid instruction.
      
      Handle compiling with -mbig-endian on ARMv6+, which generates binaries
      with mixed code vs data endianness (little endian code, big endian
      data).
      
      Else mismatch between code endianness for the generated signatures and
      data endianness for the RSEQ_SIG parameter passed to the rseq
      registration will trigger application segmentation faults when the
      kernel try to abort rseq critical sections.
      
      Prior to ARMv6, -mbig-endian generates big-endian code and data, so
      endianness should not be reversed in that case.
      
      Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      CC: Peter Zijlstra <peterz@infradead.org>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Joel Fernandes <joelaf@google.com>
      CC: Catalin Marinas <catalin.marinas@arm.com>
      CC: Dave Watson <davejwatson@fb.com>
      CC: Will Deacon <will.deacon@arm.com>
      CC: Shuah Khan <shuah@kernel.org>
      CC: Andi Kleen <andi@firstfloor.org>
      CC: linux-kselftest@vger.kernel.org
      CC: "H . Peter Anvin" <hpa@zytor.com>
      CC: Chris Lameter <cl@linux.com>
      CC: Russell King <linux@arm.linux.org.uk>
      CC: Michael Kerrisk <mtk.manpages@gmail.com>
      CC: "Paul E . McKenney" <paulmck@linux.vnet.ibm.com>
      CC: Paul Turner <pjt@google.com>
      CC: Boqun Feng <boqun.feng@gmail.com>
      CC: Josh Triplett <josh@joshtriplett.org>
      CC: Steven Rostedt <rostedt@goodmis.org>
      CC: Ben Maurer <bmaurer@fb.com>
      CC: linux-api@vger.kernel.org
      CC: Andy Lutomirski <luto@amacapital.net>
      CC: Andrew Morton <akpm@linux-foundation.org>
      CC: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      2b845d4b
    • Martin Schwidefsky's avatar
      rseq/selftests: s390: use trap4 for RSEQ_SIG · 3d4d1f05
      Martin Schwidefsky authored
      
      Use trap4 as the guard instruction for the restartable sequence abort
      handler.
      
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      3d4d1f05
    • Mathieu Desnoyers's avatar
      rseq/selftests: x86: use ud1 instruction as RSEQ_SIG opcode · 24fa5d1e
      Mathieu Desnoyers authored
      
      Use ud1 as the guard instruction for the restartable sequence abort
      handler. Its benefit compared to nopl is to trap execution if the
      program ends up trying to execute it by mistake, which makes debugging
      easier.
      
      The 4-byte signature per se is unchanged (it is the instruction
      operand). Only the opcode is changed from nopl to ud1.
      
      Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Suggested-by: default avatarPeter Zijlstra <peterz@infradead.org>
      CC: Peter Zijlstra <peterz@infradead.org>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Joel Fernandes <joelaf@google.com>
      CC: Catalin Marinas <catalin.marinas@arm.com>
      CC: Dave Watson <davejwatson@fb.com>
      CC: Will Deacon <will.deacon@arm.com>
      CC: Shuah Khan <shuah@kernel.org>
      CC: Andi Kleen <andi@firstfloor.org>
      CC: linux-kselftest@vger.kernel.org
      CC: "H . Peter Anvin" <hpa@zytor.com>
      CC: Chris Lameter <cl@linux.com>
      CC: Russell King <linux@arm.linux.org.uk>
      CC: Michael Kerrisk <mtk.manpages@gmail.com>
      CC: "Paul E . McKenney" <paulmck@linux.vnet.ibm.com>
      CC: Paul Turner <pjt@google.com>
      CC: Boqun Feng <boqun.feng@gmail.com>
      CC: Josh Triplett <josh@joshtriplett.org>
      CC: Steven Rostedt <rostedt@goodmis.org>
      CC: Ben Maurer <bmaurer@fb.com>
      CC: linux-api@vger.kernel.org
      CC: Andy Lutomirski <luto@amacapital.net>
      CC: Andrew Morton <akpm@linux-foundation.org>
      CC: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      24fa5d1e
    • Mathieu Desnoyers's avatar
      rseq/selftests: s390: use jg instruction for jumps outside of the asm · 97b8be81
      Mathieu Desnoyers authored
      
      The branch target range of the "j" instruction is 64K, which is not
      enough for the general case.
      
      Suggested-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Joel Fernandes <joelaf@google.com>
      CC: Peter Zijlstra <peterz@infradead.org>
      CC: Catalin Marinas <catalin.marinas@arm.com>
      CC: Dave Watson <davejwatson@fb.com>
      CC: Will Deacon <will.deacon@arm.com>
      CC: Shuah Khan <shuah@kernel.org>
      CC: Andi Kleen <andi@firstfloor.org>
      CC: linux-kselftest@vger.kernel.org
      CC: "H . Peter Anvin" <hpa@zytor.com>
      CC: Chris Lameter <cl@linux.com>
      CC: Russell King <linux@arm.linux.org.uk>
      CC: Michael Kerrisk <mtk.manpages@gmail.com>
      CC: "Paul E . McKenney" <paulmck@linux.vnet.ibm.com>
      CC: Paul Turner <pjt@google.com>
      CC: Boqun Feng <boqun.feng@gmail.com>
      CC: Josh Triplett <josh@joshtriplett.org>
      CC: Steven Rostedt <rostedt@goodmis.org>
      CC: Ben Maurer <bmaurer@fb.com>
      CC: linux-api@vger.kernel.org
      CC: Andy Lutomirski <luto@amacapital.net>
      CC: Andrew Morton <akpm@linux-foundation.org>
      CC: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      97b8be81
    • Mathieu Desnoyers's avatar
      rseq/selftests: Use __rseq_handled symbol to coexist with glibc · 5b0c308a
      Mathieu Desnoyers authored
      
      In order to integrate rseq into user-space applications, expose a
      __rseq_handled symbol so many rseq users can be linked into the same
      application (e.g. librseq and glibc).
      
      The __rseq_refcount TLS variable is static to the librseq library. It
      ensures that rseq syscall registration/unregistration happens only for
      the most early/late caller to rseq_{,un}register_current_thread for each
      thread, thus ensuring that rseq is registered across the lifetime of all
      rseq users for a given thread.
      
      Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      CC: Shuah Khan <shuah@kernel.org>
      CC: Carlos O'Donell <carlos@redhat.com>
      CC: Florian Weimer <fweimer@redhat.com>
      CC: Joseph Myers <joseph@codesourcery.com>
      CC: Szabolcs Nagy <szabolcs.nagy@arm.com>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Ben Maurer <bmaurer@fb.com>
      CC: Peter Zijlstra <peterz@infradead.org>
      CC: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      CC: Boqun Feng <boqun.feng@gmail.com>
      CC: Will Deacon <will.deacon@arm.com>
      CC: Dave Watson <davejwatson@fb.com>
      CC: Paul Turner <pjt@google.com>
      CC: linux-api@vger.kernel.org
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      5b0c308a
    • Mathieu Desnoyers's avatar
      rseq/selftests: Introduce __rseq_cs_ptr_array, rename __rseq_table to __rseq_cs · a3e3131f
      Mathieu Desnoyers authored
      
      The entries within __rseq_table are aligned on 32 bytes due to
      linux/rseq.h struct rseq_cs uapi requirements, but the start of the
      __rseq_table section is not guaranteed to be 32-byte aligned. It can
      cause padding to be added at the start of the section, which makes it
      hard to use as an array of items by debuggers.
      
      Considering that __rseq_table does not really consist of a table due to
      the presence of padding, rename this section to __rseq_cs.
      
      Create a new __rseq_cs_ptr_array section which contains 64-bit packed
      pointers to entries within the __rseq_cs section.
      
      Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Joel Fernandes <joelaf@google.com>
      CC: Peter Zijlstra <peterz@infradead.org>
      CC: Catalin Marinas <catalin.marinas@arm.com>
      CC: Dave Watson <davejwatson@fb.com>
      CC: Will Deacon <will.deacon@arm.com>
      CC: Shuah Khan <shuah@kernel.org>
      CC: Andi Kleen <andi@firstfloor.org>
      CC: linux-kselftest@vger.kernel.org
      CC: "H . Peter Anvin" <hpa@zytor.com>
      CC: Chris Lameter <cl@linux.com>
      CC: Russell King <linux@arm.linux.org.uk>
      CC: Michael Kerrisk <mtk.manpages@gmail.com>
      CC: "Paul E . McKenney" <paulmck@linux.vnet.ibm.com>
      CC: Paul Turner <pjt@google.com>
      CC: Boqun Feng <boqun.feng@gmail.com>
      CC: Josh Triplett <josh@joshtriplett.org>
      CC: Steven Rostedt <rostedt@goodmis.org>
      CC: Ben Maurer <bmaurer@fb.com>
      CC: linux-api@vger.kernel.org
      CC: Andy Lutomirski <luto@amacapital.net>
      CC: Andrew Morton <akpm@linux-foundation.org>
      CC: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      a3e3131f
    • Mathieu Desnoyers's avatar
      rseq/selftests: Add __rseq_exit_point_array section for debuggers · 4fe2088e
      Mathieu Desnoyers authored
      
      Knowing all exit points is useful to assist debuggers stepping over the
      rseq critical sections without requiring them to disassemble the content
      of the critical section to figure out the exit points.
      
      Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Joel Fernandes <joelaf@google.com>
      CC: Peter Zijlstra <peterz@infradead.org>
      CC: Catalin Marinas <catalin.marinas@arm.com>
      CC: Dave Watson <davejwatson@fb.com>
      CC: Will Deacon <will.deacon@arm.com>
      CC: Shuah Khan <shuah@kernel.org>
      CC: Andi Kleen <andi@firstfloor.org>
      CC: linux-kselftest@vger.kernel.org
      CC: "H . Peter Anvin" <hpa@zytor.com>
      CC: Chris Lameter <cl@linux.com>
      CC: Russell King <linux@arm.linux.org.uk>
      CC: Michael Kerrisk <mtk.manpages@gmail.com>
      CC: "Paul E . McKenney" <paulmck@linux.vnet.ibm.com>
      CC: Paul Turner <pjt@google.com>
      CC: Boqun Feng <boqun.feng@gmail.com>
      CC: Josh Triplett <josh@joshtriplett.org>
      CC: Steven Rostedt <rostedt@goodmis.org>
      CC: Ben Maurer <bmaurer@fb.com>
      CC: linux-api@vger.kernel.org
      CC: Andy Lutomirski <luto@amacapital.net>
      CC: Andrew Morton <akpm@linux-foundation.org>
      CC: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      4fe2088e
Loading