Skip to contentSkip to conversation

s390 patches for 4.1-rc2

GIT PULL Martin Schwidefsky 1 participant 1 message Apr 28, 2015

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Hi Linus,

please pull from the 'for-linus' branch of

git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-linus

to receive the following updates:

One additional new feature for 4.1, a new PRNG based on SHA-512 for the zcrypt driver. Two memory management related changes, the page table reallocation for KVM is removed, and with file ptes gone the encoding of page table entries is improved. And three bug fixes.

Christophe Jaillet (1):
s390/3215: free memory in error path

Harald Freudenberger (1):
s390/zcrypt: Introduce new SHA-512 based Pseudo Random Generator.

Heiko Carstens (1):
s390/bpf: add dependency to z196 features

Martin Schwidefsky (3):
s390/kvm: remove delayed reallocation of page tables for KVM s390/mm: correct transfer of dirty & young bits in __pmd_to_pte s390/mm: change swap pte encoding and pgtable cleanup

 arch/s390/Kconfig                   |   2 +-
 arch/s390/crypto/crypt_s390.h       | 122 ++++--
 arch/s390/crypto/prng.c             | 850 +++++++++++++++++++++++++++++++++---
 arch/s390/include/asm/mmu.h         |   4 +-
 arch/s390/include/asm/mmu_context.h |   3 +
 arch/s390/include/asm/pgalloc.h     |   1 +
 arch/s390/include/asm/pgtable.h     | 167 +++----
 arch/s390/mm/hugetlbpage.c          |  66 +--
 arch/s390/mm/pgtable.c              | 142 ++----
 drivers/s390/char/con3215.c         |   2 +
 10 files changed, 1031 insertions(+), 328 deletions(-)
arch/s390/Kconfig +1 -1
index 8e58c61..b06dc38 100644
@@ -115,7 +115,7 @@ config S390
 	select HAVE_ARCH_SECCOMP_FILTER
 	select HAVE_ARCH_TRACEHOOK
 	select HAVE_ARCH_TRANSPARENT_HUGEPAGE
-	select HAVE_BPF_JIT if PACK_STACK && HAVE_MARCH_Z9_109_FEATURES
+	select HAVE_BPF_JIT if PACK_STACK && HAVE_MARCH_Z196_FEATURES
 	select HAVE_CMPXCHG_DOUBLE
 	select HAVE_CMPXCHG_LOCAL
 	select HAVE_DEBUG_KMEMLEAK
arch/s390/crypto/crypt_s390.h +91 -31

222 lines not on this page · raw message

arch/s390/crypto/prng.c +779 -71

975 lines not on this page · raw message

arch/s390/include/asm/mmu.h +3 -1
index a5e6562..d29ad95 100644
@@ -14,7 +14,9 @@ typedef struct {
 	unsigned long asce_bits;
 	unsigned long asce_limit;
 	unsigned long vdso_base;
-	/* The mmu context has extended page tables. */
+	/* The mmu context allocates 4K page tables. */
+	unsigned int alloc_pgste:1;
+	/* The mmu context uses extended page tables. */
 	unsigned int has_pgste:1;
 	/* The mmu context uses storage keys. */
 	unsigned int use_skey:1;
arch/s390/include/asm/mmu_context.h +3 -0
index d25d9ff..fb1b93e 100644
@@ -20,8 +20,11 @@ static inline int init_new_context(struct task_struct *tsk,
 	mm->context.flush_mm = 0;
 	mm->context.asce_bits = _ASCE_TABLE_LENGTH | _ASCE_USER_BITS;
 	mm->context.asce_bits |= _ASCE_TYPE_REGION3;
+#ifdef CONFIG_PGSTE
+	mm->context.alloc_pgste = page_table_allocate_pgste;
 	mm->context.has_pgste = 0;
 	mm->context.use_skey = 0;
+#endif
 	mm->context.asce_limit = STACK_TOP_MAX;
 	crst_table_init((unsigned long *) mm->pgd, pgd_entry_type(mm));
 	return 0;
arch/s390/include/asm/pgalloc.h +1 -0
index 51e7fb6..7b7858f 100644
@@ -21,6 +21,7 @@ void crst_table_free(struct mm_struct *, unsigned long *);
 unsigned long *page_table_alloc(struct mm_struct *);
 void page_table_free(struct mm_struct *, unsigned long *);
 void page_table_free_rcu(struct mmu_gather *, unsigned long *, unsigned long);
+extern int page_table_allocate_pgste;
 
 int set_guest_storage_key(struct mm_struct *mm, unsigned long addr,
 			  unsigned long key, bool nq);
arch/s390/include/asm/pgtable.h +72 -95

241 lines not on this page · raw message

arch/s390/mm/hugetlbpage.c +36 -30

84 lines not on this page · raw message

arch/s390/mm/pgtable.c +43 -99

178 lines not on this page · raw message

drivers/s390/char/con3215.c +2 -0
index c43aca6..0fc3fe5 100644
@@ -667,6 +667,8 @@ static struct raw3215_info *raw3215_alloc_info(void)
 	info->buffer = kzalloc(RAW3215_BUFFER_SIZE, GFP_KERNEL | GFP_DMA);
 	info->inbuf = kzalloc(RAW3215_INBUF_SIZE, GFP_KERNEL | GFP_DMA);
 	if (!info->buffer || !info->inbuf) {
+		kfree(info->inbuf);
+		kfree(info->buffer);
 		kfree(info);
 		return NULL;
 	}