Issue:
In function ese_cold_reset_ioctl, kfree is getting call
for nfc_dev->cold_reset.cmd_buf in case of early failure
in the function.
Fix:
Add check NULL check before calling kfree
Change-Id: Ic3e86494f65330ff58a0deb394b3a654f0a395db
Signed-off-by: Om Prakash Singh <quic_omprsing@quicinc.com>
Added compilation flag for secure module librarie dependencies.
Change-Id: If810b7376fc079307ca6d55abca4f3f97699f41c
Signed-off-by: Khageswararao Rao B <quic_kraob@quicinc.com>
Added build files for bazel based compilation of nxp-nci
Steps to test
1. Create symlink
cd kernel_platform
mkdir techpacks
cd techpacks
mkdir nxpnci_driver-kernel
cd nxpnci_driver-kernel
ln -s ../../../vendor/nxp/opensource/driver/* .
2. To compile
cd kernel_platfrom
./tools/bazel build --lto=thin //techpacks/nxpnci_driver-kernel:pineapple_consolidate_nxp-nci
./tools/bazel run --lto=thin //techpacks/nxpnci_driver-kernel:pineapple_consolidate_nxp-nci_dist
3. Test done:
Able to compile nxp-nci DLKM
out/target/product/<target>/dlkm/lib/modules
Change-Id: Iaf6f05d9228e1cc2ddd717de8d748238bb6082fe
To avoid code compilation issues NFC team added break in
eSE cold reset file as temperory fix.
Replacing the break with Fall through.
Change-Id: Ieb6a5f105a71ae0533f746f6c56479c56a68cd2c
"struct i2c_driver".remove function's return type is
changed from int to void in kernel version 6.1.0.
Support new i2c_driver remove API for NFC driver.
Change-Id: I2fc0d4a044afd49cc08c8b2486ce355a5857e202
Signed-off-by: Maria Yu <quic_aiquny@quicinc.com>
Signed-off-by: Amruth Naga <quic_amrunaga@quicinc.com>
Added mutex loc in the fucntion ese_cold_reset_ioctl
to avoid double free issues
Change-Id: I1ba7187f8339a6de5a31ef009b45556ceab46989
Signed-off-by: PRANAY BHARGAV BHAVARAJU <quic_pbhavara@quicinc.com>
chages done to ese_cold_reset c file to avoid
slabout of bound issues.
Change-Id: Idbc72acc16c8a2f55d982015b69e196d38ddc199
Signed-off-by: PRANAY BHARGAV BHAVARAJU <quic_pbhavara@quicinc.com>
NFC: set the rsp buffer to null
set the response buffer to null in order to avoid
invalid free
Change-Id: Id92aca9255e4e58cc03822a1af1adf6fbbdfa443
Signed-off-by: PRANAY BHARGAV BHAVARAJU <quic_pbhavara@quicinc.com>
When received the read count from application more than MAX_NCI_BUFFER_SIZE
limiting the read count to MAX_NCI_BUFFER_SIZE.
Change-Id: Ib060b3b20fedc77a2e7a13bd1ac2b4c64da87a81
Modified code to add a local flag to enable or disable
module compilation based on system-wide global flags
for different targets.
Change-Id: I52ee08ed82a0d40999cfbd0e8969d43801f29d95
During hiberantion/suspend, freezer process sends
fake signals to all running processes to put the
device into system wide sleep, which leads to
ungraceful exit of I2c read thread leaving the
upper layer retry the I2C access & ends up with
excessive error logging on the console.
Modified code to set/unset the no-freeze flag to
ensure such freezer fake signals can be avoided
when NFC is enabled & vice versa.
Change-Id: If0b8814daa172b3734a331ad9ab225c714e11e43
Signed-off-by: Tapas Dey <quic_c_tdey@quicinc.com>
Implemented NFC dynamic protection control feature in driver; performing
Ven GPIO enable/disable post TZ notifications in non-secure/secure zone
respectively.
Change-Id: I13dedf23987ce0b3b2a53881d35f6c3cf462cd92
Modified code to fix compilation issues on NFC driver
for MW version 12.10.00 and retained QC specific code.
Change-Id: I9eeba3f6534a3c67c3b32b6361b4ef5d42965265
Shared variable is accessed without any mutual exclusion,
it may result into overwriting memory address and cause
invalid write access to buffer after free or invalid free.
Convert shared variable to local as it's usage was limited
with in API itself, it will avoid overwriting memory address
by another thread as all of them will have their own copy.
Change-Id: I36692313396f6c60e1be4479711feb14bb92ae4c
Signed-off-by: Gaurav Singhal <quic_gsinghal@quicinc.com>