Commit graph

903,725 commits

Author SHA1 Message Date
qctecmdr
e72c85664b Merge "msm: ADSPRPC: Fix to avoid Use after free in create_dynamic_process" 2021-08-22 23:06:36 -07:00
Mao Jinlong
5e6bbb64ec coresight-tmc-etr: Use vmalloc once kcalloc fail
Sometimes system doesn't have enough continuous pages for kcalloc.
If kcalloc fail, use vmalloc instead.

Change-Id: Ie0864224f4eeedbd01b301f59b4eb307cc1f8df2
Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
2021-08-22 19:56:01 -07:00
qctecmdr
2ae37c23f5 Merge "msm: kgsl: Remove unused 'mapped' variable" 2021-08-22 10:36:51 -07:00
Todd Kjos
a4ef36f248 ANDROID: xt_quota2: set usersize in xt_match registration object
Explicitly set what is visible to userspace

Bug: 196046570
Test: passed netd test suites
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: Iacec0ef8ae290e01f1b60508d8abcd40a3653c83
2021-08-20 15:50:27 -07:00
Todd Kjos
9b34778e81 ANDROID: xt_quota2: clear quota2_log message before sending
Initialize message buffer for quota2_log to avoid sending
random data.

Bug: 196046570
Test: passed netd test suites
Fixes: 10cda83af9 ("ANDROID: netfilter: xt_quota2: adding the
original quota2 from xtables-addons")
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: Ic9f34aaa2593809b375fc649b74567190c99dc62
2021-08-20 15:50:25 -07:00
Sam Liddicott
e7e0887ebf ANDROID: xt_quota2: remove trailing junk which might have a digit in it
Make sure string only contains the characters specified by userspace.

Fix cherry-picked from xtables-extensions project

Signed-off-by: Sam Liddicott <sam@liddicott.com>
Bug: 196046570
Test: passed netd test suites
Fixes: 10cda83af9 ("ANDROID: netfilter: xt_quota2: adding the
original quota2 from xtables-addons")
Signed-off-by: Todd Kjos <tkjos@google.com>
(cherry picked from https://git.code.sf.net/p/xtables-addons/xtables-addons
bc2bcc383c70b293bd816c29523a952ca8736fb5)
Change-Id: I965448564906e5fbf0fe6d6414f44d9e257ea195
2021-08-20 15:50:23 -07:00
Sarthak Garg
4af8529d8d mmc: sdhci-msm: Update pr_err condition in DLL init path
eMMC device operating at 1.8 V can be run up to 100 MHz without SDCDC
(DLL) and with DLL above 100 MHz.

Change the existing pr_err condition to less than 100MHz.

Change-Id: Ia6575ddfd0e4dc57723226e3dff24ad485a1a2ea
Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
2021-08-20 04:19:46 -07:00
Naman Padhiar
5c463f983f icnss2: Properly handle SOC_WAKE req stuck in QMI
SOC_WAKE_REQ can stuck in QMI layer for more than 500ms,
this will be considered as SOC_WAKE_REQ failure by host
driver and it will send SOC_WAKE_REL. Properly handle
SOC_WAKE_REL based on SOC_WAKE_REQ status and accordingly
update reference count.

Change-Id: Ib4a549bceb98be071e7a570a663276d2c7bea389
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
2021-08-20 14:00:35 +05:30
Isaac J. Manjarres
8c994bbe15 soc: qcom: secure_buffer: Fix types and accessors when working with __le64
When the kernel is compiled with the sparse static analysis tool
enabled, the following warnings are emitted:

 drivers/soc/qcom//trace_secure_buffer.h:53:1: warning: incorrect type in
 assignment (different base types)
 drivers/soc/qcom//trace_secure_buffer.h:53:1: warning: incorrect type in
 assignment (different base types)
 drivers/soc/qcom//trace_secure_buffer.h:53:1: warning: invalid
 assignment: +=

Fix this by converting the type of the addrs variable from phys_addr_t
to u64, since the value we read into it is of type__le64 will always be
64 bits, while phys_addr_t may not be. Also, use the correct accessors
when accessing variables of type __le64.

Change-Id: Ia7e2394f2dc501dbf80f9035e0177555449dcfd8
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2021-08-19 20:26:03 -07:00
Pankaj Gupta
0b1bc8a213 msm: kgsl: Use worker to put refcount on mem entry
If refcount on mem entry is the last refcount, we will call
kgsl_mem_entry_destroy and detach it from process list. If
there is no refcount on the process private as well then we
will call kgsl_destroy_process_private to cleanup. During
cleanup, we will try to remove the same sysfs node which is
in use by the current thread and this situation will end up in
a deadlock.
To fix this problem, use a worker to put the refcount on mem
entry.

Change-Id: I69a77c4059489c95de2ca205701571daac4bdc8a
Signed-off-by: Pankaj Gupta <gpankaj@codeaurora.org>
2021-08-19 23:25:05 +05:30
qctecmdr
a241910347 Merge "clk: qcom: Round parent rate in clk_rcg2_determine_rate" 2021-08-18 05:23:14 -07:00
vgattupa
5766228b5b msm: ADSPRPC: Fix to avoid Use after free in create_dynamic_process
Allow single thread to execute fastrpc_init_create_dynamic_process
to avoid UAF scenario.

Change-Id: Id4ba1a406ace04d46482cd8b14c9d9ef5c96c4a1
Acked-by: Nishant Chaubey <chaubey@qti.qualcomm.com>
Signed-off-by: vgattupa <vgattupa@codeaurora.org>
2021-08-18 03:25:03 -07:00
qctecmdr
9b2ccc1d45 Merge "coresight: Add Null check before accessing pointer buf" 2021-08-18 01:05:58 -07:00
Mike Tipton
88ea0a4426 clk: qcom: Round parent rate in clk_rcg2_determine_rate
We currently set best_parent_rate to the ideal frequency wanted by the
RCG. This doesn't always align to the exact frequency the parent can
provide. If they differ, then clk_calc_new_rates() will return the
parent as top, even if the rounded parent frequency isn't changing.
This causes clk_propagate_rate_change() to return before being called
for its children, which means children aren't notified of the
PRE_RATE_CHANGE events.

Set best_parent_rate to the rounded rate so that we don't unnecessarily
try to change the parent.

Change-Id: Ic976db7a13dfbc63cb66b032a45060565ca90b43
Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>
2021-08-17 17:24:33 -07:00
qctecmdr
b156bf984c Merge "serial: msm_geni_serial: Reduce stale delay added in stop_rx_sequencer" 2021-08-17 16:40:15 -07:00
qctecmdr
77614a92d8 Merge "msm: ipa3: add eth ep_pair info" 2021-08-17 16:40:15 -07:00
Nicolai Stange
bf4d02ab1e UPSTREAM: io_uring: Fix current->fs handling in io_sq_wq_submit_work()
No upstream commit, this is a fix to a stable 5.4 specific backport.

The intention of backport commit cac68d12c5 ("io_uring: grab ->fs as part
of async offload") as found in the stable 5.4 tree was to make
io_sq_wq_submit_work() to switch the workqueue task's ->fs over to the
submitting task's one during the IO operation.

However, due to a small logic error, this change turned out to not have any
actual effect. From a high level, the relevant code in
io_sq_wq_submit_work() looks like

  old_fs_struct = current->fs;
  do {
          ...
          if (req->fs != current->fs && current->fs != old_fs_struct) {
                  task_lock(current);
                  if (req->fs)
                          current->fs = req->fs;
                  else
                          current->fs = old_fs_struct;
                  task_unlock(current);
          }
          ...
  } while (req);

The if condition is supposed to cover the case that current->fs doesn't
match what's needed for processing the request, but observe how it fails
to ever evaluate to true due to the second clause:
current->fs != old_fs_struct will be false in the first iteration as per
the initialization of old_fs_struct and because this prevents current->fs
from getting replaced, the same follows inductively for all subsequent
iterations.

Fix said if condition such that
- if req->fs is set and doesn't match current->fs, the latter will be
  switched to the former
- or if req->fs is unset, the switch back to the initial old_fs_struct
  will be made, if necessary.

While at it, also correct the condition for the ->fs related cleanup right
before the return of io_sq_wq_submit_work(): currently, old_fs_struct is
restored only if it's non-NULL. It is always non-NULL though and thus, the
if-condition is rendundant. Supposedly, the motivation had been to optimize
and avoid switching current->fs back to the initial old_fs_struct in case
it is found to have the desired value already. Make it so.

Cc: stable@vger.kernel.org # v5.4
Fixes: cac68d12c5 ("io_uring: grab ->fs as part of async offload")
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Nicolai Stange <nstange@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit c4a23c852e)
Bug: 196948385
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Id4e7757ef2beaf58ac578bd9f09184085b3d0f5b
2021-08-17 17:05:36 +00:00
qctecmdr
4a24cc844b Merge "cnss2: Move cnss_dms_init after cnss power on" 2021-08-17 06:16:39 -07:00
Saurabh Ambulkar
be06049ea6 coresight: Add Null check before accessing pointer buf
Add NULL check to avoid potential NULL pointer dereference for
"buf"  pointer.

Change-Id: I80b29fdacfd8a95a895a32f30b99eb00b3fc2f55
Signed-off-by: Saurabh Ambulkar <sambulka@codeaurora.org>
2021-08-17 04:53:46 -07:00
Chandana Kishori Chiluveru
f30aac1b7c serial: msm_geni_serial: Reduce stale delay added in stop_rx_sequencer
Currently driver calculating stale delay based on baud rate during
stop_rx sequencer. When BT started with lower baud rate like 2400
this logic will add around 130msecs of extra delay during BT INIT.

This change will remove logic for stale delay calculation
based on baud rate and add constant delay of 10msec to
wait for stale interrupt during stop_rx_sequencer.

Change-Id: I566d79145ba887de71482642655b63c5bd640fc8
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
2021-08-17 04:02:55 -07:00
qctecmdr
8d73eba443 Merge "input: qcom-hv-haptics: update FIFO real time fill status mask" 2021-08-17 01:19:15 -07:00
qctecmdr
4d95988863 Merge "clk: qcom: gcc-shima: Use floor ops for SDCC clocks" 2021-08-17 01:19:15 -07:00
Will Huang
ae0559f702 cnss2: Move cnss_dms_init after cnss power on
To handle install cnss2 as module, need set dms server state after
bus init.

Change-Id: Ie6ac374193057190a69cb8e98da1771657b00f2d
Signed-off-by: Will Huang <wilhuang@codeaurora.org>
2021-08-16 21:51:58 -07:00
Priyansh Jain
0b8376adfa drivers: thermal: tsens: Optimize logs in tsens crash path
Logs loop count is reduced from 5 to 1 as 5 time looping of same
register set is not required.

Change-Id: Iba5b4b39c2cebb19298250925ea01992ddcd5e77
Signed-off-by: Priyansh Jain <priyjain@codeaurora.org>
2021-08-17 09:54:23 +05:30
Lingutla Chandrasekhar
da935c6b63 sched: Improve the scheduler
This change is for general scheduler improvements.

Change-Id: Ib0ed25f0b83a6a7bbc0f600ef2a9351d578bffb5
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2021-08-17 09:43:36 +05:30
Jagadeesh Kona
3c8f39d488 clk: qcom: gcc-shima: Use floor ops for SDCC clocks
To avoid overclocking issues observed on few parts,
use floor ops for SDCC clocks.

Change-Id: I0bdb6dd540a4885f0c39f25ed97b17035e31f510
Signed-off-by: Jagadeesh Kona <jkona@codeaurora.org>
2021-08-16 21:08:08 -07:00
qctecmdr
c688b1eac0 Merge "drivers: thermal: tsens: updating tsens WD bark threshold to 100" 2021-08-16 20:30:20 -07:00
Taniya Das
5ce18d9ae8 ANDROID: ABI: Update allowed list for QCOM
Leaf changes summary: 2 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, 0 Added
variable

2 Added functions:

  [A] 'function void clk_restore_context()'
  [A] 'function int clk_save_context()'

Bug: 196793278
Change-Id: Ib944b947b781e9c8844978c85044220cc94dfedb
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2021-08-16 22:04:46 +05:30
Kiran Gunda
41004b86e3 input: qcom-hv-haptics: update FIFO real time fill status mask
FIFO_REAL_TIME_FILL_STATUS_MASK is different for haptics HW
version V3. Update it.

Change-Id: Ida8326d89678af34ae2c3a35164ae1a7ad5f6b7b
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2021-08-16 03:54:29 -07:00
Pooja Kumari
72f3ff60b3 msm: ipa3: add eth ep_pair info
Add ep details corresponding to
RMNET_CV2X tethering over eth.

Change-Id: I0285887470c950a73e61dd51bf673bbc650d40bb
Signed-off-by: Pooja Kumari <kumarip@codeaurora.org>
2021-08-16 03:44:27 -07:00
Swetha Chikkaboraiah
8bc528d654 pinctrl: qcom: Update lahaina_groups for gpio6
As per the latest ipcat gpio6 func2 should be
mapped to qup6. Changes are done to support the same.

Change-Id: I57bf30916a8b51eececdeefe21ac3729bc20d903
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
2021-08-15 21:18:37 -07:00
qctecmdr
72c28d8ec9 Merge "arm64: defconfig: Enable AW2016 LED driver for Holi" 2021-08-13 16:53:52 -07:00
qctecmdr
f78b504f2f Merge "cnss2: retry mhi fast suspend if mhi returns EBUSY" 2021-08-13 16:53:52 -07:00
Priyansh Jain
9cdc56a4ee drivers: thermal: tsens: updating tsens WD bark threshold to 100
Updating tsens WatchDog Bark count threshold to 100.

Change-Id: Ic3a7945e56057ba0a8e1d809dcd1f703035fce90
Signed-off-by: Priyansh Jain <priyjain@codeaurora.org>
2021-08-13 10:37:58 +05:30
Hui Liu
5e9c28825a arm64: defconfig: Enable AW2016 LED driver for Holi
Enalbe AW2016 LED driver for Holi platform.

Change-Id: I07fd45f8d80bed09ead2b5c83c0fdb9c65d1d9c2
Signed-off-by: Hui Liu <huliu@codeaurora.org>
2021-08-13 10:29:31 +08:00
Kamal Agrawal
f8f5577cc9 msm: kgsl: Remove unused 'mapped' variable
"mapped" variable inside kgsl_mem_entry structure is not used anymore.
Remove this variable from kgsl_mem_entry structure.

Change-Id: I3ced1ae140e8ce91fdc4eac3276d3f5283823fd6
Signed-off-by: Kamal Agrawal <kamaagra@codeaurora.org>
2021-08-12 04:40:01 -07:00
qctecmdr
2744660cb6 Merge "msm: kgsl: Add CX_MISC registers in a6xx gpu snapshot" 2021-08-12 02:58:26 -07:00
qctecmdr
43c9e4ae44 Merge "msm: kgsl: Fail import if secure buffer is not accessible to CP_PIXEL" 2021-08-12 02:58:26 -07:00
qctecmdr
80ec7c125d Merge "cnss2: WAR to trigger self-recovery for link recover callback" 2021-08-12 02:58:25 -07:00
qctecmdr
84d24b82dd Merge "FM: Fix for no sound issue in FM Audio" 2021-08-12 02:58:25 -07:00
qctecmdr
0f5359ff50 Merge "drivers: qcom: pil: Call pil_clear_segment when S2 mapping is done " 2021-08-12 02:58:24 -07:00
qctecmdr
e1c6e9102d Merge "icnss2: Send WLAN_EN delay value in Host Cap" 2021-08-12 02:58:23 -07:00
Will Deacon
4417145c4f UPSTREAM: arm64: vdso: Avoid ISB after reading from cntvct_el0
commit 77ec462536a13d4b428a1eead725c4818a49f0b1 upstream.
(The upstream patch was not marked as fixed but this can fix
Fixes: 28b1a824a4 ("arm64: vdso: Substitute gettimeofday() with C implementation")
sysbench memory comparison:
- Before: 3072.00 MB transferred (2601.11 MB/sec)
- After:  3072.00 MB transferred (3217.86 MB/sec)
)

We can avoid the expensive ISB instruction after reading the counter in
the vDSO gettime functions by creating a fake address hazard against a
dummy stack read, just like we do inside the kernel.

Bug: 195968646
Fixes: 28b1a824a4 ("arm64: vdso: Substitute gettimeofday() with C implementation")
Signed-off-by: Will Deacon <will@kernel.org>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://lore.kernel.org/r/20210318170738.7756-5-will@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
CC: stable@vger.kernel.org
(cherry picked from commit 77ec462536a13d4b428a1eead725c4818a49f0b1)
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Change-Id: I891873626c27060e7ead724754096a7c5f59e4e6
2021-08-12 07:48:24 +00:00
Swetha Chikkaboraiah
2ae69d5f1a drivers: qcom: pil: Call pil_clear_segment when S2 mapping is done
The function pil_clear_segment should be called only
when S2 mapping is success. So update clear_fw_region
accordingly.

Change-Id: Ie5bcf5b322ce347b08a575d18b7de3226027af91
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
2021-08-12 00:20:41 -07:00
qctecmdr
c6efa85d9b Merge "icnss2: Add proper debug logs" 2021-08-11 22:27:42 -07:00
qctecmdr
02068fd1a3 Merge "msm: ipa: Add vlan id field for ip collision" 2021-08-11 22:27:42 -07:00
qctecmdr
2d5c14b8c1 Merge "Merge android11-5.4.86+ (8eb8412) into msm-5.4" 2021-08-11 22:27:42 -07:00
qctecmdr
7c58288807 Merge "defconfig: msm: enable tlb_conflict_handler for holi" 2021-08-11 22:27:40 -07:00
qctecmdr
2dbef21093 Merge "pci: msm: Fix out of bound error with find_next_bit()" 2021-08-11 18:09:05 -07:00
qctecmdr
5474ca56df Merge "mmc: sdhci-msm: Restore CMDQ_VENDOR_SPECIFIC_CFG register correctly" 2021-08-11 18:09:05 -07:00