summaryrefslogtreecommitdiff
path: root/certs/blacklist.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-09-18 12:52:17 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-21 19:32:53 +0300
commitca8e055c22155b262e14409a555bab41a52edfea (patch)
treebd9e4a3f8d744e1972256ff1a2d04afdacd10c0a /certs/blacklist.c
parent0b87a1b81ba9b9e2d1d2bc65b3b4318bb645a6e7 (diff)
downloadlinux-ca8e055c22155b262e14409a555bab41a52edfea.tar.xz
scripts: get_abi.pl: add a graph to speedup the undefined algorithm
Searching for symlinks is an expensive operation with the current logic, as it is at the order of O(n^3). In practice, running the check spends 2-3 minutes to check all symbols. Fix it by storing the directory tree into a graph, and using a Breadth First Search (BFS) to find the links for each sysfs node. With such improvement, it can now report issues with ~11 seconds on my machine. It comes with a price, though: there are more symbols reported as undefined after this change. I suspect it is due to some sysfs circular loops that are dropped by BFS. Despite such increase, it seems that the reports are now more coherent. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/f5c1e7b14a27132821c08f0459ba9aea3ed69028.1631957565.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'certs/blacklist.c')
0 files changed, 0 insertions, 0 deletions