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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 26 Jul 2022 10:55:21 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Damien Le Moal <damien.lemoal@...nsource.wdc.com>,
        linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 1/1] ata: libata-scsi: Refactor scsi_6_lba_len() with
 use of get_unaligned_be24()

On Tue, Jul 26, 2022 at 06:45:18PM +0300, Andy Shevchenko wrote:
>  static void scsi_6_lba_len(const u8 *cdb, u64 *plba, u32 *plen)
>  {
> +	*plba = get_unaligned_be24(cdb[1]) & 0x1fffff;
> +	*plen = cdb[4];

I think just pen coding this in the caller would be a lot cleaner.

Same for scsi_10_lba_len and scsi_16_lba_len in their two callers each.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ