1. 01 2月, 2023 4 次提交
  2. 14 1月, 2023 1 次提交
    • A
      efi: tpm: Avoid READ_ONCE() for accessing the event log · d3f45053
      Ard Biesheuvel 提交于
      Nathan reports that recent kernels built with LTO will crash when doing
      EFI boot using Fedora's GRUB and SHIM. The culprit turns out to be a
      misaligned load from the TPM event log, which is annotated with
      READ_ONCE(), and under LTO, this gets translated into a LDAR instruction
      which does not tolerate misaligned accesses.
      
      Interestingly, this does not happen when booting the same kernel
      straight from the UEFI shell, and so the fact that the event log may
      appear misaligned in memory may be caused by a bug in GRUB or SHIM.
      
      However, using READ_ONCE() to access firmware tables is slightly unusual
      in any case, and here, we only need to ensure that 'event' is not
      dereferenced again after it gets unmapped, but this is already taken
      care of by the implicit barrier() semantics of the early_memunmap()
      call.
      
      Cc: <stable@vger.kernel.org>
      Cc: Peter Jones <pjones@redhat.com>
      Cc: Jarkko Sakkinen <jarkko@kernel.org>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Reported-by: NNathan Chancellor <nathan@kernel.org>
      Tested-by: NNathan Chancellor <nathan@kernel.org>
      Link: https://github.com/ClangBuiltLinux/linux/issues/1782Signed-off-by: NArd Biesheuvel <ardb@kernel.org>
      d3f45053
  3. 13 1月, 2023 2 次提交
  4. 12 1月, 2023 3 次提交
  5. 10 1月, 2023 1 次提交
    • M
      net/mlx5: Fix command stats access after free · da2e552b
      Moshe Shemesh 提交于
      Command may fail while driver is reloading and can't accept FW commands
      till command interface is reinitialized. Such command failure is being
      logged to command stats. This results in NULL pointer access as command
      stats structure is being freed and reallocated during mlx5 devlink
      reload (see kernel log below).
      
      Fix it by making command stats statically allocated on driver probe.
      
      Kernel log:
      [ 2394.808802] BUG: unable to handle kernel paging request at 000000000002a9c0
      [ 2394.810610] PGD 0 P4D 0
      [ 2394.811811] Oops: 0002 [#1] SMP NOPTI
      ...
      [ 2394.815482] RIP: 0010:native_queued_spin_lock_slowpath+0x183/0x1d0
      ...
      [ 2394.829505] Call Trace:
      [ 2394.830667]  _raw_spin_lock_irq+0x23/0x26
      [ 2394.831858]  cmd_status_err+0x55/0x110 [mlx5_core]
      [ 2394.833020]  mlx5_access_reg+0xe7/0x150 [mlx5_core]
      [ 2394.834175]  mlx5_query_port_ptys+0x78/0xa0 [mlx5_core]
      [ 2394.835337]  mlx5e_ethtool_get_link_ksettings+0x74/0x590 [mlx5_core]
      [ 2394.836454]  ? kmem_cache_alloc_trace+0x140/0x1c0
      [ 2394.837562]  __rh_call_get_link_ksettings+0x33/0x100
      [ 2394.838663]  ? __rtnl_unlock+0x25/0x50
      [ 2394.839755]  __ethtool_get_link_ksettings+0x72/0x150
      [ 2394.840862]  duplex_show+0x6e/0xc0
      [ 2394.841963]  dev_attr_show+0x1c/0x40
      [ 2394.843048]  sysfs_kf_seq_show+0x9b/0x100
      [ 2394.844123]  seq_read+0x153/0x410
      [ 2394.845187]  vfs_read+0x91/0x140
      [ 2394.846226]  ksys_read+0x4f/0xb0
      [ 2394.847234]  do_syscall_64+0x5b/0x1a0
      [ 2394.848228]  entry_SYSCALL_64_after_hwframe+0x65/0xca
      
      Fixes: 34f46ae0 ("net/mlx5: Add command failures data to debugfs")
      Signed-off-by: NMoshe Shemesh <moshe@nvidia.com>
      Reviewed-by: NShay Drory <shayd@nvidia.com>
      Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
      da2e552b
  6. 05 1月, 2023 5 次提交
  7. 02 1月, 2023 3 次提交
  8. 01 1月, 2023 2 次提交
  9. 29 12月, 2022 3 次提交
  10. 20 12月, 2022 2 次提交
  11. 17 12月, 2022 1 次提交
  12. 16 12月, 2022 10 次提交
  13. 13 12月, 2022 2 次提交
  14. 12 12月, 2022 1 次提交