* linux-next: manual merge of the akpm-current tree with the nvdimm tree
@ 2021-12-07 6:39 Stephen Rothwell
2021-12-07 6:55 ` Christoph Hellwig
0 siblings, 1 reply; 9+ messages in thread
From: Stephen Rothwell @ 2021-12-07 6:39 UTC (permalink / raw)
To: Andrew Morton, Dan Williams
Cc: Christoph Hellwig, Joao Martins, Linux Kernel Mailing List,
Linux Next Mailing List, Stephen Rothwell
[-- Attachment #1: Type: text/plain, Size: 2400 bytes --]
Hi all,
Today's linux-next merge of the akpm-current tree got a conflict in:
mm/memremap.c
between commit:
b80892ca022e ("memremap: remove support for external pgmap refcounts")
from the nvdimm tree and commit:
30156644eb0d ("mm/memremap: add ZONE_DEVICE support for compound pages")
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 mm/memremap.c
index 643965da13a6,d591f3aa8884..000000000000
--- a/mm/memremap.c
+++ b/mm/memremap.c
@@@ -110,8 -136,33 +136,9 @@@ bool pfn_zone_device_reserved(unsigned
}
#define for_each_device_pfn(pfn, map, i) \
- for (pfn = pfn_first(map, i); pfn < pfn_end(map, i); pfn = pfn_next(pfn))
+ for (pfn = pfn_first(map, i); pfn < pfn_end(map, i); \
+ pfn = pfn_next(map, pfn))
-static void dev_pagemap_kill(struct dev_pagemap *pgmap)
-{
- if (pgmap->ops && pgmap->ops->kill)
- pgmap->ops->kill(pgmap);
- else
- percpu_ref_kill(pgmap->ref);
-}
-
-static void dev_pagemap_cleanup(struct dev_pagemap *pgmap)
-{
- if (pgmap->ops && pgmap->ops->cleanup) {
- pgmap->ops->cleanup(pgmap);
- } else {
- wait_for_completion(&pgmap->done);
- percpu_ref_exit(pgmap->ref);
- }
- /*
- * Undo the pgmap ref assignment for the internal case as the
- * caller may re-enable the same pgmap.
- */
- if (pgmap->ref == &pgmap->internal_ref)
- pgmap->ref = NULL;
-}
-
static void pageunmap_range(struct dev_pagemap *pgmap, int range_id)
{
struct range *range = &pgmap->ranges[range_id];
@@@ -271,8 -322,7 +298,7 @@@ static int pagemap_range(struct dev_pag
memmap_init_zone_device(&NODE_DATA(nid)->node_zones[ZONE_DEVICE],
PHYS_PFN(range->start),
PHYS_PFN(range_len(range)), pgmap);
- percpu_ref_get_many(&pgmap->ref,
- pfn_end(pgmap, range_id) - pfn_first(pgmap, range_id));
- percpu_ref_get_many(pgmap->ref, pfn_len(pgmap, range_id));
++ percpu_ref_get_many(&pgmap->ref, pfn_len(pgmap, range_id));
return 0;
err_add_memory:
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: linux-next: manual merge of the akpm-current tree with the nvdimm tree
2021-12-07 6:39 linux-next: manual merge of the akpm-current tree with the nvdimm tree Stephen Rothwell
@ 2021-12-07 6:55 ` Christoph Hellwig
2021-12-07 10:23 ` Joao Martins
0 siblings, 1 reply; 9+ messages in thread
From: Christoph Hellwig @ 2021-12-07 6:55 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Andrew Morton, Dan Williams, Christoph Hellwig, Joao Martins,
Linux Kernel Mailing List, Linux Next Mailing List
On Tue, Dec 07, 2021 at 05:39:38PM +1100, Stephen Rothwell wrote:
> Hi all,
>
> Today's linux-next merge of the akpm-current tree got a conflict in:
>
> mm/memremap.c
>
> between commit:
>
> b80892ca022e ("memremap: remove support for external pgmap refcounts")
>
> from the nvdimm tree and commit:
>
> 30156644eb0d ("mm/memremap: add ZONE_DEVICE support for compound pages")
>
> from the akpm-current tree.
The resolution looks good to me, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: linux-next: manual merge of the akpm-current tree with the nvdimm tree
2021-12-07 6:55 ` Christoph Hellwig
@ 2021-12-07 10:23 ` Joao Martins
0 siblings, 0 replies; 9+ messages in thread
From: Joao Martins @ 2021-12-07 10:23 UTC (permalink / raw)
To: Christoph Hellwig, Stephen Rothwell
Cc: Andrew Morton, Dan Williams, Linux Kernel Mailing List,
Linux Next Mailing List
On 12/7/21 06:55, Christoph Hellwig wrote:
> On Tue, Dec 07, 2021 at 05:39:38PM +1100, Stephen Rothwell wrote:
>> Hi all,
>>
>> Today's linux-next merge of the akpm-current tree got a conflict in:
>>
>> mm/memremap.c
>>
>> between commit:
>>
>> b80892ca022e ("memremap: remove support for external pgmap refcounts")
>>
>> from the nvdimm tree and commit:
>>
>> 30156644eb0d ("mm/memremap: add ZONE_DEVICE support for compound pages")
>>
>> from the akpm-current tree.
>
> The resolution looks good to me, thanks.
>
+1, the resolution looks good to me too.
^ permalink raw reply [flat|nested] 9+ messages in thread
* linux-next: manual merge of the akpm-current tree with the nvdimm tree
@ 2018-06-04 10:24 Stephen Rothwell
0 siblings, 0 replies; 9+ messages in thread
From: Stephen Rothwell @ 2018-06-04 10:24 UTC (permalink / raw)
To: Andrew Morton, Dan Williams
Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
Souptick Joarder, Matthew Wilcox
[-- Attachment #1: Type: text/plain, Size: 1652 bytes --]
Hi all,
Today's linux-next merge of the akpm-current tree got a conflict in:
fs/dax.c
between commit:
cc4a90ac816e ("dax: dax_insert_mapping_entry always succeeds")
from the nvdimm tree and commit:
aa726309bde7 ("fs/dax.c: add new return type vm_fault_t")
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 fs/dax.c
index d6b01de7f881,821986c61f7e..000000000000
--- a/fs/dax.c
+++ b/fs/dax.c
@@@ -1017,8 -910,9 +1017,8 @@@ static vm_fault_t dax_load_hole(struct
{
struct inode *inode = mapping->host;
unsigned long vaddr = vmf->address;
- int ret = VM_FAULT_NOPAGE;
+ vm_fault_t ret = VM_FAULT_NOPAGE;
struct page *zero_page;
- void *entry2;
pfn_t pfn;
zero_page = ZERO_PAGE(0);
@@@ -1028,9 -922,14 +1028,9 @@@
}
pfn = page_to_pfn_t(zero_page);
- entry2 = dax_insert_mapping_entry(mapping, vmf, entry, pfn,
- RADIX_DAX_ZERO_PAGE, false);
- if (IS_ERR(entry2)) {
- ret = VM_FAULT_SIGBUS;
- goto out;
- }
-
+ dax_insert_mapping_entry(mapping, vmf, entry, pfn, RADIX_DAX_ZERO_PAGE,
+ false);
- vm_insert_mixed(vmf->vma, vaddr, pfn);
+ ret = vmf_insert_mixed(vmf->vma, vaddr, pfn);
out:
trace_dax_load_hole(inode, vmf, ret);
return ret;
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* linux-next: manual merge of the akpm-current tree with the nvdimm tree
@ 2017-11-16 3:16 Stephen Rothwell
2017-11-16 4:55 ` Minchan Kim
0 siblings, 1 reply; 9+ messages in thread
From: Stephen Rothwell @ 2017-11-16 3:16 UTC (permalink / raw)
To: Andrew Morton, Dan Williams
Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Minchan Kim
Hi Andrew,
Today's linux-next merge of the akpm-current tree got a conflict in:
drivers/block/brd.c
between commit:
7a862fbbdec6 ("brd: remove dax support")
from the nvdimm tree and commit:
f8ace3501d00 ("bdi: introduce BDI_CAP_SYNCHRONOUS_IO")
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 drivers/block/brd.c
index 3d8e29ad0159,16965964873e..000000000000
--- a/drivers/block/brd.c
+++ b/drivers/block/brd.c
@@@ -20,6 -20,12 +20,7 @@@
#include <linux/radix-tree.h>
#include <linux/fs.h>
#include <linux/slab.h>
+ #include <linux/backing-dev.h>
-#ifdef CONFIG_BLK_DEV_RAM_DAX
-#include <linux/pfn_t.h>
-#include <linux/dax.h>
-#include <linux/uio.h>
-#endif
#include <linux/uaccess.h>
@@@ -400,9 -450,23 +401,10 @@@ static struct brd_device *brd_alloc(in
disk->flags = GENHD_FL_EXT_DEVT;
sprintf(disk->disk_name, "ram%d", i);
set_capacity(disk, rd_size * 2);
+ disk->queue->backing_dev_info->capabilities |= BDI_CAP_SYNCHRONOUS_IO;
-#ifdef CONFIG_BLK_DEV_RAM_DAX
- queue_flag_set_unlocked(QUEUE_FLAG_DAX, brd->brd_queue);
- brd->dax_dev = alloc_dax(brd, disk->disk_name, &brd_dax_ops);
- if (!brd->dax_dev)
- goto out_free_inode;
-#endif
-
-
return brd;
-#ifdef CONFIG_BLK_DEV_RAM_DAX
-out_free_inode:
- kill_dax(brd->dax_dev);
- put_dax(brd->dax_dev);
-#endif
out_free_queue:
blk_cleanup_queue(brd->brd_queue);
out_free_dev:
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: linux-next: manual merge of the akpm-current tree with the nvdimm tree
2017-11-16 3:16 Stephen Rothwell
@ 2017-11-16 4:55 ` Minchan Kim
0 siblings, 0 replies; 9+ messages in thread
From: Minchan Kim @ 2017-11-16 4:55 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Andrew Morton, Dan Williams, Linux-Next Mailing List,
Linux Kernel Mailing List
Hi Stephen,
On Thu, Nov 16, 2017 at 02:16:27PM +1100, Stephen Rothwell wrote:
> Hi Andrew,
>
> Today's linux-next merge of the akpm-current tree got a conflict in:
>
> drivers/block/brd.c
>
> between commit:
>
> 7a862fbbdec6 ("brd: remove dax support")
>
> from the nvdimm tree and commit:
>
> f8ace3501d00 ("bdi: introduce BDI_CAP_SYNCHRONOUS_IO")
>
> from the akpm-current tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
It's good for me.
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* linux-next: manual merge of the akpm-current tree with the nvdimm tree
@ 2017-04-24 6:47 Stephen Rothwell
0 siblings, 0 replies; 9+ messages in thread
From: Stephen Rothwell @ 2017-04-24 6:47 UTC (permalink / raw)
To: Andrew Morton
Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Ross Zwisler
Hi Andrew,
Today's linux-next merge of the akpm-current tree got a conflict in:
fs/dax.c
between commit:
52d52d6f1178 ("filesystem-dax: convert to dax_direct_access()")
from the nvdimm tree and commit:
a865ea3e58c4 ("dax: add tracepoints to dax_writeback_mapping_range()")
70b18baeff15 ("dax: fix regression in dax_writeback_mapping_range()")
f18b1aa363db ("dax: add tracepoint to dax_writeback_one()")
775c67fd4de1 ("dax: add tracepoint to dax_insert_mapping()")
from the akpm-current tree.
Thanks, Dan, for the example merge.
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 fs/dax.c
index 67d900277d91,2a4e25a9f234..000000000000
--- a/fs/dax.c
+++ b/fs/dax.c
@@@ -817,8 -853,9 +823,9 @@@ static int dax_writeback_one(struct blo
spin_lock_irq(&mapping->tree_lock);
radix_tree_tag_clear(page_tree, index, PAGECACHE_TAG_DIRTY);
spin_unlock_irq(&mapping->tree_lock);
- trace_dax_writeback_one(mapping->host, index, dax.size >> PAGE_SHIFT);
- unmap:
- dax_unmap_atomic(bdev, &dax);
++ trace_dax_writeback_one(mapping->host, index, size / PAGE_SIZE);
+ dax_unlock:
+ dax_read_unlock(id);
put_locked_mapping_entry(mapping, index, entry);
return ret;
@@@ -874,16 -908,15 +883,16 @@@ int dax_writeback_mapping_range(struct
break;
}
- ret = dax_writeback_one(bdev, mapping, indices[i],
- pvec.pages[i]);
+ ret = dax_writeback_one(bdev, dax_dev, mapping,
+ indices[i], pvec.pages[i]);
- if (ret < 0) {
- put_dax(dax_dev);
- return ret;
- }
+ if (ret < 0)
+ goto out;
}
}
+ out:
+ trace_dax_writeback_range_done(inode, start_index, end_index);
+ put_dax(dax_dev);
- return 0;
+ return (ret < 0 ? ret : 0);
}
EXPORT_SYMBOL_GPL(dax_writeback_mapping_range);
@@@ -916,7 -941,8 +925,8 @@@ static int dax_insert_mapping(struct ad
return PTR_ERR(ret);
*entryp = ret;
+ trace_dax_insert_mapping(mapping->host, vmf, ret);
- return vm_insert_mixed(vma, vaddr, dax.pfn);
+ return vm_insert_mixed(vma, vaddr, pfn);
}
/**
^ permalink raw reply [flat|nested] 9+ messages in thread
* linux-next: manual merge of the akpm-current tree with the nvdimm tree
@ 2016-01-08 5:51 Stephen Rothwell
0 siblings, 0 replies; 9+ messages in thread
From: Stephen Rothwell @ 2016-01-08 5:51 UTC (permalink / raw)
To: Andrew Morton, Dan Williams; +Cc: linux-next, linux-kernel
Hi Andrew,
Today's linux-next merge of the akpm-current tree got a conflict in:
drivers/nvdimm/pmem.c
between commit:
d0d852f68113 ("block: clarify badblocks lifetime")
from the nvdimm tree and commit:
90283d3934a7 ("mm: introduce find_dev_pagemap()")
from the akpm-current tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc drivers/nvdimm/pmem.c
index 5e6656fa3f58,37ebf42c0415..000000000000
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@@ -21,10 -21,10 +21,11 @@@
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/module.h>
- #include <linux/memory_hotplug.h>
#include <linux/moduleparam.h>
+#include <linux/badblocks.h>
+ #include <linux/memremap.h>
#include <linux/vmalloc.h>
+ #include <linux/pfn_t.h>
#include <linux/slab.h>
#include <linux/pmem.h>
#include <linux/nd.h>
@@@ -192,13 -180,8 +205,9 @@@ static int pmem_attach_disk(struct devi
struct nd_namespace_common *ndns, struct pmem_device *pmem)
{
int nid = dev_to_node(dev);
+ struct badblocks *bb;
struct gendisk *disk;
- pmem->pmem_queue = blk_alloc_queue_node(GFP_KERNEL, nid);
- if (!pmem->pmem_queue)
- return -ENOMEM;
-
blk_queue_make_request(pmem->pmem_queue, pmem_make_request);
blk_queue_physical_block_size(pmem->pmem_queue, PAGE_SIZE);
blk_queue_max_hw_sectors(pmem->pmem_queue, UINT_MAX);
^ permalink raw reply [flat|nested] 9+ messages in thread
* linux-next: manual merge of the akpm-current tree with the nvdimm tree
@ 2015-12-31 10:51 Stephen Rothwell
0 siblings, 0 replies; 9+ messages in thread
From: Stephen Rothwell @ 2015-12-31 10:51 UTC (permalink / raw)
To: Andrew Morton, Dan Williams; +Cc: linux-next, linux-kernel, Andrey Ryabinin
Hi Andrew,
Today's linux-next merge of the akpm-current tree got a conflict in:
lib/Kconfig.debug
between commit:
96efc4fed452 ("arch: consolidate CONFIG_STRICT_DEVM in lib/Kconfig.debug")
from the nvdimm tree and commit:
3e138efd477e ("UBSAN: run-time undefined behavior sanity checker")
from the akpm-current tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc lib/Kconfig.debug
index 01be6fcceda2,19f7461e1594..000000000000
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@@ -1886,42 -1860,4 +1893,44 @@@ source "samples/Kconfig
source "lib/Kconfig.kgdb"
+config ARCH_HAS_DEVMEM_IS_ALLOWED
+ bool
+
+config STRICT_DEVMEM
+ bool "Filter access to /dev/mem"
+ depends on MMU
+ depends on ARCH_HAS_DEVMEM_IS_ALLOWED
+ default y if TILE || PPC
+ ---help---
+ If this option is disabled, you allow userspace (root) access to all
+ of memory, including kernel and userspace memory. Accidental
+ access to this is obviously disastrous, but specific access can
+ be used by people debugging the kernel. Note that with PAT support
+ enabled, even in this case there are restrictions on /dev/mem
+ use due to the cache aliasing requirements.
+
+ If this option is switched on, and IO_STRICT_DEVMEM=n, the /dev/mem
+ file only allows userspace access to PCI space and the BIOS code and
+ data regions. This is sufficient for dosemu and X and all common
+ users of /dev/mem.
+
+ If in doubt, say Y.
+
+config IO_STRICT_DEVMEM
+ bool "Filter I/O access to /dev/mem"
+ depends on STRICT_DEVMEM
+ default STRICT_DEVMEM
+ ---help---
+ If this option is disabled, you allow userspace (root) access to all
+ io-memory regardless of whether a driver is actively using that
+ range. Accidental access to this is obviously disastrous, but
+ specific access can be used by people debugging kernel drivers.
+
+ If this option is switched on, the /dev/mem file only allows
+ userspace access to *idle* io-memory ranges (see /proc/iomem) This
+ may break traditional users of /dev/mem (dosemu, legacy X, etc...)
+ if the driver using a given range cannot be disabled.
+
+ If in doubt, say Y.
++
+ source "lib/Kconfig.ubsan"
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-12-07 10:24 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-07 6:39 linux-next: manual merge of the akpm-current tree with the nvdimm tree Stephen Rothwell
2021-12-07 6:55 ` Christoph Hellwig
2021-12-07 10:23 ` Joao Martins
-- strict thread matches above, loose matches on Subject: below --
2018-06-04 10:24 Stephen Rothwell
2017-11-16 3:16 Stephen Rothwell
2017-11-16 4:55 ` Minchan Kim
2017-04-24 6:47 Stephen Rothwell
2016-01-08 5:51 Stephen Rothwell
2015-12-31 10:51 Stephen Rothwell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).