Commit Graph

988604 Commits

Author SHA1 Message Date
Peifeng Li
3f775b9367 ANDROID: vendor_hooks: account page-mapcount
Support five hooks as follows to account
the amount of multi-mapped pages in kernel:

- android_vh_show_mapcount_pages
- android_vh_do_traversal_lruvec
- android_vh_update_page_mapcount
- android_vh_add_page_to_lrulist
- android_vh_del_page_from_lrulist

Bug: 236578020
Signed-off-by: Peifeng Li <lipeifeng@oppo.com>
Change-Id: Ia2c7015aab442be7dbb496b8b630b9dff59ab935
2022-08-03 20:10:45 +00:00
Lee Jones
1d2287f56e FROMGIT: io_uring: Use original task for req identity in io_identity_cow()
This issue is conceptually identical to the one fixed in 29f077d070
("io_uring: always use original task when preparing req identity"), so
rather than reinvent the wheel, I'm shamelessly quoting the commit
message from that patch - thanks Jens:

 "If the ring is setup with IORING_SETUP_IOPOLL and we have more than
  one task doing submissions on a ring, we can up in a situation where
  we assign the context from the current task rather than the request
  originator.

  Always use req->task rather than assume it's the same as current.

  No upstream patch exists for this issue, as only older kernels with
  the non-native workers have this problem."

Bug: 238177383
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Pavel Begunkov <asml.silence@gmail.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: io-uring@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org
Fixes: 5c3462cfd1 ("io_uring: store io_identity in io_uring_task")
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 2ee0cab11f
git: //git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.10.y)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I98adc653dbe03f8e9d214d9430fe50d351a45910
2022-08-03 16:22:54 +00:00
Carlos Llamas
e0c9da25b2 FROMLIST: binder: fix UAF of ref->proc caused by race condition
A transaction of type BINDER_TYPE_WEAK_HANDLE can fail to increment the
reference for a node. In this case, the target proc normally releases
the failed reference upon close as expected. However, if the target is
dying in parallel the call will race with binder_deferred_release(), so
the target could have released all of its references by now leaving the
cleanup of the new failed reference unhandled.

The transaction then ends and the target proc gets released making the
ref->proc now a dangling pointer. Later on, ref->node is closed and we
attempt to take spin_lock(&ref->proc->inner_lock), which leads to the
use-after-free bug reported below. Let's fix this by cleaning up the
failed reference on the spot instead of relying on the target to do so.

  ==================================================================
  BUG: KASAN: use-after-free in _raw_spin_lock+0xa8/0x150
  Write of size 4 at addr ffff5ca207094238 by task kworker/1:0/590

  CPU: 1 PID: 590 Comm: kworker/1:0 Not tainted 5.19.0-rc8 #10
  Hardware name: linux,dummy-virt (DT)
  Workqueue: events binder_deferred_func
  Call trace:
   dump_backtrace.part.0+0x1d0/0x1e0
   show_stack+0x18/0x70
   dump_stack_lvl+0x68/0x84
   print_report+0x2e4/0x61c
   kasan_report+0xa4/0x110
   kasan_check_range+0xfc/0x1a4
   __kasan_check_write+0x3c/0x50
   _raw_spin_lock+0xa8/0x150
   binder_deferred_func+0x5e0/0x9b0
   process_one_work+0x38c/0x5f0
   worker_thread+0x9c/0x694
   kthread+0x188/0x190
   ret_from_fork+0x10/0x20

Signed-off-by: Carlos Llamas <cmllamas@google.com>
Acked-by: Christian Brauner (Microsoft) <brauner@kernel.org>

Bug: 239630375
Link: https://lore.kernel.org/all/20220801182511.3371447-1-cmllamas@google.com/
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: I5085dd0dc805a780a64c057e5819f82dd8f02868
(cherry picked from commit ae3fa5d16a02ba7c7b170e0e1ab56d6f0ba33964)
2022-08-02 20:52:18 +00:00
Elliot Berman
12f4322442 ANDROID: vendor_hooks: Guard cgroup struct with CONFIG_CGROUPS
See commit 573c7f061d ("ANDROID: Guard hooks with their CONFIG_
options"). Needed to do CGROUPS as well due to cgroup_subsys definition
being guarded by CONFIG_CGROUPS in include/linux/cgroup-defs.h.

Bug: 240404657
Change-Id: Ie51f053a9e82ef8d7d1c149374ac02608717429d
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2022-08-01 17:43:07 -07:00
Peifeng Li
6532784c78 ANDROID: vendor_hooks: add hooks for remove_vm_area.
Provide a vendor hook to remove additional fields when remove_vm_area
for slab/vmalloc memory leak debugging.

Bug: 240869642
Signed-off-by: Peifeng Li <lipeifeng@oppo.com>
Change-Id: Iafecd7c6e75cdc2df0e77ae105283590d8852f74
2022-08-01 21:01:48 +00:00
Suren Baghdasaryan
c9a70dd592 ANDROID: GKI: allow mm vendor hooks header inclusion from header files
Introduce PROTECT_TRACE_INCLUDE_PATH to allow trace/hooks/mm.h to be
included from a header file. When trace/hooks/mm.h is included from a
header file PROTECT_TRACE_INCLUDE_PATH should be defined before the
inclusion so that the existing TRACE_INCLUDE_PATH gets preserved.

Bug: 236578020
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ia5890ba51675de41ff3ea4ab38bcb458202df5fb
2022-08-01 20:11:21 +00:00
JianMin Liu
039080d064 ANDROID: Update symbol list of mediatek
Leaf changes summary: 3 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 2 Added
functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 1 Added
variable

2 Added functions:

  [A] 'function int __traceiter_android_vh_sched_pelt_multiplier(void*,
unsigned int, unsigned int, int*)'
  [A] 'function int get_pelt_halflife()'

1 Added variable:

  [A] 'tracepoint __tracepoint_android_vh_sched_pelt_multiplier'

Bug: 240896506

Change-Id: Ied73dce8528005b8e71d639a6ba879d4ac123449
Signed-off-by: JianMin Liu <jian-min.liu@mediatek.com>
2022-08-01 17:55:57 +00:00
Jing-Ting Wu
9e8dedef1e ANDROID: sched: add vendor hook to PELT multiplier
We add vendor hook at sched_pelt_multiplier for
performance tuning.

Bug: 240896506

Change-Id: I10e3436a986dd5dd7d375460922407666f27739d
Signed-off-by: Jing-Ting Wu <Jing-Ting.Wu@mediatek.com>
Signed-off-by: JianMin Liu <jian-min.liu@mediatek.com>
2022-08-01 17:55:57 +00:00
Elliot Berman
573c7f061d ANDROID: Guard hooks with their CONFIG_ options
ANDROID_VENDOR_HOOKS has implicit dependencies on the subsystems which
it hooks into whenever it directly uses an "internal" header for that
system. For instance, drivers/scsi/ufs/ufshcd.h doesn't compile unless
CONFIG_SCSI_UFSHCD is enabled:

  In file included from drivers/android/vendor_hooks.c:41:
  In file included from include/trace/hooks/ufshcd.h:21:
  include/../drivers/scsi/ufs/ufshcd.h:675:38: error: field has incomplete type 'struct devfreq_simple_ondemand_data'
          struct devfreq_simple_ondemand_data ondemand_data;
                                              ^
  include/../drivers/scsi/ufs/ufshcd.h:675:9: note: forward declaration of 'struct devfreq_simple_ondemand_data'
          struct devfreq_simple_ondemand_data ondemand_data;

To avoid these implicit dependencies, guard any "internal" header
includes with the respective CONFIG_ options when applicable. If the
CONFIG_ option is not enabled, then the forward-declared structs are
used. This is acceptable because those hooks would not have been called
anyway since the underlying subsytem wasn't enabled.

Fixes: commit 1590a0e8e1 ("ANDROID: GKI: include more type definitions in vendor hooks")
Bug: 240404657
Change-Id: I43d19136fdb1b534e80630067f5db92c379adc67
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2022-07-29 14:34:26 -07:00
Todd Kjos
14f646cca5 ANDROID: fix kernelci issue for allnoconfig builds
'allnoconfig' builds failed with:

kernel/sched/sched.h:1203:50: error: ‘struct rq’ has no member named ‘cpu’

rq->cpu needs to be replaced with cpu_of(rq) for !CONFIG_SMP builds

Fixes: 4442801a43 ("ANDROID: sched: Introducing PELT multiplier")
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: Iceb439dc3bba27516b5ecd2c18c9835c23e5a39a
2022-07-28 14:13:33 -07:00
JianMin Liu
4442801a43 ANDROID: sched: Introducing PELT multiplier
The new sysctl sched_pelt_multiplier allows a user to set a clock
multiplier x2 or x4 (x1 being the default). This clock multiplier
artificially speed-up PELT ramp up/down similarly to a faster half-life.
Indeed, if we write PELT as a first order filter:

  y(t) = G * (1 - exp(t/tau))

Then we can see that multiplying the time by a constant X, is the same
as
dividing the time constant tau by X.

  y(t) = G * (1 - exp((t*X)/tau))
  y(t) = G * (1 - exp(t/(tau/X)))

Tau being half-life*ln(2), multiplying the PELT time is the same as
dividing the half-life:

  - x1: 32ms half-life
  - x2: 16ms half-life
  - x4: 8ms  half-life

Internally, a new clock is created: rq->clock_task_mult. It sits in the
clock hierarchy between rq->clock_task and rq->clock_pelt.

Bug: 177593580
Bug: 237219700
Change-Id: I67e6ca7994bebea22bf75732ee11d2b10e0d6b7e
Suggested-by: Morten Rasmussen <morten.rasmussen@arm.com>
Signed-off-by: Vincent Donnefort <vincent.donnefort@arm.com>
Signed-off-by: JianMin Liu <jian-min.liu@mediatek.com>
2022-07-27 21:20:26 +00:00
Carlos Llamas
b2e5773ea4 FROMGIT: binder: fix redefinition of seq_file attributes
The patchset in [1] exported some definitions to binder_internal.h in
order to make the debugfs entries such as 'stats' and 'transaction_log'
available in a binderfs instance. However, the DEFINE_SHOW_ATTRIBUTE
macro expands into a static function/variable pair, which in turn get
redefined each time a source file includes this internal header.

This problem was made evident after a report from the kernel test robot
<lkp@intel.com> where several W=1 build warnings are seen in downstream
kernels. See the following example:

  include/../drivers/android/binder_internal.h:111:23: warning: 'binder_stats_fops' defined but not used [-Wunused-const-variable=]
     111 | DEFINE_SHOW_ATTRIBUTE(binder_stats);
         |                       ^~~~~~~~~~~~
  include/linux/seq_file.h:174:37: note: in definition of macro 'DEFINE_SHOW_ATTRIBUTE'
     174 | static const struct file_operations __name ## _fops = {                 \
         |                                     ^~~~~~

This patch fixes the above issues by moving back the definitions into
binder.c and instead creates an array of the debugfs entries which is
more convenient to share with binderfs and iterate through.

  [1] https://lore.kernel.org/all/20190903161655.107408-1-hridya@google.com/

Fixes: 0e13e452da ("binder: Add stats, state and transactions files")
Fixes: 03e2e07e38 ("binder: Make transaction_log available in binderfs")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Link: https://lore.kernel.org/r/20220701182041.2134313-1-cmllamas@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 240404657
(cherry picked from commit b7e241bbff24f9e106bf616408fd58bcedc44bae
 git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git char-misc-next)
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: I7e9ca1ab1f3a5a4a272e50f24d404c17cad55d32
2022-07-27 16:45:41 +00:00
Greg Kroah-Hartman
9c2a5eef8f Merge tag 'android12-5.10.117_r00' into 'android12-5.10'
This is the merge of the upstream LTS release of 5.10.117 into the
android12-5.10 branch.

It contains the following commits:

fdd06dc6b0 ANDROID: GKI: db845c: Update symbols list and ABI
0974b8411a Merge 5.10.117 into android12-5.10-lts
7686a5c2a8 Linux 5.10.117
937c6b0e3e SUNRPC: Fix fall-through warnings for Clang
29f077d070 io_uring: always use original task when preparing req identity
1444e0568b usb: gadget: uvc: allow for application to cleanly shutdown
42505e3622 usb: gadget: uvc: rename function to be more consistent
002e7223dc ping: fix address binding wrt vrf
d9a1e82bf6 arm[64]/memremap: don't abuse pfn_valid() to ensure presence of linear map
49750c5e9a net: phy: Fix race condition on link status change
e68b60ae29 SUNRPC: Ensure we flush any closed sockets before xs_xprt_free()
dbe6974a39 SUNRPC: Don't call connect() more than once on a TCP socket
47541ed4d4 SUNRPC: Prevent immediate close+reconnect
2ab569edd8 SUNRPC: Clean up scheduling of autoclose
85844ea29f drm/vmwgfx: Initialize drm_mode_fb_cmd2
7e849dbe60 cgroup/cpuset: Remove cpus_allowed/mems_allowed setup in cpuset_init_smp()
6aa239d82e net: atlantic: always deep reset on pm op, fixing up my null deref regression
6158df4fa5 i40e: i40e_main: fix a missing check on list iterator
819796024c drm/nouveau/tegra: Stop using iommu_present()
e06605af8b ceph: fix setting of xattrs on async created inodes
86db01f373 serial: 8250_mtk: Fix register address for XON/XOFF character
84ad84e495 serial: 8250_mtk: Fix UART_EFR register address
f8d8440f13 slimbus: qcom: Fix IRQ check in qcom_slim_probe
d7b7c5532a USB: serial: option: add Fibocom MA510 modem
2ba0034e36 USB: serial: option: add Fibocom L610 modem
319b312edb USB: serial: qcserial: add support for Sierra Wireless EM7590
994395f356 USB: serial: pl2303: add device id for HP LM930 Display
8276a3dbe2 usb: typec: tcpci_mt6360: Update for BMC PHY setting
54979aa49e usb: typec: tcpci: Don't skip cleanup in .remove() on error
7335a6b11d usb: cdc-wdm: fix reading stuck on device close
6d47eceaf3 tty: n_gsm: fix mux activation issues in gsm_config()
69139a45b8 tty/serial: digicolor: fix possible null-ptr-deref in digicolor_uart_probe()
5a73581116 firmware_loader: use kernel credentials when reading firmware
d254309aab tcp: resalt the secret every 10 seconds
3abbfac1ab net: sfp: Add tx-fault workaround for Huawei MA5671A SFP ONT
48f1dd67a8 net: emaclite: Don't advertise 1000BASE-T and do auto negotiation
5c09dbdfd4 s390: disable -Warray-bounds
03ebc6fd5c ASoC: ops: Validate input values in snd_soc_put_volsw_range()
31606a73ba ASoC: max98090: Generate notifications on changes for custom control
ce154bd3bc ASoC: max98090: Reject invalid values in custom control put()
5ecaaaeb2c hwmon: (f71882fg) Fix negative temperature
88091c0275 gfs2: Fix filesystem block deallocation for short writes
fccf4bf3f2 tls: Fix context leak on tls_device_down
161c4edeca net: sfc: ef10: fix memory leak in efx_ef10_mtd_probe()
d5e1b41bf7 net/smc: non blocking recvmsg() return -EAGAIN when no data and signal_pending
e417a8fcea net: dsa: bcm_sf2: Fix Wake-on-LAN with mac_link_down()
9012209f43 net: bcmgenet: Check for Wake-on-LAN interrupt probe deferral
abe35bf3be net/sched: act_pedit: really ensure the skb is writable
b816ed53f3 s390/lcs: fix variable dereferenced before check
4d3c6d7418 s390/ctcm: fix potential memory leak
5497f87edc s390/ctcm: fix variable dereferenced before check
cc71c9f17c selftests: vm: Makefile: rename TARGETS to VMTARGETS
ce12e5ff8d hwmon: (ltq-cputemp) restrict it to SOC_XWAY
ceb3db723f dim: initialize all struct fields
8b1b8fc819 ionic: fix missing pci_release_regions() on error in ionic_probe()
2cb8689f45 nfs: fix broken handling of the softreval mount option
49c10784b9 mac80211_hwsim: call ieee80211_tx_prepare_skb under RCU protection
79432d2237 net: sfc: fix memory leak due to ptp channel
bdb8d4aed1 sfc: Use swap() instead of open coding it
33c93f6e55 netlink: do not reset transport header in netlink_recvmsg()
9e40f2c513 drm/nouveau: Fix a potential theorical leak in nouveau_get_backlight_name()
54f26fc07e ipv4: drop dst in multicast routing path
c07a84492f net: mscc: ocelot: avoid corrupting hardware counters when moving VCAP filters
abb237c544 net: mscc: ocelot: restrict tc-trap actions to VCAP IS2 lookup 0
f9674c52a1 net: mscc: ocelot: fix VCAP IS2 filters matching on both lookups
c1184d2888 net: mscc: ocelot: fix last VCAP IS1/IS2 filter persisting in hardware when deleted
e2cdde89d2 net: Fix features skip in for_each_netdev_feature()
c420d66047 mac80211: Reset MBSSID parameters upon connection
9cbf2a7d5d hwmon: (tmp401) Add OF device ID table
85eba08be2 iwlwifi: iwl-dbg: Use del_timer_sync() before freeing
a6a73781b4 batman-adv: Don't skb_split skbuffs with frag_list
0577ff1c69 Merge 5.10.116 into android12-5.10-lts
3f70116e5f Merge 5.10.115 into android12-5.10-lts
07a4d3649a Linux 5.10.116
d1ac096f88 mm: userfaultfd: fix missing cache flush in mcopy_atomic_pte() and __mcopy_atomic()
c6cbf5431a mm: hugetlb: fix missing cache flush in copy_huge_page_from_user()
308ff6a6e7 mm: fix missing cache flush for all tail pages of compound page
185fa5984d Bluetooth: Fix the creation of hdev->name
9ff4a6b806 arm: remove CONFIG_ARCH_HAS_HOLES_MEMORYMODEL
dfb55dcf9d nfp: bpf: silence bitwise vs. logical OR warning
f89f76f4b0 drm/amd/display/dc/gpio/gpio_service: Pass around correct dce_{version, environment} types
efd1429fa9 block: drbd: drbd_nl: Make conversion to 'enum drbd_ret_code' explicit
a71658c7db regulator: consumer: Add missing stubs to regulator/consumer.h
7648f42d1a MIPS: Use address-of operator on section symbols
2ed28105c6 ANDROID: GKI: update the abi .xml file due to hex_to_bin() changes
ee8877df71 Revert "tcp: ensure to use the most recently sent skb when filling the rate sample"
6273d79c86 Merge 5.10.114 into android12-5.10-lts
e61686bb77 Linux 5.10.115
8528806abe mmc: rtsx: add 74 Clocks in power on flow
e1ab92302b PCI: aardvark: Fix reading MSI interrupt number
49143c9ed2 PCI: aardvark: Clear all MSIs at setup
7676a5b99f dm: interlock pending dm_io and dm_wait_for_bios_completion
a439819f47 block-map: add __GFP_ZERO flag for alloc_page in function bio_copy_kern
a22d66eb51 rcu: Apply callbacks processing time limit only on softirq
40fb3812d9 rcu: Fix callbacks processing time limit retaining cond_resched()
43dbc3edad KVM: LAPIC: Enable timer posted-interrupt only when mwait/hlt is advertised
9c8474fa34 KVM: x86/mmu: avoid NULL-pointer dereference on page freeing bugs
a474ee5ece KVM: x86: Do not change ICR on write to APIC_SELF_IPI
64e3e16dbc x86/kvm: Preserve BSP MSR_KVM_POLL_CONTROL across suspend/resume
5f884e0c2e net/mlx5: Fix slab-out-of-bounds while reading resource dump menu
599fc32e74 kvm: x86/cpuid: Only provide CPUID leaf 0xA if host has architectural PMU
0a960a3672 net: igmp: respect RCU rules in ip_mc_source() and ip_mc_msfilter()
4fd45ef704 btrfs: always log symlinks in full mode
687167eef9 smsc911x: allow using IRQ0
b280877eab selftests: ocelot: tc_flower_chains: specify conform-exceed action for policer
a9fd5d6cd5 bnxt_en: Fix unnecessary dropping of RX packets
72e4fc1a4e bnxt_en: Fix possible bnxt_open() failure caused by wrong RFS flag
9ac9f07f0f selftests: mirror_gre_bridge_1q: Avoid changing PVID while interface is operational
475237e807 hinic: fix bug of wq out of bound access
1b9f1f455d net: emaclite: Add error handling for of_address_to_resource()
8459485db7 net: cpsw: add missing of_node_put() in cpsw_probe_dt()
4eee980950 net: stmmac: dwmac-sun8i: add missing of_node_put() in sun8i_dwmac_register_mdio_mux()
2347e9c922 net: dsa: mt7530: add missing of_node_put() in mt7530_setup()
1092656cc4 net: ethernet: mediatek: add missing of_node_put() in mtk_sgmii_init()
408fb2680e NFSv4: Don't invalidate inode attributes on delegation return
c1b480e6be RDMA/siw: Fix a condition race issue in MPA request processing
5bf2a45e33 selftests/seccomp: Don't call read() on TTY from background pgrp
3ea0b44c01 net/mlx5: Avoid double clear or set of sync reset requested
2455331591 net/mlx5e: Fix the calling of update_buffer_lossy() API
e07c13fbdd net/mlx5e: CT: Fix queued up restore put() executing after relevant ft release
d8338a7a09 net/mlx5e: Don't match double-vlan packets if cvlan is not set
c7f87ad115 net/mlx5e: Fix trust state reset in reload
87f0d9a518 ASoC: dmaengine: Restore NULL prepare_slave_config() callback
ad87f8498e hwmon: (adt7470) Fix warning on module removal
997b8605e8 gpio: pca953x: fix irq_stat not updated when irq is disabled (irq_mask not set)
879b075a9a NFC: netlink: fix sleep in atomic bug when firmware download timeout
1961c5a688 nfc: nfcmrvl: main: reorder destructive operations in nfcmrvl_nci_unregister_dev to avoid bugs
8a9e7c64f4 nfc: replace improper check device_is_registered() in netlink related functions
11adc9ab3e can: grcan: only use the NAPI poll budget for RX
4df5e498e0 can: grcan: grcan_probe(): fix broken system id check for errata workaround needs
dd973c0185 can: grcan: use ofdev->dev when allocating DMA memory
45bdcb5ca4 can: isotp: remove re-binding of bound socket
13959b9117 can: grcan: grcan_close(): fix deadlock
6c7c0e131e s390/dasd: Fix read inconsistency for ESE DASD devices
6e02c0413a s390/dasd: Fix read for ESE with blksize < 4k
ecc8396827 s390/dasd: prevent double format of tracks for ESE devices
30e008ab3f s390/dasd: fix data corruption for ESE devices
d53d47fadd ASoC: meson: Fix event generation for AUI CODEC mux
93a1f0755e ASoC: meson: Fix event generation for G12A tohdmi mux
e8b08e2f17 ASoC: meson: Fix event generation for AUI ACODEC mux
954d55170f ASoC: wm8958: Fix change notifications for DSP controls
f45359824a ASoC: da7219: Fix change notifications for tone generator frequency
e6e61aab49 genirq: Synchronize interrupt thread startup
dcf1150f2e net: stmmac: disable Split Header (SPH) for Intel platforms
68f35987d4 firewire: core: extend card->lock in fw_core_handle_bus_reset
629b4003a7 firewire: remove check of list iterator against head past the loop body
e757ff4bbc firewire: fix potential uaf in outbound_phy_packet_callback()
70d25d4fba Revert "SUNRPC: attempt AF_LOCAL connect on setup"
466721d767 drm/amd/display: Avoid reading audio pattern past AUDIO_CHANNELS_COUNT
2e6f3d665a iommu/vt-d: Calculate mask for non-aligned flushes
fbb7c61e76 KVM: x86/svm: Account for family 17h event renumberings in amd_pmc_perf_hw_id
b085afe226 gpiolib: of: fix bounds check for 'gpio-reserved-ranges'
2b7cb072d0 mmc: core: Set HS clock speed before sending HS CMD13
66651d7199 mmc: sdhci-msm: Reset GCC_SDCC_BCR register for SDHC
2906c73632 ALSA: fireworks: fix wrong return count shorter than expected by 4 bytes
03ab174805 ALSA: hda/realtek: Add quirk for Yoga Duet 7 13ITL6 speakers
a196f277c5 parisc: Merge model and model name into one line in /proc/cpuinfo
326f02f172 MIPS: Fix CP0 counter erratum detection for R4k CPUs
681997eca1 Revert "ipv6: make ip6_rt_gc_expire an atomic_t"
141fbd343b Revert "oom_kill.c: futex: delay the OOM reaper to allow time for proper futex cleanup"
ca9b002a16 Merge 5.10.113 into android12-5.10-lts
f64cd19a00 Merge branch 'android12-5.10' into `android12-5.10-lts`
f40e35e79c Linux 5.10.114
2d74f61787 perf symbol: Remove arch__symbols__fixup_end()
bf98302e68 tty: n_gsm: fix software flow control handling
95b267271a tty: n_gsm: fix incorrect UA handling
70b045d9ae tty: n_gsm: fix reset fifo race condition
320a24c4ef tty: n_gsm: fix wrong command frame length field encoding
935f314b6f tty: n_gsm: fix wrong command retry handling
17b86db43c tty: n_gsm: fix missing explicit ldisc flush
a2baa907c2 tty: n_gsm: fix wrong DLCI release order
705925e693 tty: n_gsm: fix insufficient txframe size
842a9bbbef netfilter: nft_socket: only do sk lookups when indev is available
7346e54dbf tty: n_gsm: fix malformed counter for out of frame data
d19613895e tty: n_gsm: fix wrong signal octet encoding in convergence layer type 2
26f127f6d9 tty: n_gsm: fix mux cleanup after unregister tty device
f26c271492 tty: n_gsm: fix decoupled mux resource
47132f9f7f tty: n_gsm: fix restart handling via CLD command
b3c88d46db perf symbol: Update symbols__fixup_end()
3d0a3168a3 perf symbol: Pass is_kallsyms to symbols__fixup_end()
2ab14625b8 x86/cpu: Load microcode during restore_processor_state()
795afbe8b4 thermal: int340x: Fix attr.show callback prototype
11d16498d7 net: ethernet: stmmac: fix write to sgmii_adapter_base
236dd62230 drm/i915: Fix SEL_FETCH_PLANE_*(PIPE_B+) register addresses
78d4dccf16 kasan: prevent cpu_quarantine corruption when CPU offline and cache shrink occur at same time
5fef6df273 zonefs: Clear inode information flags on inode creation
92ed64a920 zonefs: Fix management of open zones
42e8ec3b4b powerpc/perf: Fix 32bit compile
ac3d077043 drivers: net: hippi: Fix deadlock in rr_close()
5399e7b80c cifs: destage any unwritten data to the server before calling copychunk_write
80fc45377f x86: __memcpy_flushcache: fix wrong alignment if size > 2^32
585ef03c9e ext4: fix bug_on in start_this_handle during umount filesystem
07da0be588 ASoC: wm8731: Disable the regulator when probing fails
1b1747ad7e ASoC: Intel: soc-acpi: correct device endpoints for max98373
aa138efd2b tcp: fix F-RTO may not work correctly when receiving DSACK
9d56e369bd Revert "ibmvnic: Add ethtool private flag for driver-defined queue limits"
96904c8289 ibmvnic: fix miscellaneous checks
17f71272ef ixgbe: ensure IPsec VF<->PF compatibility
c33d717e06 net: fec: add missing of_node_put() in fec_enet_init_stop_mode()
9591967ac4 bnx2x: fix napi API usage sequence
1781beb879 tls: Skip tls_append_frag on zero copy size
77b922683e drm/amd/display: Fix memory leak in dcn21_clock_source_create
18068e0527 drm/amdkfd: Fix GWS queue count
c0396f5e5b net: dsa: lantiq_gswip: Don't set GSWIP_MII_CFG_RMII_CLK
1204386e26 net: phy: marvell10g: fix return value on error
e974c730f0 net: bcmgenet: hide status block before TX timestamping
ee71b47da5 clk: sunxi: sun9i-mmc: check return value after calling platform_get_resource()
8dacbef4fe bus: sunxi-rsb: Fix the return value of sunxi_rsb_device_create()
9f29f6f8da tcp: make sure treq->af_specific is initialized
8a9d6ca360 tcp: fix potential xmit stalls caused by TCP_NOTSENT_LOWAT
720b6ced85 ip_gre, ip6_gre: Fix race condition on o_seqno in collect_md mode
41661b4c1a ip6_gre: Make o_seqno start from 0 in native mode
7b187fbd7e ip_gre: Make o_seqno start from 0 in native mode
83d128daff net/smc: sync err code when tcp connection was refused
9eb25e00f5 net: hns3: add return value for mailbox handling in PF
929c30c02d net: hns3: add validity check for message data length
e3ec78d82d net: hns3: modify the return code of hclge_get_ring_chain_from_mbx
06a40e7105 cpufreq: fix memory leak in sun50i_cpufreq_nvmem_probe
fb172e93f8 pinctrl: pistachio: fix use of irq_of_parse_and_map()
8f042884af arm64: dts: imx8mn-ddr4-evk: Describe the 32.768 kHz PMIC clock
73c35379db ARM: dts: imx6ull-colibri: fix vqmmc regulator
61a89d0a5b sctp: check asoc strreset_chunk in sctp_generate_reconf_event
41d6ac687d wireguard: device: check for metadata_dst with skb_valid_dst()
3c464db03c tcp: ensure to use the most recently sent skb when filling the rate sample
ce4c3f7087 pinctrl: stm32: Keep pinctrl block clock enabled when LEVEL IRQ requested
0c60271df0 tcp: md5: incorrect tcp_header_len for incoming connections
f4dad5a48d pinctrl: rockchip: fix RK3308 pinmux bits
9ef33d23f8 bpf, lwt: Fix crash when using bpf_skb_set_tunnel_key() from bpf_xmit lwt hook
6ac03e6ddd netfilter: nft_set_rbtree: overlap detection with element re-addition after deletion
72ae15d5ce net: dsa: Add missing of_node_put() in dsa_port_link_register_of
14cc2044c1 memory: renesas-rpc-if: Fix HF/OSPI data transfer in Manual Mode
690c1bc4bf pinctrl: stm32: Do not call stm32_gpio_get() for edge triggered IRQs in EOI
6f2bf9c5dd mtd: fix 'part' field data corruption in mtd_info
4da421035b mtd: rawnand: Fix return value check of wait_for_completion_timeout
94ca69b702 pinctrl: mediatek: moore: Fix build error
123b7e0388 ipvs: correctly print the memory size of ip_vs_conn_tab
f4446f2136 ARM: dts: logicpd-som-lv: Fix wrong pinmuxing on OMAP35
4a526cc29c ARM: dts: am3517-evm: Fix misc pinmuxing
b622bca852 ARM: dts: Fix mmc order for omap3-gta04
9419d27fe1 phy: ti: Add missing pm_runtime_disable() in serdes_am654_probe
9e00a6e1fd phy: mapphone-mdm6600: Fix PM error handling in phy_mdm6600_probe
eb659608e6 ARM: dts: at91: sama5d4_xplained: fix pinctrl phandle name
bb524f5a95 ARM: dts: at91: Map MCLK for wm8731 on at91sam9g20ek
4691ce8f28 phy: ti: omap-usb2: Fix error handling in omap_usb2_enable_clocks
76d1591a38 bus: ti-sysc: Make omap3 gpt12 quirk handling SoC specific
1b9855bf31 ARM: OMAP2+: Fix refcount leak in omap_gic_of_init
93cc8f184e phy: samsung: exynos5250-sata: fix missing device put in probe error paths
3ca7491570 phy: samsung: Fix missing of_node_put() in exynos_sata_phy_probe
8f7644ac24 ARM: dts: imx6qdl-apalis: Fix sgtl5000 detection issue
23b0711fcd USB: Fix xhci event ring dequeue pointer ERDP update issue
712302aed1 mtd: rawnand: fix ecc parameters for mt7622
207c7af341 iio:imu:bmi160: disable regulator in error path
70d2df257e arm64: dts: meson: remove CPU opps below 1GHz for SM1 boards
2d320609be arm64: dts: meson: remove CPU opps below 1GHz for G12B boards
c4fb41bdf4 video: fbdev: udlfb: properly check endpoint type
0967830e72 iocost: don't reset the inuse weight of under-weighted debtors
ad604cbd1d x86/pci/xen: Disable PCI/MSI[-X] masking for XEN_HVM guests
8fcce58c59 riscv: patch_text: Fixup last cpu should be master
51477d3b38 hex2bin: fix access beyond string end
616d354fb9 hex2bin: make the function hex_to_bin constant-time
1633cb2d4a pinctrl: samsung: fix missing GPIOLIB on ARM64 Exynos config
bdc3ad9251 arch_topology: Do not set llc_sibling if llc_id is invalid
aaee3f6617 serial: 8250: Correct the clock for EndRun PTP/1588 PCIe device
662f945a20 serial: 8250: Also set sticky MCR bits in console restoration
8be962c89d serial: imx: fix overrun interrupts in DMA mode
d22d92230f usb: phy: generic: Get the vbus supply
b820764c64 usb: cdns3: Fix issue for clear halt endpoint
bd7f84708e usb: dwc3: gadget: Return proper request status
a633b8c341 usb: dwc3: core: Only handle soft-reset in DCTL
5fa59bb867 usb: dwc3: core: Fix tx/rx threshold settings
140801d3fb usb: dwc3: Try usb-role-switch first in dwc3_drd_init
4dd5feb279 usb: gadget: configfs: clear deactivation flag in configfs_composite_unbind()
6c3da0e19c usb: gadget: uvc: Fix crash when encoding data for usb request
fb1fe1a455 usb: typec: ucsi: Fix role swapping
06826eb063 usb: typec: ucsi: Fix reuse of completion structure
7b510d4bb4 usb: misc: fix improper handling of refcount in uss720_probe()
bb8ecca2dd iio: imu: inv_icm42600: Fix I2C init possible nack
ca2b54b6ad iio: magnetometer: ak8975: Fix the error handling in ak8975_power_on()
1060604fc7 iio: dac: ad5446: Fix read_raw not returning set value
6ff33c01be iio: dac: ad5592r: Fix the missing return value.
06ada9487f xhci: increase usb U3 -> U0 link resume timeout from 100ms to 500ms
e1be000166 xhci: stop polling roothubs after shutdown
2eb6c86891 xhci: Enable runtime PM on second Alderlake controller
63eda431b2 USB: serial: option: add Telit 0x1057, 0x1058, 0x1075 compositions
e9971dac69 USB: serial: option: add support for Cinterion MV32-WA/MV32-WB
34ff5455ee USB: serial: cp210x: add PIDs for Kamstrup USB Meter Reader
729a81ae10 USB: serial: whiteheat: fix heap overflow in WHITEHEAT_GET_DTR_RTS
008ba29f33 USB: quirks: add STRING quirk for VCOM device
ac6ad0ef83 USB: quirks: add a Realtek card reader
8ba02cebb7 usb: mtu3: fix USB 3.0 dual-role-switch from device to host
549209caab lightnvm: disable the subsystem
54c028cfc4 floppy: disable FDRAWCMD by default
de64d941a7 Merge 5.10.112 into android12-5.10-lts
54af9dd2b9 Linux 5.10.113
7992fdb045 Revert "net: micrel: fix KS8851_MLL Kconfig"
8bedbc8f7f block/compat_ioctl: fix range check in BLKGETSIZE
fea24b07ed staging: ion: Prevent incorrect reference counting behavour
dccee748af spi: atmel-quadspi: Fix the buswidth adjustment between spi-mem and controller
572761645b jbd2: fix a potential race while discarding reserved buffers after an abort
50aac44273 can: isotp: stop timeout monitoring when no first frame was sent
e1e96e3727 ext4: force overhead calculation if the s_overhead_cluster makes no sense
4789149b9e ext4: fix overhead calculation to account for the reserved gdt blocks
0c54b09376 ext4, doc: fix incorrect h_reserved size
22c450d39f ext4: limit length to bitmap_maxbytes - blocksize in punch_hole
75ac724684 ext4: fix use-after-free in ext4_search_dir
a46b3d8498 ext4: fix symlink file size not match to file content
f6038d43b2 ext4: fix fallocate to use file_modified to update permissions consistently
19590bbc69 perf report: Set PERF_SAMPLE_DATA_SRC bit for Arm SPE event
e012f9d1af powerpc/perf: Fix power9 event alternatives
0a2cef65b3 drm/vc4: Use pm_runtime_resume_and_get to fix pm_runtime_get_sync() usage
f8f8b3124b KVM: PPC: Fix TCE handling for VFIO
405d984274 drm/panel/raspberrypi-touchscreen: Initialise the bridge in prepare
231381f521 drm/panel/raspberrypi-touchscreen: Avoid NULL deref if not initialised
51d9cbbb0f perf/core: Fix perf_mmap fail when CONFIG_PERF_USE_VMALLOC enabled
88fcfd6ee6 sched/pelt: Fix attach_entity_load_avg() corner case
c55327bc37 arm_pmu: Validate single/group leader events
5580b974a8 ARC: entry: fix syscall_trace_exit argument
7082650eb8 e1000e: Fix possible overflow in LTR decoding
43a2a3734a ASoC: soc-dapm: fix two incorrect uses of list iterator
54e6180c8c gpio: Request interrupts after IRQ is initialized
0837ff17d0 openvswitch: fix OOB access in reserve_sfa_size()
19f6dcb1f0 xtensa: fix a7 clobbering in coprocessor context load/store
f399ab11dd xtensa: patch_text: Fixup last cpu should be master
ba2716da23 net: atlantic: invert deep par in pm functions, preventing null derefs
358a3846f6 dma: at_xdmac: fix a missing check on list iterator
cf23a960c5 ata: pata_marvell: Check the 'bmdma_addr' beforing reading
9ca66d7914 mm/mmu_notifier.c: fix race in mmu_interval_notifier_remove()
ed5d4efb4d oom_kill.c: futex: delay the OOM reaper to allow time for proper futex cleanup
6b932920b9 mm, hugetlb: allow for "high" userspace addresses
50cbc583fa EDAC/synopsys: Read the error count from the correct register
7ec6e06ee4 nvme-pci: disable namespace identifiers for Qemu controllers
316bd86c22 nvme: add a quirk to disable namespace identifiers
76101c8e0c stat: fix inconsistency between struct stat and struct compat_stat
bf28bba304 scsi: qedi: Fix failed disconnect handling
a284cca3d8 net: macb: Restart tx only if queue pointer is lagging
9581e07b54 drm/msm/mdp5: check the return of kzalloc()
8d71edabb0 dpaa_eth: Fix missing of_node_put in dpaa_get_ts_info()
b3afe5a7fd brcmfmac: sdio: Fix undefined behavior due to shift overflowing the constant
202748f441 mt76: Fix undefined behavior due to shift overflowing the constant
0de9c104d0 net: atlantic: Avoid out-of-bounds indexing
5bef9fc38f cifs: Check the IOCB_DIRECT flag, not O_DIRECT
e129c55153 vxlan: fix error return code in vxlan_fdb_append
8e7ea11364 arm64: dts: imx: Fix imx8*-var-som touchscreen property sizes
cd227ac03f ALSA: usb-audio: Fix undefined behavior due to shift overflowing the constant
490815f0b5 platform/x86: samsung-laptop: Fix an unsigned comparison which can never be negative
cb17b56a9b reset: tegra-bpmp: Restore Handle errors in BPMP response
d513ea9b7e ARM: vexpress/spc: Avoid negative array index when !SMP
052e4a661f arm64: mm: fix p?d_leaf()
18ff7a2efa arm64/mm: Remove [PUD|PMD]_TABLE_BIT from [pud|pmd]_bad()
3bf8ca3501 selftests: mlxsw: vxlan_flooding: Prevent flooding of unwanted packets
520aab8b72 dmaengine: idxd: add RO check for wq max_transfer_size write
9a3c026dc3 dmaengine: idxd: add RO check for wq max_batch_size write
f593f49fcd net: stmmac: Use readl_poll_timeout_atomic() in atomic state
3d55b19574 netlink: reset network and mac headers in netlink_dump()
49516e6ed9 ipv6: make ip6_rt_gc_expire an atomic_t
078d839f11 l3mdev: l3mdev_master_upper_ifindex_by_index_rcu should be using netdev_master_upper_dev_get_rcu
0ac8f83d8f net/sched: cls_u32: fix possible leak in u32_init_knode()
93366275be ip6_gre: Fix skb_under_panic in __gre6_xmit()
200f96ebb3 ip6_gre: Avoid updating tunnel->tun_hlen in __gre6_xmit()
8fb76adb89 net/packet: fix packet_sock xmit return value checking
a499cb5f3e net/smc: Fix sock leak when release after smc_shutdown()
60592f16a4 rxrpc: Restore removed timer deletion
fc7116a79a igc: Fix BUG: scheduling while atomic
46b0e4f998 igc: Fix infinite loop in release_swfw_sync
c075c3ea03 esp: limit skb_page_frag_refill use to a single page
3f7914dbea spi: spi-mtk-nor: initialize spi controller after resume
f714abf28f dmaengine: mediatek:Fix PM usage reference leak of mtk_uart_apdma_alloc_chan_resources
9bc949a181 dmaengine: imx-sdma: Fix error checking in sdma_event_remap
12aa8021c7 ASoC: codecs: wcd934x: do not switch off SIDO Buck when codec is in use
b6f474cd30 ASoC: msm8916-wcd-digital: Check failure for devm_snd_soc_register_component
608fc58858 ASoC: atmel: Remove system clock tree configuration for at91sam9g20ek
d29c78d3f9 dm: fix mempool NULL pointer race when completing IO
cf9b195464 ALSA: hda/realtek: Add quirk for Clevo NP70PNP
8ce3820fc9 ALSA: usb-audio: Clear MIDI port active flag after draining
43ce33a68e net/sched: cls_u32: fix netns refcount changes in u32_change()
04dd45d977 gfs2: assign rgrp glock before compute_bitstructs
378061c9b8 perf tools: Fix segfault accessing sample_id xyarray
5e8446e382 tracing: Dump stacktrace trigger to the corresponding instance
69848f9488 mm: page_alloc: fix building error on -Werror=array-compare
08ad7a770e etherdevice: Adjust ether_addr* prototypes to silence -Wstringop-overead
904c5c08bb ANDROID: fix up gpio change in 5.10.111
5dadf6321c Merge 5.10.111 into android12-5.10-lts
1052f9bce6 Linux 5.10.112
5c62d3bf14 ax25: Fix UAF bugs in ax25 timers
f934fa478d ax25: Fix NULL pointer dereferences in ax25 timers
145ea8d213 ax25: fix NPD bug in ax25_disconnect
a4942c6fea ax25: fix UAF bug in ax25_send_control()
b20a5ab0f5 ax25: Fix refcount leaks caused by ax25_cb_del()
57cc15f5fd ax25: fix UAF bugs of net_device caused by rebinding operation
5ddae8d064 ax25: fix reference count leaks of ax25_dev
5ea00fc606 ax25: add refcount in ax25_dev to avoid UAF bugs
361288633b scsi: iscsi: Fix unbound endpoint error handling
129db30599 scsi: iscsi: Fix endpoint reuse regression
26f827e095 dma-direct: avoid redundant memory sync for swiotlb
9a5a4d23e2 timers: Fix warning condition in __run_timers()
84837f43e5 i2c: pasemi: Wait for write xfers to finish
89496d80bf smp: Fix offline cpu check in flush_smp_call_function_queue()
cd02b2687d dm integrity: fix memory corruption when tag_size is less than digest size
0a312ec66a ARM: davinci: da850-evm: Avoid NULL pointer dereference
0806f19305 tick/nohz: Use WARN_ON_ONCE() to prevent console saturation
0275c75955 genirq/affinity: Consider that CPUs on nodes can be unbalanced
1fcfe37d17 drm/amdgpu: Enable gfxoff quirk on MacBook Pro
68ae52efa1 drm/amd/display: don't ignore alpha property on pre-multiplied mode
a263712ba8 ipv6: fix panic when forwarding a pkt with no in6 dev
659214603b nl80211: correctly check NL80211_ATTR_REG_ALPHA2 size
912797e54c ALSA: pcm: Test for "silence" field in struct "pcm_format_data"
48d070ca5e ALSA: hda/realtek: add quirk for Lenovo Thinkpad X12 speakers
163e162471 ALSA: hda/realtek: Add quirk for Clevo PD50PNT
5e4dd17998 btrfs: mark resumed async balance as writing
1d2eda18f6 btrfs: fix root ref counts in error handling in btrfs_get_root_ref
9b7ec35253 ath9k: Fix usage of driver-private space in tx_info
0f65cedae5 ath9k: Properly clear TX status area before reporting to mac80211
cc21ae9326 gcc-plugins: latent_entropy: use /dev/urandom
c089ffc846 memory: renesas-rpc-if: fix platform-device leak in error path
342454231e KVM: x86/mmu: Resolve nx_huge_pages when kvm.ko is loaded
06c348fde5 mm: kmemleak: take a full lowmem check in kmemleak_*_phys()
20ed94f818 mm: fix unexpected zeroed page mapping with zram swap
192e507ef8 mm, page_alloc: fix build_zonerefs_node()
000b3921b4 perf/imx_ddr: Fix undefined behavior due to shift overflowing the constant
ca24c5e8f0 drivers: net: slip: fix NPD bug in sl_tx_timeout()
e8cf1e4d95 scsi: megaraid_sas: Target with invalid LUN ID is deleted during scan
5b7ce74b6b scsi: mvsas: Add PCI ID of RocketRaid 2640
4b44cd5840 drm/amd/display: Fix allocate_mst_payload assert on resume
34ea097fb6 drm/amd/display: Revert FEC check in validation
fa5ee7c423 myri10ge: fix an incorrect free for skb in myri10ge_sw_tso
d90df6da50 net: usb: aqc111: Fix out-of-bounds accesses in RX fixup
9c12fcf1d8 net: axienet: setup mdio unconditionally
b643807a73 tlb: hugetlb: Add more sizes to tlb_remove_huge_tlb_entry
98973d2bdd arm64: alternatives: mark patch_alternative() as `noinstr`
2462faffbf regulator: wm8994: Add an off-on delay for WM8994 variant
aa8cdedaf7 gpu: ipu-v3: Fix dev_dbg frequency output
150fe861c5 ata: libata-core: Disable READ LOG DMA EXT for Samsung 840 EVOs
1ff5359afa net: micrel: fix KS8851_MLL Kconfig
d3478709ed scsi: ibmvscsis: Increase INITIAL_SRP_LIMIT to 1024
b9a110fa75 scsi: lpfc: Fix queue failures when recovering from PCI parity error
aec36b98a1 scsi: target: tcmu: Fix possible page UAF
4366679805 Drivers: hv: vmbus: Prevent load re-ordering when reading ring buffer
1d7a5aae88 drm/amdkfd: Check for potential null return of kmalloc_array()
e5afacc826 drm/amdgpu/vcn: improve vcn dpg stop procedure
d2e0931e6d drm/amdkfd: Fix Incorrect VMIDs passed to HWS
7fc0610ad8 drm/amd/display: Update VTEM Infopacket definition
6906e05cf3 drm/amd/display: FEC check in timing validation
756c61c168 drm/amd/display: fix audio format not updated after edid updated
76e086ce7b btrfs: do not warn for free space inode in cow_file_range
217190dc66 btrfs: fix fallocate to use file_modified to update permissions consistently
9b5d1b3413 drm/amd: Add USBC connector ID
6f9c06501d net: bcmgenet: Revert "Use stronger register read/writes to assure ordering"
504c15f07f dm mpath: only use ktime_get_ns() in historical selector
4e166a4118 cifs: potential buffer overflow in handling symlinks
67677050ce nfc: nci: add flush_workqueue to prevent uaf
bfba9722cf perf tools: Fix misleading add event PMU debug message
280f721edc testing/selftests/mqueue: Fix mq_perf_tests to free the allocated cpu set
eb8873b324 sctp: Initialize daddr on peeled off socket
45226fac4d scsi: iscsi: Fix conn cleanup and stop race during iscsid restart
73805795c9 scsi: iscsi: Fix offload conn cleanup when iscsid restarts
699bd835c3 scsi: iscsi: Move iscsi_ep_disconnect()
46f37a34a5 scsi: iscsi: Fix in-kernel conn failure handling
8125738967 scsi: iscsi: Rel ref after iscsi_lookup_endpoint()
22608545b8 scsi: iscsi: Use system_unbound_wq for destroy_work
4029a1e992 scsi: iscsi: Force immediate failure during shutdown
17d14456f6 scsi: iscsi: Stop queueing during ep_disconnect
da9cf24aa7 scsi: pm80xx: Enable upper inbound, outbound queues
e08d269712 scsi: pm80xx: Mask and unmask upper interrupt vectors 32-63
35b91e49bc net/smc: Fix NULL pointer dereference in smc_pnet_find_ib()
98a7f6c4ad drm/msm/dsi: Use connector directly in msm_dsi_manager_connector_init()
5f78ad9383 drm/msm: Fix range size vs end confusion
5513f9a0b0 cfg80211: hold bss_lock while updating nontrans_list
a44938950e net/sched: taprio: Check if socket flags are valid
08d5e3e954 net: ethernet: stmmac: fix altr_tse_pcs function when using a fixed-link
2ad9d890d8 net: dsa: felix: suppress -EPROBE_DEFER errors
f2cc341fcc net/sched: fix initialization order when updating chain 0 head
7a7cf84148 mlxsw: i2c: Fix initialization error flow
43e58e119a net: mdio: Alphabetically sort header inclusion
9709c8b5cd gpiolib: acpi: use correct format characters
d67c900f19 veth: Ensure eth header is in skb's linear part
845f44ce3d net/sched: flower: fix parsing of ethertype following VLAN header
85ee17ca21 SUNRPC: Fix the svc_deferred_event trace class
af12dd7123 media: rockchip/rga: do proper error checking in probe
5637129712 firmware: arm_scmi: Fix sorting of retrieved clock rates
16c628b0c6 memory: atmel-ebi: Fix missing of_node_put in atmel_ebi_probe
cb66641f81 drm/msm: Add missing put_task_struct() in debugfs path
921fdc45a0 btrfs: remove unused variable in btrfs_{start,write}_dirty_block_groups()
5d131318bb ACPI: processor idle: Check for architectural support for LPI
503934df31 cpuidle: PSCI: Move the `has_lpi` check to the beginning of the function
cfa98ffc42 hamradio: remove needs_free_netdev to avoid UAF
80a4df1464 hamradio: defer 6pack kfree after unregister_netdev
f0c31f192f drm/amdkfd: Use drm_priv to pass VM from KFD to amdgpu
6c8e5cb264 Linux 5.10.111
d36febbcd5 powerpc: Fix virt_addr_valid() for 64-bit Book3E & 32-bit
5c672073bc mm/sparsemem: fix 'mem_section' will never be NULL gcc 12 warning
5973f7507a irqchip/gic, gic-v3: Prevent GSI to SGI translations
000e09462f Drivers: hv: vmbus: Replace smp_store_mb() with virt_store_mb()
e1f540b752 arm64: module: remove (NOLOAD) from linker script
919823bd67 selftests: cgroup: Test open-time cgroup namespace usage for migration checks
637eca44b8 selftests: cgroup: Test open-time credential usage for migration checks
9dd39d2c65 selftests: cgroup: Make cg_create() use 0755 for permission instead of 0644
e74da71e66 selftests/cgroup: Fix build on older distros
4665722d36 cgroup: Use open-time credentials for process migraton perm checks
f089471d1b mm: don't skip swap entry even if zap_details specified
58823a9b09 ubsan: remove CONFIG_UBSAN_OBJECT_SIZE
03b39bbbec dmaengine: Revert "dmaengine: shdma: Fix runtime PM imbalance on error"
40e00885a6 tools build: Use $(shell ) instead of `` to get embedded libperl's ccopts
75c8558d41 tools build: Filter out options and warnings not supported by clang
6374faf49e perf python: Fix probing for some clang command line options
79abc219ba perf build: Don't use -ffat-lto-objects in the python feature test when building with clang-13
82e4395014 drm/amdkfd: Create file descriptor after client is added to smi_clients list
326b408e7e drm/nouveau/pmu: Add missing callbacks for Tegra devices
786ae8de3a drm/amdgpu/smu10: fix SoC/fclk units in auto mode
ff24114bb0 irqchip/gic-v3: Fix GICR_CTLR.RWP polling
451214b266 perf: qcom_l2_pmu: fix an incorrect NULL check on list iterator
fc629224aa ata: sata_dwc_460ex: Fix crash due to OOB write
7e88a50704 gpio: Restrict usage of GPIO chip irq members before initialization
5f54364ff6 RDMA/hfi1: Fix use-after-free bug for mm struct
8bb4168291 arm64: patch_text: Fixup last cpu should be master
a044bca8ef btrfs: prevent subvol with swapfile from being deleted
82ae73ac96 btrfs: fix qgroup reserve overflow the qgroup limit
fc4bdaed4d x86/speculation: Restore speculation related MSRs during S3 resume
8c9e26c890 x86/pm: Save the MSR validity status at context setup
2827328e64 io_uring: fix race between timeout flush and removal
f7e183b0a7 mm/mempolicy: fix mpol_new leak in shared_policy_replace
7d659cb176 mmmremap.c: avoid pointless invalidate_range_start/end on mremap(old_size=0)
6adc01a7aa lz4: fix LZ4_decompress_safe_partial read out of bound
8b6f04b4c9 mmc: renesas_sdhi: don't overwrite TAP settings when HS400 tuning is complete
029b417073 mmc: mmci: stm32: correctly check all elements of sg list
41a519c05b Revert "mmc: sdhci-xenon: fix annoying 1.8V regulator warning"
9de98470db arm64: Add part number for Arm Cortex-A78AE
4604b5738d perf session: Remap buf if there is no space for event
362ced3769 perf tools: Fix perf's libperf_print callback
65210fac63 perf: arm-spe: Fix perf report --mem-mode
bd905fed87 iommu/omap: Fix regression in probe for NULL pointer dereference
b3c00be2ff SUNRPC: svc_tcp_sendmsg() should handle errors from xdr_alloc_bvec()
9a45e08636 SUNRPC: Handle low memory situations in call_status()
132cbe2f18 SUNRPC: Handle ENOMEM in call_transmit_status()
aed30a2054 io_uring: don't touch scm_fp_list after queueing skb
594205b493 drbd: Fix five use after free bugs in get_initial_state
970a6bb729 bpf: Support dual-stack sockets in bpf_tcp_check_syncookie
6c17f4ef3c spi: bcm-qspi: fix MSPI only access with bcm_qspi_exec_mem_op()
8928239e5e qede: confirm skb is allocated before using
b7893388bb net: phy: mscc-miim: reject clause 45 register accesses
08ff0e74fa rxrpc: fix a race in rxrpc_exit_net()
5ae05b5eb5 net: openvswitch: fix leak of nested actions
42ab401d22 net: openvswitch: don't send internal clone attribute to the userspace.
e54ea8fc51 ice: synchronize_rcu() when terminating rings
e3dd1202ab ipv6: Fix stats accounting in ip6_pkt_drop
ffce126c95 ice: Do not skip not enabled queues in ice_vc_dis_qs_msg
b003fc4913 ice: Set txq_teid to ICE_INVAL_TEID on ring creation
ebd1e3458d dpaa2-ptp: Fix refcount leak in dpaa2_ptp_probe
43c2d7890e IB/rdmavt: add lock to call to rvt_error_qp to prevent a race condition
3a57babfb6 RDMA/mlx5: Don't remove cache MRs when a delay is needed
d8992b393f sfc: Do not free an empty page_ring
0ac74169eb bnxt_en: reserve space inside receive page for skb_shared_info
f8b0ef0a58 drm/imx: Fix memory leak in imx_pd_connector_get_modes
25bc9fd4c8 drm/imx: imx-ldb: Check for null pointer after calling kmemdup
02ab4abe5b net: stmmac: Fix unset max_speed difference between DT and non-DT platforms
63ea57478a net: ipv4: fix route with nexthop object delete warning
4be6ed0310 ice: Clear default forwarding VSI during VSI release
589154d0f1 net/tls: fix slab-out-of-bounds bug in decrypt_internal
c5f77b5953 scsi: zorro7xx: Fix a resource leak in zorro7xx_remove_one()
45b9932b4d NFSv4: fix open failure with O_ACCMODE flag
c688705a39 Revert "NFSv4: Handle the special Linux file open access mode"
cf580d2e38 Drivers: hv: vmbus: Fix potential crash on module unload
0c122eb3a1 drm/amdgpu: fix off by one in amdgpu_gfx_kiq_acquire()
84e5dfc05f Revert "hv: utils: add PTP_1588_CLOCK to Kconfig to fix build"
3c3fbfa6dd mm: fix race between MADV_FREE reclaim and blkdev direct IO read
1753a49e26 parisc: Fix patch code locking and flushing
f7c3522030 parisc: Fix CPU affinity for Lasi, WAX and Dino chips
c74e2f6ecc NFS: Avoid writeback threads getting stuck in mempool_alloc()
34681aeddc NFS: nfsiod should not block forever in mempool_alloc()
7a506fabcf SUNRPC: Fix socket waits for write buffer space
b9c5ac0a15 jfs: prevent NULL deref in diFree
c69b442125 virtio_console: eliminate anonymous module_init & module_exit
3309b32217 serial: samsung_tty: do not unlock port->lock for uart_write_wakeup()
9cb90f9ad5 x86/Kconfig: Do not allow CONFIG_X86_X32_ABI=y with llvm-objcopy
b3882e78aa NFS: swap-out must always use STABLE writes.
d4170a2821 NFS: swap IO handling is slightly different for O_DIRECT IO
4b6f122bdf SUNRPC: remove scheduling boost for "SWAPPER" tasks.
f4fc47e71e SUNRPC/xprt: async tasks mustn't block waiting for memory
f9244d31e0 SUNRPC/call_alloc: async tasks mustn't block waiting for memory
e2b2542f74 clk: Enforce that disjoints limits are invalid
1e9b5538cf clk: ti: Preserve node in ti_dt_clocks_register()
a2a0e04f64 xen: delay xen_hvm_init_time_ops() if kdump is boot on vcpu>=32
4a2544ce24 NFSv4: Protect the state recovery thread against direct reclaim
9b9feec97c NFSv4.2: fix reference count leaks in _nfs42_proc_copy_notify()
2e16895d06 w1: w1_therm: fixes w1_seq for ds28ea00 sensors
93498c6e77 staging: wfx: fix an error handling in wfx_init_common()
8f1d24f85f phy: amlogic: meson8b-usb2: Use dev_err_probe()
aa0b729678 staging: vchiq_core: handle NULL result of find_service_by_handle
be4ecca958 clk: si5341: fix reported clk_rate when output divider is 2
c9cf6baabf minix: fix bug when opening a file with O_DIRECT
8d9efd4434 init/main.c: return 1 from handled __setup() functions
f442978612 ceph: fix memory leak in ceph_readdir when note_last_dentry returns error
d745512d54 netlabel: fix out-of-bounds memory accesses
2cc803804e Bluetooth: Fix use after free in hci_send_acl
789621df19 MIPS: ingenic: correct unit node address
61e25021e6 xtensa: fix DTC warning unit_address_format
f6b9550f53 usb: dwc3: omap: fix "unbalanced disables for smps10_out1" on omap5evm
a4dd3e9e5a net: sfp: add 2500base-X quirk for Lantech SFP module
278b652f0a net: limit altnames to 64k total
423e7107f6 net: account alternate interface name memory
74c4d50255 can: isotp: set default value for N_As to 50 micro seconds
1d7effe5ff scsi: libfc: Fix use after free in fc_exch_abts_resp()
02222bf4f0 powerpc/secvar: fix refcount leak in format_show()
fd416c3f5a MIPS: fix fortify panic when copying asm exception handlers
7c657c0694 PCI: endpoint: Fix misused goto label
79cfc0052f bnxt_en: Eliminate unintended link toggle during FW reset
9567d54e70 Bluetooth: use memset avoid memory leaks
f9b183f133 Bluetooth: Fix not checking for valid hdev on bt_dev_{info,warn,err,dbg}
647b35aaf4 tuntap: add sanity checks about msg_controllen in sendmsg
797b4ea951 macvtap: advertise link netns via netlink
142ae7d4f2 mips: ralink: fix a refcount leak in ill_acc_of_setup()
f2565cb40e net/smc: correct settings of RMB window update limit
224903cc60 scsi: hisi_sas: Free irq vectors in order for v3 HW
f49ffaa85d scsi: aha152x: Fix aha152x_setup() __setup handler return value
91ee8a14ef mt76: mt7615: Fix assigning negative values to unsigned variable
d83574666b scsi: pm8001: Fix memory leak in pm8001_chip_fw_flash_update_req()
a0bb65eadb scsi: pm8001: Fix tag leaks on error
2051044d79 scsi: pm8001: Fix task leak in pm8001_send_abort_all()
3bd9a28798 scsi: pm8001: Fix pm8001_mpi_task_abort_resp()
ef969095c4 scsi: pm8001: Fix pm80xx_pci_mem_copy() interface
fe4b6d5a0d drm/amdkfd: make CRAT table missing message informational only
2f2f017ea8 dm: requeue IO if mapping table not yet available
71c8df33fd dm ioctl: prevent potential spectre v1 gadget
f655b724b4 ipv4: Invalidate neighbour for broadcast address upon address addition
bae03957e8 iwlwifi: mvm: Correctly set fragmented EBS
9538563d31 power: supply: axp288-charger: Set Vhold to 4.4V
c66cc04043 PCI: pciehp: Add Qualcomm quirk for Command Completed erratum
b1b27b0e8d tcp: Don't acquire inet_listen_hashbucket::lock with disabled BH.
b02a1a6502 PCI: endpoint: Fix alignment fault error in copy tests
4820847e8b usb: ehci: add pci device support for Aspeed platforms
0b9cf0b599 iommu/arm-smmu-v3: fix event handling soft lockup
e07e420a00 PCI: aardvark: Fix support for MSI interrupts
6694b8643b drm/amdgpu: Fix recursive locking warning
ea21eaea7f powerpc: Set crashkernel offset to mid of RMA region
fb5ac62fbe ipv6: make mc_forwarding atomic
5baf92a2c4 libbpf: Fix build issue with llvm-readelf
26a1e4739e cfg80211: don't add non transmitted BSS to 6GHz scanned channels
9a56e2b271 mt76: dma: initialize skip_unmap in mt76_dma_rx_fill
b42b6d0ec3 power: supply: axp20x_battery: properly report current when discharging
de9505936c scsi: bfa: Replace snprintf() with sysfs_emit()
ed7db95920 scsi: mvsas: Replace snprintf() with sysfs_emit()
995f517888 bpf: Make dst_port field in struct bpf_sock 16-bit wide
339bd0b55e ath11k: mhi: use mhi_sync_power_up()
c6a815f5ab ath11k: fix kernel panic during unload/load ath11k modules
e4d2d72013 powerpc: dts: t104xrdb: fix phy type for FMAN 4/5
02e2ee8619 ptp: replace snprintf with sysfs_emit
9ea17b9f1d usb: gadget: tegra-xudc: Fix control endpoint's definitions
07971b818e usb: gadget: tegra-xudc: Do not program SPARAM
927beb05aa drm/amd/amdgpu/amdgpu_cs: fix refcount leak of a dma_fence obj
85313d9bc7 drm/amd/display: Add signal type check when verify stream backends same
9d7d83d039 ath5k: fix OOB in ath5k_eeprom_read_pcal_info_5111
850c4351e8 drm: Add orientation quirk for GPD Win Max
a24479c5e9 KVM: x86/emulator: Emulate RDPID only if it is enabled in guest
66b0fa6b22 KVM: x86/svm: Clear reserved bits written to PerfEvtSeln MSRs
2e52a29470 rtc: wm8350: Handle error for wm8350_register_irq
0777fe98a4 gfs2: gfs2_setattr_size error path fix
f349d7f9ee gfs2: Fix gfs2_release for non-writers regression
3f53715fd5 gfs2: Check for active reservation in gfs2_release
2dc49f58a2 ubifs: Rectify space amount budget for mkdir/tmpfile operations

Update the .xml file with the following needed changes that came in from
the -lts branch to handle ABI issues with LTS security fixes:

Leaf changes summary: 3 artifacts changed
Changed leaf types summary: 2 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 1 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

1 function with some sub-type change:

  [C] 'function int hex_to_bin(char)' at hexdump.c:53:1 has some sub-type changes:
    parameter 1 of type 'char' changed:
      type name changed from 'char' to 'unsigned char'
      type size hasn't changed

'struct gpio_chip at driver.h:362:1' changed (indirectly):
  type size hasn't changed
  there are data member changes:
    type 'struct gpio_irq_chip' of 'gpio_chip::irq' changed:
      type size hasn't changed
      there are data member changes:
        data member u64 android_kabi_reserved1 at offset 2304 (in bits) became anonymous data member 'union {bool initialized; struct {u64 android_kabi_reserved1;}; union {};}'
      1265 impacted interfaces
  1265 impacted interfaces

'struct gpio_irq_chip at driver.h:32:1' changed:
  details were reported earlier

Change-Id: Iface7385c5d82fbcdaeb92fda79ac3cd1835d323
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2022-07-27 11:21:05 +02:00
Kever Yang
5fa1e1affc ANDROID: GKI: pcie: Fix the broken dw_pcie structure
This patch fix the break to abi dw_pcie structure and keep other code AS
IS.

Bug: 239396464
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I138f28812eb4254671fa353a7541e65bddfc1bda
2022-07-26 18:46:49 +00:00
Rob Herring
51b3e17071 UPSTREAM: PCI: dwc: Support multiple ATU memory regions
The current ATU setup only supports a single memory resource which
isn't sufficient if there are also prefetchable memory regions. In order
to support multiple memory regions, we need to move away from fixed ATU
slots and rework the assignment. As there's always an ATU entry for
config space, let's assign index 0 to config space. Then we assign
memory resources to index 1 and up. Finally, if we have an I/O region
and slots remaining, we assign the I/O region last. If there aren't
remaining slots, we keep the same config and I/O space sharing.

Bug: 239396464

Link: https://lore.kernel.org/r/20201026181652.418729-1-robh@kernel.org
Tested-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Vidya Sagar <vidyas@nvidia.com>
Acked-by: Jingoo Han <jingoohan1@gmail.com>
Cc: Vidya Sagar <vidyas@nvidia.com>
Cc: Jingoo Han <jingoohan1@gmail.com>
Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Change-Id: Ib945de723c29a80f055227474a01806283bd1873
(cherry picked from commit 9f9e59a4809563f24e3d1377aa804a4b7386a418)
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2022-07-26 18:46:49 +00:00
liuhailong
a8d7f6518e ANDROID: oplus: Update the ABI xml and symbol list
Leaf changes summary: 4 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 2 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 2 Added variables

2 Added functions:

  [A] 'function int __traceiter_android_vh_alloc_pages_slowpath_begin(void*, gfp_t, unsigned int, unsigned long int*)'
  [A] 'function int __traceiter_android_vh_alloc_pages_slowpath_end(void*, gfp_t, unsigned int, unsigned long int)'

2 Added variables:

  [A] 'tracepoint __tracepoint_android_vh_alloc_pages_slowpath_begin'
  [A] 'tracepoint __tracepoint_android_vh_alloc_pages_slowpath_end'

Bug: 182443489
Signed-off-by: liuhailong <liuhailong@oppo.com>
Change-Id: I2745cb53ae192e2ce31726d09d7e9746b77ccce3
2022-07-25 17:59:12 +00:00
liuhailong
4536de1b70 ANDROID: vendor_hooks: add hooks in __alloc_pages_slowpath
Since android_vh_alloc_pages_slowpath is revert by
commit e09000ee19 ("Revert half of "ANDROID: vendor_hooks: Add hooks
for memory when debug""). re-add hooks here to measure the duration

Bug: 182443489
Signed-off-by: liuhailong <liuhailong@oppo.com>
Change-Id: Ie4534047105d8409623692cc3811b55d9ddbd17d
2022-07-25 17:59:12 +00:00
Liujie Xie
d63c961c9d ANDROID: GKI: Update symbols to symbol list
Leaf changes summary: 12 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 6 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 6 Added variables

6 Added functions:

  [A] 'function int __traceiter_android_vh_mutex_unlock_slowpath_end(void*, mutex*, task_struct*)'
  [A] 'function int __traceiter_android_vh_rwsem_mark_wake_readers(void*, rw_semaphore*, rwsem_waiter*)'
  [A] 'function int __traceiter_android_vh_rwsem_set_owner(void*, rw_semaphore*)'
  [A] 'function int __traceiter_android_vh_rwsem_set_reader_owned(void*, rw_semaphore*)'
  [A] 'function int __traceiter_android_vh_rwsem_up_read_end(void*, rw_semaphore*)'
  [A] 'function int __traceiter_android_vh_rwsem_up_write_end(void*, rw_semaphore*)'

6 Added variables:

  [A] 'tracepoint __tracepoint_android_vh_mutex_unlock_slowpath_end'
  [A] 'tracepoint __tracepoint_android_vh_rwsem_mark_wake_readers'
  [A] 'tracepoint __tracepoint_android_vh_rwsem_set_owner'
  [A] 'tracepoint __tracepoint_android_vh_rwsem_set_reader_owned'
  [A] 'tracepoint __tracepoint_android_vh_rwsem_up_read_end'
  [A] 'tracepoint __tracepoint_android_vh_rwsem_up_write_end'

Bug: 193384408
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: Ib21d33425191850fbe4231a6addc69ca40bcb670
2022-07-25 17:49:04 +00:00
haibinzhang (张海斌)
41cbbe08f9 FROMGIT: arm64: fix oops in concurrently setting insn_emulation sysctls
emulation_proc_handler() changes table->data for proc_dointvec_minmax
and can generate the following Oops if called concurrently with itself:

 | Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010
 | Internal error: Oops: 96000006 [#1] SMP
 | Call trace:
 | update_insn_emulation_mode+0xc0/0x148
 | emulation_proc_handler+0x64/0xb8
 | proc_sys_call_handler+0x9c/0xf8
 | proc_sys_write+0x18/0x20
 | __vfs_write+0x20/0x48
 | vfs_write+0xe4/0x1d0
 | ksys_write+0x70/0xf8
 | __arm64_sys_write+0x20/0x28
 | el0_svc_common.constprop.0+0x7c/0x1c0
 | el0_svc_handler+0x2c/0xa0
 | el0_svc+0x8/0x200

To fix this issue, keep the table->data as &insn->current_mode and
use container_of() to retrieve the insn pointer. Another mutex is
used to protect against the current_mode update but not for retrieving
insn_emulation as table->data is no longer changing.

Bug: 237540956
Co-developed-by: hewenliang <hewenliang4@huawei.com>
Signed-off-by: hewenliang <hewenliang4@huawei.com>
Signed-off-by: Haibin Zhang <haibinzhang@tencent.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20220128090324.2727688-1-hewenliang4@huawei.com
Link: https://lore.kernel.org/r/9A004C03-250B-46C5-BF39-782D7551B00E@tencent.com
Signed-off-by: Will Deacon <will@kernel.org>
[Lee: Added Fixes: tag]
(cherry picked from commit af483947d472eccb79e42059276c4deed76f99a6
git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core)
Fixes: 587064b610 ("arm64: Add framework for legacy instruction emulation")
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: If9b96bb79c79903f9d8292e719b06fdef57ef1c5
2022-07-22 13:19:11 +00:00
Rohith Kollalsi
c301d142e8 FROMGIT: usb: dwc3: core: Do not perform GCTL_CORE_SOFTRESET during bootup
According to the programming guide, it is recommended to
 perform a GCTL_CORE_SOFTRESET only when switching the mode
 from device to host or host to device. However, it is found
 that during bootup when __dwc3_set_mode() is called for the
 first time, GCTL_CORESOFTRESET is done with suspendable bit(BIT 17)
 of DWC3_GUSB3PIPECTL set. This some times leads to issues
 like controller going into bad state and controller registers
 reading value zero. Until GCTL_CORESOFTRESET is done and
 run/stop bit is set core initialization is not complete.
 Setting suspendable bit of DWC3_GUSB3PIPECTL and then
 performing GCTL_CORESOFTRESET is therefore not recommended.
 Avoid this by only performing the reset if current_dr_role is set,
 that is, when doing subsequent role switching.

 Fixes: f88359e1588b ("usb: dwc3: core: Do core softreset when switch
 mode")
 Signed-off-by: Rohith Kollalsi <quic_rkollals@quicinc.com>
 Link:
 https://lore.kernel.org/r/20220714045625.20377-1-quic_rkollals@quicinc.com
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 (cherry picked from commit 07903626d98853e605fe63e5ce149f1b7314bbea
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/
 usb-next)

BUG: 239121944
Change-Id: Ice6da5dd64896d5deeab425dd1ac5389425a1cc8
Signed-off-by: Rohith Kollalsi <quic_rkollals@quicinc.com>
2022-07-21 20:49:46 +00:00
xiaofeng
8b19ed264b ANDROID: vendor_hooks:vendor hook for mmput
add vendor hook in mmput while mm_users decreased to 0.

Bug: 238821038
Change-Id: I42a717cbeeb3176bac14b4b2391fdb2366c972d3
Signed-off-by: xiaofeng <xiaofeng5@xiaomi.com>
2022-07-16 14:31:51 +08:00
xiaofeng
242b11e574 ANDROID: vendor_hooks:vendor hook for pidfd_open
Add vendor hook when detecting process status through
pidfd_open.

Bug: 238725692
Change-Id: I565988cb8bf6dd44ab4dc15c410c2dcf50703def
Signed-off-by: xiaofeng <xiaofeng5@xiaomi.com>
2022-07-15 14:58:39 -07:00
Bing Han
0e1cb27700 ANDROID: vendor_hook: Add hook in shmem_writepage()
Add vendor hook android_vh_set_shmem_page_flag in shmem_writepage to
set a flag in page_ext, which indicates that this page is a shmem page,
to be used in android_vh_get_swap_page. The shared page should not be
reclaimed to the extended memory, ie, the specified swap location.

Bug: 234214858
Signed-off-by: Bing Han <bing.han@transsion.com>
Change-Id: I33a9007c88b4d8aab3da044c8a05eb45d7e74f3a
2022-07-14 14:54:51 +08:00
Yunfei Wang
8ee37d0bcd BACKPORT: iommu/dma: Fix race condition during iova_domain initialization
When many devices share the same iova domain, iommu_dma_init_domain()
may be called at the same time. The checking of iovad->start_pfn will
all get false in iommu_dma_init_domain() and both enter init_iova_domain()
to do iovad initialization.

Fix this by protecting init_iova_domain() with iommu_dma_cookie->mutex.

Exception backtrace:
rb_insert_color(param1=0xFFFFFF80CD2BDB40, param3=1) + 64
init_iova_domain() + 180
iommu_setup_dma_ops() + 260
arch_setup_dma_ops() + 132
of_dma_configure_id() + 468
platform_dma_configure() + 32
really_probe() + 1168
driver_probe_device() + 268
__device_attach_driver() + 524
__device_attach() + 524
bus_probe_device() + 64
deferred_probe_work_func() + 260
process_one_work() + 580
worker_thread() + 1076
kthread() + 332
ret_from_fork() + 16

Signed-off-by: Ning Li <ning.li@mediatek.com>
Signed-off-by: Yunfei Wang <yf.wang@mediatek.com>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Miles Chen <miles.chen@mediatek.com>
Link: https://lore.kernel.org/r/20220530120748.31733-1-yf.wang@mediatek.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>

Bug: 236922015
(cherry picked from commit ac9a5d522bb80be50ea84965699e1c8257d745ce
 https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git core)
[Yunfei: Embed iommu_dma_cookie into iommu_dma_cookie_ext to avoid
 changing struct iommu_dma_cookie]
Signed-off-by: Yunfei Wang <yf.wang@mediatek.com>
Change-Id: I9b7931bea912837f17d2322713ba68a37122499d
(cherry picked from commit 8a410d778a3c3b1f535acecff7f53c542ffb348c)
2022-07-13 19:39:11 +00:00
Thinh Nguyen
321bf845e1 FROMGIT: usb: dwc3: core: Deprecate GCTL.CORESOFTRESET
Synopsys IP DWC_usb32 and DWC_usb31 version 1.90a and above deprecated
GCTL.CORESOFTRESET. The DRD mode switching flow is updated to remove the
GCTL soft reset. Add version checks to prevent using deprecated setting
in mode switching flow.

Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/9df529fde6e55f5508321b6bc26e92848044ef2b.1655338967.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

(cherry picked from commit afbd04e66e5d16ca3c7ea2e3c56eca25558eacf3 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next)

BUG: 238836938
Change-Id: I69ea5ee3b9cf25d1d972b261c8dff59c50437c04
Signed-off-by: Udipto Goswami <quic_ugoswami@quicinc.com>
2022-07-13 08:45:07 +00:00
Thinh Nguyen
c5eb0edfde FROMGIT: usb: dwc3: gadget: Prevent repeat pullup()
Don't do soft-disconnect if it's previously done. Likewise, don't do
soft-connect if the device is currently connected and running. It would
break normal operation.

Currently the caller of pullup() (udc's sysfs soft_connect) only checks
if it had initiated disconnect to prevent repeating soft-disconnect. It
doesn't check for soft-connect. To be safe, let's keep the check here
regardless whether the udc core is fixed.

Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/1c1345bd66c97a9d32f77d63aaadd04b7b037143.1650593829.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

(cherry picked from commit 69e131d1ac4e52a59ec181ab4f8aa8c48cd8fb64 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/ usb-next)

BUG: 238836938
Change-Id: Ibcb208581948132cfe4736381a67fea33026c372
Signed-off-by: Udipto Goswami <quic_ugoswami@quicinc.com>
2022-07-13 08:45:00 +00:00
Li Li
8de633b735 FROMGIT: Binder: add TF_UPDATE_TXN to replace outdated txn
When the target process is busy, incoming oneway transactions are
queued in the async_todo list. If the clients continue sending extra
oneway transactions while the target process is frozen, this queue can
become too large to accommodate new transactions. That's why binder
driver introduced ONEWAY_SPAM_DETECTION to detect this situation. It's
helpful to debug the async binder buffer exhausting issue, but the
issue itself isn't solved directly.

In real cases applications are designed to send oneway transactions
repeatedly, delivering updated inforamtion to the target process.
Typical examples are Wi-Fi signal strength and some real time sensor
data. Even if the apps might only care about the lastet information,
all outdated oneway transactions are still accumulated there until the
frozen process is thawed later. For this kind of situations, there's
no existing method to skip those outdated transactions and deliver the
latest one only.

This patch introduces a new transaction flag TF_UPDATE_TXN. To use it,
use apps can set this new flag along with TF_ONE_WAY. When such an
oneway transaction is to be queued into the async_todo list of a frozen
process, binder driver will check if any previous pending transactions
can be superseded by comparing their code, flags and target node. If
such an outdated pending transaction is found, the latest transaction
will supersede that outdated one. This effectively prevents the async
binder buffer running out and saves unnecessary binder read workloads.

Acked-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Li Li <dualli@google.com>
Link: https://lore.kernel.org/r/20220526220018.3334775-2-dualli@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 231624308
Test: manually check async binder buffer size of frozen apps
Test: stress test with kernel 4.14/4.19/5.10/5.15
(cherry picked from commit 9864bb4801331daa48514face9d0f4861e4d485b
 git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
  char-misc-next)
Change-Id: I1c4bff1eda1ca15aaaad5bf696c8fc00be743176
2022-07-08 17:44:53 +00:00
Tejun Heo
e8fce59434 BACKPORT: FROMGIT: cgroup: Use separate src/dst nodes when preloading css_sets for migration
Each cset (css_set) is pinned by its tasks. When we're moving tasks around
across csets for a migration, we need to hold the source and destination
csets to ensure that they don't go away while we're moving tasks about. This
is done by linking cset->mg_preload_node on either the
mgctx->preloaded_dst_csets or mgctx->preloaded_dst_csets list. Using the
same cset->mg_preload_node for both the src and dst lists was deemed okay as
a cset can't be both the source and destination at the same time.

Unfortunately, this overloading becomes problematic when multiple tasks are
involved in a migration and some of them are identity noop migrations while
others are actually moving across cgroups. For example, this can happen with
the following sequence on cgroup1:

 #1> mkdir -p /sys/fs/cgroup/misc/a/b
 #2> echo $$ > /sys/fs/cgroup/misc/a/cgroup.procs
 #3> RUN_A_COMMAND_WHICH_CREATES_MULTIPLE_THREADS &
 #4> PID=$!
 #5> echo $PID > /sys/fs/cgroup/misc/a/b/tasks
 #6> echo $PID > /sys/fs/cgroup/misc/a/cgroup.procs

the process including the group leader back into a. In this final migration,
non-leader threads would be doing identity migration while the group leader
is doing an actual one.

After #3, let's say the whole process was in cset A, and that after #4, the
leader moves to cset B. Then, during #6, the following happens:

 1. cgroup_migrate_add_src() is called on B for the leader.

 2. cgroup_migrate_add_src() is called on A for the other threads.

 3. cgroup_migrate_prepare_dst() is called. It scans the src list.

 3. It notices that B wants to migrate to A, so it tries to A to the dst
    list but realizes that its ->mg_preload_node is already busy.

 4. and then it notices A wants to migrate to A as it's an identity
    migration, it culls it by list_del_init()'ing its ->mg_preload_node and
    putting references accordingly.

 5. The rest of migration takes place with B on the src list but nothing on
    the dst list.

This means that A isn't held while migration is in progress. If all tasks
leave A before the migration finishes and the incoming task pins it, the
cset will be destroyed leading to use-after-free.

This is caused by overloading cset->mg_preload_node for both src and dst
preload lists. We wanted to exclude the cset from the src list but ended up
inadvertently excluding it from the dst list too.

This patch fixes the issue by separating out cset->mg_preload_node into
->mg_src_preload_node and ->mg_dst_preload_node, so that the src and dst
preloadings don't interfere with each other.

Bug: 236582926
Change-Id: Ieaf1c0c8fc23753570897fd6e48a54335ab939ce
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Mukesh Ojha <quic_mojha@quicinc.com>
Reported-by: shisiyuan <shisiyuan19870131@gmail.com>
Link: http://lkml.kernel.org/r/1654187688-27411-1-git-send-email-shisiyuan@xiaomi.com
Link: https://lore.kernel.org/lkml/Yh+RGIJ0f3nrqIiN@slm.duckdns.org/#t
Fixes: f817de9851 ("cgroup: prepare migration path for unified hierarchy")
Cc: stable@vger.kernel.org # v3.16+
(cherry picked from commit 07fd5b6cdf3cc30bfde8fe0f644771688be04447
 https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-5.19-fixes)
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
[mojha: Move the two new list heads into a wrapper ext_css_set struct to ensure
 ABI doesn't break and also defined a macro init_css_set which will be replaced
 with init_ext_css_set.cset to avoid too much code changes]
2022-07-08 17:29:08 +00:00
Yunhao Tian
f26c566455 UPSTREAM: usb: gadget: f_uac2: allow changing interface name via configfs
This adds "function_name" configfs entry to change string value
of the iInterface field. This field will be shown in Windows' audio
settings panel, so being able to change it is useful. It will default
to "Source/Sink" just as before.

Signed-off-by: Yunhao Tian <t123yh.xyz@gmail.com>
Link: https://lore.kernel.org/r/20220122112446.1415547-2-t123yh.xyz@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235196743
(cherry picked from commit 993a44fa85c1ea5989fb5c46236ca2e3cfd71b78)
Change-Id: I6061d841eee5b611f18280c901849d0c4b2a17d4
Signed-off-by: Luiz Matheus <luizmmat@motorola.com>
2022-07-08 06:21:23 +00:00
Yunhao Tian
98fa7f7dfd UPSTREAM: usb: gadget: f_uac1: allow changing interface name via configfs
This adds "function_name" configfs entry to change string value
of the iInterface field. This field will be shown in Windows' audio
settings panel, so being able to change it is useful. It will default
to "AC Interface" just as before if unchanged.

Signed-off-by: Yunhao Tian <t123yh.xyz@gmail.com>
Link: https://lore.kernel.org/r/20220122112446.1415547-1-t123yh.xyz@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235196743
(cherry picked from commit dfb05b5dc3afd90e564b69b88ff6be6947a0f32f)
Change-Id: Ibd0e417ab82efe1fb3aa6fd5bb33fb70f113cf1a
Signed-off-by: Luiz Matheus <luizmmat@motorola.com>
2022-07-07 22:12:07 +00:00
Pavel Hofman
29172165ca UPSTREAM: usb: gadget: f_uac1: Add suspend callback
Add suspend callback to f_uac1 function, calling corresponding method
of u_audio in order to stop the respective PCM streams and to notify
subscribed clients about the stop.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Link: https://lore.kernel.org/r/20220121155308.48794-11-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235196743
(cherry picked from commit d1d11dd1306908bc18b6592bbd21ba7d19a931e5)
Change-Id: I9d24b3f58aea89b167bae6af39a460adf37c1a2a
Signed-off-by: Luiz Matheus <luizmmat@motorola.com>
2022-07-07 22:12:07 +00:00
Pavel Hofman
ff5468c71e UPSTREAM: usb: gadget: f_uac2: Add suspend callback
When USB cable gets disconnected, the undergoing playback/capture
stalls, without any notification to u_audio about the change.
Experiments with a dwc2 gadget revealed that Suspend interrupt is
thrown at cable disconnection, which the gadget framework translates to
calling suspend callback of a function, if it is defined.

Add the suspend callback to f_uac2 function, calling
corresponding method of u_audio in order to stop the respective PCM
streams and to notify subscribed clients at cable disconnection.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Link: https://lore.kernel.org/r/20220121155308.48794-10-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235196743
(cherry picked from commit 7ff4a3b5489959a0256840a361b54d979b822535)
Change-Id: I43f5ccd6f84771bd63462ba9b2419a9e42f45746
Signed-off-by: Luiz Matheus <luizmmat@motorola.com>
2022-07-07 22:12:07 +00:00
Pavel Hofman
31e6d620c1 UPSTREAM: usb: gadget: u_audio: Add suspend call
Add exported method u_audio_suspend which sets stream status to
inactive and sends notifications. The method does not free any
resources.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Link: https://lore.kernel.org/r/20220121155308.48794-9-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235196743
(cherry picked from commit 62385cf158a7e65b5f347590521d02ee75dc8518)
Change-Id: I064ae3c92aaeec52a3f484665b89ee31132e5053
Signed-off-by: Luiz Matheus <luizmmat@motorola.com>
2022-07-07 22:12:07 +00:00
Pavel Hofman
17643c1fdd UPSTREAM: usb: gadget: u_audio: Rate ctl notifies about current srate (0=stopped)
The Playback/Capture ctl currently reports rate value set by USB
control selector UAC2_CS_CONTROL_SAM_FREQ (fixed for UAC1). When the
stops playback/capture, the reported value does not change.  The gadget
side has no information whether the host has started/stopped
capture/playback.

This patch sets the value reported by the respective rate ctl to zero
when the host side has stopped playback/capture. Also, it calls
snd_ctl_notify when start/stop  occurs, so that a subscribed client can
act appropriately.

Tests have confirmed that USB hosts change UAC2_CS_CONTROL_SAM_FREQ
before switching altsetting to activate playback/capture, resulting in
correct order (params->c/p_srate is set to requested rate before
u_audio_start_capture/playback is called).

The gadget rate notifications are used by user-space audio gadget
controller gaudio_ctl https://github.com/pavhofman/gaudio_ctl.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Link: https://lore.kernel.org/r/20220121155308.48794-8-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235196743
(cherry picked from commit 8fe9a03f43316cd93e753d06372159d23ba931d4)
Change-Id: I5156f080c0a22a1c3a57e8b3113a1047b945c1ca
Signed-off-by: Luiz Matheus <luizmmat@motorola.com>
2022-07-07 22:12:07 +00:00
Julian Scheel
308955e3a6 UPSTREAM: usb: gadget: f_uac1: Support multiple sampling rates
A list of sampling rates can be specified via configfs. All enabled
sampling rates are sent to the USB host on request. When the host
selects a sampling rate the internal active rate is updated.

Config strings with single value stay compatible with the previous version.

Multiple samplerates passed as configuration arrays to g_audio module
when built for f_uac1.

Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Link: https://lore.kernel.org/r/20220121155308.48794-7-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235196743
(cherry picked from commit 695d39ffc2b59b8333ff85724619514f98613205)
Change-Id: I0515eb9ca5ed7e809007ee711aedf389c1b1c40d
Signed-off-by: Luiz Matheus <luizmmat@motorola.com>
2022-07-07 22:12:07 +00:00
Julian Scheel
ae03eadb42 UPSTREAM: usb: gadget: f_uac2: Support multiple sampling rates
A list of sampling rates can be specified via configfs. All enabled
sampling rates are sent to the USB host on request. When the host
selects a sampling rate, the internal active rate (stored in
struct f_uac2) is updated.

The gadget no longer supports only one frequency. Therefore USB strings
corresponding to the clock sources are renamed from specific Hz value to
general names Input clock/Output clock.

Config strings with single value stay compatible with the previous
version.

Multiple samplerates passed as configuration arrays to g_audio module
when built for f_uac2.

Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Link: https://lore.kernel.org/r/20220121155308.48794-6-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235196743
(cherry picked from commit a7339e4f5788bd088bb0be1f96a6cce459676ed0)
Change-Id: I3ee59833975c6d010cd3335da0746eec828f4a0e
Signed-off-by: Luiz Matheus <luizmmat@motorola.com>
2022-07-07 22:12:07 +00:00
Pavel Hofman
bedc53fae4 UPSTREAM: usb: gadget:audio: Replace deprecated macro S_IRUGO
Use octal digits as suggested by checkpatch instead of the deprecated
macro.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Link: https://lore.kernel.org/r/20220121155308.48794-2-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235196743
(cherry picked from commit ce6a7bfbe57161edb53fb37e7191008ceff00752)
Change-Id: I3f15494218cd2b11e671e4eacb98e57ebf154f12
Signed-off-by: Luiz Matheus <luizmmat@motorola.com>
2022-07-07 22:12:07 +00:00
Pavel Hofman
37e0d5eddb UPSTREAM: usb: gadget: u_audio: Add capture/playback srate getter
UAC1/UAC2 functions will need to query u_audio about the currently set
srate. Add the getter functions.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Link: https://lore.kernel.org/r/20220121155308.48794-5-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235196743
(cherry picked from commit eb3a1ce6f5ed2c047bcae4aad76b7ee711715c7d)
Change-Id: Ica0243b6f65d7e568d1e7d4adfe85b7e711a5684
Signed-off-by: Luiz Matheus <luizmmat@motorola.com>
2022-07-07 22:12:07 +00:00
Pavel Hofman
3251bb3250 UPSTREAM: usb: gadget: u_audio: Move dynamic srate from params to rtd
Parameters uac_params.p_srate/c_srate are dynamic now and are not part
of parametric configuration anymore. Move them to the
runtime struct uac_rtd_params for each stream.

Suggested-by: John Keeping <john@metanate.com>
Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Link: https://lore.kernel.org/r/20220121155308.48794-4-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235196743
(cherry picked from commit 8722a949e62ad77b3e4acc11fc44774ebbc32356)
Change-Id: I03594d6fb6d08cac1d581676e5bb8f03a3d1e3f2
Signed-off-by: Luiz Matheus <luizmmat@motorola.com>
2022-07-07 22:12:07 +00:00
Julian Scheel
530916be97 UPSTREAM: usb: gadget: u_audio: Support multiple sampling rates
Implement support for multiple sampling rates in u_audio part of the
audio gadget. The currently configured rates are exposed through
read-only amixer controls 'Capture Rate' and 'Playback Rate'.

Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Link: https://lore.kernel.org/r/20220121155308.48794-3-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235196743
(cherry picked from commit c565ad07ef35f5c7461ba9fc08dbb3a61420b8d2)
Change-Id: I389574571cec7bf7cbff5375dab6542f7c5bf5f2
Signed-off-by: Luiz Matheus <luizmmat@motorola.com>
2022-07-07 22:12:07 +00:00
Pavel Hofman
7f496d5a99 UPSTREAM: docs: ABI: fixed formatting in configfs-usb-gadget-uac2
Added missing tab, line breaks.

Fixes: e3088ebc1b97 ("docs: ABI: added missing num_requests param to UAC2")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Link: https://lore.kernel.org/r/20220108105608.10726-1-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235196743
(cherry picked from commit cbb4f5f435995a56ef770e35bfafb4bcff8f0ada)
Change-Id: If0e58b65b60d8b412b7c3998f989e82d30a17a91
Signed-off-by: Luiz Matheus <luizmmat@motorola.com>
2022-07-07 22:12:07 +00:00
Pavel Hofman
2500cb53e6 UPSTREAM: usb: gadget: u_audio: Subdevice 0 for capture ctls
Both capture and playback alsa devices use subdevice 0. Yet capture-side
ctls are defined for subdevice 1. The patch sets subdevice 0 for them.

Fixes: 02de698ca812 ("usb: gadget: u_audio: add bi-directional volume and mute support")
Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Link: https://lore.kernel.org/r/20220105104643.90125-1-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235196743
(cherry picked from commit 601a5bc1aeef772ab1f47582fd322957799f5ab5)
Change-Id: I732c6dd18d23d542814c6d9df2fb424fe256abda
Signed-off-by: Luiz Matheus <luizmmat@motorola.com>
2022-07-07 22:12:07 +00:00
John Keeping
c386f34bd4 UPSTREAM: usb: gadget: u_audio: fix calculations for small bInterval
If bInterval is 1, then p_interval is 8000 and p_interval_mil is 8E9,
which is too big for a 32-bit value.  While the storage is indeed
64-bit, this value is used as the divisor in do_div() which will
truncate it into a uint32_t leading to incorrect calculated values.

Switch back to keeping the base value in struct snd_uac_chip which fits
easily into an int, meaning that the division can be done in two steps
with the divisor fitting safely into a uint32_t on both steps.

Fixes: 6fec018a7e70 ("usb: gadget: u_audio.c: Adding Playback Pitch ctl for sync playback")
Tested-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: John Keeping <john@metanate.com>
Link: https://lore.kernel.org/r/20220104183243.718258-1-john@metanate.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235196743
(cherry picked from commit f2f69bf65df12176843ca11eab99949ba69e128b)
Change-Id: Ia1e0dcdd66d60013705f9ee6ff5f76f18bdbb17e
Signed-off-by: Luiz Matheus <luizmmat@motorola.com>
2022-07-07 22:12:07 +00:00
Pavel Hofman
f74e3e2fe4 UPSTREAM: docs: ABI: fixed req_number desc in UAC1
Fixed wording of the req_number description in UAC1 docs.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Link: https://lore.kernel.org/r/20211225130929.205629-2-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235196743
(cherry picked from commit a8cf05160336535fc352c0af66115d0ec0299404)
Change-Id: I9815823f67ea086a8e9a3216e988cdd7c7b3de5a
Signed-off-by: Luiz Matheus <luizmmat@motorola.com>
2022-07-07 22:12:07 +00:00
Pavel Hofman
02949bae5c UPSTREAM: docs: ABI: added missing num_requests param to UAC2
The existing configfs-usb-gadget-uac2 ABI doc for testing was missing
the num_requests param. The patch adds the parameter to the document.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Link: https://lore.kernel.org/r/20211225130929.205629-1-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235196743
(cherry picked from commit e3088ebc1b97a3e5df13f2e218ed8430ab3a4ad2)
Change-Id: I9ea7ca2f41219ed5767b88722c73f8747a464f71
Signed-off-by: Luiz Matheus <luizmmat@motorola.com>
2022-07-07 22:12:07 +00:00
Pavel Hofman
e1377ac38f UPSTREAM: usb:gadget: f_uac1: fixed sync playback
The u_audio param fb_max was not set to its default value in f_uac1.c.
As a result the maximum value of Playback Pitch ctl was kept at 1000000,
not allowing to set faster playback pitch for UAC1.

The setting required moving the default constant UAC2_DEF_FB_MAX from
u_uac2.h to FBACK_FAST_MAX in u_audio.h as that header is common for
f_uac1.c and f_uac2.c.

Fixes: 6fec018a7e70 ("usb: gadget: u_audio.c: Adding Playback Pitch ctl for sync playback")
Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Link: https://lore.kernel.org/r/20211022140339.248669-1-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235196743
(cherry picked from commit d9f273484358285b448aff65bffeb361d0b1f917)
Change-Id: I3aadc7c6d1695be7d1ab93078c4875b87e472afd
Signed-off-by: Luiz Matheus <luizmmat@motorola.com>
2022-07-07 22:12:07 +00:00
Pavel Hofman
4b7c8905c5 UPSTREAM: usb: gadget: u_audio.c: Adding Playback Pitch ctl for sync playback
EP IN is hard-coded as ASYNC both in f_uac1 and f_uac2 but u_audio sends
steady number of audio frames in each USB packet, without any control.

This patch adds 'Playback Pitch 1000000' ctl analogous to the existing
'Capture Pitch 1000000' ctl. The calculation of playback req->length in
u_audio_iso_complete respects the Playback Pitch ctl value to 1ppm now.

Max. value for Playback Pitch is configured by the existing parameter
uac2_opts->fb_max, used also for the Capture Pitch.

Since the EP IN packet size can be increased by uac2_opts->fb_max now,
maxPacketSize for the playback direction is calculated by the same
algorithm as for the async capture direction in
f_uac2.c:set_ep_max_packet_size.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Link: https://lore.kernel.org/r/20211013073934.36476-1-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235196743
(cherry picked from commit 6fec018a7e70d611412dd961e596b0415c6d365c)
Change-Id: Ib4ed5921ed9bee7579b3f5f2eb3ae853ef263883
Signed-off-by: Luiz Matheus <luizmmat@motorola.com>
2022-07-07 22:12:07 +00:00
Mauro Carvalho Chehab
e29d2b5178 UPSTREAM: ABI: configfs-usb-gadget-uac2: fix a broken table
Changeset af6cbe09920 ("usb: gadget: f_uac2: add volume and mute support")
added some new elements to the table but didn't care enough to actually
adjust the columns, causing the output to be broken as warned by
Sphinx when producing the documentation.

Readjust it for it to be a valid ReST table.

Fixes: eaf6cbe09920 ("usb: gadget: f_uac2: add volume and mute support")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/d253819a4c201b942d754682bb91dd278300fb79.1632740376.git.mchehab+huawei@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235196743
(cherry picked from commit 5ef803538bd2f2907b0a44e24f094cf9bbf8bc13)
Change-Id: I84fedd31e7534f884a5dafdbd3bfbf612e4161f3
Signed-off-by: Luiz Matheus <luizmmat@motorola.com>
2022-07-07 22:12:07 +00:00
Mauro Carvalho Chehab
ec313ae88d UPSTREAM: ABI: configfs-usb-gadget-uac1: fix a broken table
Changeset 0356e6283c71 ("usb: gadget: f_uac1: add volume and mute support")
added some new elements to the table but didn't care enough to actually
adjust the columns, causing the output to be broken as warned by
Sphinx when producing the documentation.

Readjust it for it to be a valid ReST table.

Fixes: 0356e6283c71 ("usb: gadget: f_uac1: add volume and mute support")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/044b0c14c35922bdcca50551fe2aa870baae9b06.1632740376.git.mchehab+huawei@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235196743
(cherry picked from commit 1b8af67cae654c3c8d719563a2eabb88371d01c9)
Change-Id: I55cbfab7a954b0bd4b256dd43fe6f7e40c5201e3
Signed-off-by: Luiz Matheus <luizmmat@motorola.com>
2022-07-07 22:12:07 +00:00
Pavel Hofman
bf46bbe087 UPSTREAM: usb: gadget: f_uac1: fixing inconsistent indenting
Fixing inconsistent indenting identified by kernel test
robot.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Acked-By: Felipe Balbi <balbi@kernel.org>
Link: https://lore.kernel.org/r/20210817100555.4437-1-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235196743
(cherry picked from commit 1bc220835526ae076eecfb7ed513f80f22cf840d)
Change-Id: I3a34ed86550709247818245eca45f0e50a5d099b
Signed-off-by: Luiz Matheus <luizmmat@motorola.com>
2022-07-07 22:12:07 +00:00