1. 28 May, 2021 3 commits
  2. 27 May, 2021 11 commits
  3. 25 May, 2021 5 commits
    • Tiezhu Yang's avatar
      MIPS: Fix kernel hang under FUNCTION_GRAPH_TRACER and PREEMPT_TRACER · 78cf0eb9
      Tiezhu Yang authored
      When update the latest mainline kernel with the following three configs,
      the kernel hangs during startup:
      When update the latest mainline kernel with the above two configs (1)
      and (2), the kernel starts normally, but it still hangs when execute
      the following command:
      echo "function_graph" > /sys/kernel/debug/tracing/current_tracer
      Without CONFIG_PREEMPT_TRACER=y, the above two kinds of kernel hangs
      disappeared, so it seems that CONFIG_PREEMPT_TRACER has some influences
      with function_graph tracer at the first glance.
      I use ejtag to find out the epc address is related with preempt_enable()
      in the file arch/mips/lib/mips-atomic.c, because function tracing can
      trace the preempt_{enable,disable} calls that are traced, replace them
      with preempt_{enable,disable}_notrace to prevent function tracing from
      going into an infinite loop, and then it can fix the kernel hang issue.
      By the way, it seems that this commit is a complement and improvement of
      commit f93a1a00
       ("MIPS: Fix crash that occurs when function tracing
      is enabled").
      Signed-off-by: default avatarTiezhu Yang <yangtiezhu@loongson.cn>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
    • Randy Dunlap's avatar
      MIPS: ralink: export rt_sysc_membase for rt2880_wdt.c · fef532ea
      Randy Dunlap authored
      rt2880_wdt.c uses (well, attempts to use) rt_sysc_membase. However,
      when this watchdog driver is built as a loadable module, there is a
      build error since the rt_sysc_membase symbol is not exported.
      Export it to quell the build error.
      ERROR: modpost: "rt_sysc_membase" [drivers/watchdog/rt2880_wdt.ko] undefined!
      Fixes: 473cf939
       ("watchdog: add ralink watchdog driver")
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Cc: John Crispin <john@phrozen.org>
      Cc: linux-mips@vger.kernel.org
      Cc: linux-watchdog@vger.kernel.org
      Acked-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
    • Randy Dunlap's avatar
      MIPS: launch.h: add include guard to prevent build errors · 6855adc2
      Randy Dunlap authored
      arch/mips/include/asm/mips-boards/launch.h needs an include guard
      to prevent it from being #included more than once.
      Prevents these build errors:
      In file included from ../arch/mips/mti-malta/malta-amon.c:16:
      ../arch/mips/include/asm/mips-boards/launch.h:8:8: error: redefinition of 'struct cpulaunch'
          8 | struct cpulaunch {
            |        ^~~~~~~~~
      In file included from ../arch/mips/include/asm/mips-cps.h:13,
                       from ../arch/mips/include/asm/smp-ops.h:16,
                       from ../arch/mips/include/asm/smp.h:21,
                       from ../include/linux/smp.h:114,
                       from ../arch/mips/mti-malta/malta-amon.c:12:
      ../arch/mips/include/asm/mips-boards/launch.h:8:8: note: originally defined here
          8 | struct cpulaunch {
            |        ^~~~~~~~~
      make[3]: [../scripts/Makefile.build:273: arch/mips/mti-malta/malta-amon.o] Error 1 (ignored)
      Fixes: 6decd1aa
       ("MIPS: add support for buggy MT7621S core detection")
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: linux-mips@vger.kernel.org
      Cc: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
      Reviewed-by: default avatarIlya Lipnitskiy <ilya.lipnitskiy@gmail.com>
      Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
    • Randy Dunlap's avatar
      MIPS: alchemy: xxs1500: add gpio-au1000.h header file · ff4cff96
      Randy Dunlap authored
      board-xxs1500.c references 2 functions without declaring them, so add
      the header file to placate the build.
      ../arch/mips/alchemy/board-xxs1500.c: In function 'board_setup':
      ../arch/mips/alchemy/board-xxs1500.c:56:2: error: implicit declaration of function 'alchemy_gpio1_input_enable' [-Werror=implicit-function-declaration]
         56 |  alchemy_gpio1_input_enable();
      ../arch/mips/alchemy/board-xxs1500.c:57:2: error: implicit declaration of function 'alchemy_gpio2_enable'; did you mean 'alchemy_uart_enable'? [-Werror=implicit-function-declaration]
         57 |  alchemy_gpio2_enable();
      Fixes: 8e026910
       ("MIPS: Alchemy: merge GPR/MTX-1/XXS1500 board code into single files")
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: linux-mips@vger.kernel.org
      Cc: Manuel Lauss <manuel.lauss@googlemail.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Acked-by: default avatarManuel Lauss <manuel.lauss@gmail.com>
      Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
    • Jisheng Zhang's avatar
      arm64: mm: don't use CON and BLK mapping if KFENCE is enabled · e6901240
      Jisheng Zhang authored and Catalin Marinas's avatar Catalin Marinas committed
      When we added KFENCE support for arm64, we intended that it would
      force the entire linear map to be mapped at page granularity, but we
      only enforced this in arch_add_memory() and not in map_mem(), so
      memory mapped at boot time can be mapped at a larger granularity.
      When booting a kernel with KFENCE=y and RODATA_FULL=n, this results in
      the following WARNING at boot:
      [    0.000000] ------------[ cut here ]------------
      [    0.000000] WARNING: CPU: 0 PID: 0 at mm/memory.c:2462 apply_to_pmd_range+0xec/0x190
      [    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.13.0-rc1+ #10
      [    0.000000] Hardware name: linux,dummy-virt (DT)
      [    0.000000] pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO BTYPE=--)
      [    0.000000] pc : apply_to_pmd_range+0xec/0x190
      [    0.000000] lr : __apply_to_page_range+0x94/0x170
      [    0.000000] sp : ffffffc010573e20
      [    0.000000] x29: ffffffc010573e20 x28: ffffff801f400000 x27: ffffff801f401000
      [    0.000000] x26: 0000000000000001 x25: ffffff801f400fff x24: ffffffc010573f28
      [    0.000000] x23: ffffffc01002b710 x22: ffffffc0105fa450 x21: ffffffc010573ee4
      [    0.000000] x20: ffffff801fffb7d0 x19: ffffff801f401000 x18: 00000000fffffffe
      [    0.000000] x17: 000000000000003f x16: 000000000000000a x15: ffffffc01060b940
      [    0.000000] x14: 0000000000000000 x13: 0098968000000000 x12: 0000000098968000
      [    0.000000] x11: 0000000000000000 x10: 0000000098968000 x9 : 0000000000000001
      [    0.000000] x8 : 0000000000000000 x7 : ffffffc010573ee4 x6 : 0000000000000001
      [    0.000000] x5 : ffffffc010573f28 x4 : ffffffc01002b710 x3 : 0000000040000000
      [    0.000000] x2 : ffffff801f5fffff x1 : 0000000000000001 x0 : 007800005f400705
      [    0.000000] Call trace:
      [    0.000000]  apply_to_pmd_range+0xec/0x190
      [    0.000000]  __apply_to_page_range+0x94/0x170
      [    0.000000]  apply_to_page_range+0x10/0x20
      [    0.000000]  __change_memory_common+0x50/0xdc
      [    0.000000]  set_memory_valid+0x30/0x40
      [    0.000000]  kfence_init_pool+0x9c/0x16c
      [    0.000000]  kfence_init+0x20/0x98
      [    0.000000]  start_kernel+0x284/0x3f8
      Fixes: 840b2398
       ("arm64, kfence: enable KFENCE for ARM64")
      Cc: <stable@vger.kernel.org> # 5.12.x
      Signed-off-by: default avatarJisheng Zhang <Jisheng.Zhang@synaptics.com>
      Acked-by: Mark Rutland's avatarMark Rutland <mark.rutland@arm.com>
      Acked-by: default avatarMarco Elver <elver@google.com>
      Tested-by: default avatarMarco Elver <elver@google.com>
      Link: https://lore.kernel.org/r/20210525104551.2ec37f77@xhacker.debian
      Signed-off-by: Catalin Marinas's avatarCatalin Marinas <catalin.marinas@arm.com>
  4. 24 May, 2021 3 commits
  5. 21 May, 2021 1 commit
  6. 20 May, 2021 3 commits
  7. 19 May, 2021 4 commits
  8. 18 May, 2021 8 commits
  9. 17 May, 2021 1 commit
    • Jan Kara's avatar
      quota: Disable quotactl_path syscall · 5b9fedb3
      Jan Kara authored
      In commit fa8b9007 ("quota: wire up quotactl_path") we have wired up
      new quotactl_path syscall. However some people in LWN discussion have
      objected that the path based syscall is missing dirfd and flags argument
      which is mostly standard for contemporary path based syscalls. Indeed
      they have a point and after a discussion with Christian Brauner and
      Sascha Hauer I've decided to disable the syscall for now and update its
      API. Since there is no userspace currently using that syscall and it
      hasn't been released in any major release, we should be fine.
      CC: Christian Brauner <christian.brauner@ubuntu.com>
      CC: Sascha Hauer <s.hauer@pengutronix.de>
      Link: https://lore.kernel.org/lkml/20210512153621.n5u43jsytbik4yze@wittgenstein
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
  10. 15 May, 2021 1 commit
    • Marc Zyngier's avatar
      KVM: arm64: Fix debug register indexing · cb853ded
      Marc Zyngier authored
      Commit 03fdfb26 ("KVM: arm64: Don't write junk to sysregs on
      reset") flipped the register number to 0 for all the debug registers
      in the sysreg table, hereby indicating that these registers live
      in a separate shadow structure.
      However, the author of this patch failed to realise that all the
      accessors are using that particular index instead of the register
      encoding, resulting in all the registers hitting index 0. Not quite
      a valid implementation of the architecture...
      Address the issue by fixing all the accessors to use the CRm field
      of the encoding, which contains the debug register index.
      Fixes: 03fdfb26
       ("KVM: arm64: Don't write junk to sysregs on reset")
      Reported-by: default avatarRicardo Koller <ricarkol@google.com>
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      Cc: stable@vger.kernel.org