Skip to content

Commit

Permalink
tools/lib/lockdep: drop liblockdep
Browse files Browse the repository at this point in the history
TL;DR: While a tool like liblockdep is useful, it probably doesn't
belong within the kernel tree.

liblockdep attempts to reuse kernel code both directly (by directly
building the kernel's lockdep code) as well as indirectly (by using
sanitized headers). This makes liblockdep an integral part of the
kernel.

It also makes liblockdep quite unique: while other userspace code might
use sanitized headers, it generally doesn't attempt to use kernel code
directly which means that changes on the kernel side of things don't
affect (and break) it directly.

All our workflows and tooling around liblockdep don't support this
uniqueness. Changes that go into the kernel code aren't validated to not
break in-tree userspace code.

liblockdep ended up being very fragile, breaking over and over, to the
point that living in the same tree as the lockdep code lost most of it's
value.

liblockdep should continue living in an external tree, syncing with
the kernel often, in a controllable way.

Signed-off-by: Sasha Levin <sashal@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Sasha Levin authored and Linus Torvalds committed Nov 12, 2021
1 parent d9c8e52 commit 7246f4d
Show file tree
Hide file tree
Showing 39 changed files with 3 additions and 1,229 deletions.
5 changes: 0 additions & 5 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -10799,11 +10799,6 @@ F: drivers/ata/
F: include/linux/ata.h
F: include/linux/libata.h

LIBLOCKDEP
M: Sasha Levin <alexander.levin@microsoft.com>
S: Maintained
F: tools/lib/lockdep/

LIBNVDIMM BLK: MMIO-APERTURE DRIVER
M: Dan Williams <dan.j.williams@intel.com>
M: Vishal Verma <vishal.l.verma@intel.com>
Expand Down
16 changes: 3 additions & 13 deletions tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ help:
@echo ' intel-speed-select - Intel Speed Select tool'
@echo ' kvm_stat - top-like utility for displaying kvm statistics'
@echo ' leds - LEDs tools'
@echo ' liblockdep - user-space wrapper for kernel locking-validator'
@echo ' objtool - an ELF object analysis tool'
@echo ' pci - PCI tools'
@echo ' perf - Linux performance measurement and analysis tool'
Expand Down Expand Up @@ -72,9 +71,6 @@ cgroup counter firewire hv guest bootconfig spi usb virtio vm bpf iio gpio objto
bpf/%: FORCE
$(call descend,$@)

liblockdep: FORCE
$(call descend,lib/lockdep)

libapi: FORCE
$(call descend,lib/api)

Expand All @@ -101,7 +97,7 @@ freefall: FORCE
kvm_stat: FORCE
$(call descend,kvm/$@)

all: acpi cgroup counter cpupower gpio hv firewire liblockdep \
all: acpi cgroup counter cpupower gpio hv firewire \
perf selftests bootconfig spi turbostat usb \
virtio vm bpf x86_energy_perf_policy \
tmon freefall iio objtool kvm_stat wmi \
Expand All @@ -116,9 +112,6 @@ cpupower_install:
cgroup_install counter_install firewire_install gpio_install hv_install iio_install perf_install bootconfig_install spi_install usb_install virtio_install vm_install bpf_install objtool_install wmi_install pci_install debugging_install tracing_install:
$(call descend,$(@:_install=),install)

liblockdep_install:
$(call descend,lib/lockdep,install)

selftests_install:
$(call descend,testing/$(@:_install=),install)

Expand All @@ -135,7 +128,7 @@ kvm_stat_install:
$(call descend,kvm/$(@:_install=),install)

install: acpi_install cgroup_install counter_install cpupower_install gpio_install \
hv_install firewire_install iio_install liblockdep_install \
hv_install firewire_install iio_install \
perf_install selftests_install turbostat_install usb_install \
virtio_install vm_install bpf_install x86_energy_perf_policy_install \
tmon_install freefall_install objtool_install kvm_stat_install \
Expand All @@ -151,9 +144,6 @@ cpupower_clean:
cgroup_clean counter_clean hv_clean firewire_clean bootconfig_clean spi_clean usb_clean virtio_clean vm_clean wmi_clean bpf_clean iio_clean gpio_clean objtool_clean leds_clean pci_clean firmware_clean debugging_clean tracing_clean:
$(call descend,$(@:_clean=),clean)

liblockdep_clean:
$(call descend,lib/lockdep,clean)

libapi_clean:
$(call descend,lib/api,clean)

Expand Down Expand Up @@ -185,7 +175,7 @@ build_clean:
clean: acpi_clean cgroup_clean counter_clean cpupower_clean hv_clean firewire_clean \
perf_clean selftests_clean turbostat_clean bootconfig_clean spi_clean usb_clean virtio_clean \
vm_clean bpf_clean iio_clean x86_energy_perf_policy_clean tmon_clean \
freefall_clean build_clean libbpf_clean libsubcmd_clean liblockdep_clean \
freefall_clean build_clean libbpf_clean libsubcmd_clean \
gpio_clean objtool_clean leds_clean wmi_clean pci_clean firmware_clean debugging_clean \
intel-speed-select_clean tracing_clean

Expand Down
2 changes: 0 additions & 2 deletions tools/lib/lockdep/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion tools/lib/lockdep/Build

This file was deleted.

162 changes: 0 additions & 162 deletions tools/lib/lockdep/Makefile

This file was deleted.

29 changes: 0 additions & 29 deletions tools/lib/lockdep/common.c

This file was deleted.

54 changes: 0 additions & 54 deletions tools/lib/lockdep/include/liblockdep/common.h

This file was deleted.

Loading

0 comments on commit 7246f4d

Please sign in to comment.