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]
Date:   Mon, 8 Jan 2018 08:38:39 +0100
From:   Hannes Reinecke <hare@...e.de>
To:     Jason Yan <yanaijie@...wei.com>, martin.petersen@...cle.com,
        jejb@...ux.vnet.ibm.com
Cc:     linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        john.garry@...wei.com, zhaohongjiang@...wei.com, hare@...e.com,
        dan.j.williams@...el.com, jthumshirn@...e.de,
        Raj.Dinesh@...rosemi.com, hch@....de, huangdaode@...ilicon.com,
        chenxiang66@...ilicon.com, xiyou.wangcong@...il.com,
        Ewan Milne <emilne@...hat.com>, Tomas Henzl <thenzl@...hat.com>
Subject: Re: [PATCH v5 2/7] scsi: libsas: shut down the PHY if events reached
 the threshold

On 12/15/2017 01:18 PM, Hannes Reinecke wrote:
> On 12/08/2017 10:42 AM, Jason Yan wrote:
>> If the PHY burst too many events, we will alloc a lot of events for the
>> worker. This may leads to memory exhaustion.
>>
>> Dan Williams suggested to shut down the PHY if the events reached the
>> threshold, because in this case the PHY may have gone into some
>> erroneous state. Users can re-enable the PHY by sysfs if they want.
>>
>> We cannot use the fixed memory pool because if we run out of events, the
>> shut down event and loss of signal event will lost too. The events still
>> need to be allocated and processed in this case.
>>
>> Suggested-by: Dan Williams <dan.j.williams@...el.com>
>> Signed-off-by: Jason Yan <yanaijie@...wei.com>
>> CC: John Garry <john.garry@...wei.com>
>> CC: Johannes Thumshirn <jthumshirn@...e.de>
>> CC: Ewan Milne <emilne@...hat.com>
>> CC: Christoph Hellwig <hch@....de>
>> CC: Tomas Henzl <thenzl@...hat.com>
>> ---
>>  drivers/scsi/libsas/sas_init.c | 33 ++++++++++++++++++++++++++++++++-
>>  drivers/scsi/libsas/sas_phy.c  | 27 ++++++++++++++++++++++++++-
>>  include/scsi/libsas.h          |  6 ++++++
>>  3 files changed, 64 insertions(+), 2 deletions(-)
>>
> Well, this still looks a bit error prone; what if the system runs out of
> memory before the pool is exhausted?
> (Also a threshold of 1024 events is a bit arbitrary; one might want to
> adjust that).
> 
> Couldn't you allocate two static events always (for shutdown and signal
> loss), and then use a fixed pool?
> 
Has actually been resolved by the next patch.

Reviewed-by: Hannes Reinecke <hare@...e.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@...e.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ