Closed necipfazil closed 2 years ago
Another one:
selector: PMAC_BACKLIGHT
selectee: FB_BACKLIGHT
linux version: v4.16
arch: arm64
Reproduce the bug
A .config
file that exercise the bug: PMAC_selects_FB.tar.gz
make ARCH=arm64 olddefconfig
output with the above .config file:
warning: (PMAC_BACKLIGHT && DRM_NOUVEAU && HT16K33 && FB_TFT) selects FB_BACKLIGHT which has unmet direct dependencies (HAS_IOMEM && FB)
kismet can't find it:
kismet -a arm64 --selectees CONFIG_FB_BACKLIGHT --selectors CONFIG_PMAC_BACKLIGHT
kismet output:
INFO: Computing the build system id for the Linux source..
INFO: Build system id: f4bb5ef64868
INFO: Kismet will analyze the select constructs of the architecture "arm64" for unmet direct dependency.
INFO: All times reported are measured using Python's time.perf_counter() utility.
INFO: Prefetching the architecture kclause formulas.
INFO: Architecture kclause formulas were loaded. (2.20sec)
INFO: Identifying the select constructs.
INFO: Identification of the select constructs was done in 0.01sec. 1 constructs were found. unmet safe due to syntactical pass: 0. alarms: 1.
INFO: Doing optimized SAT pass for 1 constructs
INFO: 12:09:08 Optimized SAT pass progress: 1/1 (%100).
INFO: Optimized SAT test was done in 0.01sec. 1 constructs with alarms were checked. unmet safe due to optimized SAT test: 0. alarms: 1.
INFO: Doing precise SAT pass for 1 constructs
INFO: 12:09:09 Precise SAT pass progress: 1/1 (%100).
INFO: Precise SAT test was done in 1.04sec. 1 constructs with alarms were checked. unmet safe due to precise SAT test: 1. alarms: 0.
INFO: During precise SAT test, 0 models were generated.
INFO: Skipping test case generation since there are no models to generate test cases for.
INFO: Skipping verification since there are no test cases to verify.
INFO: Writing the aggregated summary txt to "kismet_summary_arm64.txt".
INFO: Aggregated summary txt was written.
INFO: Writing the summary csv to "kismet_summary_arm64.csv".
INFO: Summary csv was written.
Unmet dependency warnings in the old format seem to be misleading.
For example, in the first post of this issue, the provided config file results in the following message:
warning: (DRM_RADEON && DRM_AMDGPU && DRM_NOUVEAU && DRM_I915 && DRM_GMA500 && DRM_SHMOBILE && DRM_TILCDC && DRM_FSL_DCU && DRM_TINYDRM && DRM_PARADE_PS8622 && FB_BACKLIGHT && FB_ARMCLCD && FB_MX3 && USB_APPLEDISPLAY && FB_OLPC_DCON && ACPI_CMPC && SAMSUNG_Q10) selects BACKLIGHT_CLASS_DEVICE which has unmet direct dependencies (HAS_IOMEM && BACKLIGHT_LCD_SUPPORT)
This would suggest DRM_RADEON selecting BACKLIGHT_CLASS_DEVICE without meeting BACKLIGHT_CLASS_DEVICE's dependencies. However, in the config file, DRM_RADEON is off. Therefore, these are not false negatives of kismet.
In fact, the unmet dependency warning message format seem to be changed because of this: https://github.com/torvalds/linux/commit/f8f69dc0b4e070d4a4d39889a85424913cc922d5 (see the commit message, which explains why this old format is problematic ([..] Second, we see false positives.[..]
)).
These are not false negatives of kismet but false positives of old Kconfig warnings. Such risk of misinterpretations of old Kconfig warnings are now avoided by having kismet patch Kconfig code to always print warnings in the new format. See https://github.com/paulgazz/kmax/pull/166/commits/13215f3f542ab78942ed36f9e95a34d1ad1a3a33 in https://github.com/paulgazz/kmax/pull/166
kismet marks a select construct safe although there is an unmet dependency bug.
Details:
Reproducing bug by a given
.config
file, which is missed by kismet:git checkout v4.16
inside linux git copy).config
: udd_DRM_selects_BACKLIGHT_config.tar.gzmake ARCH=x86_64 olddefconfig
) inside the linux directoryOutput (see the 4th line):
Running kismet (kismet can't find the bug): This can be reproduced after merging https://github.com/paulgazz/kmax/pull/166
Logs (says no alarm):