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: <20210604040636epcms2p7bcf940a2cd060336f79250de0060e08c@epcms2p7>
Date:   Fri, 04 Jun 2021 13:06:36 +0900
From:   Daejun Park <daejun7.park@...sung.com>
To:     Bart Van Assche <bvanassche@....org>,
        Daejun Park <daejun7.park@...sung.com>,
        Greg KH <gregkh@...uxfoundation.org>,
        "avri.altman@....com" <avri.altman@....com>,
        "jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        "asutoshd@...eaurora.org" <asutoshd@...eaurora.org>,
        "stanley.chu@...iatek.com" <stanley.chu@...iatek.com>,
        "cang@...eaurora.org" <cang@...eaurora.org>,
        "huobean@...il.com" <huobean@...il.com>,
        ALIM AKHTAR <alim.akhtar@...sung.com>
CC:     "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        JinHwan Park <jh.i.park@...sung.com>,
        Javier Gonzalez <javier.gonz@...sung.com>,
        Sung-Jun Park <sungjun07.park@...sung.com>,
        Jinyoung CHOI <j-young.choi@...sung.com>,
        Dukhyun Kwon <d_hyun.kwon@...sung.com>,
        Keoseong Park <keosung.park@...sung.com>,
        Jaemyung Lee <jaemyung.lee@...sung.com>,
        Jieon Seol <jieon.seol@...sung.com>
Subject: RE: Re: [PATCH v35 3/4] scsi: ufs: Prepare HPB read for cached
 sub-region

>>> +/*
>>>> + * This function will set up HPB read command using host-side L2P map data.
>>>> + * In HPB v1.0, maximum size of HPB read command is 4KB.
>>>> + */
>>>> +void ufshpb_prep(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
>>>> +{
>>> [ ... ]
>>>> +
>>>> +        ufshpb_set_hpb_read_to_upiu(hpb, lrbp, lpn, ppn, transfer_len);
>>>
>>> 'transfer_len' has type int and is truncated to type 'u8' when passed as
>>> an argument to ufshpb_set_hpb_read_to_upiu(). Please handle transfer_len
>>> values >= 256 properly.
>> 
>> Before entering the function, ufshpb_is_supported_chunk() checks whether
>> transfer_len <= hpb->pre_req_max_tr_len which is set to
>> HPB_MULTI_CHUNK_HIGH (128) on initalization.
> 
>How about adding a WARN_ON_ONCE() in ufshpb_prep() that verifies that
>transfer_len is <= HPB_MULTI_CHUNK_HIGH?

Sure, I will add WARN_ON_ONCE() just after calling ufshpb_is_supported_chunk().

Thanks

> 
>Thanks,
> 
>Bart.
> 
> 
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ