forked from aryanshar/libfprint
-
Notifications
You must be signed in to change notification settings - Fork 15
Upgrade libfprint fork to 1.94.1 for latest fprintd compatibility #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The timeout is designed to continue commands automatically that are common (e.g. opening the device). This doesn't really make sense for scan commands, and removing the timeout enables test setups where user interaction with the device may happen at arbitrary times. One exception is device removal/unplug, in which case the timeout will be added anyway.
This just simplifies matters a bit when one messes up during test development.
This temperature model has three states: * COLD * WARM * HOT Device drivers can define the time it requires for the device to get HOT and COLD. The underlying model assumes an exponential warming and cooling process and enforces a cool-off time after the device has reached the HOT state. This cool down period is however shorter than the specified time in the driver.
This will allow libfprint to cancel operations internally in the future. If the internal cancellation method is used, then the private current_cancellation_reason variable must be set to the GError. This error will be returned when set.
This error code will be thrown if we refuse an operation to protect the device from overheating.
Devices that are considered to never run hot will have FEATURE_ALWAYS_ON set. If set, the UI can safely assume that it is fine to run fingerprint authentication in the background without other user interaction. Closes: #346
Check if a device is too hot. If it is too hot already, refuse operation. If it becomes too hot while an operation is ongoing, then cancel the action and force a FP_DEVICE_ERROR_TOO_HOT return value.
This is more for demonstration purposes. The only functional change here would be that the delete command cannot be cancelled.
The suspend/resume code tries to set sysfs attributes. To do so, the full hierarchy is needed in order to build the corresponding sysfs path.
The assumption here is that in most cases, we will just cancel any ongoing operation. However, if the device choses to implement suspend/resume handling and it returns success, then operations will not be cancelled. Note that suspend/resume requests cannot be cancelled. Closes: #256
Also update the critical section test to check the order in which the requests are processed.
We only allow suspending while we are in the interrupt transfer stage. To suspend, we cancel the interrupt transfer and at resume time we restart it. This has been tested to work correctly on an X1 Carbon 8th Gen with suspend mode set to "Windows 10" (i.e. S0ix [s2idle] and not S3 [suspend to RAM]). With S3 suspend, the USB root hub appears to be turned off or reset and the device will be unresponsive afterwards (if it returns). To avoid issues, libfprint disables the "persist" mode in the kernel and we'll see a new device instead after resume.
Not having the artifacts means not having the log on failures. So always expose them (even if in some cases we might only need them on failure).
The error may not be NULL, as such we need a second variable and then we'll only forward any error from g_usb_device_release_interface if there was none before.
This matches the expectation. i.e. we return no-match and we do not return a scanned print as we don't have anything for it. If we did indeed return a scanned print, then fprintd would try to delete it during enroll and would then fail. Note that we do *not* return a DATA_NOT_FOUND error in the storage device if the print does not exist. This is because not all devices support reporting this error. It is therefore more sensible to handle it gracefully and expect test setups to set the error explicitly for testing purposes.
It should be included in files requiring it only.
…sts" This reverts commit 0dcb4be.
This reverts commit 8f93aef.
This capture was made using a "COBO" branded device, and uses the new pcapng format.
It appears the kernel automatically "fixes" this mistake and it works. the transfer in question is an interrupt transfer and should be submitted as such. Do that in order to make things more correct and so that the test can run.
This test requires control transfer replay fixes that will be contained in umockdev 0.16.3. Bump the requirement accordingly. Closes: #412
This is inelegant, but allows API consumers to match the FpDevice with an OS device.
And update instructions for the simpler method. Co-authored-by: Benjamin Berg <[email protected]>
This fixes the flatpak build.
Really, it shouldn't matter, as there is no return. But adding the NULL initializer does not harm either.
It is needed by tests/test-generated-hwdb.sh and is not pulled in indirectly anymore.
Otherwise forks will not find the image and things fall apart (due to the method of how we build the image).
63BC: Dell XPS series fingerprint sensor
This allows creating tests both for image and non-image devices using the same script.
This is needed for the fprintd duplicate checking code. The information is needed to delete stale prints automatically from the device. Related: #415
While useful, there are advantages for this to be done by the surrounding code (i.e. fprintd). As such, remove the identify stage from the goodix driver and rely on fprintd doing it for us. One can probably argue that neither solution is perfect. Ideally, we would probably return the information required to delete the old print to the upper stack and let the driver/device handle the duplicate checking. However, for now this works well. We may need to reconsider this if we get devices that do the duplicate checking transparently and just throw an enroll error. NOTE: The driver did not report any progress for the identify step. As such, the number of enroll steps reported by the device remain the same. Closes: #415
…rint Tag 1.94.1 Git-EVTag-v0-SHA512: 61421fde06e2f4b0fc1ff53930c8df55a82f98a9032afd47d1f147c46e7f000e9410bc3e1a0236c0b563b341391eff6c4d7dcd6e4600dcd55c3758212071c15e
0x00002a
pushed a commit
to 0x00002a/libfprint
that referenced
this pull request
Nov 6, 2022
Upgrade libfprint fork to 1.94.1 for latest fprintd compatibility
sarovin
pushed a commit
to sarovin/libfprint
that referenced
this pull request
Mar 23, 2025
../libfprint/drivers/synaptics/bmkt_message.c:260:5: runtime error: null pointer passed as argument 2, which is declared to never be null
#0 0x7fd21f154592 in bmkt_compose_message ../libfprint/drivers/synaptics/bmkt_message.c:260
goodix-fp-linux-dev#1 0x7fd21f14596c in synaptics_sensor_cmd ../libfprint/drivers/synaptics/synaptics.c:417
goodix-fp-linux-dev#2 0x7fd21f14d93f in dev_probe ../libfprint/drivers/synaptics/synaptics.c:1329
goodix-fp-linux-dev#3 0x7fd21f0ca61d in device_idle_probe_cb ../libfprint/fp-device.c:375
goodix-fp-linux-dev#4 0x7fd21f21a431 in timeout_dispatch ../libfprint/fpi-device.c:336
goodix-fp-linux-dev#5 0x7fd2269cf70b in g_main_dispatch ../../glib/glib/gmain.c:3373
goodix-fp-linux-dev#6 0x7fd2269d18de in g_main_context_dispatch_unlocked ../../glib/glib/gmain.c:4224
goodix-fp-linux-dev#7 0x7fd2269d18de in g_main_context_iterate_unlocked ../../glib/glib/gmain.c:4289
goodix-fp-linux-dev#8 0x7fd2269d1fef in g_main_context_iteration ../../glib/glib/gmain.c:4354
goodix-fp-linux-dev#9 0x7fd21f0c5a85 in fp_context_enumerate ../libfprint/fp-context.c:575
sarovin
pushed a commit
to sarovin/libfprint
that referenced
this pull request
Mar 23, 2025
We had some read issues, so let's just use the safer reader that
makes things cleaner too
../libfprint/drivers/goodixmoc/goodix_proto.c:418:42: runtime error:
load of misaligned address 0x0000115ced29 for type 'uint16_t', which
requires 2 byte alignment
0x0000115ced29: note: pointer points here
00 c0 3f 00 21 64 1c 00 00 00 00 64 00 43 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^
#0 0x7f974ff9e868 in gx_proto_parse_body ../libfprint/drivers/goodixmoc/goodix_proto.c:418
goodix-fp-linux-dev#1 0x7f974ff8ec79 in fp_cmd_receive_cb ../libfprint/drivers/goodixmoc/goodix.c:185
goodix-fp-linux-dev#2 0x7f975003ca0c in transfer_finish_cb ../libfprint/fpi-usb-transfer.c:352
goodix-fp-linux-dev#3 0x7f9756e57862 in g_task_return_now ../../glib/gio/gtask.c:1363
goodix-fp-linux-dev#4 0x7f9756e5789c in complete_in_idle_cb ../../glib/gio/gtask.c:1377
goodix-fp-linux-dev#5 0x7f97577f070b in g_main_dispatch ../../glib/glib/gmain.c:3373
goodix-fp-linux-dev#6 0x7f97577f28de in g_main_context_dispatch_unlocked ../../glib/glib/gmain.c:4224
goodix-fp-linux-dev#7 0x7f97577f28de in g_main_context_iterate_unlocked ../../glib/glib/gmain.c:4289
goodix-fp-linux-dev#8 0x7f97577f2fef in g_main_context_iteration ../../glib/glib/gmain.c:4354
goodix-fp-linux-dev#9 0x7f974fed4656 in fp_device_verify_sync ../libfprint/fp-device.c:1976
sarovin
pushed a commit
to sarovin/libfprint
that referenced
this pull request
Mar 23, 2025
../libfprint/drivers/uru4000.c:743:35: runtime error: left shift of 138 by 24
places cannot be represented in type 'int'
#0 0x7fa3e696e06d in imaging_run_state ../libfprint/drivers/uru4000.c:743
goodix-fp-linux-dev#1 0x7fa3e6a366f6 in __ssm_call_handler ../libfprint/fpi-ssm.c:254
goodix-fp-linux-dev#2 0x7fa3e6a38cc8 in fpi_ssm_next_state ../libfprint/fpi-ssm.c:465
goodix-fp-linux-dev#3 0x7fa3e696bd07 in sm_read_reg_cb ../libfprint/drivers/uru4000.c:515
goodix-fp-linux-dev#4 0x7fa3e6a3db74 in transfer_finish_cb ../libfprint/fpi-usb-transfer.c:352
goodix-fp-linux-dev#5 0x7fa3ed9b9862 in g_task_return_now ../../glib/gio/gtask.c:1363
goodix-fp-linux-dev#6 0x7fa3ed9b989c in complete_in_idle_cb ../../glib/gio/gtask.c:1377
goodix-fp-linux-dev#7 0x7fa3ede4a70b in g_main_dispatch ../../glib/glib/gmain.c:3373
goodix-fp-linux-dev#8 0x7fa3ede4c8de in g_main_context_dispatch_unlocked ../../glib/glib/gmain.c:4224
goodix-fp-linux-dev#9 0x7fa3ede4c8de in g_main_context_iterate_unlocked ../../glib/glib/gmain.c:4289
goodix-fp-linux-dev#10 0x7fa3ede4cfef in g_main_context_iteration ../../glib/glib/gmain.c:4354
goodix-fp-linux-dev#11 0x7fa3e68d4a1b in fp_device_capture_sync ../libfprint/fp-device.c:2048
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'd like to merge upstream changes from their v1.94.1 tag to make the fork (and its future branches) compatible with the latest 1.94 fprintd version.
I've tested it with my own driver in a different branch and it did not require any changes at all. I assume this doesn't touch the modifications done in this project