]> Git Repo - linux.git/commitdiff
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
authorLinus Torvalds <[email protected]>
Wed, 2 Dec 2020 20:27:37 +0000 (12:27 -0800)
committerLinus Torvalds <[email protected]>
Wed, 2 Dec 2020 20:27:37 +0000 (12:27 -0800)
Pull arm64 fixes from Will Deacon:
 "I'm sad to say that we've got an unusually large arm64 fixes pull for
  rc7 which addresses numerous significant instrumentation issues with
  our entry code.

  Without these patches, lockdep is hopelessly unreliable in some
  configurations [1,2] and syzkaller is therefore not a lot of use
  because it's so noisy.

  Although much of this has always been broken, it appears to have been
  exposed more readily by other changes such as 044d0d6de9f5 ("lockdep:
  Only trace IRQ edges") and general lockdep improvements around IRQ
  tracing and NMIs.

  Fixing this properly required moving much of the instrumentation hooks
  from our entry assembly into C, which Mark has been working on for the
  last few weeks. We're not quite ready to move to the recently added
  generic functions yet, but the code here has been deliberately written
  to mimic that closely so we can look at cleaning things up once we
  have a bit more breathing room.

  Having said all that, the second version of these patches was posted
  last week and I pushed it into our CI (kernelci and cki) along with a
  commit which forced on PROVE_LOCKING, NOHZ_FULL and
  CONTEXT_TRACKING_FORCE. The result? We found a real bug in the
  md/raid10 code [3].

  Oh, and there's also a really silly typo patch that's unrelated.

  Summary:

   - Fix numerous issues with instrumentation and exception entry

   - Fix hideous typo in unused register field definition"

[1] https://lore.kernel.org/r/CACT4Y+aAzoJ48Mh1wNYD17pJqyEcDnrxGfApir=-j171TnQXhw@mail.gmail.com
[2] https://lore.kernel.org/r/20201119193819[email protected]
[3] https://lore.kernel.org/r/94c76d5e-466a-bc5f-e6c2-a11b65c39f83@redhat.com

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: mte: Fix typo in macro definition
  arm64: entry: fix EL1 debug transitions
  arm64: entry: fix NMI {user, kernel}->kernel transitions
  arm64: entry: fix non-NMI kernel<->kernel transitions
  arm64: ptrace: prepare for EL1 irq/rcu tracking
  arm64: entry: fix non-NMI user<->kernel transitions
  arm64: entry: move el1 irq/nmi logic to C
  arm64: entry: prepare ret_to_user for function call
  arm64: entry: move enter_from_user_mode to entry-common.c
  arm64: entry: mark entry code as noinstr
  arm64: mark idle code as noinstr
  arm64: syscall: exit userspace before unmasking exceptions

1  2 
arch/arm64/include/asm/sysreg.h
arch/arm64/kernel/process.c

index e2ef4c2edf0651836f91541363c97526479e35a2,c8ab9900293ff6e498df972af685003820dd537f..801861d054268a6aeefdda02c204ab2e5f37fec6
  #define SYS_CONTEXTIDR_EL1            sys_reg(3, 0, 13, 0, 1)
  #define SYS_TPIDR_EL1                 sys_reg(3, 0, 13, 0, 4)
  
 +#define SYS_SCXTNUM_EL1                       sys_reg(3, 0, 13, 0, 7)
 +
  #define SYS_CNTKCTL_EL1                       sys_reg(3, 0, 14, 1, 0)
  
  #define SYS_CCSIDR_EL1                        sys_reg(3, 1, 0, 0, 0)
  #define SYS_TPIDR_EL0                 sys_reg(3, 3, 13, 0, 2)
  #define SYS_TPIDRRO_EL0                       sys_reg(3, 3, 13, 0, 3)
  
 +#define SYS_SCXTNUM_EL0                       sys_reg(3, 3, 13, 0, 7)
 +
  /* Definitions for system register interface to AMU for ARMv8.4 onwards */
  #define SYS_AM_EL0(crm, op2)          sys_reg(3, 3, 13, (crm), (op2))
  #define SYS_AMCR_EL0                  SYS_AM_EL0(2, 0)
  #define SYS_TFSR_EL1_TF0_SHIFT        0
  #define SYS_TFSR_EL1_TF1_SHIFT        1
  #define SYS_TFSR_EL1_TF0      (UL(1) << SYS_TFSR_EL1_TF0_SHIFT)
- #define SYS_TFSR_EL1_TF1      (UK(2) << SYS_TFSR_EL1_TF1_SHIFT)
+ #define SYS_TFSR_EL1_TF1      (UL(1) << SYS_TFSR_EL1_TF1_SHIFT)
  
  /* Safe value for MPIDR_EL1: Bit31:RES1, Bit30:U:0, Bit24:MT:0 */
  #define SYS_MPIDR_SAFE_VAL    (BIT(31))
index 7697a4b48b7c6c887063c66998fbc79df0ee0f7b,0c65a91f8f53f47020f41c78bc48112fa5b18be2..ed919f633ed8ec1eb326525c7da8830485ee2eb7
@@@ -72,13 -72,13 +72,13 @@@ EXPORT_SYMBOL_GPL(pm_power_off)
  
  void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd);
  
- static void __cpu_do_idle(void)
+ static void noinstr __cpu_do_idle(void)
  {
        dsb(sy);
        wfi();
  }
  
- static void __cpu_do_idle_irqprio(void)
+ static void noinstr __cpu_do_idle_irqprio(void)
  {
        unsigned long pmr;
        unsigned long daif_bits;
   *    ensure that interrupts are not masked at the PMR (because the core will
   *    not wake up if we block the wake up signal in the interrupt controller).
   */
- void cpu_do_idle(void)
+ void noinstr cpu_do_idle(void)
  {
        if (system_uses_irq_prio_masking())
                __cpu_do_idle_irqprio();
  /*
   * This is our default idle handler.
   */
- void arch_cpu_idle(void)
+ void noinstr arch_cpu_idle(void)
  {
        /*
         * This should do all the clock switching and wait for interrupt
         * tricks
         */
        cpu_do_idle();
 -      local_irq_enable();
 +      raw_local_irq_enable();
  }
  
  #ifdef CONFIG_HOTPLUG_CPU
This page took 0.068507 seconds and 4 git commands to generate.