lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1554781699-42604-2-git-send-email-hofrat@opentech.at>
Date:   Tue,  9 Apr 2019 05:48:19 +0200
From:   Nicholas Mc Guire <hofrat@...ntech.at>
To:     Samuel Ortiz <sameo@...ux.intel.com>
Cc:     Daniel Mack <daniel@...que.org>, linux-wireless@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Nicholas Mc Guire <hofrat@...ntech.at>
Subject: [PATCH 2/2] NFC: st95hf: fix timing factor error

The comment suggests that per ISO standard 5-6ms are required
but the code is 50-60ms delay - look like a simple typo - so
set the delay to 5000 to 6000.

Signed-off-by: Nicholas Mc Guire <hofrat@...ntech.at>
Fixes: cab47333f0f7 ("NFC: Add STMicroelectronics ST95HF driver")
---

Problem located with an experimental coccinelle script

Note that as I do not have the standard - it could of course
also be a typo in the comment - in which case it should
then probably be using msleep(60) not usleep_ranges(). 

Patch was compile tested with: x86_64_defconfig + SPI=y,
NFC=y, NFC_DIGITAL=y, NFC_ST95HF=m

Patch is against 5.1-rc3 (localversion-next is -next-20190408)

 drivers/nfc/st95hf/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nfc/st95hf/core.c b/drivers/nfc/st95hf/core.c
index 34bf1d7..89e6160 100644
--- a/drivers/nfc/st95hf/core.c
+++ b/drivers/nfc/st95hf/core.c
@@ -430,7 +430,7 @@ static int st95hf_select_protocol(struct st95hf_context *stcontext, int type)
 		 * delay of 5-6 ms is required after select protocol
 		 * command in case of ISO14443 Type B
 		 */
-		usleep_range(50000, 60000);
+		usleep_range(5000, 6000);
 
 		/* secondary config. for 14443Type 4B after protocol select */
 		result = secondary_configuration_type4b(stcontext);
-- 
2.1.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ