+++ /dev/null
-From foo@baz Tue May 1 16:18:20 PDT 2018
-From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
-Date: Tue, 10 Apr 2018 16:30:23 -0700
-Subject: ARM: CMA: avoid double mapping to the CMA area if CONFIG_HIGHMEM=y
-
-From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
-
-[ Upstream commit 3d2054ad8c2d5100b68b0c0405f89fd90bf4107b ]
-
-CMA area is now managed by the separate zone, ZONE_MOVABLE, to fix many
-MM related problems. In this implementation, if CONFIG_HIGHMEM = y,
-then ZONE_MOVABLE is considered as HIGHMEM and the memory of the CMA
-area is also considered as HIGHMEM. That means that they are considered
-as the page without direct mapping. However, CMA area could be in a
-lowmem and the memory could have direct mapping.
-
-In ARM, when establishing a new mapping for DMA, direct mapping should
-be cleared since two mapping with different cache policy could cause
-unknown problem. With this patch, PageHighmem() for the CMA memory
-located in lowmem returns true so that the function for DMA mapping
-cannot notice whether it needs to clear direct mapping or not,
-correctly. To handle this situation, this patch always clears direct
-mapping for such CMA memory.
-
-Link: http://lkml.kernel.org/r/1512114786-5085-4-git-send-email-iamjoonsoo.kim@lge.com
-Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
-Tested-by: Tony Lindgren <tony@atomide.com>
-Cc: "Aneesh Kumar K . V" <aneesh.kumar@linux.vnet.ibm.com>
-Cc: Johannes Weiner <hannes@cmpxchg.org>
-Cc: Laura Abbott <lauraa@codeaurora.org>
-Cc: Marek Szyprowski <m.szyprowski@samsung.com>
-Cc: Mel Gorman <mgorman@techsingularity.net>
-Cc: Michal Hocko <mhocko@suse.com>
-Cc: Michal Nazarewicz <mina86@mina86.com>
-Cc: Minchan Kim <minchan@kernel.org>
-Cc: Rik van Riel <riel@redhat.com>
-Cc: Russell King <linux@armlinux.org.uk>
-Cc: Vlastimil Babka <vbabka@suse.cz>
-Cc: Will Deacon <will.deacon@arm.com>
-Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- arch/arm/mm/dma-mapping.c | 16 +++++++++++++++-
- 1 file changed, 15 insertions(+), 1 deletion(-)
-
---- a/arch/arm/mm/dma-mapping.c
-+++ b/arch/arm/mm/dma-mapping.c
-@@ -481,6 +481,12 @@ void __init dma_contiguous_early_fixup(p
- void __init dma_contiguous_remap(void)
- {
- int i;
-+
-+ if (!dma_mmu_remap_num)
-+ return;
-+
-+ /* call flush_cache_all() since CMA area would be large enough */
-+ flush_cache_all();
- for (i = 0; i < dma_mmu_remap_num; i++) {
- phys_addr_t start = dma_mmu_remap[i].base;
- phys_addr_t end = start + dma_mmu_remap[i].size;
-@@ -513,7 +519,15 @@ void __init dma_contiguous_remap(void)
- flush_tlb_kernel_range(__phys_to_virt(start),
- __phys_to_virt(end));
-
-- iotable_init(&map, 1);
-+ /*
-+ * All the memory in CMA region will be on ZONE_MOVABLE.
-+ * If that zone is considered as highmem, the memory in CMA
-+ * region is also considered as highmem even if it's
-+ * physical address belong to lowmem. In this case,
-+ * re-mapping isn't required.
-+ */
-+ if (!is_highmem_idx(ZONE_MOVABLE))
-+ iotable_init(&map, 1);
- }
- }
-
+++ /dev/null
-From foo@baz Tue May 1 16:18:20 PDT 2018
-From: David Lechner <david@lechnology.com>
-Date: Mon, 15 Jan 2018 11:29:31 -0600
-Subject: ARM: davinci_all_defconfig: set CONFIG_DAVINCI_WATCHDOG=y
-
-From: David Lechner <david@lechnology.com>
-
-[ Upstream commit 35ba26772c827dbfc03be8adc3af8ff0d294b38f ]
-
-This changes CONFIG_DAVINCI_WATCHDOG from a module to a compiled-in
-option. Since the reset function has been moved out of the mach code in
-commit 94f2e94514e5 ("ARM: davinci: remove watchdog reset") and into the
-watchdog driver, devices cannot reboot unless the watchdog driver is
-loaded, so make it a compiled-in option so that we can always reboot, even
-when modules are not loaded.
-
-Cc: Sekhar Nori <nsekhar@ti.com>
-Suggested-by: Adam Ford <aford173@gmail.com>
-Signed-off-by: David Lechner <david@lechnology.com>
-Signed-off-by: Sekhar Nori <nsekhar@ti.com>
-Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- arch/arm/configs/davinci_all_defconfig | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/arch/arm/configs/davinci_all_defconfig
-+++ b/arch/arm/configs/davinci_all_defconfig
-@@ -124,7 +124,7 @@ CONFIG_POWER_RESET=y
- CONFIG_POWER_RESET_GPIO=y
- CONFIG_BATTERY_LEGO_EV3=m
- CONFIG_WATCHDOG=y
--CONFIG_DAVINCI_WATCHDOG=m
-+CONFIG_DAVINCI_WATCHDOG=y
- CONFIG_MFD_DM355EVM_MSP=y
- CONFIG_TPS6507X=y
- CONFIG_REGULATOR=y
+++ /dev/null
-From foo@baz Tue May 1 16:18:19 PDT 2018
-From: Randy Dunlap <rdunlap@infradead.org>
-Date: Mon, 12 Feb 2018 13:18:38 -0800
-Subject: fs/signalfd: fix build error for BUS_MCEERR_AR
-
-From: Randy Dunlap <rdunlap@infradead.org>
-
-[ Upstream commit 9026e820cbd2ea39a06a129ecdddf2739bd3602b ]
-
-Fix build error in fs/signalfd.c by using same method that is used in
-kernel/signal.c: separate blocks for different signal si_code values.
-
-./fs/signalfd.c: error: 'BUS_MCEERR_AR' undeclared (first use in this function)
-
-Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
-Cc: Alexander Viro <viro@zeniv.linux.org.uk>
-Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
-Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- fs/signalfd.c | 15 ++++++++++++---
- 1 file changed, 12 insertions(+), 3 deletions(-)
-
---- a/fs/signalfd.c
-+++ b/fs/signalfd.c
-@@ -118,13 +118,22 @@ static int signalfd_copyinfo(struct sign
- err |= __put_user(kinfo->si_trapno, &uinfo->ssi_trapno);
- #endif
- #ifdef BUS_MCEERR_AO
-- /*
-+ /*
- * Other callers might not initialize the si_lsb field,
- * so check explicitly for the right codes here.
- */
- if (kinfo->si_signo == SIGBUS &&
-- (kinfo->si_code == BUS_MCEERR_AR ||
-- kinfo->si_code == BUS_MCEERR_AO))
-+ kinfo->si_code == BUS_MCEERR_AO)
-+ err |= __put_user((short) kinfo->si_addr_lsb,
-+ &uinfo->ssi_addr_lsb);
-+#endif
-+#ifdef BUS_MCEERR_AR
-+ /*
-+ * Other callers might not initialize the si_lsb field,
-+ * so check explicitly for the right codes here.
-+ */
-+ if (kinfo->si_signo == SIGBUS &&
-+ kinfo->si_code == BUS_MCEERR_AR)
- err |= __put_user((short) kinfo->si_addr_lsb,
- &uinfo->ssi_addr_lsb);
- #endif
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
-@@ -3904,7 +3904,13 @@ int node_reclaim(struct pglist_data *pgd
+@@ -3961,7 +3961,13 @@ int node_reclaim(struct pglist_data *pgd
*/
int page_evictable(struct page *page)
{
+++ /dev/null
-From foo@baz Tue May 1 16:18:19 PDT 2018
-From: Shakeel Butt <shakeelb@google.com>
-Date: Wed, 21 Feb 2018 14:45:28 -0800
-Subject: mm, mlock, vmscan: no more skipping pagevecs
-
-From: Shakeel Butt <shakeelb@google.com>
-
-[ Upstream commit 9c4e6b1a7027f102990c0395296015a812525f4d ]
-
-When a thread mlocks an address space backed either by file pages which
-are currently not present in memory or swapped out anon pages (not in
-swapcache), a new page is allocated and added to the local pagevec
-(lru_add_pvec), I/O is triggered and the thread then sleeps on the page.
-On I/O completion, the thread can wake on a different CPU, the mlock
-syscall will then sets the PageMlocked() bit of the page but will not be
-able to put that page in unevictable LRU as the page is on the pagevec
-of a different CPU. Even on drain, that page will go to evictable LRU
-because the PageMlocked() bit is not checked on pagevec drain.
-
-The page will eventually go to right LRU on reclaim but the LRU stats
-will remain skewed for a long time.
-
-This patch puts all the pages, even unevictable, to the pagevecs and on
-the drain, the pages will be added on their LRUs correctly by checking
-their evictability. This resolves the mlocked pages on pagevec of other
-CPUs issue because when those pagevecs will be drained, the mlocked file
-pages will go to unevictable LRU. Also this makes the race with munlock
-easier to resolve because the pagevec drains happen in LRU lock.
-
-However there is still one place which makes a page evictable and does
-PageLRU check on that page without LRU lock and needs special attention.
-TestClearPageMlocked() and isolate_lru_page() in clear_page_mlock().
-
- #0: __pagevec_lru_add_fn #1: clear_page_mlock
-
- SetPageLRU() if (!TestClearPageMlocked())
- return
- smp_mb() // <--required
- // inside does PageLRU
- if (!PageMlocked()) if (isolate_lru_page())
- move to evictable LRU putback_lru_page()
- else
- move to unevictable LRU
-
-In '#1', TestClearPageMlocked() provides full memory barrier semantics
-and thus the PageLRU check (inside isolate_lru_page) can not be
-reordered before it.
-
-In '#0', without explicit memory barrier, the PageMlocked() check can be
-reordered before SetPageLRU(). If that happens, '#0' can put a page in
-unevictable LRU and '#1' might have just cleared the Mlocked bit of that
-page but fails to isolate as PageLRU fails as '#0' still hasn't set
-PageLRU bit of that page. That page will be stranded on the unevictable
-LRU.
-
-There is one (good) side effect though. Without this patch, the pages
-allocated for System V shared memory segment are added to evictable LRUs
-even after shmctl(SHM_LOCK) on that segment. This patch will correctly
-put such pages to unevictable LRU.
-
-Link: http://lkml.kernel.org/r/20171121211241.18877-1-shakeelb@google.com
-Signed-off-by: Shakeel Butt <shakeelb@google.com>
-Acked-by: Vlastimil Babka <vbabka@suse.cz>
-Cc: Jérôme Glisse <jglisse@redhat.com>
-Cc: Huang Ying <ying.huang@intel.com>
-Cc: Tim Chen <tim.c.chen@linux.intel.com>
-Cc: Michal Hocko <mhocko@kernel.org>
-Cc: Greg Thelen <gthelen@google.com>
-Cc: Johannes Weiner <hannes@cmpxchg.org>
-Cc: Balbir Singh <bsingharora@gmail.com>
-Cc: Minchan Kim <minchan@kernel.org>
-Cc: Shaohua Li <shli@fb.com>
-Cc: Jan Kara <jack@suse.cz>
-Cc: Nicholas Piggin <npiggin@gmail.com>
-Cc: Dan Williams <dan.j.williams@intel.com>
-Cc: Mel Gorman <mgorman@suse.de>
-Cc: Hugh Dickins <hughd@google.com>
-Cc: Vlastimil Babka <vbabka@suse.cz>
-Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- include/linux/swap.h | 2 -
- mm/mlock.c | 6 +++
- mm/swap.c | 82 +++++++++++++++++++++++++++++----------------------
- mm/vmscan.c | 59 ------------------------------------
- 4 files changed, 54 insertions(+), 95 deletions(-)
-
---- a/include/linux/swap.h
-+++ b/include/linux/swap.h
-@@ -326,8 +326,6 @@ extern void deactivate_file_page(struct
- extern void mark_page_lazyfree(struct page *page);
- extern void swap_setup(void);
-
--extern void add_page_to_unevictable_list(struct page *page);
--
- extern void lru_cache_add_active_or_unevictable(struct page *page,
- struct vm_area_struct *vma);
-
---- a/mm/mlock.c
-+++ b/mm/mlock.c
-@@ -64,6 +64,12 @@ void clear_page_mlock(struct page *page)
- mod_zone_page_state(page_zone(page), NR_MLOCK,
- -hpage_nr_pages(page));
- count_vm_event(UNEVICTABLE_PGCLEARED);
-+ /*
-+ * The previous TestClearPageMlocked() corresponds to the smp_mb()
-+ * in __pagevec_lru_add_fn().
-+ *
-+ * See __pagevec_lru_add_fn for more explanation.
-+ */
- if (!isolate_lru_page(page)) {
- putback_lru_page(page);
- } else {
---- a/mm/swap.c
-+++ b/mm/swap.c
-@@ -446,30 +446,6 @@ void lru_cache_add(struct page *page)
- }
-
- /**
-- * add_page_to_unevictable_list - add a page to the unevictable list
-- * @page: the page to be added to the unevictable list
-- *
-- * Add page directly to its zone's unevictable list. To avoid races with
-- * tasks that might be making the page evictable, through eg. munlock,
-- * munmap or exit, while it's not on the lru, we want to add the page
-- * while it's locked or otherwise "invisible" to other tasks. This is
-- * difficult to do when using the pagevec cache, so bypass that.
-- */
--void add_page_to_unevictable_list(struct page *page)
--{
-- struct pglist_data *pgdat = page_pgdat(page);
-- struct lruvec *lruvec;
--
-- spin_lock_irq(&pgdat->lru_lock);
-- lruvec = mem_cgroup_page_lruvec(page, pgdat);
-- ClearPageActive(page);
-- SetPageUnevictable(page);
-- SetPageLRU(page);
-- add_page_to_lru_list(page, lruvec, LRU_UNEVICTABLE);
-- spin_unlock_irq(&pgdat->lru_lock);
--}
--
--/**
- * lru_cache_add_active_or_unevictable
- * @page: the page to be added to LRU
- * @vma: vma in which page is mapped for determining reclaimability
-@@ -484,13 +460,9 @@ void lru_cache_add_active_or_unevictable
- {
- VM_BUG_ON_PAGE(PageLRU(page), page);
-
-- if (likely((vma->vm_flags & (VM_LOCKED | VM_SPECIAL)) != VM_LOCKED)) {
-+ if (likely((vma->vm_flags & (VM_LOCKED | VM_SPECIAL)) != VM_LOCKED))
- SetPageActive(page);
-- lru_cache_add(page);
-- return;
-- }
--
-- if (!TestSetPageMlocked(page)) {
-+ else if (!TestSetPageMlocked(page)) {
- /*
- * We use the irq-unsafe __mod_zone_page_stat because this
- * counter is not modified from interrupt context, and the pte
-@@ -500,7 +472,7 @@ void lru_cache_add_active_or_unevictable
- hpage_nr_pages(page));
- count_vm_event(UNEVICTABLE_PGMLOCKED);
- }
-- add_page_to_unevictable_list(page);
-+ lru_cache_add(page);
- }
-
- /*
-@@ -883,15 +855,55 @@ void lru_add_page_tail(struct page *page
- static void __pagevec_lru_add_fn(struct page *page, struct lruvec *lruvec,
- void *arg)
- {
-- int file = page_is_file_cache(page);
-- int active = PageActive(page);
-- enum lru_list lru = page_lru(page);
-+ enum lru_list lru;
-+ int was_unevictable = TestClearPageUnevictable(page);
-
- VM_BUG_ON_PAGE(PageLRU(page), page);
-
- SetPageLRU(page);
-+ /*
-+ * Page becomes evictable in two ways:
-+ * 1) Within LRU lock [munlock_vma_pages() and __munlock_pagevec()].
-+ * 2) Before acquiring LRU lock to put the page to correct LRU and then
-+ * a) do PageLRU check with lock [check_move_unevictable_pages]
-+ * b) do PageLRU check before lock [clear_page_mlock]
-+ *
-+ * (1) & (2a) are ok as LRU lock will serialize them. For (2b), we need
-+ * following strict ordering:
-+ *
-+ * #0: __pagevec_lru_add_fn #1: clear_page_mlock
-+ *
-+ * SetPageLRU() TestClearPageMlocked()
-+ * smp_mb() // explicit ordering // above provides strict
-+ * // ordering
-+ * PageMlocked() PageLRU()
-+ *
-+ *
-+ * if '#1' does not observe setting of PG_lru by '#0' and fails
-+ * isolation, the explicit barrier will make sure that page_evictable
-+ * check will put the page in correct LRU. Without smp_mb(), SetPageLRU
-+ * can be reordered after PageMlocked check and can make '#1' to fail
-+ * the isolation of the page whose Mlocked bit is cleared (#0 is also
-+ * looking at the same page) and the evictable page will be stranded
-+ * in an unevictable LRU.
-+ */
-+ smp_mb();
-+
-+ if (page_evictable(page)) {
-+ lru = page_lru(page);
-+ update_page_reclaim_stat(lruvec, page_is_file_cache(page),
-+ PageActive(page));
-+ if (was_unevictable)
-+ count_vm_event(UNEVICTABLE_PGRESCUED);
-+ } else {
-+ lru = LRU_UNEVICTABLE;
-+ ClearPageActive(page);
-+ SetPageUnevictable(page);
-+ if (!was_unevictable)
-+ count_vm_event(UNEVICTABLE_PGCULLED);
-+ }
-+
- add_page_to_lru_list(page, lruvec, lru);
-- update_page_reclaim_stat(lruvec, file, active);
- trace_mm_lru_insertion(page, lru);
- }
-
---- a/mm/vmscan.c
-+++ b/mm/vmscan.c
-@@ -790,64 +790,7 @@ int remove_mapping(struct address_space
- */
- void putback_lru_page(struct page *page)
- {
-- bool is_unevictable;
-- int was_unevictable = PageUnevictable(page);
--
-- VM_BUG_ON_PAGE(PageLRU(page), page);
--
--redo:
-- ClearPageUnevictable(page);
--
-- if (page_evictable(page)) {
-- /*
-- * For evictable pages, we can use the cache.
-- * In event of a race, worst case is we end up with an
-- * unevictable page on [in]active list.
-- * We know how to handle that.
-- */
-- is_unevictable = false;
-- lru_cache_add(page);
-- } else {
-- /*
-- * Put unevictable pages directly on zone's unevictable
-- * list.
-- */
-- is_unevictable = true;
-- add_page_to_unevictable_list(page);
-- /*
-- * When racing with an mlock or AS_UNEVICTABLE clearing
-- * (page is unlocked) make sure that if the other thread
-- * does not observe our setting of PG_lru and fails
-- * isolation/check_move_unevictable_pages,
-- * we see PG_mlocked/AS_UNEVICTABLE cleared below and move
-- * the page back to the evictable list.
-- *
-- * The other side is TestClearPageMlocked() or shmem_lock().
-- */
-- smp_mb();
-- }
--
-- /*
-- * page's status can change while we move it among lru. If an evictable
-- * page is on unevictable list, it never be freed. To avoid that,
-- * check after we added it to the list, again.
-- */
-- if (is_unevictable && page_evictable(page)) {
-- if (!isolate_lru_page(page)) {
-- put_page(page);
-- goto redo;
-- }
-- /* This means someone else dropped this page from LRU
-- * So, it will be freed or putback to LRU again. There is
-- * nothing to do here.
-- */
-- }
--
-- if (was_unevictable && !is_unevictable)
-- count_vm_event(UNEVICTABLE_PGRESCUED);
-- else if (!was_unevictable && is_unevictable)
-- count_vm_event(UNEVICTABLE_PGCULLED);
--
-+ lru_cache_add(page);
- put_page(page); /* drop ref from isolate */
- }
-
+++ /dev/null
-From foo@baz Tue May 1 16:18:20 PDT 2018
-From: Rolf Evers-Fischer <rolf.evers.fischer@aptiv.com>
-Date: Wed, 28 Feb 2018 18:32:19 +0100
-Subject: PCI: endpoint: Fix kernel panic after put_device()
-
-From: Rolf Evers-Fischer <rolf.evers.fischer@aptiv.com>
-
-[ Upstream commit 9eef6a5c3b0bf90eb292d462ea267bcb6ad1c334 ]
-
-'put_device()' calls the relase function 'pci_epf_dev_release()',
-which already frees 'epf->name' and 'epf'.
-
-Therefore we must not free them again after 'put_device()'.
-
-Fixes: 5e8cb4033807 ("PCI: endpoint: Add EP core layer to enable EP controller and EP functions")
-
-Signed-off-by: Rolf Evers-Fischer <rolf.evers.fischer@aptiv.com>
-Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
-Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
-Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
-Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/pci/endpoint/pci-epf-core.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/pci/endpoint/pci-epf-core.c
-+++ b/drivers/pci/endpoint/pci-epf-core.c
-@@ -254,7 +254,7 @@ struct pci_epf *pci_epf_create(const cha
-
- put_dev:
- put_device(dev);
-- kfree(epf->name);
-+ return ERR_PTR(ret);
-
- free_func_name:
- kfree(func_name);
+++ /dev/null
-From foo@baz Tue May 1 16:18:20 PDT 2018
-From: David Ahern <dsahern@gmail.com>
-Date: Tue, 13 Feb 2018 08:44:06 -0800
-Subject: selftests: Add FIB onlink tests
-
-From: David Ahern <dsahern@gmail.com>
-
-[ Upstream commit 153e1b84f477f716bc3f81e6cfae1a3d941fc7ec ]
-
-Add test cases verifying FIB onlink commands work as expected in
-various conditions - IPv4, IPv6, main table, and VRF.
-
-Signed-off-by: David Ahern <dsahern@gmail.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- tools/testing/selftests/net/fib-onlink-tests.sh | 375 ++++++++++++++++++++++++
- 1 file changed, 375 insertions(+)
- create mode 100755 tools/testing/selftests/net/fib-onlink-tests.sh
-
---- /dev/null
-+++ b/tools/testing/selftests/net/fib-onlink-tests.sh
-@@ -0,0 +1,375 @@
-+#!/bin/bash
-+# SPDX-License-Identifier: GPL-2.0
-+
-+# IPv4 and IPv6 onlink tests
-+
-+PAUSE_ON_FAIL=${PAUSE_ON_FAIL:=no}
-+
-+# Network interfaces
-+# - odd in current namespace; even in peer ns
-+declare -A NETIFS
-+# default VRF
-+NETIFS[p1]=veth1
-+NETIFS[p2]=veth2
-+NETIFS[p3]=veth3
-+NETIFS[p4]=veth4
-+# VRF
-+NETIFS[p5]=veth5
-+NETIFS[p6]=veth6
-+NETIFS[p7]=veth7
-+NETIFS[p8]=veth8
-+
-+# /24 network
-+declare -A V4ADDRS
-+V4ADDRS[p1]=169.254.1.1
-+V4ADDRS[p2]=169.254.1.2
-+V4ADDRS[p3]=169.254.3.1
-+V4ADDRS[p4]=169.254.3.2
-+V4ADDRS[p5]=169.254.5.1
-+V4ADDRS[p6]=169.254.5.2
-+V4ADDRS[p7]=169.254.7.1
-+V4ADDRS[p8]=169.254.7.2
-+
-+# /64 network
-+declare -A V6ADDRS
-+V6ADDRS[p1]=2001:db8:101::1
-+V6ADDRS[p2]=2001:db8:101::2
-+V6ADDRS[p3]=2001:db8:301::1
-+V6ADDRS[p4]=2001:db8:301::2
-+V6ADDRS[p5]=2001:db8:501::1
-+V6ADDRS[p6]=2001:db8:501::2
-+V6ADDRS[p7]=2001:db8:701::1
-+V6ADDRS[p8]=2001:db8:701::2
-+
-+# Test networks:
-+# [1] = default table
-+# [2] = VRF
-+#
-+# /32 host routes
-+declare -A TEST_NET4
-+TEST_NET4[1]=169.254.101
-+TEST_NET4[2]=169.254.102
-+# /128 host routes
-+declare -A TEST_NET6
-+TEST_NET6[1]=2001:db8:101
-+TEST_NET6[2]=2001:db8:102
-+
-+# connected gateway
-+CONGW[1]=169.254.1.254
-+CONGW[2]=169.254.5.254
-+
-+# recursive gateway
-+RECGW4[1]=169.254.11.254
-+RECGW4[2]=169.254.12.254
-+RECGW6[1]=2001:db8:11::64
-+RECGW6[2]=2001:db8:12::64
-+
-+# for v4 mapped to v6
-+declare -A TEST_NET4IN6IN6
-+TEST_NET4IN6[1]=10.1.1.254
-+TEST_NET4IN6[2]=10.2.1.254
-+
-+# mcast address
-+MCAST6=ff02::1
-+
-+
-+PEER_NS=bart
-+PEER_CMD="ip netns exec ${PEER_NS}"
-+VRF=lisa
-+VRF_TABLE=1101
-+PBR_TABLE=101
-+
-+################################################################################
-+# utilities
-+
-+log_test()
-+{
-+ local rc=$1
-+ local expected=$2
-+ local msg="$3"
-+
-+ if [ ${rc} -eq ${expected} ]; then
-+ nsuccess=$((nsuccess+1))
-+ printf "\n TEST: %-50s [ OK ]\n" "${msg}"
-+ else
-+ nfail=$((nfail+1))
-+ printf "\n TEST: %-50s [FAIL]\n" "${msg}"
-+ if [ "${PAUSE_ON_FAIL}" = "yes" ]; then
-+ echo
-+ echo "hit enter to continue, 'q' to quit"
-+ read a
-+ [ "$a" = "q" ] && exit 1
-+ fi
-+ fi
-+}
-+
-+log_section()
-+{
-+ echo
-+ echo "######################################################################"
-+ echo "TEST SECTION: $*"
-+ echo "######################################################################"
-+}
-+
-+log_subsection()
-+{
-+ echo
-+ echo "#########################################"
-+ echo "TEST SUBSECTION: $*"
-+}
-+
-+run_cmd()
-+{
-+ echo
-+ echo "COMMAND: $*"
-+ eval $*
-+}
-+
-+get_linklocal()
-+{
-+ local dev=$1
-+ local pfx
-+ local addr
-+
-+ addr=$(${pfx} ip -6 -br addr show dev ${dev} | \
-+ awk '{
-+ for (i = 3; i <= NF; ++i) {
-+ if ($i ~ /^fe80/)
-+ print $i
-+ }
-+ }'
-+ )
-+ addr=${addr/\/*}
-+
-+ [ -z "$addr" ] && return 1
-+
-+ echo $addr
-+
-+ return 0
-+}
-+
-+################################################################################
-+#
-+
-+setup()
-+{
-+ echo
-+ echo "########################################"
-+ echo "Configuring interfaces"
-+
-+ set -e
-+
-+ # create namespace
-+ ip netns add ${PEER_NS}
-+ ip -netns ${PEER_NS} li set lo up
-+
-+ # add vrf table
-+ ip li add ${VRF} type vrf table ${VRF_TABLE}
-+ ip li set ${VRF} up
-+ ip ro add table ${VRF_TABLE} unreachable default
-+ ip -6 ro add table ${VRF_TABLE} unreachable default
-+
-+ # create test interfaces
-+ ip li add ${NETIFS[p1]} type veth peer name ${NETIFS[p2]}
-+ ip li add ${NETIFS[p3]} type veth peer name ${NETIFS[p4]}
-+ ip li add ${NETIFS[p5]} type veth peer name ${NETIFS[p6]}
-+ ip li add ${NETIFS[p7]} type veth peer name ${NETIFS[p8]}
-+
-+ # enslave vrf interfaces
-+ for n in 5 7; do
-+ ip li set ${NETIFS[p${n}]} vrf ${VRF}
-+ done
-+
-+ # add addresses
-+ for n in 1 3 5 7; do
-+ ip li set ${NETIFS[p${n}]} up
-+ ip addr add ${V4ADDRS[p${n}]}/24 dev ${NETIFS[p${n}]}
-+ ip addr add ${V6ADDRS[p${n}]}/64 dev ${NETIFS[p${n}]}
-+ done
-+
-+ # move peer interfaces to namespace and add addresses
-+ for n in 2 4 6 8; do
-+ ip li set ${NETIFS[p${n}]} netns ${PEER_NS} up
-+ ip -netns ${PEER_NS} addr add ${V4ADDRS[p${n}]}/24 dev ${NETIFS[p${n}]}
-+ ip -netns ${PEER_NS} addr add ${V6ADDRS[p${n}]}/64 dev ${NETIFS[p${n}]}
-+ done
-+
-+ set +e
-+
-+ # let DAD complete - assume default of 1 probe
-+ sleep 1
-+}
-+
-+cleanup()
-+{
-+ # make sure we start from a clean slate
-+ ip netns del ${PEER_NS} 2>/dev/null
-+ for n in 1 3 5 7; do
-+ ip link del ${NETIFS[p${n}]} 2>/dev/null
-+ done
-+ ip link del ${VRF} 2>/dev/null
-+ ip ro flush table ${VRF_TABLE}
-+ ip -6 ro flush table ${VRF_TABLE}
-+}
-+
-+################################################################################
-+# IPv4 tests
-+#
-+
-+run_ip()
-+{
-+ local table="$1"
-+ local prefix="$2"
-+ local gw="$3"
-+ local dev="$4"
-+ local exp_rc="$5"
-+ local desc="$6"
-+
-+ # dev arg may be empty
-+ [ -n "${dev}" ] && dev="dev ${dev}"
-+
-+ run_cmd ip ro add table "${table}" "${prefix}"/32 via "${gw}" "${dev}" onlink
-+ log_test $? ${exp_rc} "${desc}"
-+}
-+
-+valid_onlink_ipv4()
-+{
-+ # - unicast connected, unicast recursive
-+ #
-+ log_subsection "default VRF - main table"
-+
-+ run_ip 254 ${TEST_NET4[1]}.1 ${CONGW[1]} ${NETIFS[p1]} 0 "unicast connected"
-+ run_ip 254 ${TEST_NET4[1]}.2 ${RECGW4[1]} ${NETIFS[p1]} 0 "unicast recursive"
-+
-+ log_subsection "VRF ${VRF}"
-+
-+ run_ip ${VRF_TABLE} ${TEST_NET4[2]}.1 ${CONGW[2]} ${NETIFS[p5]} 0 "unicast connected"
-+ run_ip ${VRF_TABLE} ${TEST_NET4[2]}.2 ${RECGW4[2]} ${NETIFS[p5]} 0 "unicast recursive"
-+
-+ log_subsection "VRF device, PBR table"
-+
-+ run_ip ${PBR_TABLE} ${TEST_NET4[2]}.3 ${CONGW[2]} ${NETIFS[p5]} 0 "unicast connected"
-+ run_ip ${PBR_TABLE} ${TEST_NET4[2]}.4 ${RECGW4[2]} ${NETIFS[p5]} 0 "unicast recursive"
-+}
-+
-+invalid_onlink_ipv4()
-+{
-+ run_ip 254 ${TEST_NET4[1]}.11 ${V4ADDRS[p1]} ${NETIFS[p1]} 2 \
-+ "Invalid gw - local unicast address"
-+
-+ run_ip ${VRF_TABLE} ${TEST_NET4[2]}.11 ${V4ADDRS[p5]} ${NETIFS[p5]} 2 \
-+ "Invalid gw - local unicast address, VRF"
-+
-+ run_ip 254 ${TEST_NET4[1]}.101 ${V4ADDRS[p1]} "" 2 "No nexthop device given"
-+
-+ run_ip 254 ${TEST_NET4[1]}.102 ${V4ADDRS[p3]} ${NETIFS[p1]} 2 \
-+ "Gateway resolves to wrong nexthop device"
-+
-+ run_ip ${VRF_TABLE} ${TEST_NET4[2]}.103 ${V4ADDRS[p7]} ${NETIFS[p5]} 2 \
-+ "Gateway resolves to wrong nexthop device - VRF"
-+}
-+
-+################################################################################
-+# IPv6 tests
-+#
-+
-+run_ip6()
-+{
-+ local table="$1"
-+ local prefix="$2"
-+ local gw="$3"
-+ local dev="$4"
-+ local exp_rc="$5"
-+ local desc="$6"
-+
-+ # dev arg may be empty
-+ [ -n "${dev}" ] && dev="dev ${dev}"
-+
-+ run_cmd ip -6 ro add table "${table}" "${prefix}"/128 via "${gw}" "${dev}" onlink
-+ log_test $? ${exp_rc} "${desc}"
-+}
-+
-+valid_onlink_ipv6()
-+{
-+ # - unicast connected, unicast recursive, v4-mapped
-+ #
-+ log_subsection "default VRF - main table"
-+
-+ run_ip6 254 ${TEST_NET6[1]}::1 ${V6ADDRS[p1]/::*}::64 ${NETIFS[p1]} 0 "unicast connected"
-+ run_ip6 254 ${TEST_NET6[1]}::2 ${RECGW6[1]} ${NETIFS[p1]} 0 "unicast recursive"
-+ run_ip6 254 ${TEST_NET6[1]}::3 ::ffff:${TEST_NET4IN6[1]} ${NETIFS[p1]} 0 "v4-mapped"
-+
-+ log_subsection "VRF ${VRF}"
-+
-+ run_ip6 ${VRF_TABLE} ${TEST_NET6[2]}::1 ${V6ADDRS[p5]/::*}::64 ${NETIFS[p5]} 0 "unicast connected"
-+ run_ip6 ${VRF_TABLE} ${TEST_NET6[2]}::2 ${RECGW6[2]} ${NETIFS[p5]} 0 "unicast recursive"
-+ run_ip6 ${VRF_TABLE} ${TEST_NET6[2]}::3 ::ffff:${TEST_NET4IN6[2]} ${NETIFS[p5]} 0 "v4-mapped"
-+
-+ log_subsection "VRF device, PBR table"
-+
-+ run_ip6 ${PBR_TABLE} ${TEST_NET6[2]}::4 ${V6ADDRS[p5]/::*}::64 ${NETIFS[p5]} 0 "unicast connected"
-+ run_ip6 ${PBR_TABLE} ${TEST_NET6[2]}::5 ${RECGW6[2]} ${NETIFS[p5]} 0 "unicast recursive"
-+ run_ip6 ${PBR_TABLE} ${TEST_NET6[2]}::6 ::ffff:${TEST_NET4IN6[2]} ${NETIFS[p5]} 0 "v4-mapped"
-+}
-+
-+invalid_onlink_ipv6()
-+{
-+ local lladdr
-+
-+ lladdr=$(get_linklocal ${NETIFS[p1]}) || return 1
-+
-+ run_ip6 254 ${TEST_NET6[1]}::11 ${V6ADDRS[p1]} ${NETIFS[p1]} 2 \
-+ "Invalid gw - local unicast address"
-+ run_ip6 254 ${TEST_NET6[1]}::12 ${lladdr} ${NETIFS[p1]} 2 \
-+ "Invalid gw - local linklocal address"
-+ run_ip6 254 ${TEST_NET6[1]}::12 ${MCAST6} ${NETIFS[p1]} 2 \
-+ "Invalid gw - multicast address"
-+
-+ lladdr=$(get_linklocal ${NETIFS[p5]}) || return 1
-+ run_ip6 ${VRF_TABLE} ${TEST_NET6[2]}::11 ${V6ADDRS[p5]} ${NETIFS[p5]} 2 \
-+ "Invalid gw - local unicast address, VRF"
-+ run_ip6 ${VRF_TABLE} ${TEST_NET6[2]}::12 ${lladdr} ${NETIFS[p5]} 2 \
-+ "Invalid gw - local linklocal address, VRF"
-+ run_ip6 ${VRF_TABLE} ${TEST_NET6[2]}::12 ${MCAST6} ${NETIFS[p5]} 2 \
-+ "Invalid gw - multicast address, VRF"
-+
-+ run_ip6 254 ${TEST_NET6[1]}::101 ${V6ADDRS[p1]} "" 2 \
-+ "No nexthop device given"
-+
-+ # default VRF validation is done against LOCAL table
-+ # run_ip6 254 ${TEST_NET6[1]}::102 ${V6ADDRS[p3]/::[0-9]/::64} ${NETIFS[p1]} 2 \
-+ # "Gateway resolves to wrong nexthop device"
-+
-+ run_ip6 ${VRF_TABLE} ${TEST_NET6[2]}::103 ${V6ADDRS[p7]/::[0-9]/::64} ${NETIFS[p5]} 2 \
-+ "Gateway resolves to wrong nexthop device - VRF"
-+}
-+
-+run_onlink_tests()
-+{
-+ log_section "IPv4 onlink"
-+ log_subsection "Valid onlink commands"
-+ valid_onlink_ipv4
-+ log_subsection "Invalid onlink commands"
-+ invalid_onlink_ipv4
-+
-+ log_section "IPv6 onlink"
-+ log_subsection "Valid onlink commands"
-+ valid_onlink_ipv6
-+ invalid_onlink_ipv6
-+}
-+
-+################################################################################
-+# main
-+
-+nsuccess=0
-+nfail=0
-+
-+cleanup
-+setup
-+run_onlink_tests
-+cleanup
-+
-+if [ "$TESTS" != "none" ]; then
-+ printf "\nTests passed: %3d\n" ${nsuccess}
-+ printf "Tests failed: %3d\n" ${nfail}
-+fi
locking-xchg-alpha-add-unconditional-memory-barrier-to-cmpxchg.patch
md-raid5-avoid-string-overflow-warning.patch
virtio_net-fix-xdp-code-path-in-receive_small.patch
-mm-mlock-vmscan-no-more-skipping-pagevecs.patch
kernel-relay.c-limit-kmalloc-size-to-kmalloc_max_size.patch
bug.h-work-around-gcc-pr82365-in-bug.patch
selftests-memfd-add-run_fuse_test.sh-to-test_files.patch
arm-omap-fix-dmtimer-init-for-omap1.patch
smsc75xx-fix-smsc75xx_set_features.patch
regulatory-add-nul-to-request-alpha2.patch
-fs-signalfd-fix-build-error-for-bus_mceerr_ar.patch
integrity-security-fix-digsig.c-build-error-with-header-file.patch
x86-intel_rdt-fix-incorrect-returned-value-when-creating-rdgroup-sub-directory-in-resctrl-file-system.patch
locking-xchg-alpha-fix-xchg-and-cmpxchg-memory-ordering-bugs.patch
x86-pgtable-don-t-set-huge-pud-pmd-on-non-leaf-entries.patch
x86-mm-do-not-forbid-_page_rw-before-init-for-__ro_after_init.patch
fs-proc-proc_sysctl.c-fix-potential-page-fault-while-unregistering-sysctl-table.patch
-arm-cma-avoid-double-mapping-to-the-cma-area-if-config_highmem-y.patch
swap-divide-by-zero-when-zero-length-swap-file-on-ssd.patch
z3fold-fix-memory-leak.patch
sr-get-drop-reference-to-device-in-revalidate-and-check_events.patch
staging-fsl-dpaa2-eth-fix-incorrect-casts.patch
staging-rtl8192u-return-enomem-on-failed-allocation-of-priv-oldaddr.patch
staging-ks7010-use-constants-from-ieee80211_eid-instead-of-literal-ints.patch
-pci-endpoint-fix-kernel-panic-after-put_device.patch
rtc-tx4939-avoid-unintended-sign-extension-on-a-24-bit-shift.patch
rtc-rp5c01-fix-possible-race-condition.patch
dmaengine-qcom-bam_dma-get-num-channels-and-num-ees-from-dt.patch
media-vb2-fix-videobuf2-to-map-correct-area.patch
media-vivid-fix-incorrect-capabilities-for-radio.patch
media-cx25821-prevent-out-of-bounds-read-on-array-card.patch
-arm-davinci_all_defconfig-set-config_davinci_watchdog-y.patch
clk-samsung-s3c2410-fix-pll-rates.patch
clk-samsung-exynos7-fix-pll-rates.patch
clk-samsung-exynos5260-fix-pll-rates.patch
crypto-sunxi-ss-add-module_alias-to-sun4i-ss.patch
crypto-inside-secure-fix-the-invalidation-step-during-cra_exit.patch
audit-return-on-memory-error-to-avoid-null-pointer-dereference.patch
-x86-mce-amd-collect-error-info-even-if-valid-bits-are-not-set.patch
net-stmmac-call-correct-function-in-stmmac_mac_config_rx_queues_routing.patch
rcu-call-touch_nmi_watchdog-while-printing-stall-warnings.patch
pinctrl-sh-pfc-r8a7796-fix-mod_sel-register-pin-assignment-for-ssi-pins-group.patch
netlabel-if-pf_inet6-check-sk_buff-ip-header-version.patch
drm-rcar-du-lvds-fix-lvds-startup-on-r-car-gen3.patch
drm-rcar-du-lvds-fix-lvds-startup-on-r-car-gen2.patch
-selftests-add-fib-onlink-tests.patch
rtc-goldfish-add-missing-module_license.patch
arm-dts-at91-tse850-use-the-correct-compatible-for-the-eeprom.patch
regmap-correct-comparison-in-regmap_cached.patch
+++ /dev/null
-From foo@baz Tue May 1 16:18:20 PDT 2018
-From: Borislav Petkov <bp@suse.de>
-Date: Wed, 21 Feb 2018 11:18:56 +0100
-Subject: x86/mce/AMD: Collect error info even if valid bits are not set
-
-From: Borislav Petkov <bp@suse.de>
-
-[ Upstream commit 4b1e84276a6172980c5bf39aa091ba13e90d6dad ]
-
-The MCA banks log error info into MCA_ADDR, MCA_MISC0, and MCA_SYND even
-if the corresponding valid bits are not set:
-
-"Error handlers should save the values in MCA_ADDR, MCA_MISC0,
-and MCA_SYND even if MCA_STATUS[AddrV], MCA_STATUS[MiscV], and
-MCA_STATUS[SyndV] are zero."
-
-Do so by setting those bits so that code down the MCE processing path
-doesn't need to be changed.
-
-Signed-off-by: Borislav Petkov <bp@suse.de>
-Cc: Borislav Petkov <bp@alien8.de>
-Cc: Linus Torvalds <torvalds@linux-foundation.org>
-Cc: Peter Zijlstra <peterz@infradead.org>
-Cc: Thomas Gleixner <tglx@linutronix.de>
-Cc: Tony Luck <tony.luck@intel.com>
-Cc: linux-edac <linux-edac@vger.kernel.org>
-Link: http://lkml.kernel.org/r/20180221101900.10326-5-bp@alien8.de
-Signed-off-by: Ingo Molnar <mingo@kernel.org>
-Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- arch/x86/kernel/cpu/mcheck/mce.c | 14 ++++++++++++++
- 1 file changed, 14 insertions(+)
-
---- a/arch/x86/kernel/cpu/mcheck/mce.c
-+++ b/arch/x86/kernel/cpu/mcheck/mce.c
-@@ -445,6 +445,20 @@ static inline void mce_gather_info(struc
- if (mca_cfg.rip_msr)
- m->ip = mce_rdmsrl(mca_cfg.rip_msr);
- }
-+
-+ /*
-+ * Error handlers should save the values in MCA_ADDR, MCA_MISC0, and
-+ * MCA_SYND even if MCA_STATUS[AddrV], MCA_STATUS[MiscV], and
-+ * MCA_STATUS[SyndV] are zero.
-+ */
-+ if (m->cpuvendor == X86_VENDOR_AMD) {
-+ u64 status = MCI_STATUS_ADDRV | MCI_STATUS_MISCV;
-+
-+ if (mce_flags.smca)
-+ status |= MCI_STATUS_SYNDV;
-+
-+ m->status |= status;
-+ }
- }
-
- int mce_available(struct cpuinfo_x86 *c)
+++ /dev/null
-From foo@baz Tue May 1 14:59:17 PDT 2018
-From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
-Date: Tue, 10 Apr 2018 16:30:23 -0700
-Subject: ARM: CMA: avoid double mapping to the CMA area if CONFIG_HIGHMEM=y
-
-From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
-
-[ Upstream commit 3d2054ad8c2d5100b68b0c0405f89fd90bf4107b ]
-
-CMA area is now managed by the separate zone, ZONE_MOVABLE, to fix many
-MM related problems. In this implementation, if CONFIG_HIGHMEM = y,
-then ZONE_MOVABLE is considered as HIGHMEM and the memory of the CMA
-area is also considered as HIGHMEM. That means that they are considered
-as the page without direct mapping. However, CMA area could be in a
-lowmem and the memory could have direct mapping.
-
-In ARM, when establishing a new mapping for DMA, direct mapping should
-be cleared since two mapping with different cache policy could cause
-unknown problem. With this patch, PageHighmem() for the CMA memory
-located in lowmem returns true so that the function for DMA mapping
-cannot notice whether it needs to clear direct mapping or not,
-correctly. To handle this situation, this patch always clears direct
-mapping for such CMA memory.
-
-Link: http://lkml.kernel.org/r/1512114786-5085-4-git-send-email-iamjoonsoo.kim@lge.com
-Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
-Tested-by: Tony Lindgren <tony@atomide.com>
-Cc: "Aneesh Kumar K . V" <aneesh.kumar@linux.vnet.ibm.com>
-Cc: Johannes Weiner <hannes@cmpxchg.org>
-Cc: Laura Abbott <lauraa@codeaurora.org>
-Cc: Marek Szyprowski <m.szyprowski@samsung.com>
-Cc: Mel Gorman <mgorman@techsingularity.net>
-Cc: Michal Hocko <mhocko@suse.com>
-Cc: Michal Nazarewicz <mina86@mina86.com>
-Cc: Minchan Kim <minchan@kernel.org>
-Cc: Rik van Riel <riel@redhat.com>
-Cc: Russell King <linux@armlinux.org.uk>
-Cc: Vlastimil Babka <vbabka@suse.cz>
-Cc: Will Deacon <will.deacon@arm.com>
-Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- arch/arm/mm/dma-mapping.c | 16 +++++++++++++++-
- 1 file changed, 15 insertions(+), 1 deletion(-)
-
---- a/arch/arm/mm/dma-mapping.c
-+++ b/arch/arm/mm/dma-mapping.c
-@@ -466,6 +466,12 @@ void __init dma_contiguous_early_fixup(p
- void __init dma_contiguous_remap(void)
- {
- int i;
-+
-+ if (!dma_mmu_remap_num)
-+ return;
-+
-+ /* call flush_cache_all() since CMA area would be large enough */
-+ flush_cache_all();
- for (i = 0; i < dma_mmu_remap_num; i++) {
- phys_addr_t start = dma_mmu_remap[i].base;
- phys_addr_t end = start + dma_mmu_remap[i].size;
-@@ -498,7 +504,15 @@ void __init dma_contiguous_remap(void)
- flush_tlb_kernel_range(__phys_to_virt(start),
- __phys_to_virt(end));
-
-- iotable_init(&map, 1);
-+ /*
-+ * All the memory in CMA region will be on ZONE_MOVABLE.
-+ * If that zone is considered as highmem, the memory in CMA
-+ * region is also considered as highmem even if it's
-+ * physical address belong to lowmem. In this case,
-+ * re-mapping isn't required.
-+ */
-+ if (!is_highmem_idx(ZONE_MOVABLE))
-+ iotable_init(&map, 1);
- }
- }
-
+++ /dev/null
-From foo@baz Tue May 1 14:59:18 PDT 2018
-From: David Lechner <david@lechnology.com>
-Date: Mon, 15 Jan 2018 11:29:31 -0600
-Subject: ARM: davinci_all_defconfig: set CONFIG_DAVINCI_WATCHDOG=y
-
-From: David Lechner <david@lechnology.com>
-
-[ Upstream commit 35ba26772c827dbfc03be8adc3af8ff0d294b38f ]
-
-This changes CONFIG_DAVINCI_WATCHDOG from a module to a compiled-in
-option. Since the reset function has been moved out of the mach code in
-commit 94f2e94514e5 ("ARM: davinci: remove watchdog reset") and into the
-watchdog driver, devices cannot reboot unless the watchdog driver is
-loaded, so make it a compiled-in option so that we can always reboot, even
-when modules are not loaded.
-
-Cc: Sekhar Nori <nsekhar@ti.com>
-Suggested-by: Adam Ford <aford173@gmail.com>
-Signed-off-by: David Lechner <david@lechnology.com>
-Signed-off-by: Sekhar Nori <nsekhar@ti.com>
-Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- arch/arm/configs/davinci_all_defconfig | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/arch/arm/configs/davinci_all_defconfig
-+++ b/arch/arm/configs/davinci_all_defconfig
-@@ -128,7 +128,7 @@ CONFIG_POWER_RESET=y
- CONFIG_POWER_RESET_GPIO=y
- CONFIG_BATTERY_LEGO_EV3=m
- CONFIG_WATCHDOG=y
--CONFIG_DAVINCI_WATCHDOG=m
-+CONFIG_DAVINCI_WATCHDOG=y
- CONFIG_MFD_DM355EVM_MSP=y
- CONFIG_TPS6507X=y
- CONFIG_REGULATOR=y
+++ /dev/null
-From foo@baz Tue May 1 14:59:17 PDT 2018
-From: Davidlohr Bueso <dave@stgolabs.net>
-Date: Tue, 10 Apr 2018 16:35:30 -0700
-Subject: ipc/msg: introduce msgctl(MSG_STAT_ANY)
-
-From: Davidlohr Bueso <dave@stgolabs.net>
-
-[ Upstream commit 23c8cec8cf679b10997a512abb1e86f0cedc42ba ]
-
-There is a permission discrepancy when consulting msq ipc object
-metadata between /proc/sysvipc/msg (0444) and the MSG_STAT shmctl
-command. The later does permission checks for the object vs S_IRUGO.
-As such there can be cases where EACCESS is returned via syscall but the
-info is displayed anyways in the procfs files.
-
-While this might have security implications via info leaking (albeit no
-writing to the msq metadata), this behavior goes way back and showing
-all the objects regardless of the permissions was most likely an
-overlook - so we are stuck with it. Furthermore, modifying either the
-syscall or the procfs file can cause userspace programs to break (ie
-ipcs). Some applications require getting the procfs info (without root
-privileges) and can be rather slow in comparison with a syscall -- up to
-500x in some reported cases for shm.
-
-This patch introduces a new MSG_STAT_ANY command such that the msq ipc
-object permissions are ignored, and only audited instead. In addition,
-I've left the lsm security hook checks in place, as if some policy can
-block the call, then the user has no other choice than just parsing the
-procfs file.
-
-Link: http://lkml.kernel.org/r/20180215162458.10059-4-dave@stgolabs.net
-Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
-Reported-by: Robert Kettler <robert.kettler@outlook.com>
-Cc: Eric W. Biederman <ebiederm@xmission.com>
-Cc: Kees Cook <keescook@chromium.org>
-Cc: Manfred Spraul <manfred@colorfullife.com>
-Cc: Michael Kerrisk <mtk.manpages@gmail.com>
-Cc: Michal Hocko <mhocko@kernel.org>
-Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- include/uapi/linux/msg.h | 1 +
- ipc/msg.c | 17 ++++++++++++-----
- security/selinux/hooks.c | 1 +
- security/smack/smack_lsm.c | 1 +
- 4 files changed, 15 insertions(+), 5 deletions(-)
-
---- a/include/uapi/linux/msg.h
-+++ b/include/uapi/linux/msg.h
-@@ -7,6 +7,7 @@
- /* ipcs ctl commands */
- #define MSG_STAT 11
- #define MSG_INFO 12
-+#define MSG_STAT_ANY 13
-
- /* msgrcv options */
- #define MSG_NOERROR 010000 /* no error if message is too big */
---- a/ipc/msg.c
-+++ b/ipc/msg.c
-@@ -483,14 +483,14 @@ static int msgctl_stat(struct ipc_namesp
- memset(p, 0, sizeof(*p));
-
- rcu_read_lock();
-- if (cmd == MSG_STAT) {
-+ if (cmd == MSG_STAT || cmd == MSG_STAT_ANY) {
- msq = msq_obtain_object(ns, msqid);
- if (IS_ERR(msq)) {
- err = PTR_ERR(msq);
- goto out_unlock;
- }
- id = msq->q_perm.id;
-- } else {
-+ } else { /* IPC_STAT */
- msq = msq_obtain_object_check(ns, msqid);
- if (IS_ERR(msq)) {
- err = PTR_ERR(msq);
-@@ -498,9 +498,14 @@ static int msgctl_stat(struct ipc_namesp
- }
- }
-
-- err = -EACCES;
-- if (ipcperms(ns, &msq->q_perm, S_IRUGO))
-- goto out_unlock;
-+ /* see comment for SHM_STAT_ANY */
-+ if (cmd == MSG_STAT_ANY)
-+ audit_ipc_obj(&msq->q_perm);
-+ else {
-+ err = -EACCES;
-+ if (ipcperms(ns, &msq->q_perm, S_IRUGO))
-+ goto out_unlock;
-+ }
-
- err = security_msg_queue_msgctl(msq, cmd);
- if (err)
-@@ -558,6 +563,7 @@ SYSCALL_DEFINE3(msgctl, int, msqid, int,
- return err;
- }
- case MSG_STAT: /* msqid is an index rather than a msg queue id */
-+ case MSG_STAT_ANY:
- case IPC_STAT:
- err = msgctl_stat(ns, msqid, cmd, &msqid64);
- if (err < 0)
-@@ -671,6 +677,7 @@ COMPAT_SYSCALL_DEFINE3(msgctl, int, msqi
- }
- case IPC_STAT:
- case MSG_STAT:
-+ case MSG_STAT_ANY:
- err = msgctl_stat(ns, msqid, cmd, &msqid64);
- if (err < 0)
- return err;
---- a/security/selinux/hooks.c
-+++ b/security/selinux/hooks.c
-@@ -5590,6 +5590,7 @@ static int selinux_msg_queue_msgctl(stru
- SECCLASS_SYSTEM, SYSTEM__IPC_INFO, NULL);
- case IPC_STAT:
- case MSG_STAT:
-+ case MSG_STAT_ANY:
- perms = MSGQ__GETATTR | MSGQ__ASSOCIATE;
- break;
- case IPC_SET:
---- a/security/smack/smack_lsm.c
-+++ b/security/smack/smack_lsm.c
-@@ -3294,6 +3294,7 @@ static int smack_msg_queue_msgctl(struct
- switch (cmd) {
- case IPC_STAT:
- case MSG_STAT:
-+ case MSG_STAT_ANY:
- may = MAY_READ;
- break;
- case IPC_SET:
+++ /dev/null
-From foo@baz Tue May 1 14:59:17 PDT 2018
-From: Rolf Evers-Fischer <rolf.evers.fischer@aptiv.com>
-Date: Wed, 28 Feb 2018 18:32:19 +0100
-Subject: PCI: endpoint: Fix kernel panic after put_device()
-
-From: Rolf Evers-Fischer <rolf.evers.fischer@aptiv.com>
-
-[ Upstream commit 9eef6a5c3b0bf90eb292d462ea267bcb6ad1c334 ]
-
-'put_device()' calls the relase function 'pci_epf_dev_release()',
-which already frees 'epf->name' and 'epf'.
-
-Therefore we must not free them again after 'put_device()'.
-
-Fixes: 5e8cb4033807 ("PCI: endpoint: Add EP core layer to enable EP controller and EP functions")
-
-Signed-off-by: Rolf Evers-Fischer <rolf.evers.fischer@aptiv.com>
-Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
-Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
-Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
-Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/pci/endpoint/pci-epf-core.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/pci/endpoint/pci-epf-core.c
-+++ b/drivers/pci/endpoint/pci-epf-core.c
-@@ -243,7 +243,7 @@ struct pci_epf *pci_epf_create(const cha
-
- put_dev:
- put_device(dev);
-- kfree(epf->name);
-+ return ERR_PTR(ret);
-
- free_func_name:
- kfree(func_name);
fs-proc-proc_sysctl.c-fix-potential-page-fault-while-unregistering-sysctl-table.patch
kasan-fix-invalid-free-test-crashing-the-kernel.patch
kasan-slub-fix-handling-of-kasan_slab_free-hook.patch
-ipc-msg-introduce-msgctl-msg_stat_any.patch
-arm-cma-avoid-double-mapping-to-the-cma-area-if-config_highmem-y.patch
memcg-fix-per_node_info-cleanup.patch
swap-divide-by-zero-when-zero-length-swap-file-on-ssd.patch
z3fold-fix-memory-leak.patch
staging-fsl-dpaa2-eth-fix-incorrect-casts.patch
staging-rtl8192u-return-enomem-on-failed-allocation-of-priv-oldaddr.patch
staging-ks7010-use-constants-from-ieee80211_eid-instead-of-literal-ints.patch
-pci-endpoint-fix-kernel-panic-after-put_device.patch
rtc-tx4939-avoid-unintended-sign-extension-on-a-24-bit-shift.patch
rtc-rp5c01-fix-possible-race-condition.patch
dmaengine-qcom-bam_dma-get-num-channels-and-num-ees-from-dt.patch
media-vb2-fix-videobuf2-to-map-correct-area.patch
media-vivid-fix-incorrect-capabilities-for-radio.patch
media-cx25821-prevent-out-of-bounds-read-on-array-card.patch
-x86-xen-add-pvh-specific-rsdp-address-retrieval-function.patch
-arm-davinci_all_defconfig-set-config_davinci_watchdog-y.patch
clk-samsung-s3c2410-fix-pll-rates.patch
clk-samsung-exynos7-fix-pll-rates.patch
clk-samsung-exynos5260-fix-pll-rates.patch
crypto-sunxi-ss-add-module_alias-to-sun4i-ss.patch
crypto-inside-secure-fix-the-invalidation-step-during-cra_exit.patch
audit-return-on-memory-error-to-avoid-null-pointer-dereference.patch
-x86-mce-amd-collect-error-info-even-if-valid-bits-are-not-set.patch
asoc-fsl_ssi-maintain-a-mask-of-active-streams.patch
net-stmmac-call-correct-function-in-stmmac_mac_config_rx_queues_routing.patch
rcu-call-touch_nmi_watchdog-while-printing-stall-warnings.patch
+++ /dev/null
-From foo@baz Tue May 1 14:59:18 PDT 2018
-From: Borislav Petkov <bp@suse.de>
-Date: Wed, 21 Feb 2018 11:18:56 +0100
-Subject: x86/mce/AMD: Collect error info even if valid bits are not set
-
-From: Borislav Petkov <bp@suse.de>
-
-[ Upstream commit 4b1e84276a6172980c5bf39aa091ba13e90d6dad ]
-
-The MCA banks log error info into MCA_ADDR, MCA_MISC0, and MCA_SYND even
-if the corresponding valid bits are not set:
-
-"Error handlers should save the values in MCA_ADDR, MCA_MISC0,
-and MCA_SYND even if MCA_STATUS[AddrV], MCA_STATUS[MiscV], and
-MCA_STATUS[SyndV] are zero."
-
-Do so by setting those bits so that code down the MCE processing path
-doesn't need to be changed.
-
-Signed-off-by: Borislav Petkov <bp@suse.de>
-Cc: Borislav Petkov <bp@alien8.de>
-Cc: Linus Torvalds <torvalds@linux-foundation.org>
-Cc: Peter Zijlstra <peterz@infradead.org>
-Cc: Thomas Gleixner <tglx@linutronix.de>
-Cc: Tony Luck <tony.luck@intel.com>
-Cc: linux-edac <linux-edac@vger.kernel.org>
-Link: http://lkml.kernel.org/r/20180221101900.10326-5-bp@alien8.de
-Signed-off-by: Ingo Molnar <mingo@kernel.org>
-Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- arch/x86/kernel/cpu/mcheck/mce.c | 14 ++++++++++++++
- 1 file changed, 14 insertions(+)
-
---- a/arch/x86/kernel/cpu/mcheck/mce.c
-+++ b/arch/x86/kernel/cpu/mcheck/mce.c
-@@ -444,6 +444,20 @@ static inline void mce_gather_info(struc
- if (mca_cfg.rip_msr)
- m->ip = mce_rdmsrl(mca_cfg.rip_msr);
- }
-+
-+ /*
-+ * Error handlers should save the values in MCA_ADDR, MCA_MISC0, and
-+ * MCA_SYND even if MCA_STATUS[AddrV], MCA_STATUS[MiscV], and
-+ * MCA_STATUS[SyndV] are zero.
-+ */
-+ if (m->cpuvendor == X86_VENDOR_AMD) {
-+ u64 status = MCI_STATUS_ADDRV | MCI_STATUS_MISCV;
-+
-+ if (mce_flags.smca)
-+ status |= MCI_STATUS_SYNDV;
-+
-+ m->status |= status;
-+ }
- }
-
- int mce_available(struct cpuinfo_x86 *c)
+++ /dev/null
-From foo@baz Tue May 1 14:59:18 PDT 2018
-From: Juergen Gross <jgross@suse.com>
-Date: Mon, 19 Feb 2018 11:09:06 +0100
-Subject: x86/xen: Add pvh specific rsdp address retrieval function
-
-From: Juergen Gross <jgross@suse.com>
-
-[ Upstream commit b17d9d1df3c33a4f1d2bf397e2257aecf9dc56d4 ]
-
-Add pvh_get_root_pointer() for Xen PVH guests to communicate the
-address of the RSDP table given to the kernel via Xen start info.
-
-This makes the kernel boot again in PVH mode after on recent Xen the
-RSDP was moved to higher addresses. So up to that change it was pure
-luck that the legacy method to locate the RSDP was working when
-running as PVH mode.
-
-Signed-off-by: Juergen Gross <jgross@suse.com>
-Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
-Acked-by: Thomas Gleixner <tglx@linutronix.de>
-Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-Cc: Borislav Petkov <bp@alien8.de>
-Cc: Eric Biederman <ebiederm@xmission.com>
-Cc: H. Peter Anvin <hpa@zytor.com>
-Cc: Kees Cook <keescook@chromium.org>
-Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
-Cc: Linus Torvalds <torvalds@linux-foundation.org>
-Cc: Peter Zijlstra <peterz@infradead.org>
-Cc: boris.ostrovsky@oracle.com
-Cc: lenb@kernel.org
-Cc: linux-acpi@vger.kernel.org
-Cc: xen-devel@lists.xenproject.org
-Link: http://lkml.kernel.org/r/20180219100906.14265-4-jgross@suse.com
-Signed-off-by: Ingo Molnar <mingo@kernel.org>
-Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- arch/x86/xen/enlighten_pvh.c | 14 +++++++++++---
- 1 file changed, 11 insertions(+), 3 deletions(-)
-
---- a/arch/x86/xen/enlighten_pvh.c
-+++ b/arch/x86/xen/enlighten_pvh.c
-@@ -6,6 +6,7 @@
- #include <asm/io_apic.h>
- #include <asm/hypervisor.h>
- #include <asm/e820/api.h>
-+#include <asm/x86_init.h>
-
- #include <asm/xen/interface.h>
- #include <asm/xen/hypercall.h>
-@@ -16,15 +17,20 @@
- /*
- * PVH variables.
- *
-- * xen_pvh and pvh_bootparams need to live in data segment since they
-- * are used after startup_{32|64}, which clear .bss, are invoked.
-+ * xen_pvh pvh_bootparams and pvh_start_info need to live in data segment
-+ * since they are used after startup_{32|64}, which clear .bss, are invoked.
- */
- bool xen_pvh __attribute__((section(".data"))) = 0;
- struct boot_params pvh_bootparams __attribute__((section(".data")));
-+struct hvm_start_info pvh_start_info __attribute__((section(".data")));
-
--struct hvm_start_info pvh_start_info;
- unsigned int pvh_start_info_sz = sizeof(pvh_start_info);
-
-+static u64 pvh_get_root_pointer(void)
-+{
-+ return pvh_start_info.rsdp_paddr;
-+}
-+
- static void __init init_pvh_bootparams(void)
- {
- struct xen_memory_map memmap;
-@@ -71,6 +77,8 @@ static void __init init_pvh_bootparams(v
- */
- pvh_bootparams.hdr.version = 0x212;
- pvh_bootparams.hdr.type_of_loader = (9 << 4) | 0; /* Xen loader */
-+
-+ x86_init.acpi.get_root_pointer = pvh_get_root_pointer;
- }
-
- /*