The KASAN builds have started producing the warning:
WARNING: vmlinux.o(.text+0x8cad78): Section mismatch in reference from the function spcom_probe() to the function .init.text:spcom_register_chardev()
The function spcom_probe() references
the function __init spcom_register_chardev().
This is often because spcom_probe lacks a __init
annotation or the annotation of spcom_register_chardev is wrong.
Indeed, spcom_register_chardev is called from the non-__init
spcom_probe, so marking spcom_register_chardev __init is dangerous.
Bug: 139442076
Change-Id: I8feff354bcea8171d8f8130cfa8a230439efc9b0
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Because array name is uninitialized, when using copy_to_user
to copy name to userspace, the kernel stack information will
be leaked.
Change-Id: I65f50f3495d4d922357fe3b6e8245690ab7a4209
Signed-off-by: Zelong Ren <zeloren@codeaurora.org>
When we call crypto_qti_program_key to program the key, and
it fails due to trustzone busy issue, we try to call invalidate
key method just after that, and in the process, overwrite the
error code returned by the program key failure. Fix this by handling
the errors from both program key and invalidate key separately,
and return the program key error code to caller.
Test: Verified device boot up and reboot.
Change-Id: Iaff0844f68b4886c23e1840d7e0e4a404d38fc96
Signed-off-by: Vaibhav Agrawal <vagrawa@codeaurora.org>
Adding check in msm_minidump_add_region() to handle scenarios for
out of bound access while adding region in minidump table in SMEM.
Change-Id: Ic20663dbd2fa8ae96899930a7f7ba79dc204ff5e
Signed-off-by: Komal Bajaj <kbajaj@codeaurora.org>
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
Need check context index is valid or not before use it.
Change-Id: Ifd4f5dffb3a9317e13516e4863059b087d39fc66
Signed-off-by: Kasin Li <donglil@codeaurora.org>
Removed force_stop_bit in condition check as this check
will fail if we need to set 0th bit.
Function qcom_smem_state_update_bits takes a mask , so
convert the bit into mask before call to this function.
Modem is notified for app crash, set ignore_errors to
true to avoid further crash reporting from modem.
Change-Id: I28c8979f59ced81e091d98fa9c3656c017e4bfa2
Signed-off-by: Sivasri Kumar Vanka <sivasri@codeaurora.org>
In case of SSR/PDR, when FW comes up, platform driver receives
FW_READY indication. As part of FW_READY, platform driver calls
shutdown and reinit ops of host driver.
Clear SHUTDOWN_DONE flag at right place so that if reinit is not
called SSR/PDR because of FW again went down between calling driver
shutdown and reinit then next time directly call reinit and avoid
calling shutdown.
Change-Id: I2a8bd77ab47d5008b705010f09084cbfebc4d06e
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
In qmi_handle_init(), a buffer is allocated for to hold messages
received through the handle's socket. Any "normal" messages
(expected by the caller) will have a header prepended, so the
buffer size is adjusted to accomodate that.
The buffer must also be of sufficient size to receive control
messages, so the size is increased if necessary to ensure these
will fit.
Unfortunately the calculation is done wrong, making it possible
for the calculated buffer size to be too small to hold a "normal"
message. Specifically, if:
recv_buf_size > sizeof(struct qrtr_ctrl_pkt) - sizeof(struct qmi_header)
AND
recv_buf_size < sizeof(struct qrtr_ctrl_pkt)
the current logic will use sizeof(struct qrtr_ctrl_pkt) as the
receive buffer size, which is not enough to hold the maximum
"normal" message plus its header. Currently this problem occurs
for (13 < recv_buf_size < 20).
This patch corrects this.
Change-Id: If80199f06bbf0de0b0f06358cdd7dc215c6d6fb7
Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Git-repo: https://android.googlesource.com/kernel/msm
Git-commit: 7df5ff258bd27900d516fea88da10d05602bf8c7
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
This change adds new API which does cmdq crypto
initialization for targets having legacy ICE(ICE<3.X).
It populates required cmdq fields needed to achieve
Inline File Encryption.
Change-Id: I71a5c64db529daf8c4afc12b3523c48d8948ab30
Signed-off-by: Jiten Patel <jitepate@codeaurora.org>
Detects TCP pure acks so they can be put in the dedicated TX queues
even if they contain various options.
Change-Id: I6a9b714ccb58616ff49a150467d33a348d88ec64
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Enabling the irqs from other subsystems before they power up. This
ensures that the irqs are not missed by hlos.
Change-Id: I501cf28c3ea7244358f26b0a2d95572022315871
Signed-off-by: Anuj Garg <anujgarg@codeaurora.org>
Separated read data from BG on TWM exit into two part.
BG_FETCH_TWM_DATA will send command to read data from
BG and keep data on bgdeamon and BG_READ_TWM_DATA will
provide data to userspace.
Change-Id: I5af8de7e40ca16216a82c15e9561095364ea8464
Signed-off-by: Ganesh Keethol <gkeethol@codeaurora.org>
Call bgcom_bgdown_handler in AFTER_SUBSYS_DOWN to ensure
status reg cleared.
Change-Id: I205e2e29a669895152fc3b61b4de401b73090091
Signed-off-by: Ganesh Keethol <gkeethol@codeaurora.org>
Load tz app and send command to read data from BG.
Change-Id: I80dd0cfcfbcc04a81d5a619264216ad4393d2094
Signed-off-by: Ajit Kumar <kajit@codeaurora.org>
RSB driver sends configure command to Blackghost
and should wait before reading the response from BG.
Fixes issue where RSB driver sends enable command
even though BG is not configured.
Change-Id: I5ae816d07762e3e26d16923b5767ba2ae9120781
Signed-off-by: Protik Biswas <protbisw@codeaurora.org>
In cases of system suspend, there is a requirement to update
existing boot marker. Add API to update existing boot marker.
Change-Id: If26249578f4a2594f37f53f3ea819e5032db2b85
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>
Use secure world to generate and maintain the file name
encryption key.
Test: vts-kernel-encryption test.
Change-Id: I3a2c093a6fdc622b106b22d324cae0519c8de7c0
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
Sends disable command to Blackghost during TWM
entry. Fixes interrupt issue on BG and crash
during TWM entry.
Change-Id: I47c399fb5c884b4e94bcd88dfc5fbc5cb61f6f72
Signed-off-by: Protik Biswas <protbisw@codeaurora.org>
bg-rsb driver makes use of bgrsb-rpmsg driver
for Glink communication.
This change enables rsb driver to send tx message
on RSB_CTRL channel with the help of rpmsg driver.
Change-Id: Ib68df84d88c42bd310c1a3676be61d991d711ba3
Signed-off-by: Protik Biswas <protbisw@codeaurora.org>
Add support for bgrsb-rpmsg driver that is
used by bgrsb driver to communicate with
a remote processor over Glink communication.
Change-Id: I1a0b904c4d6ea5df1a2e670181b44efb394b806e
Signed-off-by: Protik Biswas <protbisw@codeaurora.org>
Use secure world to generate and maintain the file name
encryption key.
Test: vts-kernel-encryption test.
Change-Id: I3a2c093a6fdc622b106b22d324cae0519c8de7c0
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
From ICE 3.0 onwards the keys are used in little endian format
but legacy ICE driver in trustzone reverses the endianness. So reverse
the endianness of keys before passing it to trusted ICE driver.
Change-Id: I189680c588d31fd2549d08094208e55dce45ffbf
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
When TX is OFF from one client but a positive grant is received
from another client, treat it as TX ON. This is to prevent data
stall due to a race condition that TX status from different transports
could arrive out-of-order.
Change-Id: Id257b79569390a47f863d713e89b2c868561af7b
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Add QTI implementation for variant ops required for inline
encryption with wrapped key support. These include UFS
crypto ops and KSM ops. Also add crypto common library to cater
to different key programing mechanisms.
Change-Id: Ica930a8a806a78d4c2d074639cbed355b895a459
Signed-off-by: Gaurav Kashyap <gaurkash@codeaurora.org>
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
Blackghost TWM firmware name has been changed as
from META scripts the usage of firmware name having
more than 8 characters is not allowed.
Change-Id: I4c7b9091de68b9ef9a7f0750a01b26923c05299a
Signed-off-by: Protik Biswas <protbisw@codeaurora.org>
From ICE 3.0 onwards the keys are used in little endian format
but legacy ICE driver in trustzone reverses the endianness. So reverse
the endianness of keys before passing it to trusted ICE driver.
Change-Id: I189680c588d31fd2549d08094208e55dce45ffbf
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
bg-rsb driver is taken from msm-4.9 'commit
<94afce5b> ("soc: qcom: bg-rsb: enable/disable
events through gpio")'.
bg-rsb driver maintains RSB state machine.
bgrsb-rpmsg is registered as a rpmsg driver
when remote processor opens RSB_CTRL channel
it sends callback to rsb driver.
Change-Id: I58e341ce81f33df38e900f822325be6f37cef8e6
Signed-off-by: Protik Biswas <protbisw@codeaurora.org>
Add QTI implementation for variant ops required for inline
encryption with wrapped key support. These include UFS
crypto ops and KSM ops. Also add crypto common library to cater
to different key programing mechanisms.
Change-Id: Ica930a8a806a78d4c2d074639cbed355b895a459
Signed-off-by: Gaurav Kashyap <gaurkash@codeaurora.org>
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
Rename EVT_WAKE_UP to EVENT_REQUEST_WAKE_UP to clearly
expalin that this notification is to request to wake up
the remote processor.
Change-Id: Icc829f3b6c6d8b0cfc2e0ff189a0152759bb6415
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>
Add socinfo support for trinket-iot Soc and update the
bindings for the same.
Change-Id: I377526de9e7e7d95d93f6f954f6ff94e8f886b71
Signed-off-by: Anurag Chouhan <achouhan@codeaurora.org>
Remove Unnecessary socinfo support and update the
bindings for the same.
Change-Id: I724b37fd7e466307db0c209cef834c4a308fa940
Signed-off-by: Anurag Chouhan <achouhan@codeaurora.org>
3 DBQs can be assigned to one GVM and have different priority such as
low, medium and high based on the context priority.
Change-Id: Ie7ab4c6837528954ca56033bb2e7c515a16b27f8
Signed-off-by: Thomas (Wonyoung) Yun <wyun@codeaurora.org>
Run sdx_ext_ipc_wakeup_irq in isr context and not in thread
context.
Change-Id: Ida0c6653c20ea20077881b30552f68929fdf1241
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>
The version numbers shall be copied into the local variables for
any potential version comparison.
Change-Id: Ib2648805bd7832b4fd7508b10d1382c8055a139f
Signed-off-by: Yong Ding <yongding@codeaurora.org>
Add conditional boot marker for modem sub-system in peripheral
loader driver. Condition is added to find subsystem
and place marker only for modem subsystem.
Change-Id: I5697b78e0a8322477e78d7b5f9814e1c18b42152
Signed-off-by: Sanjay Dwivedi <sanjaykd@codeaurora.org>
Fix the dev_err to print the correct IRQ information.
Change-Id: I759627d34e86528023a210578ca9e4bac82d34be
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>
Probe fails because of unsigned int. Change it to int.
Change-Id: I71b53a7ff74b0b2a64ceddb50e88018b1f90e154
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>
hab only supports multiple page size memory export, so the exported buffer
size must be N * PAGE_SIZE w/ N > 0.
Change-Id: I0b59639b3ca8842ccd49deb6b32f29f68da0b7a4
Signed-off-by: Yao Jiang <yaojia@codeaurora.org>
Addition of GVM LA increases total number of host to
13 which requires modification in smem definition.
Change-Id: Ibe3b0e184f373ce89507fbab37ba41c65ddc0cb1
Signed-off-by: Arun Prakash <app@codeaurora.org>