lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 09 Mar 2023 16:20:25 -0500
From:   "Martin K. Petersen" <martin.petersen@...cle.com>
To:     Thomas Weißschuh <linux@...ssschuh.net>
Cc:     Jens Axboe <axboe@...nel.dk>, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Mirsad Todorovac <mirsad.todorovac@....unizg.hr>
Subject: Re: [PATCH] block: don't embed integrity_kobj into gendisk


Hi Thomas!

> A struct kobject is only supposed to be embedded into objects which
> lifetime it will manage.  Objects of type struct gendisk however are
> refcounted by their part0 block_device.  Therefore the integrity_kobj
> should not be embedded but split into its own independently managed
> object.

That's how we originally did it. However, this caused problems for a
couple of subsystems, NVMe and DM, if I remember correctly.

Managing the lifetime of request_queue vs. gendisk vs. blk_integrity
proved to be tricky. Basically at the time things were allocated we
didn't yet have all the information required to complete the block
device setup. We had to be able to send commands to the drive to finish
probing for all the relevant parameters. That dependency was the
rationale behind inlining the blk_integrity into gendisk so it was
always available. Hazy on the details, this was a long time ago.

Another option would be to reshuffle the sysfs bits. The kobj really
isn't used for anything else.

-- 
Martin K. Petersen	Oracle Linux Engineering

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ