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: <DM6PR04MB65752E6128BD92A801221ECDFC329@DM6PR04MB6575.namprd04.prod.outlook.com>
Date:   Sun, 13 Jun 2021 10:20:53 +0000
From:   Avri Altman <Avri.Altman@....com>
To:     "yohan.joung@...com" <yohan.joung@...com>,
        "daejun7.park@...sung.com" <daejun7.park@...sung.com>
CC:     "alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
        "asutoshd@...eaurora.org" <asutoshd@...eaurora.org>,
        "bvanassche@....org" <bvanassche@....org>,
        "cang@...eaurora.org" <cang@...eaurora.org>,
        "d_hyun.kwon@...sung.com" <d_hyun.kwon@...sung.com>,
        Greg KH <gregkh@...uxfoundation.org>,
        "huobean@...il.com" <huobean@...il.com>,
        "j-young.choi@...sung.com" <j-young.choi@...sung.com>,
        "jaemyung.lee@...sung.com" <jaemyung.lee@...sung.com>,
        "javier.gonz@...sung.com" <javier.gonz@...sung.com>,
        "jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
        "jh.i.park@...sung.com" <jh.i.park@...sung.com>,
        "jieon.seol@...sung.com" <jieon.seol@...sung.com>,
        "keosung.park@...sung.com" <keosung.park@...sung.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        "stanley.chu@...iatek.com" <stanley.chu@...iatek.com>,
        "sungjun07.park@...sung.com" <sungjun07.park@...sung.com>,
        "jaeyoung21.choi@...com" <jaeyoung21.choi@...com>
Subject: RE: [PATCH v37 3/4] scsi: ufs: Prepare HPB read for cached sub-region

> >+      /*
> >+       * If the region state is active, mctx must be allocated.
> >+       * In this case, check whether the region is evicted or
> >+       * mctx allcation fail.
> >+       */
> >+      if (unlikely(!srgn->mctx)) {
> >+              dev_err(&hpb->sdev_ufs_lu->sdev_dev,
> >+                      "no mctx in region %d subregion %d.\n",
> >+                      srgn->rgn_idx, srgn->srgn_idx);
> >+              return true;
> >+      }
> >+
> >+      if ((srgn_offset + cnt) > bitmap_len)
> >+              bit_len = bitmap_len - srgn_offset;
> >+      else
> >+              bit_len = cnt;
> >+
> >+      if (find_next_bit(srgn->mctx->ppn_dirty, bitmap_len,
> >+                        srgn_offset) < bit_len + srgn_offset)
> >+              return true;
> >+
> 
> It seems unnecessary to search through bitmap_len
> How about searching by transfer size?
> 
> if (find_next_bit(srgn->mctx->ppn_dirty,
>               bit_len + srgn_offset, srgn_offset) < bit_len + srgn_offset)
Isn't bit_len should be used for size, and not bit_len + srgn_offset ?

Thanks,
Avri

> 
> Thanks
> Yohan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ