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] [day] [month] [year] [list]
Message-ID: <CAPcyv4jGOy+WsdFrPfS9Pr9UiJHrogfdYqUcXxC0GxBsFefpWw@mail.gmail.com>
Date:   Thu, 29 Aug 2019 16:35:00 -0700
From:   Dan Williams <dan.j.williams@...el.com>
To:     Jens Axboe <axboe@...nel.dk>
Cc:     Stephen Douthit <stephend@...icom-usa.com>,
        Christoph Hellwig <hch@...radead.org>,
        "IDE/ATA development list" <linux-ide@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] libata/ahci: Drop PCS quirk for Denverton and beyond

On Thu, Aug 29, 2019 at 4:33 PM Dan Williams <dan.j.williams@...el.com> wrote:
>
> The Linux ahci driver has historically implemented a configuration fixup
> for platforms / platform-firmware that fails to enable the ports prior
> to OS hand-off at boot. The fixup was originally implemented way back
> before ahci moved from drivers/scsi/ to drivers/ata/, and was updated in
> 2007 via commit 49f290903935 "ahci: update PCS programming". The quirk
> sets a port-enable bitmap in the PCS register at offset 0x92.
>
> This quirk could be applied generically up until the arrival of the
> Denverton (DNV) platform. The DNV AHCI controller architecture supports
> more than 6 ports and along with that the PCS register location and
> format were updated to allow for more possible ports in the bitmap. DNV
> AHCI expands the register to 32-bits and moves it to offset 0x94.
>
> As it stands there are no known problem reports with existing Linux
> trying to set bits at offset 0x92 which indicates that the quirk is not
> applicable. Likely it is not applicable on a wider range of platforms,
> but it is difficult to discern which platforms if any still depend on
> the quirk.
>
> Rather than try to fix the PCS quirk to consider the DNV register layout
> instead require explicit opt-in. The assumption is that the OS driver
> need not touch this register, and platforms can be added with a new
> boad_ahci_pcs7 board-id when / if problematic platforms are found in the
> future. The logic in ahci_intel_pcs_quirk() looks for all Intel AHCI
> instances with "legacy" board-ids and otherwise skips the quirk if the
> board was matched by class-code.
>
> Reported-by: Stephen Douthit <stephend@...icom-usa.com>
> Cc: Christoph Hellwig <hch@...radead.org>
> Signed-off-by: Dan Williams <dan.j.williams@...el.com>
> ---
> Changes since v1 [1]:
> - Find a way to not duplicate a large portion of the ahci_pci_tbl[]
>   array (Stephen).
> - Add a definition for the PCS register offset rather than hard code
>   (Stephen)
>
> [1]: https://lore.kernel.org/r/a04c0ae7-ef4d-4275-de05-b74beaeef86c@silicom-usa.com/
>
>  drivers/ata/ahci.c |   70 ++++++++++++++++++++++++++++++++--------------------
>  drivers/ata/ahci.h |    2 +
>  2 files changed, 45 insertions(+), 27 deletions(-)
>
> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
> index f7652baa6337..847e3796d505 100644
> --- a/drivers/ata/ahci.c
> +++ b/drivers/ata/ahci.c
> @@ -65,6 +65,12 @@ enum board_ids {
>         board_ahci_sb700,       /* for SB700 and SB800 */
>         board_ahci_vt8251,
>
> +       /*
> +        * board IDs for Intel chipsets that support more than 6 ports
> +        * *and* end up needing the PCS quirk.
> +        */

Ugh, sorry, I just realized I did not opt Denverton out of this... v3
on the way.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ