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: <20190704124435.GJ3401@mellanox.com>
Date:   Thu, 4 Jul 2019 12:44:39 +0000
From:   Jason Gunthorpe <jgg@...lanox.com>
To:     Stephen Rothwell <sfr@...b.auug.org.au>
CC:     Andrew Morton <akpm@...ux-foundation.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Robin Murphy <robin.murphy@....com>,
        Christoph Hellwig <hch@....de>
Subject: Re: linux-next: manual merge of the akpm-current tree with the hmm
 tree

On Thu, Jul 04, 2019 at 08:09:56PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the akpm-current tree got a conflict in:
> 
>   include/linux/mm.h
> 
> between commit:
> 
>   25b2995a35b6 ("mm: remove MEMORY_DEVICE_PUBLIC support")
> 
> from the hmm tree and commit:
> 
>   0a470a2d114a ("mm: clean up is_device_*_page() definitions")
> 
> from the akpm-current 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 include/linux/mm.h
> index d405a7cff62a,12980954daf9..000000000000
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@@ -950,27 -953,15 +950,7 @@@ static inline bool put_devmap_managed_p
>   	}
>   	return false;
>   }
> - 
> - static inline bool is_device_private_page(const struct page *page)
> - {
> - 	return is_zone_device_page(page) &&
> - 		page->pgmap->type == MEMORY_DEVICE_PRIVATE;
> - }
> - 
> - #ifdef CONFIG_PCI_P2PDMA
> - static inline bool is_pci_p2pdma_page(const struct page *page)
> - {
> - 	return is_zone_device_page(page) &&
> - 		page->pgmap->type == MEMORY_DEVICE_PCI_P2PDMA;
> - }
> - #else /* CONFIG_PCI_P2PDMA */
> - static inline bool is_pci_p2pdma_page(const struct page *page)
> - {
> - 	return false;
> - }
> - #endif /* CONFIG_PCI_P2PDMA */
> - 
>   #else /* CONFIG_DEV_PAGEMAP_OPS */
>  -static inline void dev_pagemap_get_ops(void)
>  -{
>  -}
>  -
>  -static inline void dev_pagemap_put_ops(void)
>  -{
>  -}
>  -
>   static inline bool put_devmap_managed_page(struct page *page)
>   {
>   	return false;
> @@@ -978,14 -970,27 +959,19 @@@
>   
>   static inline bool is_device_private_page(const struct page *page)
>   {
> - 	return false;
> + 	return IS_ENABLED(CONFIG_DEV_PAGEMAP_OPS) &&
> + 		IS_ENABLED(CONFIG_DEVICE_PRIVATE) &&
> + 		is_zone_device_page(page) &&
> + 		page->pgmap->type == MEMORY_DEVICE_PRIVATE;
>   }
>   
>  -static inline bool is_device_public_page(const struct page *page)
>  -{
>  -	return IS_ENABLED(CONFIG_DEV_PAGEMAP_OPS) &&
>  -		IS_ENABLED(CONFIG_DEVICE_PUBLIC) &&
>  -		is_zone_device_page(page) &&
>  -		page->pgmap->type == MEMORY_DEVICE_PUBLIC;
>  -}
>  -
>   static inline bool is_pci_p2pdma_page(const struct page *page)
>   {
> - 	return false;
> + 	return IS_ENABLED(CONFIG_DEV_PAGEMAP_OPS) &&
> + 		IS_ENABLED(CONFIG_PCI_P2PDMA) &&
> + 		is_zone_device_page(page) &&
> + 		page->pgmap->type == MEMORY_DEVICE_PCI_P2PDMA;
>   }
> - #endif /* CONFIG_DEV_PAGEMAP_OPS */
>   
>   /* 127: arbitrary random number, small enough to assemble well */
>   #define page_ref_zero_or_close_to_overflow(page) \

Yep, this new version is much nicer

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ