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-next>] [day] [month] [year] [list]
Message-ID: <20230127162143.1a3bc64b@canb.auug.org.au>
Date:   Fri, 27 Jan 2023 16:21:43 +1100
From:   Stephen Rothwell <sfr@...b.auug.org.au>
To:     Andrew Morton <akpm@...ux-foundation.org>,
        Doug Ledford <dledford@...hat.com>,
        Jason Gunthorpe <jgg@...lanox.com>
Cc:     Dean Luick <dean.luick@...nelisnetworks.com>,
        Dennis Dalessandro <dennis.dalessandro@...nelisnetworks.com>,
        Leon Romanovsky <leon@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Suren Baghdasaryan <surenb@...gle.com>
Subject: linux-next: manual merge of the mm tree with the rdma tree

Hi all,

Today's linux-next merge of the mm tree got a conflict in:

  drivers/infiniband/hw/hfi1/file_ops.c

between commit:

  1ec82317a1da ("IB/hfi1: Use dma_mmap_coherent for matching buffers")

from the rdma tree and commit:

  6fe0afd07701 ("mm: replace vma->vm_flags direct modifications with modifier calls")

from the mm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/infiniband/hw/hfi1/file_ops.c
index e03b0207856e,c6e59bc480f9..000000000000
--- a/drivers/infiniband/hw/hfi1/file_ops.c
+++ b/drivers/infiniband/hw/hfi1/file_ops.c
@@@ -424,17 -403,8 +424,17 @@@ static int hfi1_file_mmap(struct file *
  			ret = -EPERM;
  			goto done;
  		}
- 		vma->vm_flags &= ~VM_MAYWRITE;
+ 		vm_flags_clear(vma, VM_MAYWRITE);
 -		addr = vma->vm_start;
 +		/*
 +		 * Mmap multiple separate allocations into a single vma.  From
 +		 * here, dma_mmap_coherent() calls dma_direct_mmap(), which
 +		 * requires the mmap to exactly fill the vma starting at
 +		 * vma_start.  Adjust the vma start and end for each eager
 +		 * buffer segment mapped.  Restore the originals when done.
 +		 */
 +		vm_start_save = vma->vm_start;
 +		vm_end_save = vma->vm_end;
 +		vma->vm_end = vma->vm_start;
  		for (i = 0 ; i < uctxt->egrbufs.numbufs; i++) {
  			memlen = uctxt->egrbufs.buffers[i].len;
  			memvirt = uctxt->egrbufs.buffers[i].addr;
@@@ -560,9 -528,11 +560,9 @@@
  		goto done;
  	}
  
- 	vma->vm_flags = flags;
+ 	vm_flags_reset(vma, flags);
 -	hfi1_cdbg(PROC,
 -		  "%u:%u type:%u io/vf:%d/%d, addr:0x%llx, len:%lu(%lu), flags:0x%lx\n",
 -		    ctxt, subctxt, type, mapio, vmf, memaddr, memlen,
 -		    vma->vm_end - vma->vm_start, vma->vm_flags);
 +	mmap_cdbg(ctxt, subctxt, type, mapio, vmf, memaddr, memvirt, memdma, 
 +		  memlen, vma);
  	if (vmf) {
  		vma->vm_pgoff = PFN_DOWN(memaddr);
  		vma->vm_ops = &vm_ops;

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ