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]
Message-ID: <bba5f248-523d-0def-1a3e-bafeb2b7633f@huawei.com>
Date:   Tue, 20 Apr 2021 09:14:12 +0100
From:   John Garry <john.garry@...wei.com>
To:     Ming Lei <ming.lei@...hat.com>
CC:     <jejb@...ux.ibm.com>, <martin.petersen@...cle.com>,
        <linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <kashyap.desai@...adcom.com>, <dgilbert@...erlog.com>
Subject: Re: [PATCH] scsi: core: Cap initial sdev queue depth at
 shost.can_queue

On 20/04/2021 01:02, Ming Lei wrote:
> On Tue, Apr 20, 2021 at 12:06:24AM +0800, John Garry wrote:
>> Function sdev_store_queue_depth() enforces that the sdev queue depth cannot
>> exceed shost.can_queue.
>>
>> However, the LLDD may still set cmd_per_lun > can_queue, which leads to an
>> initial sdev queue depth greater than can_queue.
>>
>> Stop this happened by capping initial sdev queue depth at can_queue.
>>
>> Signed-off-by: John Garry <john.garry@...wei.com>
>> ---
>> Topic originally discussed at:
>> https://lore.kernel.org/linux-scsi/85dec8eb-8eab-c7d6-b0fb-5622747c5499@interlog.com/T/#m5663d0cac657d843b93d0c9a2374f98fc04384b9
>>
>> Last idea there was to error/warn in scsi_add_host() for cmd_per_lun >
> 

Hi Ming,

> No, that isn't my suggestion.

Right, it was what I mentioned.

> 
>> can_queue. However, such a shost driver could still configure the sdev
>> queue depth to be sound value at .slave_configure callback, so now thinking
>> the orig patch better.
> 
> As I mentioned last time, why can't we fix ->cmd_per_lun in
> scsi_add_host() using .can_queue?
> 

I would rather not change the values which are provided from the driver. 
I would rather take the original values and try to use them in a sane way.

I have not seen other places where driver shost config values are 
modified by the core code.

Thanks,
John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ