aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-10-16UPSTREAM: rmi4update: Make sure the device file exists when rebinding the driverandroid-wear-o-preview-4android-wear-o-preview-3android-wear-n-preview-3android-wear-n-preview-2android-wear-n-preview-1android-wear-7.1.1_r1android-o-preview-4android-o-preview-3android-o-preview-2android-o-preview-1android-o-iot-preview-5android-n-preview-5android-n-preview-4android-n-preview-3android-n-preview-2android-n-preview-1android-n-mr2-preview-2android-n-mr2-preview-1android-n-mr1-preview-2android-n-mr1-preview-1android-n-iot-preview-4android-n-iot-preview-2android-cts_7.1_r1android-cts-7.1_r9android-cts-7.1_r8android-cts-7.1_r7android-cts-7.1_r6android-cts-7.1_r5android-cts-7.1_r4android-cts-7.1_r3android-cts-7.1_r29android-cts-7.1_r28android-cts-7.1_r27android-cts-7.1_r26android-cts-7.1_r25android-cts-7.1_r24android-cts-7.1_r23android-cts-7.1_r22android-cts-7.1_r21android-cts-7.1_r20android-cts-7.1_r2android-cts-7.1_r19android-cts-7.1_r18android-cts-7.1_r17android-cts-7.1_r16android-cts-7.1_r15android-cts-7.1_r14android-cts-7.1_r13android-cts-7.1_r12android-cts-7.1_r11android-cts-7.1_r10android-cts-7.1_r1android-cts-7.0_r9android-cts-7.0_r8android-cts-7.0_r7android-cts-7.0_r6android-cts-7.0_r5android-cts-7.0_r4android-cts-7.0_r33android-cts-7.0_r32android-cts-7.0_r31android-cts-7.0_r30android-cts-7.0_r3android-cts-7.0_r29android-cts-7.0_r28android-cts-7.0_r27android-cts-7.0_r26android-cts-7.0_r25android-cts-7.0_r24android-cts-7.0_r23android-cts-7.0_r22android-cts-7.0_r21android-cts-7.0_r20android-cts-7.0_r2android-cts-7.0_r19android-cts-7.0_r18android-cts-7.0_r17android-cts-7.0_r16android-cts-7.0_r15android-cts-7.0_r14android-cts-7.0_r13android-cts-7.0_r12android-cts-7.0_r11android-cts-7.0_r10android-cts-7.0_r1android-7.1.2_r9android-7.1.2_r8android-7.1.2_r6android-7.1.2_r5android-7.1.2_r4android-7.1.2_r39android-7.1.2_r38android-7.1.2_r37android-7.1.2_r36android-7.1.2_r33android-7.1.2_r32android-7.1.2_r30android-7.1.2_r3android-7.1.2_r29android-7.1.2_r28android-7.1.2_r27android-7.1.2_r25android-7.1.2_r24android-7.1.2_r23android-7.1.2_r2android-7.1.2_r19android-7.1.2_r18android-7.1.2_r17android-7.1.2_r16android-7.1.2_r15android-7.1.2_r14android-7.1.2_r13android-7.1.2_r12android-7.1.2_r11android-7.1.2_r10android-7.1.2_r1android-7.1.1_r9android-7.1.1_r8android-7.1.1_r7android-7.1.1_r61android-7.1.1_r60android-7.1.1_r6android-7.1.1_r59android-7.1.1_r58android-7.1.1_r57android-7.1.1_r56android-7.1.1_r55android-7.1.1_r54android-7.1.1_r53android-7.1.1_r52android-7.1.1_r51android-7.1.1_r50android-7.1.1_r49android-7.1.1_r48android-7.1.1_r47android-7.1.1_r46android-7.1.1_r45android-7.1.1_r44android-7.1.1_r43android-7.1.1_r42android-7.1.1_r41android-7.1.1_r40android-7.1.1_r4android-7.1.1_r39android-7.1.1_r38android-7.1.1_r35android-7.1.1_r33android-7.1.1_r32android-7.1.1_r31android-7.1.1_r3android-7.1.1_r28android-7.1.1_r27android-7.1.1_r26android-7.1.1_r25android-7.1.1_r24android-7.1.1_r23android-7.1.1_r22android-7.1.1_r21android-7.1.1_r20android-7.1.1_r2android-7.1.1_r17android-7.1.1_r16android-7.1.1_r15android-7.1.1_r14android-7.1.1_r13android-7.1.1_r12android-7.1.1_r11android-7.1.1_r10android-7.1.1_r1android-7.1.0_r7android-7.1.0_r6android-7.1.0_r5android-7.1.0_r4android-7.1.0_r3android-7.1.0_r2android-7.1.0_r1android-7.0.0_r9android-7.0.0_r8android-7.0.0_r7android-7.0.0_r6android-7.0.0_r5android-7.0.0_r4android-7.0.0_r36android-7.0.0_r35android-7.0.0_r34android-7.0.0_r33android-7.0.0_r32android-7.0.0_r31android-7.0.0_r30android-7.0.0_r3android-7.0.0_r29android-7.0.0_r28android-7.0.0_r27android-7.0.0_r24android-7.0.0_r21android-7.0.0_r19android-7.0.0_r17android-7.0.0_r15android-7.0.0_r14android-7.0.0_r13android-7.0.0_r12android-7.0.0_r11android-7.0.0_r10android-7.0.0_r1o-previewo-iot-preview-5nougat-releasenougat-mr2.3-releasenougat-mr2.2-releasenougat-mr2.1-releasenougat-mr2-security-releasenougat-mr2-releasenougat-mr2-pixel-releasenougat-mr2-devnougat-mr1.8-releasenougat-mr1.7-releasenougat-mr1.6-releasenougat-mr1.5-releasenougat-mr1.4-releasenougat-mr1.3-releasenougat-mr1.2-releasenougat-mr1.1-releasenougat-mr1-wear-releasenougat-mr1-volantis-releasenougat-mr1-security-releasenougat-mr1-releasenougat-mr1-flounder-releasenougat-mr1-devnougat-mr1-cts-releasenougat-mr0.5-releasenougat-dr1-releasenougat-devnougat-cts-releasenougat-bugfix-releasen-iot-preview-4n-iot-preview-2Andrew Duggan
The /dev/hidrawX device may not exist immediately after writing to the bind file. This change checks to see if it exists before attempting to reopen the device. (cherry picked from commit 8336b9c19bbf2adad93a4e193cd9258cf3fc7d0d) Signed-off-by: Benson Leung <bleung@google.com> Bug: 24809436 Change-Id: I02a662a2fc38e93df32190c03f35a1db3640f451
2015-10-16UPSTREAM: Add some additional architecturesAndrew Duggan
(cherry picked from commit 8fa2d839a428deb97762b7afcfef9666fd5e1640) Signed-off-by: Benson Leung <bleung@google.com> Bug: 24809436 Change-Id: Ibd2d363792d29876237ca1f4cf9604d7a0c20296
2015-10-16UPSTREAM: rmi4update: remove redundant include of alloca.hAndrew Duggan
(cherry picked from commit cf807718a2a6802475be33bff400835d447e5bff) Signed-off-by: Benson Leung <bleung@google.com> Bug: 24809436 Change-Id: I3bdd5c1b4aca08c9ed8fa524472bdb52285be125
2015-10-16UPSTREAM: rmi4update: fix uninitialized variable warningAndrew Duggan
Signed-off-by: Benson Leung <bleung@google.com> Bug: 24809436 (cherry picked from commit 757b6f6c072b023dd42d71dfb65417987a611234) Change-Id: I57d6cd10f0d775fc4dfdbe51fd8b76ba4038eef6
2015-10-16UPSTREAM: rmi4update: Optimize writing firmware blocksAndrew Duggan
Most HID devices allow appending the reflash command to the end of the firmware block. This avoids sending a second report with the just the command. Also, after the block is written HID devices send an attention report. Only read the F34 control registers if waiting for that attention report times out. Signed-off-by: Benson Leung <bleung@google.com> Bug: 24809436 (cherry picked from commit 76743e425429076626df483691ce7abe563abd81) Change-Id: I0a3276d77605843cbb6ddec221320a6048d7b925
2015-10-16UPSTREAM: After review bump the version to v1.2.0Andrew Duggan
Signed-off-by: Benson Leung <bleung@google.com> Bug: 24809436 (cherry picked from commit d8b02a8fd18ca9d748908e297bf8902af019bcfd) Change-Id: I7b80317ad0834fe580414800cad280ad006cc567
2015-09-16Fix build for inclusion in Android external treeAndrew de los Reyes
2015-09-10HIDDevice::Write: return number of bytes of data writtenAndrew Duggan
Write was returning the size of an output report since that is what the the lower level write is returning. On success HIDDevice::Write should return the number of bytes actual data which is what the caller cares about.
2015-09-10HIDDevice::GetAttentionReport: Fix copying of attention dataAndrew Duggan
2015-09-10HIDDevice::Read: Check that the bytes reported by the report match what we ↵Andrew Duggan
expect Make sure that the bytes in the report do no exceed the bytes which were requested or that the bytes exceed the bytes remaining in the buffer.
2015-09-10rmi4update: Check that Read() and Write() return exactly the expected amount.Andrew Duggan
2015-09-10rmi4update: massively speed up update when no update neededAndrew de los Reyes
2015-09-10rmihidtool: length check on find_tokenAndrew de los Reyes
Addresses security concern: find_token does not check size of result buffer when writing, just depends on caller to make sure input and output buffers are the same length. This can lead to a stack buffer overflow if run with malicious arguments (e.g. "-w AAAA...more.than.255...AAAA").
2015-09-10rmi4update: Check Read() and Write() return lengthsAndrew de los Reyes
Addresses security concern: All users of Read and Write fail to check for return value being equal to desired write size (only look for <0, not a size >= 0 but less than expected). This can lead to all kinds of corruption or overflows.
2015-09-10rmidevice: Check return value of Read(), Write()Andrew de los Reyes
Addresses security concern: All users of Read and Write fail to check for return value being equal to desired write size (only look for <0, not a size >= 0 but less than expected). This can lead to all kinds of corruption or overflows.
2015-09-10HIDDevice: WriteDeviceNameToFile: check lengths, close return valueAndrew de los Reyes
Addresses security concern: WriteDeviceNameToFile does not check buffer lengths, and uses a fixed size of 19, though this is likely safe due to how the kernel builds the /sys tree entries. Also fails to check return code of "close".
2015-09-10HIDDevice::GetReport: Fix count for split readsAndrew de los Reyes
Haven't tested split reads. Addresses security concern: HIDDevice::GetReport does not correctly handle split reads (count is used at the end as if it were the total size of bytes read, which it isn't), which could lead to communication corruption and data content confusion (m_attnData and m_readData could have partially updated contents). It's unlikely the hidraw interface could be tricked into doing split reads, but I haven't tested it.
2015-09-10HIDDevice::Read: Fix possible out of bounds accessAndrew de los Reyes
Addresses security concern: HIDDevice::Read contains potential past-end-of-buffer write (and read) when presented with a malicious/corrupt device report (m_readData[HID_RMI4_READ_INPUT_COUNT] is not compared against the remaining buf size. It asks nicely for no more than what would fit, but the value in m_readData is HID device controlled, but isn't checked against the actual size of the incoming buffer)
2015-09-10HIDDevice::ParseReportSizes: check for valid descriptorsAndrew de los Reyes
Addresses security concern: HIDDevice::ParseReportSizes contains potential past-end-of-buffer reads when presented with a malicious/corrupt device descriptor (++i and i + 1, i + 2 array indexes don't validate they're less than m_rptDesc.size).
2015-09-10validate m_*Report lengthsAndrew de los Reyes
Addresses Security concerns: HIDDevice::Open does not validate minimum sizes for m_*ReportSize, which could lead to past-end-of-buffer writes when using m_*Report arrays. HIDDevice::GetAttentionReport does not correctly validate the size of the m_attnData buffer vs the buf len. This is a past-end-of-buffer read condition. I don't understand the point of reading bytes-many bytes but returning *len set to the valid size of bytes in the buffer.
2015-09-10RMIDevice: Make dtor vitualAndrew de los Reyes
To avoid compilation warning
2015-06-23bump subminor numberAndrew Duggan
2015-06-23Reset and rebind the driver even if update failsAndrew Duggan
2015-05-11Add command line option to reset the deviceAndrew Duggan
2015-05-11Merge pull request #7 from josephsih/masterAndrew Duggan
Add a noReset flag to f54test
2015-05-07bump minor version to indicate that it can support multiple input report sizesAndrew Duggan
2015-05-07Update Android NDK version so I can keep using readlinkatAndrew Duggan
2015-05-07Fix build warning on ARM and some cleanup.Andrew Duggan
2015-05-07Rebind the driver when switching between bootloader and UI in case the size ↵Andrew Duggan
of input reports changed If the firmware configuration has changed then the size of input reports between the bootloader and the UI may be different. Forcing a rebind of the driver when switching modes will update the transport drivers of the new input report size.
2015-05-06Print protocol specific information about a deviceAndrew Duggan
2015-05-06Add option to rebind the driver from rmihidtool.Andrew Duggan
2015-05-06Allow rebinding of the transport device to force a reload of the HID descriptorsAndrew Duggan
In some cases during firmware update the size of the input reports can change this commit allows for the unbinding and rebinding of the transport HID device to force a reload of the HID descriptors so that the new size if read by the HID transport drivers.
2015-05-06Add a noReset flag to f54testJoseph Hwang
2015-03-16bump the subminor verison to create a new release with some fixesAndrew Duggan
2015-03-16Add error message when the tool refuses to update the device if the firmware ↵Andrew Duggan
image is not newer then the firmware on the device
2015-03-16Change m_imageSize to signed since it's value is set by the result of tellg andAndrew Duggan
tellg returns -1 when there is an error. Also, check the result of tellg.
2015-02-23Disable all interrupts not related to the update process before entering ↵Andrew Duggan
flash programming
2014-11-14Fix string parsing bugs which prevented write commands from working correctlyAndrew Duggan
2014-11-12Add a version numberAndrew Duggan
2014-11-10Check the interrupt sources in WaitforIdle to ensure F34 generated the interruptAndrew Duggan
2014-11-10Print the interrupt mask part of the function infoAndrew Duggan
2014-11-10Change GetReport to only read one report at a time and remove HIDDevice's ↵Andrew Duggan
attention report queue Simplify GetReport and only have it read a single report and let the functions which call it decide if they have gotten the data which they are looking for. Also, remove in the HIDDevice attention report queue since reports are queued in the kernel so queueing in userspace is unnecessary.
2014-10-08Stop printing attention reports if GetAttentionReport failsAndrew Duggan
2014-09-30Fix Android build errors in f54testAndrew Duggan
2014-09-30Revert "Remove f54test from Android build since it is currently not compatible"Andrew Duggan
This reverts commit a15fa80ba498286ef78a89410903c43801b95699.
2014-09-30Remove f54test from Android build since it is currently not compatibleAndrew Duggan
2014-09-30Merge pull request #6 from synasnoguchi/masterAndrew Duggan
Add f54 test
2014-09-29Add f54 test functionsSatoshi Noguchi
2014-09-29Have interrupt register number and mask in RMIFunctionSatoshi Noguchi
2014-09-29Have register base addresses in 16 bit in RMIFunctionSatoshi Noguchi