Re: [PATCH 0/3] SG_IO command filtering via sysfs
From: Theodore Y. Ts'o
Date: Fri Nov 16 2018 - 12:36:17 EST
On Fri, Nov 16, 2018 at 08:01:29AM +0100, Paolo Bonzini wrote:
> On 16/11/18 01:37, Bart Van Assche wrote:
> > All user space interfaces in the Linux kernel for storage that I'm familiar
> > with not only allow configuration of parameters but also make it easy to
> > query which parameters have been configured. The existing sysfs and configfs
> > interfaces demonstrate this. Using BPF to configure SG/IO access has a
> > significant disadvantage, namely that it is very hard to figure out what has
> > been configured. Figuring out what has been configured namely requires
> > disassembling BPF. I'm not sure anyone will be enthusiast about this.
>
> Well, that's a problem with BPF in general. With great power comes
> great obscurability.
You can also make the same complaint about kernel modules; that it's
impossible to figure exactly what a kernel modules does without
disassembling them. However, you can a one-line description of what
it does using modinfo:
% modinfo async_pq
filename: /lib/modules/4.19.0-00022-g831156939ae8/kernel/crypto/async_tx/async_pq.ko
license: GPL
description: asynchronous raid6 syndrome generation/validation
srcversion: 529102C736C4FED181C15A8
depends: raid6_pq,async_tx,async_xor
retpoline: Y
intree: Y
name: async_pq
vermagic: 4.19.0-00022-g831156939ae8 SMP mod_unload modversions
- Ted