Commit graph

814678 commits

Author SHA1 Message Date
Luis Chamberlain
a4877d2515 coredump: fix crash when umh is disabled
Commit 64e90a8acb ("Introduce STATIC_USERMODEHELPER to mediate
call_usermodehelper()") added the optiont to disable all
call_usermodehelper() calls by setting STATIC_USERMODEHELPER_PATH to
an empty string. When this is done, and crashdump is triggered, it
will crash on null pointer dereference, since we make assumptions
over what call_usermodehelper_exec() did.

This has been reported by Sergey when one triggers a a coredump
with the following configuration:

```
CONFIG_STATIC_USERMODEHELPER=y
CONFIG_STATIC_USERMODEHELPER_PATH=""
kernel.core_pattern = |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h %e
```

The way disabling the umh was designed was that call_usermodehelper_exec()
would just return early, without an error. But coredump assumes
certain variables are set up for us when this happens, and calls
ile_start_write(cprm.file) with a NULL file.

[    2.819676] BUG: kernel NULL pointer dereference, address: 0000000000000020
[    2.819859] #PF: supervisor read access in kernel mode
[    2.820035] #PF: error_code(0x0000) - not-present page
[    2.820188] PGD 0 P4D 0
[    2.820305] Oops: 0000 [#1] SMP PTI
[    2.820436] CPU: 2 PID: 89 Comm: a Not tainted 5.7.0-rc1+ #7
[    2.820680] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20190711_202441-buildvm-armv7-10.arm.fedoraproject.org-2.fc31 04/01/2014
[    2.821150] RIP: 0010:do_coredump+0xd80/0x1060
[    2.821385] Code: e8 95 11 ed ff 48 c7 c6 cc a7 b4 81 48 8d bd 28 ff
ff ff 89 c2 e8 70 f1 ff ff 41 89 c2 85 c0 0f 84 72 f7 ff ff e9 b4 fe ff
ff <48> 8b 57 20 0f b7 02 66 25 00 f0 66 3d 00 8
0 0f 84 9c 01 00 00 44
[    2.822014] RSP: 0000:ffffc9000029bcb8 EFLAGS: 00010246
[    2.822339] RAX: 0000000000000000 RBX: ffff88803f860000 RCX: 000000000000000a
[    2.822746] RDX: 0000000000000009 RSI: 0000000000000282 RDI: 0000000000000000
[    2.823141] RBP: ffffc9000029bde8 R08: 0000000000000000 R09: ffffc9000029bc00
[    2.823508] R10: 0000000000000001 R11: ffff88803dec90be R12: ffffffff81c39da0
[    2.823902] R13: ffff88803de84400 R14: 0000000000000000 R15: 0000000000000000
[    2.824285] FS:  00007fee08183540(0000) GS:ffff88803e480000(0000) knlGS:0000000000000000
[    2.824767] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    2.825111] CR2: 0000000000000020 CR3: 000000003f856005 CR4: 0000000000060ea0
[    2.825479] Call Trace:
[    2.825790]  get_signal+0x11e/0x720
[    2.826087]  do_signal+0x1d/0x670
[    2.826361]  ? force_sig_info_to_task+0xc1/0xf0
[    2.826691]  ? force_sig_fault+0x3c/0x40
[    2.826996]  ? do_trap+0xc9/0x100
[    2.827179]  exit_to_usermode_loop+0x49/0x90
[    2.827359]  prepare_exit_to_usermode+0x77/0xb0
[    2.827559]  ? invalid_op+0xa/0x30
[    2.827747]  ret_from_intr+0x20/0x20
[    2.827921] RIP: 0033:0x55e2c76d2129
[    2.828107] Code: 2d ff ff ff e8 68 ff ff ff 5d c6 05 18 2f 00 00 01
c3 0f 1f 80 00 00 00 00 c3 0f 1f 80 00 00 00 00 e9 7b ff ff ff 55 48 89
e5 <0f> 0b b8 00 00 00 00 5d c3 66 2e 0f 1f 84 0
0 00 00 00 00 0f 1f 40
[    2.828603] RSP: 002b:00007fffeba5e080 EFLAGS: 00010246
[    2.828801] RAX: 000055e2c76d2125 RBX: 0000000000000000 RCX: 00007fee0817c718
[    2.829034] RDX: 00007fffeba5e188 RSI: 00007fffeba5e178 RDI: 0000000000000001
[    2.829257] RBP: 00007fffeba5e080 R08: 0000000000000000 R09: 00007fee08193c00
[    2.829482] R10: 0000000000000009 R11: 0000000000000000 R12: 000055e2c76d2040
[    2.829727] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[    2.829964] CR2: 0000000000000020
[    2.830149] ---[ end trace ceed83d8c68a1bf1 ]---
```

Change-Id: I2ff9dc56aaf8f91aa83724f35e437e236032bb88
Cc: <stable@vger.kernel.org> # v4.11+
Fixes: 64e90a8acb ("Introduce STATIC_USERMODEHELPER to mediate call_usermodehelper()")
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=199795
Reported-by: Tony Vroon <chainsaw@gentoo.org>
Reported-by: Sergey Kvachonok <ravenexp@gmail.com>
Tested-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/20200416162859.26518-1-mcgrof@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 3740d93e37902b31159a82da2d5c8812ed825404
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Prateek Sood <prsood@codeaurora.org>
2020-09-08 01:59:16 -07:00
qctecmdr
f36b8e9165 Merge "soc: qcom: Fix mhi_qdss mode permission issue" 2020-09-07 21:26:51 -07:00
qctecmdr
06c817626f Merge "msm: cvp: Enhance CVP release persist buffer process for DSP sessions" 2020-09-07 21:26:51 -07:00
qctecmdr
87e7f97e99 Merge "sched/fair: Improve the scheduler" 2020-09-07 21:26:50 -07:00
qctecmdr
69dc0ee896 Merge "msm: ipa: disable status on ODL_DPL_CONS pipe above IPAv4.5 targets" 2020-09-07 21:26:50 -07:00
Haseeb Khan
9ff2649b88 msm: cvp: Enhance CVP release persist buffer process for DSP sessions
Do not release CVP persist buffers until all outstanding DSP frames
are handled by firmware.

Change-Id: I80ed488962109d09c368097534c6d1c9d1bee9b6
Signed-off-by: Haseeb Khan <hkhan@codeaurora.org>
2020-09-07 23:49:37 +05:30
Yuanfang Zhang
1d409b9716 soc: qcom: Fix mhi_qdss mode permission issue
QDSS mhi_qdss mode node permission sometimes cannot be updated
by ueventd, this is because mode node is not created after ueventd
received qdss KOBJ_ADD event. This change solves this issue.

Change-Id: Ibdb1051db7f442fb27f6501ec81742127e0bf930
Signed-off-by: Yuanfang Zhang <zhangyuanfang@codeaurora.org>
2020-09-07 18:43:29 +08:00
qctecmdr
8a9cf8fabb Merge "kernel: dma: disallow altering logical map for non-CMA allocs" 2020-09-06 20:56:12 -07:00
qctecmdr
bc5d20c9e6 Merge "icnss: Vote for chain1 regulators if RD card is 2x2" 2020-09-06 01:03:14 -07:00
qctecmdr
45bf94257d Merge "drivers: thermal: notify at least one thermal zone if no trips are violated" 2020-09-04 17:19:32 -07:00
qctecmdr
cd90a7ce3f Merge "cnss2: Add support to use new ramdump APIs" 2020-09-04 17:19:32 -07:00
qctecmdr
4f4e766b96 Merge "defconfig: msm: Enable BCL sensor for SDM660" 2020-09-04 17:19:31 -07:00
Asha Magadi Venkateshamurthy
9b433550ad defconfig: msm: Enable BCL sensor for SDM660
It enables BCL sensor driver necessary for thermal zone
configuration.

Change-Id: I86d4a886b1b53431f929914aeb4c5ef01574758e
Signed-off-by: Asha Magadi Venkateshamurthy <amagad@codeaurora.org>
2020-09-04 09:26:39 -07:00
qctecmdr
597fdad504 Merge "icnss: Get RD card chain mask capability as part of qmi cap resp" 2020-09-04 07:59:02 -07:00
Sandeep Singh
f70baa6602 icnss: Vote for chain1 regulators if RD card is 2x2
Wlan fw will provide RD card chain mask capability
for as part of cap qmi message exchange between host
platform and fw platform. Using this info host platform
will determine whether RD card chain is 1x1 or 2x2. It
will enabled chain1 regulator if RD card is 2x2 and also
if wlan fw doesn't provide any details about RD card
chain mask capability chain1 regulator will enabled
by default.

Change-Id: I83d9058fe505f2519a2300a4989e08acbdbcaafb
Signed-off-by: Sandeep Singh <sandsing@codeaurora.org>
2020-09-04 19:30:11 +05:30
qctecmdr
2977223d4f Merge "mm: fix the page_owner initializing issue for arm32" 2020-09-04 04:11:02 -07:00
qctecmdr
93c0c7a7fc Merge "leds: qti-flash: Enable the torch mode after enabling the led module" 2020-09-04 04:11:02 -07:00
qctecmdr
2595fce46e Merge "serial: msm_geni_serial: Log UART CTS and RX IO line status" 2020-09-04 04:11:01 -07:00
qctecmdr
465eadee01 Merge "defconfig: msm: disable CONFIG_CRYPTO_MD4 to align with android base" 2020-09-04 04:11:01 -07:00
Mukesh Kumar Savaliya
224a656f6e serial: msm_geni_serial: Log UART CTS and RX IO line status
This change adds the status of UART input lines namely CTS and RX.
These two lines are driven from peer device hence it helps in debug
to confirm peer device status.

This is requested by BT HOST driver to help understand logs clearly.

Change-Id: I892961a5889aea1f46fed1fbde2c924844bc3946
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
2020-09-04 13:23:23 +05:30
Tengfei Fan
af5d978169 defconfig: msm: disable CONFIG_CRYPTO_MD4 to align with android base
Disable CONFIG_CRYPTO_MD4 for bengal debug and to align with
android base config.

Change-Id: I233d39aeaa7d0ea90f263478cfbb05838b52699d
Signed-off-by: Tengfei Fan <tengfeif@codeaurora.org>
2020-09-04 15:33:50 +08:00
qctecmdr
f5db8b0a2f Merge "sched/fair: Improve the scheduler" 2020-09-04 00:33:37 -07:00
qctecmdr
20690a6117 Merge "scsi: ufs: Fix per-LU WB buffer size setting error" 2020-09-04 00:33:37 -07:00
Kavya Nunna
02d6b93143 leds: qti-flash: Enable the torch mode after enabling the led module
Currently, we are enabling the torch mode before enabling
led module. This causes large USB current spike after the torch
event. To avoid such undesired behaviour enable the torch
mode after enabling the led module.

Change-Id: I1d867b07d05c3d745220c33a941680aa7d70f1f5
Signed-off-by: Kavya Nunna <knunna@codeaurora.org>
2020-09-04 11:37:54 +05:30
qctecmdr
cc4f0845f9 Merge "cnss2: during recovery update status only when fw is running" 2020-09-03 21:11:56 -07:00
qctecmdr
d9ddab93fe Merge "soc: qcom: update failure reason response message" 2020-09-03 21:11:55 -07:00
Biao Long
a12eda7432 sched/fair: Improve the scheduler
This change is for general scheduler improvements.

Change-Id: I917955ef029f30db6c185a41f717a89dd179cc49
Signed-off-by: Biao Long <blong@codeaurora.org>
2020-09-03 20:07:00 -07:00
Ziqi Chen
12c1d21467 scsi: ufs: Fix per-LU WB buffer size setting error
Currently we pass sizeof(*d_lun_wbb_au) as param size to request
dLUNumWriteBoosterBufferAllocUnits. In this way we can only get 1 byte
data while dLunNumWriteBoosterBufferAllocUnites size should be 4 bytes.
To fix this issue, we should pass the actual size of that buffer. The
founction ufshcd_get_wb_alloc_units() is redundant, remove it and
directly call ufshcd_read_unit_desc_param() in ufs_get_device_desc()
to read back the dLUNumWriteBoosterBufferAllocUnits.

Change-Id: Ie6eee00dcb1a4c2334abc2a01d3e81994018835a
Signed-off-by: Ziqi Chen <ziqichen@codeaurora.org>
2020-09-04 10:49:45 +08:00
Manaf Meethalavalappu Pallikunhi
b3863fada2 drivers: thermal: notify at least one thermal zone if no trips are violated
During any sensor threshold notification, the of-thermal framework
checks whether any trip of each thermal zone for that sensor is
violated or not. It requests thermal zone re-evaluation only for
those thermal zones those trip is violated. If trips are violated
for none of thermal zones due to some reason, then of-thermal ignores
that sensor notification and it leads to no active trip threshold
for that sensor forever.

Notify and request thermal zone re-evaluation for at least one thermal
zone for that sensor if trips are violated for none in of-thermal.
It makes sure that for every sensor notification, thermal zone
aggregate and set next active trip.

Change-Id: If9955977fe32929d853815ddb9408385291b3c58
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2020-09-03 09:23:05 -07:00
qctecmdr
9ca24d32bb Merge "cnss2: change for fixed link speed" 2020-09-03 05:47:30 -07:00
qctecmdr
6b3d8fb8cd Merge "dcc_v2: Add dcc region to minidump table" 2020-09-03 02:05:55 -07:00
qctecmdr
0422549c60 Merge "usb: dwc3: gadget: Fix request completion check" 2020-09-03 02:05:54 -07:00
Vinayak Menon
8c4feb92ef kernel: dma: disallow altering logical map for non-CMA allocs
DMA_ATTR_STRONGLY_ORDERED and DMA_ATTR_NO_KERNEL_MAPPING alters
the logical mapping of allocated memory. This works only for CMA
allocations where the pages are PAGE_SIZE mapped.
Disallow fallback to buddy alloc if above attrs are set.

Change-Id: I25c632d3c9179e22bc5061fd5f7e9ab6e7847322
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2020-09-03 13:56:56 +05:30
qctecmdr
4f36095a6e Merge "leds: qti-flash: Disable flash LED channel after De-strobe" 2020-09-02 22:37:14 -07:00
qctecmdr
0b2f010c52 Merge "msm: kgsl: Add support to vote bimc-interface-clk per speed-bin" 2020-09-02 22:37:13 -07:00
qctecmdr
94797210d3 Merge "msm: ipa: set the mac header to 0 for rx skbs" 2020-09-02 19:16:13 -07:00
qctecmdr
b6524bd9ca Merge "clk: qcom: mdss: DP PLL changes for SDM660" 2020-09-02 19:16:13 -07:00
Kai Liu
b25160bcb5 cnss2: during recovery update status only when fw is running
If hit memory allocate failure during boot time, platform driver
will do recovery, in order to keep platform and wlan driver align,
skip update status.

Change-Id: Id5c49953d9baa3322aa3eba2727e54e0af21d8b1
Signed-off-by: Kai Liu <kaliu@codeaurora.org>
2020-09-03 02:34:53 +08:00
Ashok Vuyyuru
0cb51c96b0 msm: ipa: disable status on ODL_DPL_CONS pipe above IPAv4.5 targets
ADPLv3 targets do not require status to be enabled on ODL_DPL pipe.
Make changes to disable the status for targets with IPAv4.5 and above.

Change-Id: Ica07a25a01e742928d3ecb19a88b7ee2305235ae
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-09-02 21:04:35 +05:30
Sandeep Singh
111e1e322e icnss: Get RD card chain mask capability as part of qmi cap resp
This change adds wlfw_rd_card_chain_cap_v0 parameter in qmi capability
message using which wlan fw will update host platform driver whether
the RD card chain mask capability is 1x1 or 2x2. Using this info
wlan platform driver will vote for chain1 regulator only if RD card
chain mask is 2x2.

Change-Id: Id0b745543225fa90f21c22066321ff4a859861c0
Signed-off-by: Sandeep Singh <sandsing@codeaurora.org>
2020-09-02 20:37:06 +05:30
qctecmdr
dad6bc069f Merge "usb: phy: qusb2: Update tune params based on efuse value" 2020-09-02 05:33:02 -07:00
Zhenhua Huang
482b636fb3 mm: fix the page_owner initializing issue for arm32
arm32 original logic:
1. allocated memory for page_ext(using memblock).
2. invoke the init callback of page_ext_ops like
page_owner(using buddy).
3. initialize buddy.

after this change:
1. allocated memory for page_ext(using memblock).
2. initialize buddy.
3. invoke the init callback of page_ext_ops like
page_owner(using buddy).

with the change, failure/dummy_handle can get its correct value.

Change-Id: I6598481299da115ff4be50bf0e5a61a012d5ac83
Signed-off-by: Zhenhua Huang <zhenhuah@codeaurora.org>
2020-09-02 16:37:28 +08:00
qctecmdr
ca9f23ce63 Merge "usb: pd: Reset pd protocol during cable disconnect" 2020-09-01 22:50:16 -07:00
Pavankumar Kondeti
fbcf62f656 sched/fair: Improve the scheduler
This change is for general scheduler improvement.

Change-Id: I19ec68fe40d931b501ea84a9306d04fcb58db60d
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2020-09-02 07:37:03 +05:30
qctecmdr
07ae6f9f1e Merge "cnss2: Remove hard-code address for error log start for HST" 2020-09-01 16:27:06 -07:00
qctecmdr
dba4bb0cb7 Merge "cnss2: Set PCIe link state in proper state during resume" 2020-09-01 16:27:06 -07:00
qctecmdr
800531e287 Merge "mhi: net: Reduce NAPI poll weight to 64 for debug builds" 2020-09-01 16:27:06 -07:00
Vivek Pernamitta
8d7ca73b11 mhi: net: Reduce NAPI poll weight to 64 for debug builds
Reducing NAPI poll weight to 64 from 128 for debug builds.
The maximum frags previously it can accumlate for  SKB is 128,
which leads to stack overflow. So, will reduce max frags to skb
to 64.

Change-Id: Iec33c4e870f9bf3c601d72078992ccb2a0b458ec
Signed-off-by: Vivek Pernamitta <vpernami@codeaurora.org>
2020-09-01 19:53:03 +05:30
Pratham Pratap
d24cf55a49 usb: pd: Reset pd protocol during cable disconnect
Consider a case where the device has initiated dr_swap to
the connected PD charger to support type-C headset and charging
concurrently. If the charger got disconnected at the same time
when the driver was trying to change the data role then
send_dr_swap flag will be set during disconnect. Upon next connect,
since the flag is already set, the driver will not set the current_pr
to sink and the PD state machine will not kick in causing the charger
to be detected as DCP. Fix this by resetting the pd protocol during
cable disconnect which will clear the flags.

Change-Id: I282986b9d6df37a74d65eb80c1ebc5510add7fe9
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
2020-09-01 06:05:38 -07:00
Mohammed Siddiq
a01097cbf3 cnss2: change for fixed link speed
Change for fixed link speed.

Change-Id: If2584bd534b868171d53b0b880d65cc2eeb74410
Signed-off-by: Mohammed Siddiq <msiddiq@codeaurora.org>
2020-09-01 18:05:38 +05:30