Skip to content
Snippets Groups Projects
  1. Nov 24, 2022
  2. Sep 28, 2022
  3. Aug 26, 2022
  4. Jul 28, 2022
  5. Jul 27, 2022
  6. May 22, 2022
    • Reza Arbab's avatar
      powerpc: Enable the DAWR on POWER9 DD2.3 and above · 26b78c81
      Reza Arbab authored
      
      The hardware bug in POWER9 preventing use of the DAWR was fixed in
      DD2.3. Set the CPU_FTR_DAWR feature bit on these newer systems to start
      using it again, and update the documentation accordingly.
      
      The CPU features for DD2.3 are currently determined by "DD2.2 or later"
      logic. In adding DD2.3 as a discrete case for the first time here, I'm
      carrying the quirks of DD2.2 forward to keep all behavior outside of
      this DAWR change the same. This leaves the assessment and potential
      removal of those quirks on DD2.3 for later.
      
      Signed-off-by: default avatarReza Arbab <arbab@linux.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20220503170152.23412-1-arbab@linux.ibm.com
      26b78c81
    • Daniel Axtens's avatar
      powerpc: Book3S 64-bit outline-only KASAN support · 41b7a347
      Daniel Axtens authored
      
      Implement a limited form of KASAN for Book3S 64-bit machines running under
      the Radix MMU, supporting only outline mode.
      
       - Enable the compiler instrumentation to check addresses and maintain the
         shadow region. (This is the guts of KASAN which we can easily reuse.)
      
       - Require kasan-vmalloc support to handle modules and anything else in
         vmalloc space.
      
       - KASAN needs to be able to validate all pointer accesses, but we can't
         instrument all kernel addresses - only linear map and vmalloc. On boot,
         set up a single page of read-only shadow that marks all iomap and
         vmemmap accesses as valid.
      
       - Document KASAN in powerpc docs.
      
      Background
      ----------
      
      KASAN support on Book3S is a bit tricky to get right:
      
       - It would be good to support inline instrumentation so as to be able to
         catch stack issues that cannot be caught with outline mode.
      
       - Inline instrumentation requires a fixed offset.
      
       - Book3S runs code with translations off ("real mode") during boot,
         including a lot of generic device-tree parsing code which is used to
         determine MMU features.
      
          [ppc64 mm note: The kernel installs a linear mapping at effective
          address c000...-c008.... This is a one-to-one mapping with physical
          memory from 0000... onward. Because of how memory accesses work on
          powerpc 64-bit Book3S, a kernel pointer in the linear map accesses the
          same memory both with translations on (accessing as an 'effective
          address'), and with translations off (accessing as a 'real
          address'). This works in both guests and the hypervisor. For more
          details, see s5.7 of Book III of version 3 of the ISA, in particular
          the Storage Control Overview, s5.7.3, and s5.7.5 - noting that this
          KASAN implementation currently only supports Radix.]
      
       - Some code - most notably a lot of KVM code - also runs with translations
         off after boot.
      
       - Therefore any offset has to point to memory that is valid with
         translations on or off.
      
      One approach is just to give up on inline instrumentation. This way
      boot-time checks can be delayed until after the MMU is set is up, and we
      can just not instrument any code that runs with translations off after
      booting. Take this approach for now and require outline instrumentation.
      
      Previous attempts allowed inline instrumentation. However, they came with
      some unfortunate restrictions: only physically contiguous memory could be
      used and it had to be specified at compile time. Maybe we can do better in
      the future.
      
      [paulus@ozlabs.org - Rebased onto 5.17.  Note that a kernel with
       CONFIG_KASAN=y will crash during boot on a machine using HPT
       translation because not all the entry points to the generic
       KASAN code are protected with a call to kasan_arch_is_ready().]
      
      Originally-by: Balbir Singh <bsingharora@gmail.com> # ppc64 out-of-line radix version
      Signed-off-by: default avatarDaniel Axtens <dja@axtens.net>
      Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
      [mpe: Update copyright year and comment formatting]
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/YoTE69OQwiG7z+Gu@cleo
      41b7a347
    • Daniel Axtens's avatar
      kasan: Document support on 32-bit powerpc · 60e832de
      Daniel Axtens authored
      
      KASAN is supported on 32-bit powerpc and the docs should reflect this.
      
      Suggested-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
      Signed-off-by: default avatarDaniel Axtens <dja@axtens.net>
      Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
      Reviewed-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/YoTEnMLrnd64j0w5@cleo
      60e832de
  7. Aug 26, 2021
  8. Aug 13, 2021
  9. May 20, 2021
  10. Apr 20, 2021
  11. Apr 14, 2021
  12. Mar 31, 2021
  13. Mar 25, 2021
  14. Feb 25, 2021
  15. Dec 03, 2020
  16. Oct 15, 2020
  17. Oct 13, 2020
    • Rob Herring's avatar
      dt: Remove booting-without-of.rst · 44184828
      Rob Herring authored
      
      booting-without-of.rst is an ancient document that first outlined
      Flattened DeviceTree on PowerPC initially. The DT world has evolved a
      lot in the 15 years since and booting-without-of.rst is pretty stale.
      The name of the document itself is confusing if you don't understand the
      evolution from real 'OpenFirmware'. Most of what booting-without-of.rst
      contains is now in the DT specification (which evolved out of the
      ePAPR). The few things that weren't documented in the DT specification
      are now.
      
      All that remains is the boot entry details, so let's move these to arch
      specific documents. The exception is arm which already has the same
      details documented.
      
      Cc: Frank Rowand <frowand.list@gmail.com>
      Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
      Cc: Geert Uytterhoeven <geert+renesas@glider.be>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: x86@kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-mips@vger.kernel.org
      Cc: linux-doc@vger.kernel.org
      Cc: linux-sh@vger.kernel.org
      Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: default avatarBorislav Petkov <bp@suse.de>
      Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      44184828
  18. Sep 15, 2020
  19. Sep 08, 2020
  20. Aug 27, 2020
    • Randy Dunlap's avatar
      Documentation/powerpc: fix malformed table in syscall64-abi · aa661d7f
      Randy Dunlap authored
      
      Fix malformed table warning in powerpc/syscall64-abi.rst by making
      two tables and moving the headings.
      
      Documentation/powerpc/syscall64-abi.rst:53: WARNING: Malformed table.
      Text in column margin in table line 2.
      
        =========== ============= ========================================
        --- For the sc instruction, differences with the ELF ABI ---
        r0          Volatile      (System call number.)
        r3          Volatile      (Parameter 1, and return value.)
        r4-r8       Volatile      (Parameters 2-6.)
        cr0         Volatile      (cr0.SO is the return error condition.)
        cr1, cr5-7  Nonvolatile
        lr          Nonvolatile
      
        --- For the scv 0 instruction, differences with the ELF ABI ---
        r0          Volatile      (System call number.)
        r3          Volatile      (Parameter 1, and return value.)
        r4-r8       Volatile      (Parameters 2-6.)
        =========== ============= ========================================
      
      Fixes: 7fa95f9a ("powerpc/64s: system call support for scv/rfscv instructions")
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/e06de4d3-a36f-2745-9775-467e125436cc@infradead.org
      aa661d7f
  21. Jul 28, 2020
  22. Jul 22, 2020
  23. Jul 21, 2020
  24. Jul 15, 2020
  25. Jul 13, 2020
  26. Jun 26, 2020
    • Mauro Carvalho Chehab's avatar
      docs: powerpc: fix some issues at vas-api.rst · cadcb83f
      Mauro Carvalho Chehab authored
      
      There are a few issues on this document, when built via the
      building with ``make htmldocs``:
      
          Documentation/powerpc/vas-api.rst:116: WARNING: Unexpected indentation.
          Documentation/powerpc/vas-api.rst:116: WARNING: Inline emphasis start-string without end-string.
          Documentation/powerpc/vas-api.rst:117: WARNING: Block quote ends without a blank line; unexpected unindent.
          Documentation/powerpc/vas-api.rst:117: WARNING: Inline emphasis start-string without end-string.
          Documentation/powerpc/vas-api.rst:120: WARNING: Definition list ends without a blank line; unexpected unindent.
          Documentation/powerpc/vas-api.rst:124: WARNING: Unexpected indentation.
          Documentation/powerpc/vas-api.rst:133: WARNING: Unexpected indentation.
          Documentation/powerpc/vas-api.rst:135: WARNING: Unexpected indentation.
          Documentation/powerpc/vas-api.rst:150: WARNING: Unexpected indentation.
          Documentation/powerpc/vas-api.rst:151: WARNING: Block quote ends without a blank line; unexpected unindent.
          Documentation/powerpc/vas-api.rst:161: WARNING: Unexpected indentation.
          Documentation/powerpc/vas-api.rst:176: WARNING: Definition list ends without a blank line; unexpected unindent.
          Documentation/powerpc/vas-api.rst:253: WARNING: Unexpected indentation.
          Documentation/powerpc/vas-api.rst:253: WARNING: Inline emphasis start-string without end-string.
          Documentation/powerpc/vas-api.rst:259: WARNING: Unexpected indentation.
          Documentation/powerpc/vas-api.rst:261: WARNING: Block quote ends without a blank line; unexpected unindent.
          Documentation/powerpc/vas-api.rst:266: WARNING: Unexpected indentation.
          Documentation/powerpc/vas-api.rst:267: WARNING: Block quote ends without a blank line; unexpected unindent.
          Documentation/powerpc/vas-api.rst:270: WARNING: Definition list ends without a blank line; unexpected unindent.
          Documentation/powerpc/vas-api.rst:271: WARNING: Definition list ends without a blank line; unexpected unindent.
          Documentation/powerpc/vas-api.rst:273: WARNING: Unexpected indentation.
          Documentation/powerpc/vas-api.rst:274: WARNING: Block quote ends without a blank line; unexpected unindent.
          Documentation/powerpc/vas-api.rst:277: WARNING: Definition list ends without a blank line; unexpected unindent.
          Documentation/powerpc/vas-api.rst:278: WARNING: Definition list ends without a blank line; unexpected unindent.
          Documentation/powerpc/vas-api.rst:280: WARNING: Unexpected indentation.
          Documentation/powerpc/vas-api.rst:287: WARNING: Block quote ends without a blank line; unexpected unindent.
          Documentation/powerpc/vas-api.rst:289: WARNING: Block quote ends without a blank line; unexpected unindent.
      
      Fixes: c12e38b1 ("Documentation/powerpc: VAS API")
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      Link: https://lore.kernel.org/r/fc1138e563bc3a41a9e59b5dd1fe2f6a4bfad253.1592895969.git.mchehab+huawei@kernel.org
      
      
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      cadcb83f
  27. Jun 19, 2020
  28. Jun 16, 2020
  29. May 28, 2020
  30. May 20, 2020
  31. Apr 20, 2020
  32. Mar 20, 2020
Loading