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, 4 Jan 2022 01:32:14 +0000
From:   "lizhijian@...itsu.com" <lizhijian@...itsu.com>
To:     Tom Talpey <tom@...pey.com>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "zyjzyj2000@...il.com" <zyjzyj2000@...il.com>,
        "jgg@...pe.ca" <jgg@...pe.ca>,
        "aharonl@...dia.com" <aharonl@...dia.com>,
        "leon@...nel.org" <leon@...nel.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "mbloch@...dia.com" <mbloch@...dia.com>,
        "liweihang@...wei.com" <liweihang@...wei.com>,
        "liangwenpeng@...wei.com" <liangwenpeng@...wei.com>,
        "yangx.jy@...itsu.com" <yangx.jy@...itsu.com>,
        "rpearsonhpe@...il.com" <rpearsonhpe@...il.com>,
        "y-goto@...itsu.com" <y-goto@...itsu.com>
Subject: Re: [RFC PATCH rdma-next 05/10] RDMA/rxe: Allow registering
 persistent flag for pmem MR only



On 31/12/2021 22:40, Tom Talpey wrote:
> On 12/30/2021 10:34 PM, lizhijian@...itsu.com wrote:
>
>>>>    +static bool ib_check_flush_access_flags(struct ib_mr *mr, u32 flags)
>>>> +{
>>>> +    return mr->is_pmem || !(flags & IB_ACCESS_FLUSH_PERSISTENT);
>>>> +}
>
>>> Its name is confusing and needs to be clarified.
>>
>> Err,  let me see.... a more suitable name is very welcome.
>
> Since the subroutine is rather simple, and with only a single
> reference in a single file, it would be best to just pull
> the test inline and delete it. This would also remove some
> inefficient code.
>
>      if (flags & IB_ACCESS_FLUSH_PERSISTENT) {
>         if (!iova_in_pmem(mr, iova, length) {
>             pr_err("Cannot set IB_ACCESS_FLUSH_PERSISTENT for non-pmem memory\n");
>             mr->state = RXE_MR_STATE_INVALID;
>             mr->umem = NULL;
>             err = -EINVAL;
>             goto err_release_umem;
>         }
>         mr-> ibmr.is_pmem = true;
>     }
> ...

Make sense.

Thanks
Zhijian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ