1. 19 May, 2022 4 commits
    • Nathan Chancellor's avatar
      powerpc/vdso: Remove unused ENTRY in linker scripts · e2471728
      Nathan Chancellor authored
      When linking vdso{32,64}.so.dbg with ld.lld, there is a warning about
      not finding _start for the starting address:
      
        ld.lld: warning: cannot find entry symbol _start; not setting start address
        ld.lld: warning: cannot find entry symbol _start; not setting start address
      
      Looking at GCC + GNU ld, the entry point address is 0x0:
      
        $ llvm-readelf -h vdso{32,64}.so.dbg &| rg "(File|Entry point address):"
        File: vdso32.so.dbg
          Entry point address:               0x0
        File: vdso64.so.dbg
          Entry point address:               0x0
      
      This matches what ld.lld emits:
      
        $ powerpc64le-linux-gnu-readelf -p .comment vdso{32,64}.so.dbg
      
        File: vdso32.so.dbg
      
        String dump of section '.comment':
          [     0]  Linker: LLD 14.0.0
          [    14]  clang version 14.0.0 (Fedora 14.0.0-1.fc37)
      
        File: vdso64.so.dbg
      
        String dump of section '.comment':
          [     0]  Linker: LLD 14.0.0
          [    14]  clang version 14.0.0 (Fedora 14.0.0-1.fc37)
      
        $ llvm-readelf -h vdso{32,64}.so.dbg &| rg "(File|Entry point address):"
        File: vdso32.so.dbg
          Entry point address:               0x0
        File: vdso64.so.dbg
          Entry point address:               0x0
      
      Remove ENTRY to remove the warning, as it is unnecessary for the vDSO to
      function correctly.
      Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Tested-by: default avatarAlexey Kardashevskiy <aik@ozlabs.ru>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Reviewed-by: default avatarAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20220511185001.3269404-2-nathan@kernel.org
      e2471728
    • Kevin Hao's avatar
      powerpc: Export mmu_feature_keys[] as non-GPL · d9e5c3e9
      Kevin Hao authored
      When the mmu_feature_keys[] was introduced in the commit c12e6f24
      ("powerpc: Add option to use jump label for mmu_has_feature()"),
      it is unlikely that it would be used either directly or indirectly in
      the out of tree modules. So we exported it as GPL only.
      
      But with the evolution of the codes, especially the PPC_KUAP support, it
      may be indirectly referenced by some primitive macro or inline functions
      such as get_user() or __copy_from_user_inatomic(), this will make it
      impossible to build many non GPL modules (such as ZFS) on ppc
      architecture. Fix this by exposing the mmu_feature_keys[] to the non-GPL
      modules too.
      
      Fixes: 7613f5a6 ("powerpc/64s/kuap: Use mmu_has_feature()")
      Reported-by: default avatarNathaniel Filardo <nwfilardo@gmail.com>
      Signed-off-by: default avatarKevin Hao <haokexin@gmail.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20220329085709.4132729-1-haokexin@gmail.com
      d9e5c3e9
    • Guilherme G. Piccoli's avatar
      powerpc/setup: Refactor/untangle panic notifiers · e2aa34ce
      Guilherme G. Piccoli authored
      The panic notifiers infrastructure is a bit limited in the scope of
      the callbacks - basically every kind of functionality is dropped
      in a list that runs in the same point during the kernel panic path.
      This is not really on par with the complexities and particularities
      of architecture / hypervisors' needs, and a refactor is ongoing.
      
      As part of this refactor, it was observed that powerpc has 2 notifiers,
      with mixed goals: one is just a KASLR offset dumper, whereas the other
      aims to hard-disable IRQs (necessary on panic path), warn firmware of
      the panic event (fadump) and run low-level platform-specific machinery
      that might stop kernel execution and never come back.
      
      Clearly, the 2nd notifier has opposed goals: disable IRQs / fadump
      should run earlier while low-level platform actions should
      run late since it might not even return. Hence, this patch decouples
      the notifiers splitting them in three:
      
      - First one is responsible for hard-disable IRQs and fadump,
      should run early;
      
      - The kernel KASLR offset dumper is really an informative notifier,
      harmless and may run at any moment in the panic path;
      
      - The last notifier should run last, since it aims to perform
      low-level actions for specific platforms, and might never return.
      It is also only registered for 2 platforms, pseries and ps3.
      
      The patch better documents the notifiers and clears the code too,
      also removing a useless header.
      
      Currently no functionality change should be observed, but after
      the planned panic refactor we should expect more panic reliability
      with this patch.
      Signed-off-by: default avatarGuilherme G. Piccoli <gpiccoli@igalia.com>
      Reviewed-by: default avatarHari Bathini <hbathini@linux.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20220427224924.592546-9-gpiccoli@igalia.com
      e2aa34ce
    • Michael Ellerman's avatar
      Merge branch 'topic/ppc-kvm' into next · b104e41c
      Michael Ellerman authored
      Merge our KVM topic branch.
      b104e41c
  2. 18 May, 2022 10 commits
  3. 13 May, 2022 13 commits
  4. 11 May, 2022 11 commits
  5. 08 May, 2022 2 commits