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:   Tue, 17 Mar 2020 07:55:57 -0700
From:   James Bottomley <jejb@...ux.ibm.com>
To:     Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Jens Axboe <axboe@...nel.dk>
Cc:     Michael Schmitz <schmitzmic@...il.com>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Christoph Hellwig <hch@....de>, linux-ide@...r.kernel.org,
        linux-m68k@...ts.linux-m68k.org, linux-kernel@...r.kernel.org,
        "Martin K . Petersen" <martin.petersen@...cle.com>
Subject: Re: [PATCH v4 03/27] ata: make SATA_PMP option selectable only if
 any SATA host driver is enabled

On Tue, 2020-03-17 at 15:43 +0100, Bartlomiej Zolnierkiewicz wrote:
> There is no reason to expose SATA_PMP config option when no SATA
> host drivers are enabled. To fix it add SATA_HOST config option,
> make all SATA host drivers select it and finally make SATA_PMP
> config options depend on it.
> 
> This also serves as preparation for the future changes which
> optimize libata core code size on PATA only setups.
> 
> CC: "James E.J. Bottomley" <jejb@...ux.ibm.com>
> Reviewed-by: Martin K. Petersen <martin.petersen@...cle.com> # for
> SCSI bits
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
> ---
>  drivers/ata/Kconfig         | 40
> +++++++++++++++++++++++++++++++++++++
>  drivers/scsi/Kconfig        |  1 +
>  drivers/scsi/libsas/Kconfig |  1 +
>  3 files changed, 42 insertions(+)
> 
> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
> index a6beb2c5a692..ad7760656f71 100644
> --- a/drivers/ata/Kconfig
> +++ b/drivers/ata/Kconfig
> @@ -34,6 +34,9 @@ if ATA
>  config ATA_NONSTANDARD
>         bool
>  
> +config SATA_HOST
> +	bool
> +
>  config ATA_VERBOSE_ERROR
>  	bool "Verbose ATA error reporting"
>  	default y
> @@ -73,6 +76,7 @@ config SATA_ZPODD
>  
>  config SATA_PMP
>  	bool "SATA Port Multiplier support"
> +	depends on SATA_HOST
>  	default y
>  	help
>  	  This option adds support for SATA Port Multipliers
> @@ -85,6 +89,7 @@ comment "Controllers with non-SFF native interface"
>  config SATA_AHCI
>  	tristate "AHCI SATA support"
>  	depends on PCI
> +	select SATA_HOST
>  	help
>  	  This option enables support for AHCI Serial ATA.

This is a bit fragile and not the way Kconfig should be done.  The
fragility comes because anyone adding a new host has also to remember
to add the select, and there will be no real consequences for not doing
so.  The way to get rid of the fragility is to make SATA_HOST a
menuconfig option enclosing all the hosts, which makes the patch much
smaller as well.  The hint implies you want to separate out all the
PATA drivers, which also makes a menuconfig sound like the better
option.

I've also got to say that the problem doesn't seem to be one ... even
if some raving lunatic disables all SATA hosts and then enables PMP it
doesn't cause any problems does it?

James

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ