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: <Y3zgzyMN71AmIFPI@nvidia.com>
Date:   Tue, 22 Nov 2022 10:46:39 -0400
From:   Jason Gunthorpe <jgg@...dia.com>
To:     Li Zhijian <lizhijian@...itsu.com>
Cc:     zyjzyj2000@...il.com, leon@...nel.org,
        Bob Pearson <rpearsonhpe@...il.com>,
        linux-rdma@...r.kernel.org, Mark Bloch <mbloch@...dia.com>,
        Tom Talpey <tom@...pey.com>, tomasz.gromadzki@...el.com,
        Dan Williams <dan.j.williams@...el.com>,
        Xiao Yang <yangx.jy@...itsu.com>, y-goto@...itsu.com,
        linux-kernel@...r.kernel.org
Subject: Re: [for-next PATCH v6 04/10] RDMA/rxe: Allow registering persistent
 flag for pmem MR only

On Wed, Nov 16, 2022 at 04:19:45PM +0800, Li Zhijian wrote:
>  int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length, u64 iova,
>  		     int access, struct rxe_mr *mr)
>  {
> @@ -148,16 +157,25 @@ int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length, u64 iova,
>  	num_buf			= 0;
>  	map = mr->map;
>  	if (length > 0) {
> -		buf = map[0]->buf;
> +		bool persistent_access = access & IB_ACCESS_FLUSH_PERSISTENT;
>  
> +		buf = map[0]->buf;
>  		for_each_sgtable_page (&umem->sgt_append.sgt, &sg_iter, 0) {
> +			struct page *pg = sg_page_iter_page(&sg_iter);
> +
> +			if (persistent_access && !is_pmem_page(pg)) {
> +				pr_debug("Unable to register persistent access to non-pmem device\n");
> +				err = -EINVAL;
> +				goto err_release_umem;

This should use rxe_dbg_mr()

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ