1. 15 Dec, 2021 5 commits
    • Suzuki Poulose's avatar
      BACKPORT: arm64: errata: Add workaround for TSB flush failures · 5b0fa63e
      Suzuki Poulose authored and Qais Yousef's avatar Qais Yousef committed
      
      
      Arm Neoverse-N2 (#2067961) and Cortex-A710 (#2054223) suffers
      from errata, where a TSB (trace synchronization barrier)
      fails to flush the trace data completely, when executed from
      a trace prohibited region. In Linux we always execute it
      after we have moved the PE to trace prohibited region. So,
      we can apply the workaround every time a TSB is executed.
      
      The work around is to issue two TSB consecutively.
      
      NOTE: This errata is defined as LOCAL_CPU_ERRATUM, implying
      that a late CPU could be blocked from booting if it is the
      first CPU that requires the workaround. This is because we
      do not allow setting a cpu_hwcaps after the SMP boot. The
      other alternative is to use "this_cpu_has_cap()" instead
      of the faster system wide check, which may be a bit of an
      overhead, given we may have to do this in nvhe KVM host
      before a guest entry.
      
      Cc: Will Deacon <will@kernel.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Marc Zyngier <maz@kernel.org>
      Acked-by: Catalin Marinas's avatarCatalin Marinas <catalin.marinas@arm.com>
      Reviewed-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
      Reviewed-by: Anshuman Khandual's avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Signed-off-by: Suzuki Poulose's avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Link: https://lore.kernel.org/r/20211019163153.3692640-4-suzuki.poulose@arm.com
      
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      (cherry picked from commit fa82d0b4b833790ac4572377fb777dcea24a9d69)
      [Fix conflict due to another workaround that is not backported
      (TRBE_OVERWRITE). Also manually update cpucaps.h which is autogenerated
      in upstream from arch/arm64/tools/cpucaps which we ignored as part of
      the conflict resolution]
      Signed-off-by: Qais Yousef's avatarQais Yousef <qais.yousef@arm.com>
      Change-Id: I6b40eaa0ac14552c867860133a04619cb556bc31
      5b0fa63e
    • Suzuki Poulose's avatar
      UPSTREAM: arm64: Add Neoverse-N2, Cortex-A710 CPU part definition · cfbbf45d
      Suzuki Poulose authored and Qais Yousef's avatar Qais Yousef committed
      
      
      Add the CPU Partnumbers for the new Arm designs.
      
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Acked-by: Catalin Marinas's avatarCatalin Marinas <catalin.marinas@arm.com>
      Reviewed-by: Anshuman Khandual's avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Signed-off-by: Suzuki Poulose's avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Link: https://lore.kernel.org/r/20211019163153.3692640-2-suzuki.poulose@arm.com
      
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      (cherry picked from commit 2d0d656700d67239a57afaf617439143d8dac9be)
      Signed-off-by: Qais Yousef's avatarQais Yousef <qais.yousef@arm.com>
      Change-Id: I6fd8750086badd03e486c24036dabdd3d0b14026
      cfbbf45d
    • Suzuki Poulose's avatar
      UPSTREAM: coresight: trbe: Defer the probe on offline CPUs · f4c99e64
      Suzuki Poulose authored and Qais Yousef's avatar Qais Yousef committed
      If a CPU is offline during the driver init, we could end up causing
      a kernel crash trying to register the coresight device for the TRBE
      instance. The trbe_cpudata for the TRBE instance is initialized only
      when it is probed. Otherwise, we could end up dereferencing a NULL
      cpudata->drvdata.
      
      e.g:
      
      [    0.149999] coresight ete0: CPU0: ete v1.1 initialized
      [    0.149999] coresight-etm4x ete_1: ETM arch init failed
      [    0.149999] coresight-etm4x: probe of ete_1 failed with error -22
      [    0.150085] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000050
      [    0.150085] Mem abort info:
      [    0.150085]   ESR = 0x96000005
      [    0.150085]   EC = 0x25: DABT (current EL), IL = 32 bits
      [    0.150085]   SET = 0, FnV = 0
      [    0.150085]   EA = 0, S1PTW = 0
      [    0.150085] Data abort info:
      [    0.150085]   ISV = 0, ISS = 0x00000005
      [    0.150085]   CM = 0, WnR = 0
      [    0.150085] [0000000000000050] user address but active_mm is swapper
      [    0.150085] Internal error: Oops: 96000005 [#1] PREEMPT SMP
      [    0.150085] Modules linked in:
      [    0.150085] Hardware name: FVP Base RevC (DT)
      [    0.150085] pstate: 00800009 (nzcv daif -PAN +UAO -TCO BTYPE=--)
      [    0.150155] pc : arm_trbe_register_coresight_cpu+0x74/0x144
      [    0.150155] lr : arm_trbe_register_coresight_cpu+0x48/0x144
        ...
      
      [    0.150237] Call trace:
      [    0.150237]  arm_trbe_register_coresight_cpu+0x74/0x144
      [    0.150237]  arm_trbe_device_probe+0x1c0/0x2d8
      [    0.150259]  platform_drv_probe+0x94/0xbc
      [    0.150259]  really_probe+0x1bc/0x4a8
      [    0.150266]  driver_probe_device+0x7c/0xb8
      [    0.150266]  device_driver_attach+0x6c/0xac
      [    0.150266]  __driver_attach+0xc4/0x148
      [    0.150266]  bus_for_each_dev+0x7c/0xc8
      [    0.150266]  driver_attach+0x24/0x30
      [    0.150266]  bus_add_driver+0x100/0x1e0
      [    0.150266]  driver_register+0x78/0x110
      [    0.150266]  __platform_driver_register+0x44/0x50
      [    0.150266]  arm_trbe_init+0x28/0x84
      [    0.150266]  do_one_initcall+0x94/0x2bc
      [    0.150266]  do_initcall_level+0xa4/0x158
      [    0.150266]  do_initcalls+0x54/0x94
      [    0.150319]  do_basic_setup+0x24/0x30
      [    0.150319]  kernel_init_freeable+0xe8/0x14c
      [    0.150319]  kernel_init+0x14/0x18c
      [    0.150319]  ret_from_fork+0x10/0x30
      [    0.150319] Code: f94012c8 b0004ce2 9134a442 52819801 (f9402917)
      [    0.150319] ---[ end trace d23e0cfe5098535e ]---
      [    0.150346] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
      
      Fix this by skipping the step, if we are unable to probe the CPU.
      
      Fixes: 3fbf7f01
      
       ("coresight: sink: Add TRBE driver")
      Reported-by: default avatarBransilav Rankov <branislav.rankov@arm.com>
      Cc: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: stable <stable@vger.kernel.org>
      Tested-by: default avatarBranislav Rankov <branislav.rankov@arm.com>
      Signed-off-by: Suzuki Poulose's avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Reviewed-by: Anshuman Khandual's avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Link: https://lore.kernel.org/r/20211014142238.2221248-1-suzuki.poulose@arm.com
      
      Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
      (cherry picked from commit a08025b3fe56185290a1ea476581f03ca733f967)
      Signed-off-by: Qais Yousef's avatarQais Yousef <qais.yousef@arm.com>
      Change-Id: I34a5a03a8f321cd807731b54d620b3b90135264f
      f4c99e64
    • Suzuki Poulose's avatar
      UPSTREAM: coresight: etm4x: Use Trace Filtering controls dynamically · fb938540
      Suzuki Poulose authored and Qais Yousef's avatar Qais Yousef committed
      
      
      The Trace Filtering support (FEAT_TRF) ensures that the ETM
      can be prohibited from generating any trace for a given EL.
      This is much stricter knob, than the TRCVICTLR exception level
      masks, which doesn't prevent the ETM from generating Context
      packets for an "excluded" EL. At the moment, we do a onetime
      enable trace at user and kernel and leave it untouched for the
      kernel life time. This implies that the ETM could potentially
      generate trace packets containing the kernel addresses, and
      thus leaking the kernel virtual address in the trace.
      
      This patch makes the switch dynamic, by honoring the filters
      set by the user and enforcing them in the TRFCR controls.
      We also rename the cpu_enable_tracing() appropriately to
      cpu_detect_trace_filtering() and the drvdata member
      trfc => trfcr to indicate the "value" of the TRFCR_EL1.
      
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Al Grant <al.grant@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Signed-off-by: Suzuki Poulose's avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Reviewed-by: Anshuman Khandual's avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Link: https://lore.kernel.org/r/20210914102641.1852544-3-suzuki.poulose@arm.com
      
      Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
      (cherry picked from commit 5f6fd1aa8cc147b111af1a833574487a87237dc0)
      Signed-off-by: Qais Yousef's avatarQais Yousef <qais.yousef@arm.com>
      Change-Id: If6ae831b3d1f5334648eb3d02262812527e2bb9d
      fb938540
    • Suzuki Poulose's avatar
      BACKPORT: coresight: etm4x: Save restore TRFCR_EL1 · 78bd0151
      Suzuki Poulose authored and Qais Yousef's avatar Qais Yousef committed
      
      
      When the CPU enters a low power mode, the TRFCR_EL1 contents could be
      reset. Thus we need to save/restore the TRFCR_EL1 along with the ETM4x
      registers to allow the tracing.
      
      The TRFCR related helpers are in a new header file, as we need to use
      them for TRBE in the later patches.
      
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Reviewed-by: Anshuman Khandual's avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Signed-off-by: Suzuki Poulose's avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Link: https://lore.kernel.org/r/20210914102641.1852544-2-suzuki.poulose@arm.com
      
      
      [Fixed cosmetic details]
      Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
      (cherry picked from commit 937d3f58cacf377cab7c32e475e1ffa91d611dce)
      Signed-off-by: Qais Yousef's avatarQais Yousef <qais.yousef@arm.com>
      [Conflict in in drivers/hwtracing/coresight/coresight-etm4x-core.c,
      unnecessary new includes were removed]
      Change-Id: Id81d9505e86664c09ec6876e48c4e9c2d945503e
      78bd0151
  2. 09 Dec, 2021 2 commits
  3. 08 Dec, 2021 2 commits
  4. 07 Dec, 2021 3 commits
    • Jindong Yue's avatar
      ANDROID: ABI: Add symbols used by clocksource driver · 686cd3b2
      Jindong Yue authored
      
      
      Export three symbols required by timer-imx-tpm.ko
      
      Leaf changes summary: 3 artifacts changed
      Changed leaf types summary: 0 leaf type changed
      Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 3 Added functions
      Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable
      
      3 Added functions:
      
        [A] 'function int clocksource_mmio_init(void*, const char*, unsigned long int, int, unsigned int, long long unsigned int (clocksource*)*)'
        [A] 'function u64 clocksource_mmio_readl_up(clocksource*)'
        [A] 'function void sched_clock_register(long long unsigned int ()*, int, unsigned long int)'
      
      Bug: 194108974
      Signed-off-by: default avatarJindong Yue <jindong.yue@nxp.com>
      Change-Id: I123996fc08740d3e4bf242a1913b22ca83b2e2b9
      686cd3b2
    • Jindong Yue's avatar
      ANDROID: GKI: Export clocksource_mmio_init · 80c1cef2
      Jindong Yue authored
      
      
      Export clocksource_mmio_init and clocksource_mmio_readl_up
      to support building clocksource driver as module.
      
      Bug: 194108974
      Signed-off-by: default avatarJindong Yue <jindong.yue@nxp.com>
      Change-Id: I63bab35efa6ca2c8b0c6283f6d42c13db66568af
      80c1cef2
    • Jindong Yue's avatar
      ANDROID: GKI: Export sched_clock_register · 84881c68
      Jindong Yue authored
      
      
      clocksource driver may use sched_clock_register
      to resigter itself as a sched_clock source.
      Export it to support building such driver
      as module, like timer-imx-tpm.c
      
      Bug: 194108974
      Signed-off-by: default avatarJindong Yue <jindong.yue@nxp.com>
      Change-Id: Id23f3da624a1e70fc1a44daf6f827c03dc1d053d
      84881c68
  5. 06 Dec, 2021 3 commits
  6. 03 Dec, 2021 1 commit
  7. 02 Dec, 2021 1 commit
    • Donnie Pollitz's avatar
      ANDROID: GKI: Add symbols abi for USB IP kernel modules. · 32432740
      Donnie Pollitz authored
      
      
      Leaf changes summary: 4 artifacts changed
      Changed leaf types summary: 0 leaf type changed
      Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 3 Added functions
      Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 1 Added variable
      
      3 Added functions:
      
        [A] 'function int kernel_sock_shutdown(socket*, sock_shutdown_cmd)'
        [A] 'function int sock_recvmsg(socket*, msghdr*, int)'
        [A] 'function socket* sockfd_lookup(int, int*)'
      
      1 Added variable:
      
        [A] 'device platform_bus'
      
      Bug: 207100354
      Test: Manually, Emulator boots up.
      Signed-off-by: default avatarDonnie Pollitz <donpollitz@google.com>
      Change-Id: Iba6b282d4a21d641b992867d0519d1da9edd5cec
      32432740
  8. 01 Dec, 2021 5 commits
  9. 30 Nov, 2021 5 commits
    • Gao Xiang's avatar
      UPSTREAM: erofs: fix unsafe pagevec reuse of hooked pclusters · b943d328
      Gao Xiang authored
      There are pclusters in runtime marked with Z_EROFS_PCLUSTER_TAIL
      before actual I/O submission. Thus, the decompression chain can be
      extended if the following pcluster chain hooks such tail pcluster.
      
      As the related comment mentioned, if some page is made of a hooked
      pcluster and another followed pcluster, it can be reused for in-place
      I/O (since I/O should be submitted anyway):
       _______________________________________________________________
      |  tail (partial) page |          head (partial) page           |
      |_____PRIMARY_HOOKED___|____________PRIMARY_FOLLOWED____________|
      
      However, it's by no means safe to reuse as pagevec since if such
      PRIMARY_HOOKED pclusters finally move into bypass chain without I/O
      submission. It's somewhat hard to reproduce with LZ4 and I just found
      it (general protection fault) by ro_fsstressing a LZMA image for long
      time.
      
      I'm going to actively clean up related code together with multi-page
      folio adaption in the next few months. Let's address it directly for
      easier backporting for now.
      
      Call trace for reference:
        z_erofs_decompress_pcluster+0x10a/0x8a0 [erofs]
        z_erofs_decompress_queue.isra.36+0x3c/0x60 [erofs]
        z_erofs_runqueue+0x5f3/0x840 [erofs]
        z_erofs_readahead+0x1e8/0x320 [erofs]
        read_pages+0x91/0x270
        page_cache_ra_unbounded+0x18b/0x240
        filemap_get_pages+0x10a/0x5f0
        filemap_read+0xa9/0x330
        new_sync_read+0x11b/0x1a0
        vfs_read+0xf1/0x190
      
      Link: https://lore.kernel.org/r/20211103182006.4040-1-xiang@kernel.org
      Fixes: 3883a79a
      
       ("staging: erofs: introduce VLE decompression support")
      Cc: <stable@vger.kernel.org> # 4.19+
      Reviewed-by: default avatarChao Yu <chao@kernel.org>
      Signed-off-by: default avatarGao Xiang <hsiangkao@linux.alibaba.com>
      
      Bug: 206904737
      Change-Id: Ib34644bf29f3f6dc0369cc51869c8b259f8d0f0a
      (cherry picked from commit 86432a6dca9bed79111990851df5756d3eb5f57c)
      Signed-off-by: default avatarHuang Jianan <huangjianan@oppo.com>
      b943d328
    • Yue Hu's avatar
      UPSTREAM: erofs: remove the occupied parameter from z_erofs_pagevec_enqueue() · 028f7128
      Yue Hu authored
      No any behavior to variable occupied in z_erofs_attach_page() which
      is only caller to z_erofs_pagevec_enqueue().
      
      Link: https://lore.kernel.org/r/20210419102623.2015-1-zbestahu@gmail.com
      
      Signed-off-by: default avatarYue Hu <huyue2@yulong.com>
      Reviewed-by: default avatarGao Xiang <xiang@kernel.org>
      Signed-off-by: default avatarGao Xiang <xiang@kernel.org>
      
      Bug: 206904737
      Change-Id: I37f5496d89befe7550b63024b1ead4ce531a22a8
      (cherry picked from commit 7dea3de7
      
      )
      Signed-off-by: default avatarHuang Jianan <huangjianan@oppo.com>
      028f7128
    • Albert Wang's avatar
      UPSTREAM: usb: dwc3: gadget: Fix null pointer exception · 504b13fb
      Albert Wang authored
      [ Upstream commit 26288448120b28af1dfd85a6fa6b6d55a16c7f2f ]
      
      In the endpoint interrupt functions
      dwc3_gadget_endpoint_transfer_in_progress() and
      dwc3_gadget_endpoint_trbs_complete() will dereference the endpoint
      descriptor. But it could be cleared in __dwc3_gadget_ep_disable()
      when accessory disconnected. So we need to check whether it is null
      or not before dereferencing it.
      
      Bug: 202829886
      Bug: 204052921
      Fixes: f09ddcfc
      
       ("usb: dwc3: gadget: Prevent EP queuing while stopping transfers")
      Cc: stable <stable@vger.kernel.org>
      Reviewed-by: default avatarJack Pham <quic_jackp@quicinc.com>
      Signed-off-by: default avatarAlbert Wang <albertccwang@google.com>
      Link: https://lore.kernel.org/r/20211109092642.3507692-1-albertccwang@google.com
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Change-Id: I767f61f3c8840b7854a467ab6bf18c26c89757c2
      Signed-off-by: default avatarAlbert Wang <albertccwang@google.com>
      504b13fb
    • Eric Biggers's avatar
      ANDROID: fips140: support "evaluation testing" builds via build.sh · 143ac631
      Eric Biggers authored
      
      
      Allow the following command to be run to make a build of fips140.ko
      that has CONFIG_CRYPTO_FIPS140_MOD_EVAL_TESTING enabled:
      
          BUILD_CONFIG=common/build.config.gki.aarch64.fips140_eval_testing ./build/build.sh
      
      Bug: 188620248
      Change-Id: I0e0be487974c6ad40f3135fc5fec6aa107aab78c
      Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
      143ac631
    • Mark Rutland's avatar
      FROMGIT: sched/scs: Reset task stack state in bringup_cpu() · cbd64e25
      Mark Rutland authored
      To hot unplug a CPU, the idle task on that CPU calls a few layers of C
      code before finally leaving the kernel. When KASAN is in use, poisoned
      shadow is left around for each of the active stack frames, and when
      shadow call stacks are in use. When shadow call stacks (SCS) are in use
      the task's saved SCS SP is left pointing at an arbitrary point within
      the task's shadow call stack.
      
      When a CPU is offlined than onlined back into the kernel, this stale
      state can adversely affect execution. Stale KASAN shadow can alias new
      stackframes and result in bogus KASAN warnings. A stale SCS SP is
      effectively a memory leak, and prevents a portion of the shadow call
      stack being used. Across a number of hotplug cycles the idle task's
      entire shadow call stack can become unusable.
      
      We previously fixed the KASAN issue in commit:
      
        e1b77c92 ("sched/kasan: remove stale KASAN poison after hotplug")
      
      ... by removing any stale KASAN stack poison immediately prior to
      onlining a CPU.
      
      Subsequently in commit:
      
        f1a0a376 ("sched/core: Initialize the idle task with preemption disabled")
      
      ... the refactoring left the KASAN and SCS cleanup in one-time idle
      thread initialization code rather than something invoked prior to each
      CPU being onlined, breaking both as above.
      
      We fixed SCS (but not KASAN) in commit:
      
        63acd42c ("sched/scs: Reset the shadow stack when idle_task_exit")
      
      ... but as this runs in the context of the idle task being offlined it's
      potentially fragile.
      
      To fix these consistently and more robustly, reset the SCS SP and KASAN
      shadow of a CPU's idle task immediately before we online that CPU in
      bringup_cpu(). This ensures the idle task always has a consistent state
      when it is running, and removes the need to so so when exiting an idle
      task.
      
      Whenever any thread is created, dup_task_struct() will give the task a
      stack which is free of KASAN shadow, and initialize the task's SCS SP,
      so there's no need to specially initialize either for idle thread within
      init_idle(), as this was only necessary to handle hotplug cycles.
      
      I've tested this on arm64 with:
      
      * gcc 11.1.0, defconfig +KASAN_INLINE, KASAN_STACK
      * clang 12.0.0, defconfig +KASAN_INLINE, KASAN_STACK, SHADOW_CALL_STACK
      
      ... offlining and onlining CPUS with:
      
      | while true; do
      |   for C in /sys/devices/system/cpu/cpu*/online; do
      |     echo 0 > $C;
      |     echo 1 > $C;
      |   done
      | done
      
      Fixes: f1a0a376
      
       ("sched/core: Initialize the idle task with preemption disabled")
      Reported-by: default avatarQian Cai <quic_qiancai@quicinc.com>
      Signed-off-by: Mark Rutland's avatarMark Rutland <mark.rutland@arm.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Reviewed-by: default avatarValentin Schneider <valentin.schneider@arm.com>
      Tested-by: default avatarQian Cai <quic_qiancai@quicinc.com>
      Link: https://lore.kernel.org/lkml/20211115113310.35693-1-mark.rutland@arm.com/
      
      Bug: 207346964
      (cherry picked from commit dce1ca0525bfdc8a69a9343bc714fbc19a2f04b3
      https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
      
       sched/urgent)
      Signed-off-by: default avatarYee Lee <yee.lee@mediatek.com>
      Change-Id: Ia2db6477afddcc01fae00c6eb925fb3ec2791130
      cbd64e25
  10. 29 Nov, 2021 1 commit
  11. 26 Nov, 2021 5 commits
    • Jindong Yue's avatar
      ANDROID: ABI: Add several spi_mem related symbols · 851990cc
      Jindong Yue authored
      
      
      Add several spi_mem related symbols required by
      spi-nxp-fspi.ko and spi-nor.ko
      
      Leaf changes summary: 11 artifacts changed
      Changed leaf types summary: 0 leaf type changed
      Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 11 Added functions
      Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable
      
      11 Added functions:
      
        [A] 'function spi_mem_dirmap_desc* devm_spi_mem_dirmap_create(device*, spi_mem*, const spi_mem_dirmap_info*)'
        [A] 'function int spi_mem_adjust_op_size(spi_mem*, spi_mem_op*)'
        [A] 'function bool spi_mem_default_supports_op(spi_mem*, const spi_mem_op*)'
        [A] 'function ssize_t spi_mem_dirmap_read(spi_mem_dirmap_desc*, u64, size_t, void*)'
        [A] 'function ssize_t spi_mem_dirmap_write(spi_mem_dirmap_desc*, u64, size_t, void*)'
        [A] 'function int spi_mem_driver_register_with_owner(spi_mem_driver*, module*)'
        [A] 'function void spi_mem_driver_unregister(spi_mem_driver*)'
        [A] 'function bool spi_mem_dtr_supports_op(spi_mem*, const spi_mem_op*)'
        [A] 'function int spi_mem_exec_op(spi_mem*, const spi_mem_op*)'
        [A] 'function const char* spi_mem_get_name(spi_mem*)'
        [A] 'function bool spi_mem_supports_op(spi_mem*, const spi_mem_op*)'
      
      Bug: 207737303
      Signed-off-by: default avatarJindong Yue <jindong.yue@nxp.com>
      Change-Id: I6637737f5076cb87fe2180680fd5a3e507b10bc6
      851990cc
    • Pratyush Yadav's avatar
      UPSTREAM: spi: spi-mem: add spi_mem_dtr_supports_op() · be30f0ce
      Pratyush Yadav authored
      
      
      spi_mem_default_supports_op() rejects DTR ops by default to ensure that
      the controller drivers that haven't been updated with DTR support
      continue to reject them. It also makes sure that controllers that don't
      support DTR mode at all (which is most of them at the moment) also
      reject them.
      
      This means that controller drivers that want to support DTR mode can't
      use spi_mem_default_supports_op(). Driver authors have to roll their own
      supports_op() function and mimic the buswidth checks. See
      spi-cadence-quadspi.c for example. Or even worse, driver authors might
      skip it completely or get it wrong.
      
      Add spi_mem_dtr_supports_op(). It provides a basic sanity check for DTR
      ops and performs the buswidth requirement check. Move the logic for
      checking buswidth in spi_mem_default_supports_op() to a separate
      function so the logic is not repeated twice.
      Signed-off-by: default avatarPratyush Yadav <p.yadav@ti.com>
      Reviewed-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
      Link: https://lore.kernel.org/r/20210204141218.32229-1-p.yadav@ti.com
      
      Signed-off-by: Mark Brown's avatarMark Brown <broonie@kernel.org>
      
      Bug: 207737303
      (cherry picked from commit 539cf68c
      
      )
      Change-Id: Iaa3951c2e3f51f265b9bea583a3c8bd4fed80bb7
      Signed-off-by: default avatarJindong Yue <jindong.yue@nxp.com>
      be30f0ce
    • Jindong Yue's avatar
      ANDROID: gki_defconfig: enable CONFIG_SPI_MEM · e5dfa891
      Jindong Yue authored
      
      
      Enable SPI memory extension to provide high-level
      interface to send memory-like commands, which are
      used by vendor SPI controllers, like spi-nxp-fspi.
      
      Bug: 207737303
      Signed-off-by: default avatarJindong Yue <jindong.yue@nxp.com>
      Change-Id: I9ea58edc1407bead42970c4cc74c5d4a93c99d13
      e5dfa891
    • Jindong Yue's avatar
      ANDROID: ABI: Add several iio related symbols · bb18be42
      Jindong Yue authored
      
      
      Add several iio related symbols required by st_lsm6dsx.ko
      
      Leaf changes summary: 5 artifacts changed
      Changed leaf types summary: 0 leaf type changed
      Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 5 Added functions
      Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable
      
      5 Added functions:
      
        [A] 'function int iio_device_claim_direct_mode(iio_dev*)'
        [A] 'function void iio_device_release_direct_mode(iio_dev*)'
        [A] 'function int iio_push_event(iio_dev*, u64, s64)'
        [A] 'function int iio_read_mount_matrix(device*, const char*, iio_mount_matrix*)'
        [A] 'function ssize_t iio_show_mount_matrix(iio_dev*, uintptr_t, const iio_chan_spec*, char*)'
      
      Bug: 194108974
      Signed-off-by: default avatarJindong Yue <jindong.yue@nxp.com>
      Change-Id: I7f7b78d510f120497f597463e69ce35cb7203417
      bb18be42
    • Jindong Yue's avatar
      ANDROID: ABI: Update symbol list for IMX · 1407b7e1
      Jindong Yue authored
      
      
      Add below symbols:
       regmap-i3c.ko: dev_to_i3cdev, i3c_device_match_id
       st_lsm6dsx_spi.ko: spi_get_device_id
       micrel.ko: genphy_restart_aneg, phy_modify_mmd
       snd-soc-rpmsg-pcm512x.ko: snd_interval_ranges, snd_pcm_hw_constraint_ratnums
       snd-soc-imx-pcm512x-rpmsg.ko: snd_soc_limit_volume
       goodix.ko: touchscreen_parse_properties, touchscreen_report_pos
      
      Leaf changes summary: 10 artifacts changed
      Changed leaf types summary: 0 leaf type changed
      Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 10 Added functions
      Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable
      
      10 Added functions:
      
        [A] 'function i3c_device* dev_to_i3cdev(device*)'
        [A] 'function int genphy_restart_aneg(phy_device*)'
        [A] 'function const i3c_device_id* i3c_device_match_id(i3c_device*, const i3c_device_id*)'
        [A] 'function int phy_modify_mmd(phy_device*, int, unsigned int, unsigned short int, unsigned short int)'
        [A] 'function int snd_interval_ranges(snd_interval*, unsigned int, const snd_interval*, unsigned int)'
        [A] 'function int snd_pcm_hw_constraint_ratnums(snd_pcm_runtime*, unsigned int, snd_pcm_hw_param_t, const snd_pcm_hw_constraint_ratnums*)'
        [A] 'function int snd_soc_limit_volume(snd_soc_card*, const char*, int)'
        [A] 'function const spi_device_id* spi_get_device_id(const spi_device*)'
        [A] 'function void touchscreen_parse_properties(input_dev*, bool, touchscreen_properties*)'
        [A] 'function void touchscreen_report_pos(input_dev*, const touchscreen_properties*, unsigned int, unsigned int, bool)'
      
      Bug: 194108974
      Signed-off-by: default avatarJindong Yue <jindong.yue@nxp.com>
      Change-Id: I824286c114b9a90b779e712b844b7db93d4b57a0
      1407b7e1
  12. 25 Nov, 2021 3 commits
  13. 24 Nov, 2021 2 commits
    • Chris Goldsworthy's avatar
      ANDROID: arm64/mm: Add command line option to make ZONE_DMA32 empty · c3c2bb34
      Chris Goldsworthy authored
      
      
      ZONE_DMA32 is enabled by default on android12-5.10, yet it is not
      needed for all devices, nor is it desirable to have if not needed. For
      instance, if a partner in GKI 1.0 did not use ZONE_DMA32, memory can
      be lower for ZONE_NORMAL relative to older targets, such that memory
      would run out more quickly in ZONE_NORMAL leading kswapd to be invoked
      unnecessarily.
      
      Correspondingly, provide a means of making ZONE_DMA32 empty via the
      kernel command line when it is compiled in via CONFIG_ZONE_DMA32.
      
      Bug: 199917449
      Change-Id: I70ec76914b92e518d61a61072f0b3cb41cb28646
      Signed-off-by: default avatarChris Goldsworthy <quic_cgoldswo@quicinc.com>
      c3c2bb34
    • Liangliang Li's avatar
      ANDROID: GKI: Add newly added vendor hook to abi symbol list · f8f6c733
      Liangliang Li authored
      
      
      Leaf changes summary: 2 artifacts changed
      Changed leaf types summary: 0 leaf type changed
      Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 1 Added function
      Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 1 Added variable
      
      1 Added function:
      
        [A] 'function int __traceiter_android_rvh_binder_transaction(void*, binder_proc*, binder_proc*, binder_thread*, binder_transaction_data*)'
      
      1 Added variable:
      
        [A] 'tracepoint __tracepoint_android_rvh_binder_transaction'
      
      Bug: 207255096
      Change-Id: Ic312438f4e45b46283ac405333d6969862710f09
      Signed-off-by: default avatarLiangliang Li <liliangliang@vivo.com>
      Signed-off-by: default avatarGiuliano Procida <gprocida@google.com>
      f8f6c733
  14. 23 Nov, 2021 2 commits
    • Eric Biggers's avatar
      ANDROID: fips140: add userspace interface for evaluation testing · 109f31ac
      Eric Biggers authored
      
      
      The FIPS lab is required to test the service indicators and version
      information services of the module, i.e. the
      fips140_is_approved_service() and fips140_module_version() functions.
      There are several ways we could support this:
      
      - Implement the tests in the module ourselves.  However it's unclear
        that CMVP would allow this, and we would need the full list of tests,
        which could change over time depending on what the lab decides to do.
      
      - Support the lab writing, building, and loading a custom kernel module
        (or a custom kernel image) that tests these functions.
      
      - Provide a userspace interface to these services, restricted to builds
        with CONFIG_CRYPTO_FIPS140_MOD_EVAL_TESTING=y.  This would allow
        writing the tests in userspace, which would be much easier.
      
      Implement the last solution, since it's the easier of the two solutions
      that are "guaranteed" to be allowed.  Make the module register a char
      device which supports some ioctls, one per function that needs to be
      tested.  Also provide some sample userspace code in samples/crypto/.
      
      Note: copy_to_user() would break the integrity check, so take some care
      to exclude it.  This is allowed since this is non-production code.
      
      Bug: 188620248
      Change-Id: Ic256d9c5bd4d0c57ede88a3e3e76e89554909b38
      Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
      109f31ac
    • Eric Biggers's avatar
      ANDROID: fips140: add support for injecting integrity error · 97fb2104
      Eric Biggers authored
      
      
      The lab is required to test injecting an integrity error, so add a
      module parameter fail_integrity_check=1 which does this.  This parameter
      is only supported when CONFIG_CRYPTO_FIPS140_MOD_EVAL_TESTING=y.
      
      Bug: 188620248
      Change-Id: I1f3683837706dc1df2755ca5b6e88f21f7956135
      Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
      97fb2104