Based on tag 'MMI-U1UGS34.23-110-23-2' of https://github.com/MotorolaMobilityLLC/motorola-kernel-modules
Fogos push for Android 14
* staging/motorola-kernel-modules/MMI-U1UGS34.23-110-23-2: (3149 commits)
Documentation: Remove slg51000.txt
treewide: Remove conflicting Makefiles
include: Remove unused synaptics_tcm.h header
fs: Remove exfat drivers
dlkm: goodix_fod_mmi: fix KE issue
dlkm: goodix_fod: support drm panel notification
moto_swap: Add reset_bdev to close backing dev for ramboost2.0
add page fault pages to list head to avoid be swapped out soon
fogos: TP: open 1st icnl9916c force up config
workaround fix long page fault issue
Revert "(CR) moto_swap: Add SWP_SYNCHRONOUS_IO cmd for ioctl"
fix null pointer at quota_day_store
moto_swap: Add SWP_SYNCHRONOUS_IO cmd for ioctl
charge: config qg iterm small than FCC
moto_swap:fix kernel panic on memcg conf
Moto kernel protection module
Add macro to close debug function in user build
fogo/motorola:Fogo 5g na optimize stowed mode
input: goodix_berlin: enable palm cancel for report id
Update UWB driver to version 7.4
...
Conflicts:
Documentation/devicetree/bindings~HEAD
Change-Id: I1e380097e692b2efea451cbcf4dc42d972e6dd5a
Fogos push for Android 14
* tag 'MMI-U1UGS34.23-110-23-2' of https://github.com/MotorolaMobilityLLC/kernel-msm-5.4-techpack-display: (116 commits)
dsi_panel: panel_feature: corret the code mistake
dsi_panel: fix the bug of local HBM
gpu/msm: check fps value before enable lhbm
msm/display-drivers: release lhbm resource
dsi/dfps: update the dfps code to support "OLED+vid mode"
dsi/dfps: set the right fps when panel resume
Support 120Hz command sending
dts/display: [bangkok] update the dsc configure for tianma panel
display-drivers: local hbm: add suport for dc_hybird_threshold
optimze lcd log
kernel:pnangn:update 2nd panel brightness settings to 11bits
kernel/panel:power on/off reset sequence
display/backlight: support hbm dcs only with 51 cmd
display/dsi:add new lcd backlight align type for bit11_4
display: The lcd backlight shift mode update
drm_ioctl: add return value for set_param
drm/dsi_panel: resend hbm off commands
msm/drm:compatible with different hbm table in panel
drm/msm:add delay between mipi0 to reset0 when power off
drm/panel: check panel status before send custom commands
...
Conflicts:
techpack/display/msm/sde/sde_connector.c
techpack/display/msm/sde/sde_kms.c
Change-Id: I13ede04c21415717cd009ae73871894f1be74927
Fogos push for Android 14
* tag 'MMI-U1UGS34.23-110-23-2' of https://github.com/MotorolaMobilityLLC/kernel-msm-5.4-techpack-camera: (86 commits)
fogo: fix tombstone when use secure camera
fogo: Fix secure mode switch error (2/2)
Bangkk: reset ois when read standby_flag fail
fogos: Actuator noise reduction[2/2]
fogor: Actuator noise reduction[2/2]
bangkk: Powerup and initialize sensor early [3/4]
bangkk: Fix flash request GPIO-24 failed
bangkk: support dw9784 af drift
bangkk: Open Camera preview will be black then camera error
bangkk: open Camera preview may be black sometimes
bangkk: dw9784 ois bring up
bangkk: Secondary supply flash driver ic compatible
Tundra: restore ois delete submit
Tundra: add delay at check ois data_ready
Revert "(CR): milanf: modify ois vsync irq processing flow"
penang: Adjust actuator noise reduction
penang: Adjust actuator noise reduction
penang: Actuator noise reduction
milanf: modify ois vsync irq processing flow
camera: ois: avoid ois power down twice when download firmware failed
...
Conflicts:
techpack/camera/drivers/cam_sensor_module/cam_ois/cam_ois_core.c
Change-Id: I9aa733fcd4412059a267c7cb9408b05e91eba111
Fogos push for Android 14
* tag 'MMI-U1UGS34.23-110-23-2' of https://github.com/MotorolaMobilityLLC/kernel-msm-5.4-techpack-audio: (79 commits)
Revert "asoc: msm-compress : Fix for CTS-on-gsi with gki"
soc: swr-mstr-ctrl: allow runtime suspend first before system suspend
audio:add lock for aw dynamics set dailink
Revert "(CR):audio:add lock for aw dynamics set dailink"
dsp: q6lsm: Address use after free for mmap handle
dsp: q6lsm: Add check for payload buffer
ASoC: msm-pcm-host-voice: Check validity of session idx
audio:add lock for aw dynamics set dailink
q6fsm:add protect for fs1815 algo
fs1815:correct rotation code
aw882xxacf: add hac scene algo ctrl
audio-kernel: fix build fail caused by aw8838
techpack:add aw8838 driver
fsm:correct fsm vbat monitor logic
audio/dsp:reduce fsm vbat monitor retry times
audio/asoc:add PRI_MI2S_TX_HOSTLESS
machie_driver:add aw pri I2S dailink
audio:add fs1815 bypass algo code and logic.
Awinic: update communicate with adsp logic
codecs:add fs1815 PA driver
...
Conflicts:
techpack/audio/dsp/q6lsm.c
Change-Id: I6ec23f0d578fd2494e5e29577ce470dc2cb90f5c
Fogos push for Android 14
* tag 'MMI-U1UGS34.23-110-23-2' of https://github.com/MotorolaMobilityLLC/vendor-qcom-opensource-wlan-qcacld-3.0: (55 commits)
qcacld-3.0: Remove use-after-free of frame in tx mgmt send
qcacld-3.0: Ignore CSA request for invalid channel
Revert "qcacld-3.0: Fix OOB issue when access wma_find_vdev_by_addr"
qcacld-3.0: Fix OOB issue when access wma_find_vdev_by_addr
remove invoking "sock_from_file" function
Print the process which is receiving data
fix wifi reconnect issue
wlan: Support loading moto specific ini configurations
Revert "qcacld-3.0: Change PCL for throughput case in case of STA+GO"
: Revert "qcacld-3.0: Add support to flush fragments for a particular peer"
qcacld-3.0: Modify check to ensure consecutive PN for frags
qcacld-3.0: Drop mcast and plaintext frags in protected network
qcacld-3.0: Flush frags for peer on add key request
qcacld-3.0: Add support to flush fragments for a particular peer
use NONHLOS_PLATFORM_COMMON_PATH
sm4350: Store WLAN Unstripped and ELF in build archives
fix compile errors
prop (CR) the MAC address more appropriately
lito: Update FW version for R
- Update wifimacaddr command line arg
...
Change-Id: Ibb7fd5d5df7ee9fd07a78069cc9b385c1bf34121
Fogos push for Android 14
* tag 'MMI-U1UGS34.23-110-23-2' of https://github.com/MotorolaMobilityLLC/vendor-qcom-opensource-wlan-qca-wifi-host-cmn:
qcacmn: Add length checks for noninheritance_ie
qcacmn: Fix OOB reads in util_gen_new_ie
qcacmn: Fix potential OOB read in util_scan_parse_rnr_ie
qcacmn: Fix out of bound read issue in ESP ie parse
qcacmn: Add check to avoid NULL pointer deference in parse MBSSID
qcacmn: Fix potential OOB read in util_scan_is_split_prof_found()
qcacmn: Fix potential OOB read in util_scan_parse_mbssid()
qcacmn: Fix use-after-free issue in util_scan_parse_mbssid
qcacmn: Fix memleak in MBSSIE handler
add NOTICE for vendor/qcom/opensource/wlan/qca-wifi-host-cmn
Modify PNO timers.
Support for 12M WLAN Radiated Power test on Production SW
qcacmn: Fix out-of-bounds of src_freq
qcacmn: Handle gracefully if scheduler cb is not registered
qcacmn: Set default value of mawc_nlo_enabled ini as 0
qcacmn: Use local skb pointer for reentrant cld80211_msg_allocator
qcacmn: Validate NDP app info length before accessing NDP app info
qcacmn: add cdp ops for IPA Tx buf smmu_unmapping
qcacmn: Avoid array out of bound access for current channels list
Conflicts:
drivers/staging/qca-wifi-host-cmn/umac/scan/dispatcher/src/wlan_scan_utils_api.c
Change-Id: I00c00211511127de3ed3fece6a81879f998f0653
Fogos push for Android 14
* tag 'MMI-U1UGS34.23-110-23-2' of https://github.com/MotorolaMobilityLLC/kernel-display-devicetree:
dts/panel: add the dts file of auo panel
dts/panel: add the dts file of dummy panel
Change-Id: I621af395f50d93cbb288bff626c368ae1f21b364
Fogos push for Android 14
* tag 'MMI-U1UGS34.23-110-23-2' of https://github.com/MotorolaMobilityLLC/kernel-camera-devicetree: (183 commits)
fogos: Actuator noise reduction[1/2]
fogor: Modify mclk for s5k4h7
fogor: Actuator noise reduction[1/2]
camera-devicetree: add init file for fogos bringup
fogo: Bring up eeprom of main camera[1/2]
fogo: Bring up flash[1/3]
fogo: Bring up s5k4h7 otp[2/2]
fogo: Bring up macro sc202acs otp
fogo: Bring up actuator of main camera[1/2]
fogo: Bring up front s5k4h7[2/2]
fogo: Bring up macro sc202acs
fogo: Bring up main s5kjns
fogo: Setup camera driver baseline[2/3]
fogor: Update the power pins of avdd
fogor: Bring up eeprom of macro sc202acs
fogor: Bring up flash[2/2]
fogor: Bring up eeprom of front camera[2/2]
fogor: Bring up eeprom of main camera[1/2]
fogor: Bring up actuator of main camera[1/2]
fogor: Bring up macro sc202acs
...
Change-Id: Ie6b083e7d9b99052d897af385cb1c6c48586124f
Based on tag 'MMI-U1UGS34.23-110-23-2' of https://github.com/MotorolaMobilityLLC/kernel-msm
"Fogos push for Android 14"
* staging/kernel-msm/MMI-U1UGS34.23-110-23-2: (698 commits)
mmc: sdhci-msm: Move MMC_CAP2_MAX_DISCARD_SIZE to prevent merge conflict
Reapply "UPSTREAM: binder: fix the missing BR_FROZEN_REPLY in binder_return_strings"
Revert "qseecom: Suppress suspend warning if without bus scaling."
Revert "Penang: fix for device suspend tests fail. [1/2]"
Revert "Penang: resolve kasan panic"
Revert "Penang: kasan panic"
Revert "penang: device suspend tests fail"
Revert "net: qrtr: get svc_id before queueing sk_buff"
Revert "af_unix: Do not use atomic ops for unix_sk(sk)->inflight."
Revert "af_unix: Fix garbage collector racing against connect()"
Revert "BACKPORT: net: fix __dst_negative_advice() race"
Revert "ANDROID: ABI fixup for abi break in struct dst_ops"
Revert "BACKPORT:sched: Provide sched_set_fifo()"
Revert "msm: npu: Fix use after free issue"
Revert "fs:EROFS:Porting 5.10 erofs to 5.4"
Revert "BACKPORT:erofs: add per-cpu threads for decompression as an option"
Revert "UPSTREAM: erofs: fix an error code in z_erofs_init_zip_subsystem()"
msm: adsprpc: Avoid taking reference for group_info
adsprpc: Handle UAF scenario in put_args
msm: adsprpc: use-after-free (UAF) in global maps
...
Change-Id: Ia48438f247670d77560472205994632fa62062dd
To avoid a race between rmap walk and mremap, mremap does
take_rmap_locks(). The lock was taken to ensure that rmap walk don't miss
a page table entry due to PTE moves via move_pagetables(). The kernel
does further optimization of this lock such that if we are going to find
the newly added vma after the old vma, the rmap lock is not taken. This
is because rmap walk would find the vmas in the same order and if we don't
find the page table attached to older vma we would find it with the new
vma which we would iterate later.
As explained in commit eb66ae0308 ("mremap: properly flush TLB before
releasing the page") mremap is special in that it doesn't take ownership
of the page. The optimized version for PUD/PMD aligned mremap also
doesn't hold the ptl lock. This can result in stale TLB entries as show
below.
This patch updates the rmap locking requirement in mremap to handle the race condition
explained below with optimized mremap::
Optmized PMD move
CPU 1 CPU 2 CPU 3
mremap(old_addr, new_addr) page_shrinker/try_to_unmap_one
mmap_write_lock_killable()
addr = old_addr
lock(pte_ptl)
lock(pmd_ptl)
pmd = *old_pmd
pmd_clear(old_pmd)
flush_tlb_range(old_addr)
*new_pmd = pmd
*new_addr = 10; and fills
TLB with new addr
and old pfn
unlock(pmd_ptl)
ptep_clear_flush()
old pfn is free.
Stale TLB entry
Optimized PUD move also suffers from a similar race. Both the above race
condition can be fixed if we force mremap path to take rmap lock.
Link: https://lkml.kernel.org/r/20210616045239.370802-7-aneesh.kumar@linux.ibm.com
Fixes: 2c91bd4a4e ("mm: speed up mremap by 20x on large regions")
Fixes: c49dd3401802 ("mm: speedup mremap on 1GB or larger regions")
Link: https://lore.kernel.org/linux-mm/CAHk-=wgXVR04eBNtxQfevontWnP6FDm+oj5vauQXP3S-huwbPw@mail.gmail.com
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Acked-by: Hugh Dickins <hughd@google.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Joel Fernandes <joel@joelfernandes.org>
Cc: Kalesh Singh <kaleshsingh@google.com>
Cc: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 97113eb39fa7972722ff490b947d8af023e1f6a2)
[Kalesh Singh: Resolve some trivial conflicts in mm/mremap.c]
Bug: 151772539
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Change-Id: I5b7235e982ea2efdc155018271fbaf2711fac4c1