From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Dave Hansen <dave.hansen@linux.intel.com>,
Andy Lutomirski <luto@kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Borislav Petkov <bp@alien8.de>, "H. Peter Anvin" <hpa@zytor.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Rik van Riel <riel@surriel.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Thomas Gleixner <tglx@linutronix.de>,
dave.hansen@intel.com, Ingo Molnar <mingo@kernel.org>
Subject: [PATCH 4.14 057/101] x86/mm: Drop usage of __flush_tlb_all() in kernel_physical_mapping_init()
Date: Mon, 7 Jan 2019 13:32:45 +0100 [thread overview]
Message-ID: <20190107105336.046274395@linuxfoundation.org> (raw)
In-Reply-To: <20190107105330.372621917@linuxfoundation.org>
4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Williams <dan.j.williams@intel.com>
commit ba6f508d0ec4adb09f0a939af6d5e19cdfa8667d upstream.
Commit:
f77084d96355 "x86/mm/pat: Disable preemption around __flush_tlb_all()"
addressed a case where __flush_tlb_all() is called without preemption
being disabled. It also left a warning to catch other cases where
preemption is not disabled.
That warning triggers for the memory hotplug path which is also used for
persistent memory enabling:
WARNING: CPU: 35 PID: 911 at ./arch/x86/include/asm/tlbflush.h:460
RIP: 0010:__flush_tlb_all+0x1b/0x3a
[..]
Call Trace:
phys_pud_init+0x29c/0x2bb
kernel_physical_mapping_init+0xfc/0x219
init_memory_mapping+0x1a5/0x3b0
arch_add_memory+0x2c/0x50
devm_memremap_pages+0x3aa/0x610
pmem_attach_disk+0x585/0x700 [nd_pmem]
Andy wondered why a path that can sleep was using __flush_tlb_all() [1]
and Dave confirmed the expectation for TLB flush is for modifying /
invalidating existing PTE entries, but not initial population [2]. Drop
the usage of __flush_tlb_all() in phys_{p4d,pud,pmd}_init() on the
expectation that this path is only ever populating empty entries for the
linear map. Note, at linear map teardown time there is a call to the
all-cpu flush_tlb_all() to invalidate the removed mappings.
[1]: https://lkml.kernel.org/r/9DFD717D-857D-493D-A606-B635D72BAC21@amacapital.net
[2]: https://lkml.kernel.org/r/749919a4-cdb1-48a3-adb4-adb81a5fa0b5@intel.com
[ mingo: Minor readability edits. ]
Suggested-by: Dave Hansen <dave.hansen@linux.intel.com>
Reported-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: <stable@vger.kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@surriel.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: dave.hansen@intel.com
Fixes: f77084d96355 ("x86/mm/pat: Disable preemption around __flush_tlb_all()")
Link: http://lkml.kernel.org/r/154395944713.32119.15611079023837132638.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/mm/init_64.c | 6 ------
1 file changed, 6 deletions(-)
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -574,7 +574,6 @@ phys_pud_init(pud_t *pud_page, unsigned
paddr_end,
page_size_mask,
prot);
- __flush_tlb_all();
continue;
}
/*
@@ -617,7 +616,6 @@ phys_pud_init(pud_t *pud_page, unsigned
pud_populate(&init_mm, pud, pmd);
spin_unlock(&init_mm.page_table_lock);
}
- __flush_tlb_all();
update_page_count(PG_LEVEL_1G, pages);
@@ -658,7 +656,6 @@ phys_p4d_init(p4d_t *p4d_page, unsigned
paddr_last = phys_pud_init(pud, paddr,
paddr_end,
page_size_mask);
- __flush_tlb_all();
continue;
}
@@ -670,7 +667,6 @@ phys_p4d_init(p4d_t *p4d_page, unsigned
p4d_populate(&init_mm, p4d, pud);
spin_unlock(&init_mm.page_table_lock);
}
- __flush_tlb_all();
return paddr_last;
}
@@ -723,8 +719,6 @@ kernel_physical_mapping_init(unsigned lo
if (pgd_changed)
sync_global_pgds(vaddr_start, vaddr_end - 1);
- __flush_tlb_all();
-
return paddr_last;
}
next prev parent reply other threads:[~2019-01-07 13:02 UTC|newest]
Thread overview: 130+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-07 12:31 [PATCH 4.14 000/101] 4.14.92-stable review Greg Kroah-Hartman
2019-01-07 12:31 ` [PATCH 4.14 001/101] phonet: af_phonet: Fix Spectre v1 vulnerability Greg Kroah-Hartman
2019-01-07 21:11 ` Sudip Mukherjee
2019-01-08 0:36 ` David Miller
2019-01-08 7:44 ` Greg KH
2019-01-07 12:31 ` [PATCH 4.14 002/101] net: core: " Greg Kroah-Hartman
2019-01-07 21:13 ` Sudip Mukherjee
2019-01-08 0:36 ` David Miller
2019-01-08 7:44 ` Greg KH
2019-01-07 12:31 ` [PATCH 4.14 003/101] ipv4: Fix potential " Greg Kroah-Hartman
2019-01-07 12:31 ` [PATCH 4.14 004/101] ip6mr: " Greg Kroah-Hartman
2019-01-07 12:31 ` [PATCH 4.14 005/101] ax25: fix a use-after-free in ax25_fillin_cb() Greg Kroah-Hartman
2019-01-07 12:31 ` [PATCH 4.14 006/101] gro_cell: add napi_disable in gro_cells_destroy Greg Kroah-Hartman
2019-01-07 12:31 ` [PATCH 4.14 007/101] ibmveth: fix DMA unmap error in ibmveth_xmit_start error path Greg Kroah-Hartman
2019-01-07 12:31 ` [PATCH 4.14 008/101] ieee802154: lowpan_header_create check must check daddr Greg Kroah-Hartman
2019-01-07 12:31 ` [PATCH 4.14 009/101] ipv6: explicitly initialize udp6_addr in udp_sock_create6() Greg Kroah-Hartman
2019-01-07 12:31 ` [PATCH 4.14 010/101] ipv6: tunnels: fix two use-after-free Greg Kroah-Hartman
2019-01-07 12:31 ` [PATCH 4.14 011/101] isdn: fix kernel-infoleak in capi_unlocked_ioctl Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 012/101] net: ipv4: do not handle duplicate fragments as overlapping Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 013/101] net: macb: restart tx after tx used bit read Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 014/101] net: phy: Fix the issue that netif always links up after resuming Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 015/101] netrom: fix locking in nr_find_socket() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 016/101] net/wan: fix a double free in x25_asy_open_tty() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 017/101] packet: validate address length Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 018/101] packet: validate address length if non-zero Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 019/101] ptr_ring: wrap back ->producer in __ptr_ring_swap_queue() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 020/101] qmi_wwan: Added support for Telit LN940 series Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 021/101] sctp: initialize sin6_flowinfo for ipv6 addrs in sctp_inet6addr_event Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 022/101] tcp: fix a race in inet_diag_dump_icsk() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 023/101] tipc: fix a double kfree_skb() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 024/101] vhost: make sure used idx is seen before log in vhost_add_used_n() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 025/101] VSOCK: Send reset control packet when socket is partially bound Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 026/101] xen/netfront: tolerate frags with no data Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 027/101] net/mlx5: Typo fix in del_sw_hw_rule Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 028/101] net/mlx5e: RX, Fix wrong early return in receive queue poll Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 029/101] mlxsw: core: Increase timeout during firmware flash process Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 030/101] net/mlx5e: Remove the false indication of software timestamping support Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 031/101] tipc: use lock_sock() in tipc_sk_reinit() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 032/101] tipc: compare remote and local protocols in tipc_udp_enable() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 033/101] qmi_wwan: Added support for Fibocom NL668 series Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 034/101] qmi_wwan: Add support for Fibocom NL678 series Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 035/101] net/smc: fix TCP fallback socket release Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 036/101] sock: Make sock->sk_stamp thread-safe Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 037/101] IB/hfi1: Incorrect sizing of sge for PIO will OOPs Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 038/101] ALSA: rme9652: Fix potential Spectre v1 vulnerability Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 039/101] ALSA: emu10k1: Fix potential Spectre v1 vulnerabilities Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 040/101] ALSA: pcm: Fix potential Spectre v1 vulnerability Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 041/101] ALSA: emux: Fix potential Spectre v1 vulnerabilities Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 042/101] mtd: atmel-quadspi: disallow building on ebsa110 Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 043/101] ALSA: hda: add mute LED support for HP EliteBook 840 G4 Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 044/101] ALSA: fireface: fix for state to fetch PCM frames Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 045/101] ALSA: firewire-lib: fix wrong handling payload_length as payload_quadlet Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 046/101] ALSA: firewire-lib: fix wrong assignment for out_packet_without_header tracepoint Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 047/101] ALSA: firewire-lib: use the same print format for without_header tracepoints Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 048/101] ALSA: hda/tegra: clear pending irq handlers Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 049/101] USB: serial: pl2303: add ids for Hewlett-Packard HP POS pole displays Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 050/101] USB: serial: option: add Fibocom NL678 series Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 051/101] usb: r8a66597: Fix a possible concurrency use-after-free bug in r8a66597_endpoint_disable() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 052/101] staging: wilc1000: fix missing read_write setting when reading data Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 053/101] qmi_wwan: apply SET_DTR quirk to the SIMCOM shared device ID Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 054/101] s390/pci: fix sleeping in atomic during hotplug Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 055/101] Input: elan_i2c - add ACPI ID for touchpad in ASUS Aspire F5-573G Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 056/101] x86/speculation/l1tf: Drop the swap storage limit restriction when l1tf=off Greg Kroah-Hartman
2019-01-07 12:32 ` Greg Kroah-Hartman [this message]
2019-01-07 12:32 ` [PATCH 4.14 058/101] KVM: x86: Use jmp to invoke kvm_spurious_fault() from .fixup Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 059/101] KVM: nVMX: Free the VMREAD/VMWRITE bitmaps if alloc_kvm_area() fails Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 060/101] platform-msi: Free descriptors in platform_msi_domain_free() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 061/101] perf pmu: Suppress potential format-truncation warning Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 062/101] ext4: add ext4_sb_bread() to disambiguate ENOMEM cases Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 063/101] ext4: fix possible use after free in ext4_quota_enable Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 064/101] ext4: missing unlock/put_page() in ext4_try_to_write_inline_data() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 065/101] ext4: fix EXT4_IOC_GROUP_ADD ioctl Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 066/101] ext4: include terminating u32 in size of xattr entries when expanding inodes Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 067/101] ext4: force inode writes when nfsd calls commit_metadata() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 068/101] ext4: check for shutdown and r/o file system in ext4_write_inode() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 069/101] spi: bcm2835: Fix race on DMA termination Greg Kroah-Hartman
2019-01-07 21:15 ` Sudip Mukherjee
2019-01-08 7:37 ` Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 070/101] spi: bcm2835: Fix book-keeping of " Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 071/101] spi: bcm2835: Avoid finishing transfer prematurely in IRQ mode Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 072/101] clk: rockchip: fix typo in rk3188 spdif_frac parent Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 073/101] crypto: cavium/nitrox - fix a DMA pool free failure Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 074/101] crypto: testmgr - add AES-CFB tests Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 075/101] cgroup: fix CSS_TASK_ITER_PROCS Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 076/101] cdc-acm: fix abnormal DATA RX issue for Mediatek Preloader Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 077/101] Btrfs: fix fsync of files with multiple hard links in new directories Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 078/101] btrfs: run delayed items before dropping the snapshot Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 079/101] powerpc/tm: Set MSR[TS] just prior to recheckpoint Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 080/101] netfilter: xt_connlimit: dont store address in the conn nodes Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 081/101] netfilter: nf_conncount: expose connection list interface Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 082/101] netfilter: nf_conncount: Fix garbage collection with zones Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 083/101] netfilter: nf_conncount: fix garbage collection confirm race Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 084/101] netfilter: nf_conncount: dont skip eviction when age is negative Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 085/101] f2fs: fix validation of the block count in sanity_check_raw_super Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 086/101] serial: uartps: Fix interrupt mask issue to handle the RX interrupts properly Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 087/101] media: vivid: free bitmap_cap when updating std/timings/etc Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 088/101] media: v4l2-tpg: array index could become negative Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 089/101] MIPS: math-emu: Write-protect delay slot emulation pages Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 090/101] MIPS: c-r4k: Add r4k_blast_scache_node for Loongson-3 Greg Kroah-Hartman
2019-01-07 21:17 ` Sudip Mukherjee
2019-01-08 7:38 ` Greg Kroah-Hartman
2019-01-08 9:54 ` Sudip Mukherjee
2019-01-08 12:03 ` Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 091/101] MIPS: Ensure pmd_present() returns false after pmd_mknotpresent() Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 092/101] MIPS: Align kernel load address to 64KB Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 093/101] MIPS: Expand MIPS32 ASIDs to 64 bits Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 094/101] MIPS: OCTEON: mark RGMII interface disabled on OCTEON III Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 095/101] CIFS: Fix error mapping for SMB2_LOCK command which caused OFD lock problem Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 096/101] arm64: KVM: Avoid setting the upper 32 bits of VTCR_EL2 to 1 Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 097/101] arm/arm64: KVM: vgic: Force VM halt when changing the active state of GICv3 PPIs/SGIs Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 098/101] rtc: m41t80: Correct alarm month range with RTC reads Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 099/101] tpm: tpm_try_transmit() refactor error flow Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 100/101] tpm: tpm_i2c_nuvoton: use correct command duration for TPM 2.x Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 101/101] ARM: dts: exynos: Specify I2S assigned clocks in proper node Greg Kroah-Hartman
2019-01-07 14:39 ` [PATCH 4.14 000/101] 4.14.92-stable review Daniel Díaz
2019-01-07 14:47 ` Greg Kroah-Hartman
2019-01-07 14:51 ` Greg Kroah-Hartman
2019-01-07 14:52 ` Greg Kroah-Hartman
2019-01-08 9:20 ` Naresh Kamboju
2019-01-07 22:34 ` shuah
2019-01-07 22:38 ` shuah
2019-01-08 4:59 ` Guenter Roeck
2019-01-08 12:25 ` Greg Kroah-Hartman
2019-01-09 11:40 ` Jinpu Wang
2019-01-09 14:46 ` Greg Kroah-Hartman
2019-01-09 15:47 ` Guenter Roeck
2019-01-08 12:19 ` Greg Kroah-Hartman
2019-01-09 10:47 ` Jon Hunter
2019-01-09 14:40 ` Greg Kroah-Hartman
2019-01-08 23:05 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190107105336.046274395@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=bigeasy@linutronix.de \
--cc=bp@alien8.de \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=riel@surriel.com \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome