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-next>] [day] [month] [year] [list]
Message-ID: <f9e8acb5-32d5-4a30-859f-d4336a86b31a@gmail.com>
Date:   Sun, 27 Aug 2023 11:32:05 +0200
From:   Milan Broz <gmazyland@...il.com>
To:     Alan Stern <stern@...land.harvard.edu>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-usb@...r.kernel.org, usb-storage@...ts.one-eyed-alien.net,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: usb-storage: how to extend quirks flags to 64bit?

Hello,

I tried to extend USB storage for the passthrough of Opal
security commands, and some adapters are clearly "not perfect".
I would need to introduce a new quirks flag to turn it off.

Seems that we are already out of quirks flags on 32bit
for usb storage - in usb_usual.h the last entry in mainline is
   US_FLAG(SENSE_AFTER_SYNC, 0x80000000)

Adding a new flag will work for 64-bit systems but not
for platforms with 32-bit unsigned long like i686.

How do we allow new flag definitions?

Struct us_data fflags can be made 64bit (defined in
drivers/usb/storage/usb.h), but the major problem is that these
are transferred through the generic driver_info field
defined in linux/mod_devicetable.h as unsigned long).
Making this 64bit is IMO an extensive API change (if even possible).
I guess this is not the way to go.

Could USB maintainers please help to advise what is the correct
solution? I am not familiar with the USB driver model here
and I see no easy way how it can be solved by a trivial static
allocation inside the USB storage driver.

Someone will need a new quirks flag in the future anyway... :)

Thanks,
Milan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ