Skip to content
  1. Feb 11, 2021
  2. Jan 27, 2021
    • Juergen Gross's avatar
      x86/xen: avoid warning in Xen pv guest with CONFIG_AMD_MEM_ENCRYPT enabled · 2e924936
      Juergen Gross authored
      When booting a kernel which has been built with CONFIG_AMD_MEM_ENCRYPT
      enabled as a Xen pv guest a warning is issued for each processor:
      
      [    5.964347] ------------[ cut here ]------------
      [    5.968314] WARNING: CPU: 0 PID: 1 at /home/gross/linux/head/arch/x86/xen/enlighten_pv.c:660 get_trap_addr+0x59/0x90
      [    5.972321] Modules linked in:
      [    5.976313] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G        W         5.11.0-rc5-default #75
      [    5.980313] Hardware name: Dell Inc. OptiPlex 9020/0PC5F7, BIOS A05 12/05/2013
      [    5.984313] RIP: e030:get_trap_addr+0x59/0x90
      [    5.988313] Code: 42 10 83 f0 01 85 f6 74 04 84 c0 75 1d b8 01 00 00 00 c3 48 3d 00 80 83 82 72 08 48 3d 20 81 83 82 72 0c b8 01 00 00 00 eb db <0f> 0b 31 c0 c3 48 2d 00 80 83 82 48 ba 72 1c c7 71 1c c7 71 1c 48
      [    5.992313] RSP: e02b:ffffc90040033d38 EFLAGS: 00010202
      [    5.996313] RAX: 0000000000000001 RBX: ffffffff82a141d0 RCX: ffffffff8222ec38
      [    6.000312] RDX: ffffffff8222ec38 RSI: 0000000000000005 RDI: ffffc90040033d40
      [    6.004313] RBP: ffff8881003984a0 R08: 0000000000000007 R09: ffff888100398000
      [    6.008312] R10: 0000000000000007 R11: ffffc90040246000 R12: ffff8884082182a8
      [    6.012313] R13: 0000000000000100 R14: 000000000000001d R15: ffff8881003982d0
      [    6.016316] FS:  0000000000000000(0000) GS:ffff888408200000(0000) knlGS:0000000000000000
      [    6.020313] CS:  e030 DS: 0000 ES: 0000 CR0: 0000000080050033
      [    6.024313] CR2: ffffc900020ef000 CR3: 000000000220a000 CR4: 0000000000050660
      [    6.028314] Call Trace:
      [    6.032313]  cvt_gate_to_trap.part.7+0x3f/0x90
      [    6.036313]  ? asm_exc_double_fault+0x30/0x30
      [    6.040313]  xen_convert_trap_info+0x87/0xd0
      [    6.044313]  xen_pv_cpu_up+0x17a/0x450
      [    6.048313]  bringup_cpu+0x2b/0xc0
      [    6.052313]  ? cpus_read_trylock+0x50/0x50
      [    6.056313]  cpuhp_invoke_callback+0x80/0x4c0
      [    6.060313]  _cpu_up+0xa7/0x140
      [    6.064313]  cpu_up+0x98/0xd0
      [    6.068313]  bringup_nonboot_cpus+0x4f/0x60
      [    6.072313]  smp_init+0x26/0x79
      [    6.076313]  kernel_init_freeable+0x103/0x258
      [    6.080313]  ? rest_init+0xd0/0xd0
      [    6.084313]  kernel_init+0xa/0x110
      [    6.088313]  ret_from_fork+0x1f/0x30
      [    6.092313] ---[ end trace be9ecf17dceeb4f3 ]---
      
      Reason is that there is no Xen pv trap entry for X86_TRAP_VC.
      
      Fix that by adding a generic trap handler for unknown traps and wire all
      unknown bare metal handlers to this generic handler, which will just
      crash the system in case such a trap will ever happen.
      
      Fixes: 0786138c
      
       ("x86/sev-es: Add a Runtime #VC Exception Handler")
      Cc: <stable@vger.kernel.org> # v5.10
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      Reviewed-by: default avatarAndrew Cooper <andrew.cooper3@citrix.com>
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      2e924936
    • David Woodhouse's avatar
      xen: Fix XenStore initialisation for XS_LOCAL · 5f46400f
      David Woodhouse authored
      In commit 3499ba81 ("xen: Fix event channel callback via INTX/GSI")
      I reworked the triggering of xenbus_probe().
      
      I tried to simplify things by taking out the workqueue based startup
      triggered from wake_waiting(); the somewhat poorly named xenbus IRQ
      handler.
      
      I missed the fact that in the XS_LOCAL case (Dom0 starting its own
      xenstored or xenstore-stubdom, which happens after the kernel is booted
      completely), that IRQ-based trigger is still actually needed.
      
      So... put it back, except more cleanly. By just spawning a xenbus_probe
      thread which waits on xb_waitq and runs the probe the first time it
      gets woken, just as the workqueue-based hack did.
      
      This is actually a nicer approach for *all* the back ends with different
      interrupt methods, and we can switch them all over to that without the
      complex conditions for when to trigger it. But not in -rc6. This is
      the minimal fix for the regression, although it's a step in the right
      direction instead of doing a partial revert and actually putting the
      workqueue back. It's also simpler than the workqueue.
      
      Fixes: 3499ba81
      
       ("xen: Fix event channel callback via INTX/GSI")
      Reported-by: default avatarJuergen Gross <jgross@suse.com>
      Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
      Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
      Link: https://lore.kernel.org/r/4c9af052a6e0f6485d1de43f2c38b1461996db99.camel@infradead.org
      
      
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      5f46400f
  3. Jan 26, 2021
  4. Jan 18, 2021
  5. Jan 13, 2021
  6. Dec 19, 2020
  7. Dec 16, 2020
  8. Dec 14, 2020
  9. Dec 13, 2020
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 6bff9bb8
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Five small fixes.  Four in drivers:
      
         - hisi_sas: fix internal queue timeout
      
         - be2iscsi: revert a prior fix causing problems
      
         - bnx2i: add missing dependency
      
         - storvsc: late arriving revert of a problem fix
      
        and one in the core.
      
        The core one is a minor change to stop paying attention to the busy
        count when returning out of resources because there's a race window
        where the queue might not restart due to missing returning I/O"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        Revert "scsi: storvsc: Validate length of incoming packet in storvsc_on_channel_callback()"
        scsi: hisi_sas: Select a suitable queue for internal I/Os
        scsi: core: Fix race between handling STS_RESOURCE and completion
        scsi: be2iscsi: Revert "Fix a theoretical leak in beiscsi_create_eqs()"
        scsi: bnx2i: Requires MMU
      6bff9bb8
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 5ee595d9
      Linus Torvalds authored
      Pull i2c fix from Wolfram Sang:
       "Bugfix for the AT24 EEPROM driver"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        misc: eeprom: at24: fix NVMEM name with custom AT24 device name
      5ee595d9
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 7b1b868e
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
       "Bugfixes for ARM, x86 and tools"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        tools/kvm_stat: Exempt time-based counters
        KVM: mmu: Fix SPTE encoding of MMIO generation upper half
        kvm: x86/mmu: Use cpuid to determine max gfn
        kvm: svm: de-allocate svm_cpu_data for all cpus in svm_cpu_uninit()
        selftests: kvm/set_memory_region_test: Fix race in move region test
        KVM: arm64: Add usage of stage 2 fault lookup level in user_mem_abort()
        KVM: arm64: Fix handling of merging tables into a block entry
        KVM: arm64: Fix memory leak on stage2 update of a valid PTE
      7b1b868e
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.10c-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · b53966ff
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
       "A short series fixing a regression introduced in 5.9 for running as
        Xen dom0 on a system with NVMe backed storage"
      
      * tag 'for-linus-5.10c-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen: don't use page->lru for ZONE_DEVICE memory
        xen: add helpers for caching grant mapping pages
      b53966ff
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.10-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · b01deddb
      Linus Torvalds authored
      Pull RISC-V fix from Palmer Dabbelt:
       "Just one fix. It's nothing critical, just a randconfig that wasn't
        building. That said, it does seem pretty safe and is technically a
        regression so I'm sending it along for 5.10:
      
         - define get_cycles64() all the time, as it's used by most
           configurations"
      
      * tag 'riscv-for-linus-5.10-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        RISC-V: Define get_cycles64() regardless of M-mode
      b01deddb
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.10-2020-12-11' of git://git.kernel.dk/linux-block · 31d00f6e
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "Two fixes in here, fixing issues introduced in this merge window"
      
      * tag 'io_uring-5.10-2020-12-11' of git://git.kernel.dk/linux-block:
        io_uring: fix file leak on error path of io ctx creation
        io_uring: fix mis-seting personality's creds
      31d00f6e
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 643e69af
      Linus Torvalds authored
      Pull input fixes from Dmitry Torokhov:
      
       - a fix for cm109 stomping on its own control URB if it tries to toggle
         buzzer immediately after userspace opens input device (found by
         syzcaller)
      
       - another fix for Raydium touchscreens that do not like splitting
         command transfers
      
       - quirks for i8042, soc_button_array, and goodix drivers to make them
         work better with certain hardware.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: goodix - add upside-down quirk for Teclast X98 Pro tablet
        Input: cm109 - do not stomp on control URB
        Input: i8042 - add Acer laptops to the i8042 reset list
        Input: cros_ec_keyb - send 'scancodes' in addition to key events
        Input: soc_button_array - add Lenovo Yoga Tablet2 1051L to the dmi_use_low_level_irq list
        Input: raydium_ts_i2c - do not split tx transactions
      643e69af
    • Mike Snitzer's avatar
      md: change mddev 'chunk_sectors' from int to unsigned · 6ffeb1c3
      Mike Snitzer authored
      Commit e2782f56 ("Revert "dm raid: remove unnecessary discard
      limits for raid10"") exposed compiler warnings introduced by commit
      e0910c8e
      
       ("dm raid: fix discard limits for raid1 and raid10"):
      
      In file included from ./include/linux/kernel.h:14,
                       from ./include/asm-generic/bug.h:20,
                       from ./arch/x86/include/asm/bug.h:93,
                       from ./include/linux/bug.h:5,
                       from ./include/linux/mmdebug.h:5,
                       from ./include/linux/gfp.h:5,
                       from ./include/linux/slab.h:15,
                       from drivers/md/dm-raid.c:8:
      drivers/md/dm-raid.c: In function ‘raid_io_hints’:
      ./include/linux/minmax.h:18:28: warning: comparison of distinct pointer types lacks a cast
        (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
                                  ^~
      ./include/linux/minmax.h:32:4: note: in expansion of macro ‘__typecheck’
         (__typecheck(x, y) && __no_side_effects(x, y))
          ^~~~~~~~~~~
      ./include/linux/minmax.h:42:24: note: in expansion of macro ‘__safe_cmp’
        __builtin_choose_expr(__safe_cmp(x, y), \
                              ^~~~~~~~~~
      ./include/linux/minmax.h:51:19: note: in expansion of macro ‘__careful_cmp’
       #define min(x, y) __careful_cmp(x, y, <)
                         ^~~~~~~~~~~~~
      ./include/linux/minmax.h:84:39: note: in expansion of macro ‘min’
        __x == 0 ? __y : ((__y == 0) ? __x : min(__x, __y)); })
                                             ^~~
      drivers/md/dm-raid.c:3739:33: note: in expansion of macro ‘min_not_zero’
         limits->max_discard_sectors = min_not_zero(rs->md.chunk_sectors,
                                       ^~~~~~~~~~~~
      
      Fix this by changing the chunk_sectors member of 'struct mddev' from
      int to 'unsigned int' to match the type used for the 'chunk_sectors'
      member of 'struct queue_limits'.  Various MD code still uses 'int' but
      none of it appears to ever make use of signed int; and storing
      positive signed int in unsigned is perfectly safe.
      
      Reported-by: default avatarSong Liu <songliubraving@fb.com>
      Fixes: e2782f56 ("Revert "dm raid: remove unnecessary discard limits for raid10"")
      Fixes: e0910c8e ("dm raid: fix discard limits for raid1 and raid10")
      Cc: stable@vger,kernel.org # e0910c8e
      
       was marked for stable@
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      Reviewed-by: default avatarSong Liu <song@kernel.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      6ffeb1c3
  10. Dec 12, 2020