linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org,
	Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: [PATCH 4.4 08/28] s390/mm: fix CMMA vs KSM vs others
Date: Tue, 25 Apr 2017 16:08:39 +0100	[thread overview]
Message-ID: <20170425150815.085058481@linuxfoundation.org> (raw)
In-Reply-To: <20170425150814.719042460@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Christian Borntraeger <borntraeger@de.ibm.com>

commit a8f60d1fadf7b8b54449fcc9d6b15248917478ba upstream.

On heavy paging with KSM I see guest data corruption. Turns out that
KSM will add pages to its tree, where the mapping return true for
pte_unused (or might become as such later).  KSM will unmap such pages
and reinstantiate with different attributes (e.g. write protected or
special, e.g. in replace_page or write_protect_page)). This uncovered
a bug in our pagetable handling: We must remove the unused flag as
soon as an entry becomes present again.

Signed-of-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


---
 arch/s390/include/asm/pgtable.h |    2 ++
 1 file changed, 2 insertions(+)

--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -829,6 +829,8 @@ static inline void set_pte_at(struct mm_
 {
 	pgste_t pgste;
 
+	if (pte_present(entry))
+		pte_val(entry) &= ~_PAGE_UNUSED;
 	if (mm_has_pgste(mm)) {
 		pgste = pgste_get_lock(ptep);
 		pgste_val(pgste) &= ~_PGSTE_GPS_ZERO;

  parent reply	other threads:[~2017-04-25 15:11 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-25 15:08 [PATCH 4.4 00/28] 4.4.64-stable review Greg Kroah-Hartman
2017-04-25 15:08 ` [PATCH 4.4 01/28] KEYS: Disallow keyrings beginning with . to be joined as session keyrings Greg Kroah-Hartman
2017-04-25 15:08 ` [PATCH 4.4 02/28] KEYS: Change the name of the dead type to ".dead" to prevent user access Greg Kroah-Hartman
2017-04-25 15:08 ` [PATCH 4.4 03/28] KEYS: fix keyctl_set_reqkey_keyring() to not leak thread keyrings Greg Kroah-Hartman
2017-04-25 15:08 ` [PATCH 4.4 04/28] tracing: Allocate the snapshot buffer before enabling probe Greg Kroah-Hartman
2017-04-25 15:08 ` [PATCH 4.4 05/28] ring-buffer: Have ring_buffer_iter_empty() return true when empty Greg Kroah-Hartman
2017-04-25 15:08 ` [PATCH 4.4 06/28] cifs: Do not send echoes before Negotiate is complete Greg Kroah-Hartman
2017-05-09 12:13   ` Ben Hutchings
2017-05-10  1:00     ` Pavel Shilovskiy
2017-05-25 16:59       ` Pavel Shilovskiy
2017-04-25 15:08 ` [PATCH 4.4 07/28] CIFS: remove bad_network_name flag Greg Kroah-Hartman
2017-04-25 15:08 ` Greg Kroah-Hartman [this message]
2017-04-25 15:08 ` [PATCH 4.4 09/28] Drivers: hv: dont leak memory in vmbus_establish_gpadl() Greg Kroah-Hartman
2017-04-25 15:08 ` [PATCH 4.4 10/28] Drivers: hv: get rid of timeout in vmbus_open() Greg Kroah-Hartman
2017-04-25 15:08 ` [PATCH 4.4 11/28] Drivers: hv: vmbus: Reduce the delay between retries in vmbus_post_msg() Greg Kroah-Hartman
2017-04-25 15:08 ` [PATCH 4.4 12/28] VSOCK: Detach QP check should filter out non matching QPs Greg Kroah-Hartman
2017-04-25 15:08 ` [PATCH 4.4 13/28] Input: elantech - add Fujitsu Lifebook E547 to force crc_enabled Greg Kroah-Hartman
2017-04-25 15:08 ` [PATCH 4.4 14/28] ACPI / power: Avoid maybe-uninitialized warning Greg Kroah-Hartman
2017-04-25 15:08 ` [PATCH 4.4 15/28] mmc: sdhci-esdhc-imx: increase the pad I/O drive strength for DDR50 card Greg Kroah-Hartman
2017-04-25 15:08 ` [PATCH 4.4 16/28] mac80211: reject ToDS broadcast data frames Greg Kroah-Hartman
2017-04-25 15:08 ` [PATCH 4.4 17/28] ubi/upd: Always flush after prepared for an update Greg Kroah-Hartman
2017-04-25 15:08 ` [PATCH 4.4 18/28] powerpc/kprobe: Fix oops when kprobed on stdu instruction Greg Kroah-Hartman
2017-04-25 15:08 ` [PATCH 4.4 19/28] x86/mce/AMD: Give a name to MCA bank 3 when accessed with legacy MSRs Greg Kroah-Hartman
2017-04-25 15:08 ` [PATCH 4.4 20/28] kvm: arm/arm64: Fix locking for kvm_free_stage2_pgd Greg Kroah-Hartman
2017-04-25 15:08 ` [PATCH 4.4 21/28] powerpc/64: Fix flush_(d|i)cache_range() called from modules Greg Kroah-Hartman
2017-04-25 15:08 ` [PATCH 4.4 22/28] Tools: hv: kvp: ensure kvp device fd is closed on exec Greg Kroah-Hartman
2017-04-25 15:08 ` [PATCH 4.4 23/28] Drivers: hv: balloon: keep track of where ha_region starts Greg Kroah-Hartman
2017-04-25 15:08 ` [PATCH 4.4 24/28] Drivers: hv: balloon: account for gaps in hot add regions Greg Kroah-Hartman
2017-04-25 15:08 ` [PATCH 4.4 25/28] hv: dont reset hv_context.tsc_page on crash Greg Kroah-Hartman
2017-04-25 15:08 ` [PATCH 4.4 26/28] x86, pmem: fix broken __copy_user_nocache cache-bypass assumptions Greg Kroah-Hartman
2017-05-09 17:00   ` Ben Hutchings
2017-05-09 17:10     ` Dan Williams
2017-04-25 15:08 ` [PATCH 4.4 27/28] block: fix del_gendisk() vs blkdev_ioctl crash Greg Kroah-Hartman
2017-04-25 15:08 ` [PATCH 4.4 28/28] tipc: fix crash during node removal Greg Kroah-Hartman
2017-04-25 18:18 ` [PATCH 4.4 00/28] 4.4.64-stable review Shuah Khan
2017-04-26  8:32   ` Greg Kroah-Hartman
2017-04-25 21:26 ` Guenter Roeck
2017-04-26  2:27 ` Guenter Roeck
2017-04-26  8:31   ` Greg Kroah-Hartman
2017-04-26 13:10     ` Guenter Roeck
2017-04-26 13:11       ` Guenter Roeck
2017-04-26 14:39     ` Guenter Roeck
2017-04-26 15:48       ` Greg Kroah-Hartman

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=20170425150815.085058481@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=stable@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).