All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>
Cc: KVM <kvm@vger.kernel.org>,
	Cornelia Huck <cornelia.huck@de.ibm.com>,
	linux-s390 <linux-s390@vger.kernel.org>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	David Hildenbrand <dahi@linux.vnet.ibm.com>,
	stable@vger.kernel.org, #@tuxmaker.boeblingen.de.ibm.com,
	4.6+@tuxmaker.boeblingen.de.ibm.com
Subject: [GIT PULL 40/52] s390/mm: don't drop errors in get_guest_storage_key
Date: Tue, 14 Jun 2016 20:57:17 +0200	[thread overview]
Message-ID: <201606141857.u5EIsTtQ007835@mx0a-001b2d01.pphosted.com> (raw)
In-Reply-To: <1465930649-181383-1-git-send-email-borntraeger@de.ibm.com>

From: David Hildenbrand <dahi@linux.vnet.ibm.com>

Commit 1e133ab296f3 ("s390/mm: split arch/s390/mm/pgtable.c") changed
the return value of get_guest_storage_key to an unsigned char, resulting
in -EFAULT getting interpreted as a valid storage key.

Cc: stable@vger.kernel.org # 4.6+
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
 arch/s390/include/asm/pgtable.h | 2 +-
 arch/s390/mm/pgtable.c          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index 18d2beb..42b968a8 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -893,7 +893,7 @@ void ptep_zap_key(struct mm_struct *mm, unsigned long addr, pte_t *ptep);
 bool test_and_clear_guest_dirty(struct mm_struct *mm, unsigned long address);
 int set_guest_storage_key(struct mm_struct *mm, unsigned long addr,
 			  unsigned char key, bool nq);
-unsigned char get_guest_storage_key(struct mm_struct *mm, unsigned long addr);
+unsigned long get_guest_storage_key(struct mm_struct *mm, unsigned long addr);
 
 /*
  * Certain architectures need to do special things when PTEs
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c
index 4324b87..2a23ca9 100644
--- a/arch/s390/mm/pgtable.c
+++ b/arch/s390/mm/pgtable.c
@@ -543,7 +543,7 @@ int set_guest_storage_key(struct mm_struct *mm, unsigned long addr,
 }
 EXPORT_SYMBOL(set_guest_storage_key);
 
-unsigned char get_guest_storage_key(struct mm_struct *mm, unsigned long addr)
+unsigned long get_guest_storage_key(struct mm_struct *mm, unsigned long addr)
 {
 	unsigned char key;
 	spinlock_t *ptl;
-- 
2.5.5

  parent reply	other threads:[~2016-06-14 18:57 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1465930649-181383-1-git-send-email-borntraeger@de.ibm.com>
2016-06-14 18:56 ` [GIT PULL 01/52] s390: hypfs: Move diag implementation and data definitions Christian Borntraeger
2016-06-14 18:56   ` Christian Borntraeger
2016-06-14 18:56 ` [GIT PULL 02/52] s390: Make cpc_name accessible Christian Borntraeger
2016-06-14 18:56 ` [GIT PULL 03/52] s390: Make diag224 public Christian Borntraeger
2016-06-14 18:56 ` [GIT PULL 04/52] KVM: s390: Add operation exception interception handler Christian Borntraeger
2016-06-14 18:56 ` [GIT PULL 05/52] KVM: s390: Extend diag 204 fields Christian Borntraeger
2016-06-14 18:56 ` [GIT PULL 06/52] KVM: s390: Add sthyi emulation Christian Borntraeger
2016-06-14 18:56   ` Christian Borntraeger
2016-06-14 18:56 ` [GIT PULL 07/52] KVM: s390: Limit sthyi execution Christian Borntraeger
2016-06-14 18:56   ` Christian Borntraeger
2016-06-14 18:56 ` [GIT PULL 08/52] KVM: s390: Add mnemonic print to kvm_s390_intercept_prog Christian Borntraeger
2016-06-14 18:56 ` [GIT PULL 09/52] KVM: s390: interface to query and configure cpu features Christian Borntraeger
2016-06-14 18:56   ` Christian Borntraeger
2016-06-14 18:56 ` [GIT PULL 10/52] KVM: s390: forward ESOP if available Christian Borntraeger
2016-06-14 18:56 ` [GIT PULL 11/52] KVM: s390: gaccess: store guest address on ALC prot exceptions Christian Borntraeger
2016-06-14 18:56 ` [GIT PULL 12/52] KVM: s390: gaccess: function for preparing translation exceptions Christian Borntraeger
2016-06-14 18:56 ` [GIT PULL 13/52] KVM: s390: gaccess: convert kvm_s390_check_low_addr_prot_real() Christian Borntraeger
2016-06-14 18:56 ` [GIT PULL 14/52] KVM: s390: gaccess: convert guest_translate_address() Christian Borntraeger
2016-06-14 18:56 ` [GIT PULL 15/52] KVM: s390: gaccess: convert guest_page_range() Christian Borntraeger
2016-06-14 18:56 ` [GIT PULL 16/52] KVM: s390: gaccess: convert get_vcpu_asce() Christian Borntraeger
2016-06-14 18:56 ` [GIT PULL 17/52] s390/crypto: allow to query all known cpacf functions Christian Borntraeger
2016-06-14 18:56 ` [GIT PULL 18/52] KVM: s390: interface to query and configure cpu subfunctions Christian Borntraeger
2016-06-14 18:56 ` [GIT PULL 19/52] s390/sclp: detect 64-bit-SCAO facility Christian Borntraeger
2016-06-14 18:56 ` [GIT PULL 20/52] KVM: s390: handle missing " Christian Borntraeger
2016-06-14 18:56   ` Christian Borntraeger
2016-06-14 18:56 ` [GIT PULL 21/52] s390/sclp: detect guest-PER enhancement Christian Borntraeger
2016-06-14 18:56 ` [GIT PULL 22/52] KVM: s390: guestdbg: signal missing hardware support Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 23/52] s390/sclp: detect cmma Christian Borntraeger
2016-06-14 18:57   ` Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 24/52] KVM: s390: enable CMMA if the interpration is available Christian Borntraeger
2016-06-14 18:57   ` Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 25/52] KVM: s390: provide CMMA attributes only if available Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 26/52] s390/sclp: detect guest-storage-limit-suppression Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 27/52] KVM: s390: handle missing guest-storage-limit-suppression Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 28/52] s390/sclp: detect intervention bypass facility Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 29/52] KVM: s390: enable ib only if available Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 30/52] s390/sclp: detect conditional-external-interception facility Christian Borntraeger
2016-06-14 18:57   ` Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 31/52] KVM: s390: enable cei only if available Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 32/52] s390/sclp: detect PFMF interpretation facility Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 33/52] KVM: s390: enable PFMFI only if available Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 34/52] s390/sclp: detect interlock-and-broadcast-suppression facility Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 35/52] KVM: s390: enable ibs only if available Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 36/52] KVM: s390: enable host-protection-interruption only with ESOP Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 37/52] KVM: s390: turn on tx even without ctx Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 38/52] KVM: s390: provide logging for diagnose 0x500 Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 39/52] KVM: s390: fixup I/O interrupt traces Christian Borntraeger
2016-06-14 18:57 ` Christian Borntraeger [this message]
2016-06-14 18:57   ` [GIT PULL 40/52] s390/mm: don't drop errors in get_guest_storage_key Christian Borntraeger
2016-06-14 18:57 ` Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 41/52] s390/mm: set and get guest storage key mmap locking Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 42/52] s390/mm: simplify get_guest_storage_key Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 43/52] s390/mm: return key via pointer in get_guest_storage_key Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 44/52] KVM: s390: storage keys fit into a char Christian Borntraeger
2016-06-14 18:57   ` Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 45/52] KVM: s390: pfmf: fix end address calculation Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 46/52] KVM: s390: pfmf: MR and MC are ignored without CSSKE Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 47/52] KVM: s390: pfmf: take care of amode when setting reg2 Christian Borntraeger
2016-06-14 18:57   ` Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 48/52] KVM: s390: pfmf: support conditional-sske facility Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 49/52] KVM: s390: pfmf: handle address overflows Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 50/52] s390/sclp: detect storage-key facility Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 51/52] KVM: s390: trace and count all skey intercepts Christian Borntraeger
2016-06-14 18:57 ` [GIT PULL 52/52] KVM: s390: handle missing storage-key facility Christian Borntraeger

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=201606141857.u5EIsTtQ007835@mx0a-001b2d01.pphosted.com \
    --to=borntraeger@de.ibm.com \
    --cc=#@tuxmaker.boeblingen.de.ibm.com \
    --cc=4.6+@tuxmaker.boeblingen.de.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=dahi@linux.vnet.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.