[GIT PULL] s390 patches for the 3.9 merge window #2

2013-03-03 Thread Martin Schwidefsky
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:
The main part of this merge are Heikos uaccess patches. Together with
commit 09884964335e85e8 "mm: do not grow the stack vma just because of
an overrun on preceding vma" the user string access is hopefully fixed
for good. In addition some bug fixes and two cleanup patches.


Heiko Carstens (9):
  s390/page table dumper: add support for change-recording override bit
  s390/mm: ignore change bit for vmemmap
  s390/uaccess: shorten strncpy_from_user/strnlen_user
  s390/uaccess: fix strncpy_from_user/strnlen_user zero maxlen case
  s390/uaccess: remove pointless access_ok() checks
  input: disable i8042 PC Keyboard controller for s390
  s390/uaccess: fix strncpy_from_user string length check
  s390/uaccess: fix kernel ds access for page table walk
  s390/module: fix compile warning

Stefan Haberland (1):
  s390/dasd: fix unresponsive device after all channel paths were lost

Stefan Raspl (1):
  qdio: remove unused parameters

Syam Sidhardhan (1):
  s390/dis: Fix invalid array size

 arch/s390/include/asm/futex.h|6 --
 arch/s390/include/asm/pgtable.h  |2 +
 arch/s390/include/asm/uaccess.h  |   23 ++-
 arch/s390/kernel/compat_signal.c |   14 -
 arch/s390/kernel/dis.c   |4 +-
 arch/s390/kernel/module.c|2 +-
 arch/s390/kernel/signal.c|8 ---
 arch/s390/lib/uaccess_mvcos.c|   26 
 arch/s390/lib/uaccess_pt.c   |  129 +++---
 arch/s390/lib/uaccess_std.c  |   48 ++
 arch/s390/mm/dump_pagetables.c   |   25 ++--
 arch/s390/mm/vmem.c  |3 +-
 drivers/input/serio/Kconfig  |2 +-
 drivers/s390/block/dasd_eckd.c   |   10 ++-
 drivers/s390/cio/qdio_debug.c|9 +--
 drivers/s390/cio/qdio_debug.h|3 +-
 drivers/s390/cio/qdio_main.c |2 +-
 17 files changed, 172 insertions(+), 144 deletions(-)

diff --git a/arch/s390/include/asm/futex.h b/arch/s390/include/asm/futex.h
index 96bc83e..51bcaa0 100644
--- a/arch/s390/include/asm/futex.h
+++ b/arch/s390/include/asm/futex.h
@@ -16,9 +16,6 @@ static inline int futex_atomic_op_inuser (int encoded_op, u32 
__user *uaddr)
if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
oparg = 1 << oparg;
 
-   if (! access_ok (VERIFY_WRITE, uaddr, sizeof(u32)))
-   return -EFAULT;
-
pagefault_disable();
ret = uaccess.futex_atomic_op(op, uaddr, oparg, );
pagefault_enable();
@@ -40,9 +37,6 @@ static inline int futex_atomic_op_inuser (int encoded_op, u32 
__user *uaddr)
 static inline int futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
u32 oldval, u32 newval)
 {
-   if (! access_ok (VERIFY_WRITE, uaddr, sizeof(u32)))
-   return -EFAULT;
-
return uaccess.futex_atomic_cmpxchg(uval, uaddr, oldval, newval);
 }
 
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index 97de120..4a29308 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -340,6 +340,8 @@ extern unsigned long MODULES_END;
 #define _REGION3_ENTRY_EMPTY   (_REGION_ENTRY_TYPE_R3 | _REGION_ENTRY_INV)
 
 #define _REGION3_ENTRY_LARGE   0x400   /* RTTE-format control, large page  */
+#define _REGION3_ENTRY_RO  0x200   /* page protection bit  */
+#define _REGION3_ENTRY_CO  0x100   /* change-recording override*/
 
 /* Bits in the segment table entry */
 #define _SEGMENT_ENTRY_ORIGIN  ~0x7ffUL/* segment table origin */
diff --git a/arch/s390/include/asm/uaccess.h b/arch/s390/include/asm/uaccess.h
index 34268df..9c33ed4 100644
--- a/arch/s390/include/asm/uaccess.h
+++ b/arch/s390/include/asm/uaccess.h
@@ -252,9 +252,7 @@ static inline unsigned long __must_check
 copy_to_user(void __user *to, const void *from, unsigned long n)
 {
might_fault();
-   if (access_ok(VERIFY_WRITE, to, n))
-   n = __copy_to_user(to, from, n);
-   return n;
+   return __copy_to_user(to, from, n);
 }
 
 /**
@@ -315,11 +313,7 @@ copy_from_user(void *to, const void __user *from, unsigned 
long n)
copy_from_user_overflow();
return n;
}
-   if (access_ok(VERIFY_READ, from, n))
-   n = __copy_from_user(to, from, n);
-   else
-   memset(to, 0, n);
-   return n;
+   return __copy_from_user(to, from, n);
 }
 
 static inline unsigned long __must_check
@@ -332,9 +326,7 @@ static inline unsigned long __must_check
 copy_in_user(void __user *to, const void __user *from, unsigned long n)
 {
might_fault();
-   if (__access_ok(from,n) && __access_ok(to,n))
-   n = __copy_in_user(to, from, n);
-   return n;
+   return __copy_in_user(to, 

[GIT PULL] s390 patches for the 3.9 merge window #2

2013-03-03 Thread Martin Schwidefsky
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:
The main part of this merge are Heikos uaccess patches. Together with
commit 09884964335e85e8 mm: do not grow the stack vma just because of
an overrun on preceding vma the user string access is hopefully fixed
for good. In addition some bug fixes and two cleanup patches.


Heiko Carstens (9):
  s390/page table dumper: add support for change-recording override bit
  s390/mm: ignore change bit for vmemmap
  s390/uaccess: shorten strncpy_from_user/strnlen_user
  s390/uaccess: fix strncpy_from_user/strnlen_user zero maxlen case
  s390/uaccess: remove pointless access_ok() checks
  input: disable i8042 PC Keyboard controller for s390
  s390/uaccess: fix strncpy_from_user string length check
  s390/uaccess: fix kernel ds access for page table walk
  s390/module: fix compile warning

Stefan Haberland (1):
  s390/dasd: fix unresponsive device after all channel paths were lost

Stefan Raspl (1):
  qdio: remove unused parameters

Syam Sidhardhan (1):
  s390/dis: Fix invalid array size

 arch/s390/include/asm/futex.h|6 --
 arch/s390/include/asm/pgtable.h  |2 +
 arch/s390/include/asm/uaccess.h  |   23 ++-
 arch/s390/kernel/compat_signal.c |   14 -
 arch/s390/kernel/dis.c   |4 +-
 arch/s390/kernel/module.c|2 +-
 arch/s390/kernel/signal.c|8 ---
 arch/s390/lib/uaccess_mvcos.c|   26 
 arch/s390/lib/uaccess_pt.c   |  129 +++---
 arch/s390/lib/uaccess_std.c  |   48 ++
 arch/s390/mm/dump_pagetables.c   |   25 ++--
 arch/s390/mm/vmem.c  |3 +-
 drivers/input/serio/Kconfig  |2 +-
 drivers/s390/block/dasd_eckd.c   |   10 ++-
 drivers/s390/cio/qdio_debug.c|9 +--
 drivers/s390/cio/qdio_debug.h|3 +-
 drivers/s390/cio/qdio_main.c |2 +-
 17 files changed, 172 insertions(+), 144 deletions(-)

diff --git a/arch/s390/include/asm/futex.h b/arch/s390/include/asm/futex.h
index 96bc83e..51bcaa0 100644
--- a/arch/s390/include/asm/futex.h
+++ b/arch/s390/include/asm/futex.h
@@ -16,9 +16,6 @@ static inline int futex_atomic_op_inuser (int encoded_op, u32 
__user *uaddr)
if (encoded_op  (FUTEX_OP_OPARG_SHIFT  28))
oparg = 1  oparg;
 
-   if (! access_ok (VERIFY_WRITE, uaddr, sizeof(u32)))
-   return -EFAULT;
-
pagefault_disable();
ret = uaccess.futex_atomic_op(op, uaddr, oparg, oldval);
pagefault_enable();
@@ -40,9 +37,6 @@ static inline int futex_atomic_op_inuser (int encoded_op, u32 
__user *uaddr)
 static inline int futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
u32 oldval, u32 newval)
 {
-   if (! access_ok (VERIFY_WRITE, uaddr, sizeof(u32)))
-   return -EFAULT;
-
return uaccess.futex_atomic_cmpxchg(uval, uaddr, oldval, newval);
 }
 
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index 97de120..4a29308 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -340,6 +340,8 @@ extern unsigned long MODULES_END;
 #define _REGION3_ENTRY_EMPTY   (_REGION_ENTRY_TYPE_R3 | _REGION_ENTRY_INV)
 
 #define _REGION3_ENTRY_LARGE   0x400   /* RTTE-format control, large page  */
+#define _REGION3_ENTRY_RO  0x200   /* page protection bit  */
+#define _REGION3_ENTRY_CO  0x100   /* change-recording override*/
 
 /* Bits in the segment table entry */
 #define _SEGMENT_ENTRY_ORIGIN  ~0x7ffUL/* segment table origin */
diff --git a/arch/s390/include/asm/uaccess.h b/arch/s390/include/asm/uaccess.h
index 34268df..9c33ed4 100644
--- a/arch/s390/include/asm/uaccess.h
+++ b/arch/s390/include/asm/uaccess.h
@@ -252,9 +252,7 @@ static inline unsigned long __must_check
 copy_to_user(void __user *to, const void *from, unsigned long n)
 {
might_fault();
-   if (access_ok(VERIFY_WRITE, to, n))
-   n = __copy_to_user(to, from, n);
-   return n;
+   return __copy_to_user(to, from, n);
 }
 
 /**
@@ -315,11 +313,7 @@ copy_from_user(void *to, const void __user *from, unsigned 
long n)
copy_from_user_overflow();
return n;
}
-   if (access_ok(VERIFY_READ, from, n))
-   n = __copy_from_user(to, from, n);
-   else
-   memset(to, 0, n);
-   return n;
+   return __copy_from_user(to, from, n);
 }
 
 static inline unsigned long __must_check
@@ -332,9 +326,7 @@ static inline unsigned long __must_check
 copy_in_user(void __user *to, const void __user *from, unsigned long n)
 {
might_fault();
-   if (__access_ok(from,n)  __access_ok(to,n))
-   n = __copy_in_user(to, from, n);
-   return n;
+   return __copy_in_user(to, 

[GIT PULL] s390 patches for the 3.9 merge window

2013-02-21 Thread Martin Schwidefsky
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:
The most prominent change in this patch set is the software dirty bit
patch for s390. It removes __HAVE_ARCH_PAGE_TEST_AND_CLEAR_DIRTY and
the page_test_and_clear_dirty primitive which makes the common memory
management code a bit less obscure. Heiko fixed most of the PCI related
fallout, more often than not missing GENERIC_HARDIRQS dependencies.
Notable is one of the 3270 patches which adds an export to tty_io to
be able to resize a tty. The rest is the usual bunch of cleanups and
bug fixes.

There is a merge conflict in arch/s390/Kconfig between the current
upstream and the s390 branch. The cause is the Heikos Kconfig sorting
vs the removal of HAVE_IRQ_WORK. The correct merge is the sorted list
without the HAVE_IRQ_WORK select.

Heiko Carstens (18):
  asm-generic/io.h: convert readX defines to functions
  s390/time: rename tod clock access functions
  s390/barrier: convert mb() to define again
  s390/dma: provide dma_cache_sync() function
  s390/dma: remove dma_is_consistent() declaration
  s390/pci: rename pci_probe to s390_pci_probe
  ata: disable ATA for s390
  parport: disable PC-style parallel port support for s390
  s390/mm: provide PAGE_SHARED define
  uio: remove !S390 dependency from Kconfig
  phylib: remove !S390 dependeny from Kconfig
  s390/Kconfig: sort list of arch selected config options
  drivers/net,AT91RM9200: add missing GENERIC_HARDIRQS dependency
  s390/bpf,jit: add vlan tag support
  drivers/media: add missing GENERIC_HARDIRQS dependency
  s390/linker skript: discard exit.data at runtime
  drivers/input: add couple of missing GENERIC_HARDIRQS dependencies
  drivers/gpio: add missing GENERIC_HARDIRQ dependency

Hendrik Brueckner (5):
  s390/perf: cpum_cf: fallback to software sampling events
  iucv: fix kernel panic at reboot
  s390/mm: Fix crst upgrade of mmap with MAP_FIXED
  s390/cleanup: rename SPP to LPP
  s390/module: Add missing R_390_NONE relocation type

Ingo Tuchscherer (1):
  maintainer for s390 zcrypt component changed

Martin Schwidefsky (6):
  s390/3270: readd tty3270_open
  s390/3270: fix initialization order in tty3270_alloc_view
  s390/3270: introduce device notifier
  s390/3270: asynchronous size sensing
  s390/modules: add relocation overflow checking
  s390/mm: implement software dirty bits

Michael Holzheu (2):
  s390/ipl: Implement diag308 loop for zfcpdump
  s390/zcore: Add hsa file

Sebastian Ott (9):
  s390/chsc: cleanup SEI helper functions
  s390/cio: dont abort verification after missing irq
  s390/cio: skip broken paths
  s390/cio: export vpm via sysfs
  s390/cio: handle unknown pgroup state
  s390/scm: use inline dummy functions
  s390/pci: cleanup clp inline assembly
  s390/pci: cleanup clp page allocation
  s390/pci: fix hotplug module init

Stefan Weinhuber (1):
  dasd: fix sysfs cleanup in dasd_generic_remove

 MAINTAINERS   |2 +-
 arch/s390/Kconfig |  115 ---
 arch/s390/appldata/appldata_mem.c |2 +-
 arch/s390/appldata/appldata_net_sum.c |2 +-
 arch/s390/appldata/appldata_os.c  |2 +-
 arch/s390/hypfs/hypfs_vm.c|2 +-
 arch/s390/include/asm/barrier.h   |9 +-
 arch/s390/include/asm/clp.h   |2 +-
 arch/s390/include/asm/cpu_mf.h|4 +-
 arch/s390/include/asm/dma-mapping.h   |8 +-
 arch/s390/include/asm/mman.h  |4 +-
 arch/s390/include/asm/page.h  |   22 --
 arch/s390/include/asm/pci.h   |   11 +-
 arch/s390/include/asm/pgtable.h   |  132 ---
 arch/s390/include/asm/sclp.h  |1 -
 arch/s390/include/asm/setup.h |   22 +-
 arch/s390/include/asm/timex.h |   18 +-
 arch/s390/kernel/debug.c  |2 +-
 arch/s390/kernel/dis.c|1 -
 arch/s390/kernel/early.c  |8 +-
 arch/s390/kernel/entry64.S|   10 +-
 arch/s390/kernel/ipl.c|   16 +-
 arch/s390/kernel/module.c |  143 +---
 arch/s390/kernel/nmi.c|2 +-
 arch/s390/kernel/perf_cpum_cf.c   |   13 +-
 arch/s390/kernel/smp.c|   10 +-
 arch/s390/kernel/time.c   |   26 +-
 arch/s390/kernel/vmlinux.lds.S|4 +
 arch/s390/kernel/vtime.c  |2 +-
 arch/s390/kvm/interrupt.c |6 +-
 arch/s390/kvm/kvm-s390.c  |2 +-
 arch/s390/lib/delay.c |   16 +-
 arch/s390/lib/uaccess_pt.c|2 +-
 arch/s390/mm/mmap.c   |9 +-
 arch/s390/mm/pageattr.c   |2 +-
 arch/s390/mm/vmem.c   |   24 +-
 arch/s390/net/bpf_jit_comp.c  |   21 ++
 

[GIT PULL] s390 patches for the 3.9 merge window

2013-02-21 Thread Martin Schwidefsky
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:
The most prominent change in this patch set is the software dirty bit
patch for s390. It removes __HAVE_ARCH_PAGE_TEST_AND_CLEAR_DIRTY and
the page_test_and_clear_dirty primitive which makes the common memory
management code a bit less obscure. Heiko fixed most of the PCI related
fallout, more often than not missing GENERIC_HARDIRQS dependencies.
Notable is one of the 3270 patches which adds an export to tty_io to
be able to resize a tty. The rest is the usual bunch of cleanups and
bug fixes.

There is a merge conflict in arch/s390/Kconfig between the current
upstream and the s390 branch. The cause is the Heikos Kconfig sorting
vs the removal of HAVE_IRQ_WORK. The correct merge is the sorted list
without the HAVE_IRQ_WORK select.

Heiko Carstens (18):
  asm-generic/io.h: convert readX defines to functions
  s390/time: rename tod clock access functions
  s390/barrier: convert mb() to define again
  s390/dma: provide dma_cache_sync() function
  s390/dma: remove dma_is_consistent() declaration
  s390/pci: rename pci_probe to s390_pci_probe
  ata: disable ATA for s390
  parport: disable PC-style parallel port support for s390
  s390/mm: provide PAGE_SHARED define
  uio: remove !S390 dependency from Kconfig
  phylib: remove !S390 dependeny from Kconfig
  s390/Kconfig: sort list of arch selected config options
  drivers/net,AT91RM9200: add missing GENERIC_HARDIRQS dependency
  s390/bpf,jit: add vlan tag support
  drivers/media: add missing GENERIC_HARDIRQS dependency
  s390/linker skript: discard exit.data at runtime
  drivers/input: add couple of missing GENERIC_HARDIRQS dependencies
  drivers/gpio: add missing GENERIC_HARDIRQ dependency

Hendrik Brueckner (5):
  s390/perf: cpum_cf: fallback to software sampling events
  iucv: fix kernel panic at reboot
  s390/mm: Fix crst upgrade of mmap with MAP_FIXED
  s390/cleanup: rename SPP to LPP
  s390/module: Add missing R_390_NONE relocation type

Ingo Tuchscherer (1):
  maintainer for s390 zcrypt component changed

Martin Schwidefsky (6):
  s390/3270: readd tty3270_open
  s390/3270: fix initialization order in tty3270_alloc_view
  s390/3270: introduce device notifier
  s390/3270: asynchronous size sensing
  s390/modules: add relocation overflow checking
  s390/mm: implement software dirty bits

Michael Holzheu (2):
  s390/ipl: Implement diag308 loop for zfcpdump
  s390/zcore: Add hsa file

Sebastian Ott (9):
  s390/chsc: cleanup SEI helper functions
  s390/cio: dont abort verification after missing irq
  s390/cio: skip broken paths
  s390/cio: export vpm via sysfs
  s390/cio: handle unknown pgroup state
  s390/scm: use inline dummy functions
  s390/pci: cleanup clp inline assembly
  s390/pci: cleanup clp page allocation
  s390/pci: fix hotplug module init

Stefan Weinhuber (1):
  dasd: fix sysfs cleanup in dasd_generic_remove

 MAINTAINERS   |2 +-
 arch/s390/Kconfig |  115 ---
 arch/s390/appldata/appldata_mem.c |2 +-
 arch/s390/appldata/appldata_net_sum.c |2 +-
 arch/s390/appldata/appldata_os.c  |2 +-
 arch/s390/hypfs/hypfs_vm.c|2 +-
 arch/s390/include/asm/barrier.h   |9 +-
 arch/s390/include/asm/clp.h   |2 +-
 arch/s390/include/asm/cpu_mf.h|4 +-
 arch/s390/include/asm/dma-mapping.h   |8 +-
 arch/s390/include/asm/mman.h  |4 +-
 arch/s390/include/asm/page.h  |   22 --
 arch/s390/include/asm/pci.h   |   11 +-
 arch/s390/include/asm/pgtable.h   |  132 ---
 arch/s390/include/asm/sclp.h  |1 -
 arch/s390/include/asm/setup.h |   22 +-
 arch/s390/include/asm/timex.h |   18 +-
 arch/s390/kernel/debug.c  |2 +-
 arch/s390/kernel/dis.c|1 -
 arch/s390/kernel/early.c  |8 +-
 arch/s390/kernel/entry64.S|   10 +-
 arch/s390/kernel/ipl.c|   16 +-
 arch/s390/kernel/module.c |  143 +---
 arch/s390/kernel/nmi.c|2 +-
 arch/s390/kernel/perf_cpum_cf.c   |   13 +-
 arch/s390/kernel/smp.c|   10 +-
 arch/s390/kernel/time.c   |   26 +-
 arch/s390/kernel/vmlinux.lds.S|4 +
 arch/s390/kernel/vtime.c  |2 +-
 arch/s390/kvm/interrupt.c |6 +-
 arch/s390/kvm/kvm-s390.c  |2 +-
 arch/s390/lib/delay.c |   16 +-
 arch/s390/lib/uaccess_pt.c|2 +-
 arch/s390/mm/mmap.c   |9 +-
 arch/s390/mm/pageattr.c   |2 +-
 arch/s390/mm/vmem.c   |   24 +-
 arch/s390/net/bpf_jit_comp.c  |   21 ++