diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-09 14:15:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-09 14:15:23 -0500 |
commit | 531021f2ca681faf58f926771f85bb5c76f13eba (patch) | |
tree | b730cd35a1bde5f2ddd85e080a6269df96c50074 /arch | |
parent | 451688ba0b488faf274e13dc591734b1e695642c (diff) | |
parent | 6252d702c5311ce916caf75ed82e5c8245171c92 (diff) |
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
[S390] dynamic page tables.
[S390] Add four level page tables for CONFIG_64BIT=y.
[S390] 1K/2K page table pages.
[S390] Remove a.out header file.
[S390] sclp_vt220: Fix vt220 initialization
[S390] qdio: avoid hang when establishing qdio queues
[S390] VMEM_MAX_PHYS overflow on 31 bit.
[S390] zcrypt: Do not start ap poll thread per default
[S390] Fix __ffs_word_loop/__ffz_word_loop inlnie assembly.
[S390] Wire up new timerfd syscalls.
[S390] Update default configuration.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/defconfig | 87 | ||||
-rw-r--r-- | arch/s390/kernel/binfmt_elf32.c | 11 | ||||
-rw-r--r-- | arch/s390/kernel/compat_wrapper.S | 20 | ||||
-rw-r--r-- | arch/s390/kernel/process.c | 1 | ||||
-rw-r--r-- | arch/s390/kernel/setup.c | 1 | ||||
-rw-r--r-- | arch/s390/kernel/syscalls.S | 3 | ||||
-rw-r--r-- | arch/s390/kernel/traps.c | 3 | ||||
-rw-r--r-- | arch/s390/mm/fault.c | 40 | ||||
-rw-r--r-- | arch/s390/mm/init.c | 3 | ||||
-rw-r--r-- | arch/s390/mm/mmap.c | 65 | ||||
-rw-r--r-- | arch/s390/mm/pgtable.c | 176 | ||||
-rw-r--r-- | arch/s390/mm/vmem.c | 28 |
12 files changed, 386 insertions, 52 deletions
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index ece7b99da895..39921f3a9685 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig | |||
@@ -1,12 +1,13 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.23 | 3 | # Linux kernel version: 2.6.24 |
4 | # Mon Oct 22 12:10:44 2007 | 4 | # Sat Feb 9 12:13:01 2008 |
5 | # | 5 | # |
6 | CONFIG_MMU=y | 6 | CONFIG_MMU=y |
7 | CONFIG_ZONE_DMA=y | 7 | CONFIG_ZONE_DMA=y |
8 | CONFIG_LOCKDEP_SUPPORT=y | 8 | CONFIG_LOCKDEP_SUPPORT=y |
9 | CONFIG_STACKTRACE_SUPPORT=y | 9 | CONFIG_STACKTRACE_SUPPORT=y |
10 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
10 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 11 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
11 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | 12 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set |
12 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | 13 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set |
@@ -15,6 +16,7 @@ CONFIG_GENERIC_TIME=y | |||
15 | CONFIG_GENERIC_BUG=y | 16 | CONFIG_GENERIC_BUG=y |
16 | CONFIG_NO_IOMEM=y | 17 | CONFIG_NO_IOMEM=y |
17 | CONFIG_NO_DMA=y | 18 | CONFIG_NO_DMA=y |
19 | CONFIG_GENERIC_LOCKBREAK=y | ||
18 | CONFIG_S390=y | 20 | CONFIG_S390=y |
19 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 21 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
20 | 22 | ||
@@ -32,7 +34,6 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
32 | CONFIG_POSIX_MQUEUE=y | 34 | CONFIG_POSIX_MQUEUE=y |
33 | # CONFIG_BSD_PROCESS_ACCT is not set | 35 | # CONFIG_BSD_PROCESS_ACCT is not set |
34 | # CONFIG_TASKSTATS is not set | 36 | # CONFIG_TASKSTATS is not set |
35 | # CONFIG_USER_NS is not set | ||
36 | CONFIG_AUDIT=y | 37 | CONFIG_AUDIT=y |
37 | # CONFIG_AUDITSYSCALL is not set | 38 | # CONFIG_AUDITSYSCALL is not set |
38 | CONFIG_IKCONFIG=y | 39 | CONFIG_IKCONFIG=y |
@@ -41,13 +42,19 @@ CONFIG_LOG_BUF_SHIFT=17 | |||
41 | CONFIG_CGROUPS=y | 42 | CONFIG_CGROUPS=y |
42 | # CONFIG_CGROUP_DEBUG is not set | 43 | # CONFIG_CGROUP_DEBUG is not set |
43 | CONFIG_CGROUP_NS=y | 44 | CONFIG_CGROUP_NS=y |
44 | CONFIG_CGROUP_CPUACCT=y | ||
45 | # CONFIG_CPUSETS is not set | 45 | # CONFIG_CPUSETS is not set |
46 | CONFIG_FAIR_GROUP_SCHED=y | 46 | CONFIG_FAIR_GROUP_SCHED=y |
47 | CONFIG_FAIR_USER_SCHED=y | 47 | CONFIG_FAIR_USER_SCHED=y |
48 | # CONFIG_FAIR_CGROUP_SCHED is not set | 48 | # CONFIG_FAIR_CGROUP_SCHED is not set |
49 | # CONFIG_CGROUP_CPUACCT is not set | ||
50 | # CONFIG_RESOURCE_COUNTERS is not set | ||
49 | CONFIG_SYSFS_DEPRECATED=y | 51 | CONFIG_SYSFS_DEPRECATED=y |
50 | # CONFIG_RELAY is not set | 52 | # CONFIG_RELAY is not set |
53 | CONFIG_NAMESPACES=y | ||
54 | CONFIG_UTS_NS=y | ||
55 | CONFIG_IPC_NS=y | ||
56 | # CONFIG_USER_NS is not set | ||
57 | # CONFIG_PID_NS is not set | ||
51 | CONFIG_BLK_DEV_INITRD=y | 58 | CONFIG_BLK_DEV_INITRD=y |
52 | CONFIG_INITRAMFS_SOURCE="" | 59 | CONFIG_INITRAMFS_SOURCE="" |
53 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 60 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
@@ -61,17 +68,26 @@ CONFIG_HOTPLUG=y | |||
61 | CONFIG_PRINTK=y | 68 | CONFIG_PRINTK=y |
62 | CONFIG_BUG=y | 69 | CONFIG_BUG=y |
63 | CONFIG_ELF_CORE=y | 70 | CONFIG_ELF_CORE=y |
71 | # CONFIG_COMPAT_BRK is not set | ||
64 | CONFIG_BASE_FULL=y | 72 | CONFIG_BASE_FULL=y |
65 | CONFIG_FUTEX=y | 73 | CONFIG_FUTEX=y |
66 | CONFIG_ANON_INODES=y | 74 | CONFIG_ANON_INODES=y |
67 | CONFIG_EPOLL=y | 75 | CONFIG_EPOLL=y |
68 | CONFIG_SIGNALFD=y | 76 | CONFIG_SIGNALFD=y |
77 | CONFIG_TIMERFD=y | ||
69 | CONFIG_EVENTFD=y | 78 | CONFIG_EVENTFD=y |
70 | CONFIG_SHMEM=y | 79 | CONFIG_SHMEM=y |
71 | CONFIG_VM_EVENT_COUNTERS=y | 80 | CONFIG_VM_EVENT_COUNTERS=y |
72 | CONFIG_SLAB=y | 81 | CONFIG_SLAB=y |
73 | # CONFIG_SLUB is not set | 82 | # CONFIG_SLUB is not set |
74 | # CONFIG_SLOB is not set | 83 | # CONFIG_SLOB is not set |
84 | # CONFIG_PROFILING is not set | ||
85 | # CONFIG_MARKERS is not set | ||
86 | CONFIG_HAVE_OPROFILE=y | ||
87 | CONFIG_KPROBES=y | ||
88 | CONFIG_HAVE_KPROBES=y | ||
89 | CONFIG_PROC_PAGE_MONITOR=y | ||
90 | CONFIG_SLABINFO=y | ||
75 | CONFIG_RT_MUTEXES=y | 91 | CONFIG_RT_MUTEXES=y |
76 | # CONFIG_TINY_SHMEM is not set | 92 | # CONFIG_TINY_SHMEM is not set |
77 | CONFIG_BASE_SMALL=0 | 93 | CONFIG_BASE_SMALL=0 |
@@ -99,6 +115,8 @@ CONFIG_DEFAULT_DEADLINE=y | |||
99 | # CONFIG_DEFAULT_CFQ is not set | 115 | # CONFIG_DEFAULT_CFQ is not set |
100 | # CONFIG_DEFAULT_NOOP is not set | 116 | # CONFIG_DEFAULT_NOOP is not set |
101 | CONFIG_DEFAULT_IOSCHED="deadline" | 117 | CONFIG_DEFAULT_IOSCHED="deadline" |
118 | CONFIG_CLASSIC_RCU=y | ||
119 | # CONFIG_PREEMPT_RCU is not set | ||
102 | 120 | ||
103 | # | 121 | # |
104 | # Base setup | 122 | # Base setup |
@@ -137,7 +155,7 @@ CONFIG_ARCH_POPULATES_NODE_MAP=y | |||
137 | # CONFIG_PREEMPT_NONE is not set | 155 | # CONFIG_PREEMPT_NONE is not set |
138 | # CONFIG_PREEMPT_VOLUNTARY is not set | 156 | # CONFIG_PREEMPT_VOLUNTARY is not set |
139 | CONFIG_PREEMPT=y | 157 | CONFIG_PREEMPT=y |
140 | CONFIG_PREEMPT_BKL=y | 158 | # CONFIG_RCU_TRACE is not set |
141 | CONFIG_SELECT_MEMORY_MODEL=y | 159 | CONFIG_SELECT_MEMORY_MODEL=y |
142 | CONFIG_FLATMEM_MANUAL=y | 160 | CONFIG_FLATMEM_MANUAL=y |
143 | # CONFIG_DISCONTIGMEM_MANUAL is not set | 161 | # CONFIG_DISCONTIGMEM_MANUAL is not set |
@@ -151,7 +169,6 @@ CONFIG_RESOURCES_64BIT=y | |||
151 | CONFIG_ZONE_DMA_FLAG=1 | 169 | CONFIG_ZONE_DMA_FLAG=1 |
152 | CONFIG_BOUNCE=y | 170 | CONFIG_BOUNCE=y |
153 | CONFIG_VIRT_TO_BUS=y | 171 | CONFIG_VIRT_TO_BUS=y |
154 | CONFIG_HOLES_IN_ZONE=y | ||
155 | 172 | ||
156 | # | 173 | # |
157 | # I/O subsystem configuration | 174 | # I/O subsystem configuration |
@@ -180,6 +197,7 @@ CONFIG_HZ_100=y | |||
180 | # CONFIG_HZ_300 is not set | 197 | # CONFIG_HZ_300 is not set |
181 | # CONFIG_HZ_1000 is not set | 198 | # CONFIG_HZ_1000 is not set |
182 | CONFIG_HZ=100 | 199 | CONFIG_HZ=100 |
200 | # CONFIG_SCHED_HRTICK is not set | ||
183 | CONFIG_NO_IDLE_HZ=y | 201 | CONFIG_NO_IDLE_HZ=y |
184 | CONFIG_NO_IDLE_HZ_INIT=y | 202 | CONFIG_NO_IDLE_HZ_INIT=y |
185 | CONFIG_S390_HYPFS_FS=y | 203 | CONFIG_S390_HYPFS_FS=y |
@@ -201,6 +219,7 @@ CONFIG_XFRM=y | |||
201 | # CONFIG_XFRM_USER is not set | 219 | # CONFIG_XFRM_USER is not set |
202 | # CONFIG_XFRM_SUB_POLICY is not set | 220 | # CONFIG_XFRM_SUB_POLICY is not set |
203 | # CONFIG_XFRM_MIGRATE is not set | 221 | # CONFIG_XFRM_MIGRATE is not set |
222 | # CONFIG_XFRM_STATISTICS is not set | ||
204 | CONFIG_NET_KEY=y | 223 | CONFIG_NET_KEY=y |
205 | # CONFIG_NET_KEY_MIGRATE is not set | 224 | # CONFIG_NET_KEY_MIGRATE is not set |
206 | CONFIG_IUCV=m | 225 | CONFIG_IUCV=m |
@@ -251,6 +270,7 @@ CONFIG_IPV6_SIT=y | |||
251 | # CONFIG_NETWORK_SECMARK is not set | 270 | # CONFIG_NETWORK_SECMARK is not set |
252 | CONFIG_NETFILTER=y | 271 | CONFIG_NETFILTER=y |
253 | # CONFIG_NETFILTER_DEBUG is not set | 272 | # CONFIG_NETFILTER_DEBUG is not set |
273 | CONFIG_NETFILTER_ADVANCED=y | ||
254 | 274 | ||
255 | # | 275 | # |
256 | # Core Netfilter Configuration | 276 | # Core Netfilter Configuration |
@@ -258,7 +278,6 @@ CONFIG_NETFILTER=y | |||
258 | CONFIG_NETFILTER_NETLINK=m | 278 | CONFIG_NETFILTER_NETLINK=m |
259 | CONFIG_NETFILTER_NETLINK_QUEUE=m | 279 | CONFIG_NETFILTER_NETLINK_QUEUE=m |
260 | CONFIG_NETFILTER_NETLINK_LOG=m | 280 | CONFIG_NETFILTER_NETLINK_LOG=m |
261 | CONFIG_NF_CONNTRACK_ENABLED=m | ||
262 | CONFIG_NF_CONNTRACK=m | 281 | CONFIG_NF_CONNTRACK=m |
263 | # CONFIG_NF_CT_ACCT is not set | 282 | # CONFIG_NF_CT_ACCT is not set |
264 | # CONFIG_NF_CONNTRACK_MARK is not set | 283 | # CONFIG_NF_CONNTRACK_MARK is not set |
@@ -286,7 +305,7 @@ CONFIG_NF_CONNTRACK=m | |||
286 | # CONFIG_IP_NF_ARPTABLES is not set | 305 | # CONFIG_IP_NF_ARPTABLES is not set |
287 | 306 | ||
288 | # | 307 | # |
289 | # IPv6: Netfilter Configuration (EXPERIMENTAL) | 308 | # IPv6: Netfilter Configuration |
290 | # | 309 | # |
291 | # CONFIG_NF_CONNTRACK_IPV6 is not set | 310 | # CONFIG_NF_CONNTRACK_IPV6 is not set |
292 | # CONFIG_IP6_NF_QUEUE is not set | 311 | # CONFIG_IP6_NF_QUEUE is not set |
@@ -343,6 +362,7 @@ CONFIG_NET_CLS_U32=m | |||
343 | CONFIG_CLS_U32_MARK=y | 362 | CONFIG_CLS_U32_MARK=y |
344 | CONFIG_NET_CLS_RSVP=m | 363 | CONFIG_NET_CLS_RSVP=m |
345 | CONFIG_NET_CLS_RSVP6=m | 364 | CONFIG_NET_CLS_RSVP6=m |
365 | CONFIG_NET_CLS_FLOW=m | ||
346 | # CONFIG_NET_EMATCH is not set | 366 | # CONFIG_NET_EMATCH is not set |
347 | CONFIG_NET_CLS_ACT=y | 367 | CONFIG_NET_CLS_ACT=y |
348 | CONFIG_NET_ACT_POLICE=y | 368 | CONFIG_NET_ACT_POLICE=y |
@@ -351,7 +371,6 @@ CONFIG_NET_ACT_POLICE=y | |||
351 | CONFIG_NET_ACT_NAT=m | 371 | CONFIG_NET_ACT_NAT=m |
352 | # CONFIG_NET_ACT_PEDIT is not set | 372 | # CONFIG_NET_ACT_PEDIT is not set |
353 | # CONFIG_NET_ACT_SIMP is not set | 373 | # CONFIG_NET_ACT_SIMP is not set |
354 | CONFIG_NET_CLS_POLICE=y | ||
355 | # CONFIG_NET_CLS_IND is not set | 374 | # CONFIG_NET_CLS_IND is not set |
356 | CONFIG_NET_SCH_FIFO=y | 375 | CONFIG_NET_SCH_FIFO=y |
357 | 376 | ||
@@ -360,6 +379,15 @@ CONFIG_NET_SCH_FIFO=y | |||
360 | # | 379 | # |
361 | # CONFIG_NET_PKTGEN is not set | 380 | # CONFIG_NET_PKTGEN is not set |
362 | # CONFIG_NET_TCPPROBE is not set | 381 | # CONFIG_NET_TCPPROBE is not set |
382 | CONFIG_CAN=m | ||
383 | CONFIG_CAN_RAW=m | ||
384 | CONFIG_CAN_BCM=m | ||
385 | |||
386 | # | ||
387 | # CAN Device Drivers | ||
388 | # | ||
389 | CONFIG_CAN_VCAN=m | ||
390 | # CONFIG_CAN_DEBUG_DEVICES is not set | ||
363 | # CONFIG_AF_RXRPC is not set | 391 | # CONFIG_AF_RXRPC is not set |
364 | # CONFIG_RFKILL is not set | 392 | # CONFIG_RFKILL is not set |
365 | # CONFIG_NET_9P is not set | 393 | # CONFIG_NET_9P is not set |
@@ -389,7 +417,7 @@ CONFIG_BLK_DEV_NBD=m | |||
389 | CONFIG_BLK_DEV_RAM=y | 417 | CONFIG_BLK_DEV_RAM=y |
390 | CONFIG_BLK_DEV_RAM_COUNT=16 | 418 | CONFIG_BLK_DEV_RAM_COUNT=16 |
391 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 419 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
392 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | 420 | CONFIG_BLK_DEV_XIP=y |
393 | # CONFIG_CDROM_PKTCDVD is not set | 421 | # CONFIG_CDROM_PKTCDVD is not set |
394 | # CONFIG_ATA_OVER_ETH is not set | 422 | # CONFIG_ATA_OVER_ETH is not set |
395 | 423 | ||
@@ -406,6 +434,7 @@ CONFIG_DASD_DIAG=y | |||
406 | CONFIG_DASD_EER=y | 434 | CONFIG_DASD_EER=y |
407 | CONFIG_MISC_DEVICES=y | 435 | CONFIG_MISC_DEVICES=y |
408 | # CONFIG_EEPROM_93CX6 is not set | 436 | # CONFIG_EEPROM_93CX6 is not set |
437 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
409 | 438 | ||
410 | # | 439 | # |
411 | # SCSI device support | 440 | # SCSI device support |
@@ -487,6 +516,7 @@ CONFIG_NET_ETHERNET=y | |||
487 | # CONFIG_IBM_NEW_EMAC_TAH is not set | 516 | # CONFIG_IBM_NEW_EMAC_TAH is not set |
488 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | 517 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set |
489 | CONFIG_NETDEV_1000=y | 518 | CONFIG_NETDEV_1000=y |
519 | # CONFIG_E1000E_ENABLED is not set | ||
490 | CONFIG_NETDEV_10000=y | 520 | CONFIG_NETDEV_10000=y |
491 | # CONFIG_TR is not set | 521 | # CONFIG_TR is not set |
492 | # CONFIG_WAN is not set | 522 | # CONFIG_WAN is not set |
@@ -508,7 +538,6 @@ CONFIG_QETH=y | |||
508 | CONFIG_CCWGROUP=y | 538 | CONFIG_CCWGROUP=y |
509 | # CONFIG_PPP is not set | 539 | # CONFIG_PPP is not set |
510 | # CONFIG_SLIP is not set | 540 | # CONFIG_SLIP is not set |
511 | # CONFIG_SHAPER is not set | ||
512 | # CONFIG_NETCONSOLE is not set | 541 | # CONFIG_NETCONSOLE is not set |
513 | # CONFIG_NETPOLL is not set | 542 | # CONFIG_NETPOLL is not set |
514 | # CONFIG_NET_POLL_CONTROLLER is not set | 543 | # CONFIG_NET_POLL_CONTROLLER is not set |
@@ -558,6 +587,7 @@ CONFIG_S390_TAPE_34XX=m | |||
558 | CONFIG_MONWRITER=m | 587 | CONFIG_MONWRITER=m |
559 | CONFIG_S390_VMUR=m | 588 | CONFIG_S390_VMUR=m |
560 | # CONFIG_POWER_SUPPLY is not set | 589 | # CONFIG_POWER_SUPPLY is not set |
590 | # CONFIG_THERMAL is not set | ||
561 | # CONFIG_WATCHDOG is not set | 591 | # CONFIG_WATCHDOG is not set |
562 | 592 | ||
563 | # | 593 | # |
@@ -584,12 +614,10 @@ CONFIG_FS_POSIX_ACL=y | |||
584 | # CONFIG_XFS_FS is not set | 614 | # CONFIG_XFS_FS is not set |
585 | # CONFIG_GFS2_FS is not set | 615 | # CONFIG_GFS2_FS is not set |
586 | # CONFIG_OCFS2_FS is not set | 616 | # CONFIG_OCFS2_FS is not set |
587 | # CONFIG_MINIX_FS is not set | 617 | CONFIG_DNOTIFY=y |
588 | # CONFIG_ROMFS_FS is not set | ||
589 | CONFIG_INOTIFY=y | 618 | CONFIG_INOTIFY=y |
590 | CONFIG_INOTIFY_USER=y | 619 | CONFIG_INOTIFY_USER=y |
591 | # CONFIG_QUOTA is not set | 620 | # CONFIG_QUOTA is not set |
592 | CONFIG_DNOTIFY=y | ||
593 | # CONFIG_AUTOFS_FS is not set | 621 | # CONFIG_AUTOFS_FS is not set |
594 | # CONFIG_AUTOFS4_FS is not set | 622 | # CONFIG_AUTOFS4_FS is not set |
595 | # CONFIG_FUSE_FS is not set | 623 | # CONFIG_FUSE_FS is not set |
@@ -632,8 +660,10 @@ CONFIG_CONFIGFS_FS=m | |||
632 | # CONFIG_EFS_FS is not set | 660 | # CONFIG_EFS_FS is not set |
633 | # CONFIG_CRAMFS is not set | 661 | # CONFIG_CRAMFS is not set |
634 | # CONFIG_VXFS_FS is not set | 662 | # CONFIG_VXFS_FS is not set |
663 | # CONFIG_MINIX_FS is not set | ||
635 | # CONFIG_HPFS_FS is not set | 664 | # CONFIG_HPFS_FS is not set |
636 | # CONFIG_QNX4FS_FS is not set | 665 | # CONFIG_QNX4FS_FS is not set |
666 | # CONFIG_ROMFS_FS is not set | ||
637 | # CONFIG_SYSV_FS is not set | 667 | # CONFIG_SYSV_FS is not set |
638 | # CONFIG_UFS_FS is not set | 668 | # CONFIG_UFS_FS is not set |
639 | CONFIG_NETWORK_FILESYSTEMS=y | 669 | CONFIG_NETWORK_FILESYSTEMS=y |
@@ -686,16 +716,13 @@ CONFIG_MSDOS_PARTITION=y | |||
686 | # CONFIG_NLS is not set | 716 | # CONFIG_NLS is not set |
687 | CONFIG_DLM=m | 717 | CONFIG_DLM=m |
688 | # CONFIG_DLM_DEBUG is not set | 718 | # CONFIG_DLM_DEBUG is not set |
689 | CONFIG_INSTRUMENTATION=y | ||
690 | # CONFIG_PROFILING is not set | ||
691 | CONFIG_KPROBES=y | ||
692 | # CONFIG_MARKERS is not set | ||
693 | 719 | ||
694 | # | 720 | # |
695 | # Kernel hacking | 721 | # Kernel hacking |
696 | # | 722 | # |
697 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | 723 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y |
698 | # CONFIG_PRINTK_TIME is not set | 724 | # CONFIG_PRINTK_TIME is not set |
725 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
699 | CONFIG_ENABLE_MUST_CHECK=y | 726 | CONFIG_ENABLE_MUST_CHECK=y |
700 | CONFIG_MAGIC_SYSRQ=y | 727 | CONFIG_MAGIC_SYSRQ=y |
701 | # CONFIG_UNUSED_SYMBOLS is not set | 728 | # CONFIG_UNUSED_SYMBOLS is not set |
@@ -721,12 +748,18 @@ CONFIG_DEBUG_BUGVERBOSE=y | |||
721 | # CONFIG_DEBUG_INFO is not set | 748 | # CONFIG_DEBUG_INFO is not set |
722 | # CONFIG_DEBUG_VM is not set | 749 | # CONFIG_DEBUG_VM is not set |
723 | # CONFIG_DEBUG_LIST is not set | 750 | # CONFIG_DEBUG_LIST is not set |
751 | # CONFIG_DEBUG_SG is not set | ||
724 | # CONFIG_FRAME_POINTER is not set | 752 | # CONFIG_FRAME_POINTER is not set |
725 | CONFIG_FORCED_INLINING=y | 753 | CONFIG_FORCED_INLINING=y |
726 | # CONFIG_RCU_TORTURE_TEST is not set | 754 | # CONFIG_RCU_TORTURE_TEST is not set |
755 | # CONFIG_KPROBES_SANITY_TEST is not set | ||
756 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
727 | # CONFIG_LKDTM is not set | 757 | # CONFIG_LKDTM is not set |
728 | # CONFIG_FAULT_INJECTION is not set | 758 | # CONFIG_FAULT_INJECTION is not set |
759 | # CONFIG_LATENCYTOP is not set | ||
729 | CONFIG_SAMPLES=y | 760 | CONFIG_SAMPLES=y |
761 | # CONFIG_SAMPLE_KOBJECT is not set | ||
762 | # CONFIG_DEBUG_PAGEALLOC is not set | ||
730 | 763 | ||
731 | # | 764 | # |
732 | # Security options | 765 | # Security options |
@@ -738,6 +771,7 @@ CONFIG_CRYPTO=y | |||
738 | CONFIG_CRYPTO_ALGAPI=y | 771 | CONFIG_CRYPTO_ALGAPI=y |
739 | CONFIG_CRYPTO_AEAD=m | 772 | CONFIG_CRYPTO_AEAD=m |
740 | CONFIG_CRYPTO_BLKCIPHER=y | 773 | CONFIG_CRYPTO_BLKCIPHER=y |
774 | CONFIG_CRYPTO_SEQIV=m | ||
741 | CONFIG_CRYPTO_HASH=m | 775 | CONFIG_CRYPTO_HASH=m |
742 | CONFIG_CRYPTO_MANAGER=y | 776 | CONFIG_CRYPTO_MANAGER=y |
743 | CONFIG_CRYPTO_HMAC=m | 777 | CONFIG_CRYPTO_HMAC=m |
@@ -745,17 +779,20 @@ CONFIG_CRYPTO_HMAC=m | |||
745 | # CONFIG_CRYPTO_NULL is not set | 779 | # CONFIG_CRYPTO_NULL is not set |
746 | # CONFIG_CRYPTO_MD4 is not set | 780 | # CONFIG_CRYPTO_MD4 is not set |
747 | CONFIG_CRYPTO_MD5=m | 781 | CONFIG_CRYPTO_MD5=m |
748 | # CONFIG_CRYPTO_SHA1 is not set | 782 | CONFIG_CRYPTO_SHA1=m |
749 | # CONFIG_CRYPTO_SHA256 is not set | 783 | # CONFIG_CRYPTO_SHA256 is not set |
750 | # CONFIG_CRYPTO_SHA512 is not set | 784 | # CONFIG_CRYPTO_SHA512 is not set |
751 | # CONFIG_CRYPTO_WP512 is not set | 785 | # CONFIG_CRYPTO_WP512 is not set |
752 | # CONFIG_CRYPTO_TGR192 is not set | 786 | # CONFIG_CRYPTO_TGR192 is not set |
753 | # CONFIG_CRYPTO_GF128MUL is not set | 787 | CONFIG_CRYPTO_GF128MUL=m |
754 | CONFIG_CRYPTO_ECB=m | 788 | CONFIG_CRYPTO_ECB=m |
755 | CONFIG_CRYPTO_CBC=y | 789 | CONFIG_CRYPTO_CBC=y |
756 | CONFIG_CRYPTO_PCBC=m | 790 | CONFIG_CRYPTO_PCBC=m |
757 | # CONFIG_CRYPTO_LRW is not set | 791 | # CONFIG_CRYPTO_LRW is not set |
758 | # CONFIG_CRYPTO_XTS is not set | 792 | # CONFIG_CRYPTO_XTS is not set |
793 | CONFIG_CRYPTO_CTR=m | ||
794 | CONFIG_CRYPTO_GCM=m | ||
795 | CONFIG_CRYPTO_CCM=m | ||
759 | # CONFIG_CRYPTO_CRYPTD is not set | 796 | # CONFIG_CRYPTO_CRYPTD is not set |
760 | # CONFIG_CRYPTO_DES is not set | 797 | # CONFIG_CRYPTO_DES is not set |
761 | CONFIG_CRYPTO_FCRYPT=m | 798 | CONFIG_CRYPTO_FCRYPT=m |
@@ -770,20 +807,22 @@ CONFIG_CRYPTO_FCRYPT=m | |||
770 | # CONFIG_CRYPTO_KHAZAD is not set | 807 | # CONFIG_CRYPTO_KHAZAD is not set |
771 | # CONFIG_CRYPTO_ANUBIS is not set | 808 | # CONFIG_CRYPTO_ANUBIS is not set |
772 | CONFIG_CRYPTO_SEED=m | 809 | CONFIG_CRYPTO_SEED=m |
810 | CONFIG_CRYPTO_SALSA20=m | ||
773 | # CONFIG_CRYPTO_DEFLATE is not set | 811 | # CONFIG_CRYPTO_DEFLATE is not set |
774 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | 812 | # CONFIG_CRYPTO_MICHAEL_MIC is not set |
775 | # CONFIG_CRYPTO_CRC32C is not set | 813 | # CONFIG_CRYPTO_CRC32C is not set |
776 | CONFIG_CRYPTO_CAMELLIA=m | 814 | CONFIG_CRYPTO_CAMELLIA=m |
777 | # CONFIG_CRYPTO_TEST is not set | 815 | # CONFIG_CRYPTO_TEST is not set |
778 | CONFIG_CRYPTO_AUTHENC=m | 816 | CONFIG_CRYPTO_AUTHENC=m |
817 | CONFIG_CRYPTO_LZO=m | ||
779 | CONFIG_CRYPTO_HW=y | 818 | CONFIG_CRYPTO_HW=y |
819 | CONFIG_ZCRYPT=m | ||
820 | # CONFIG_ZCRYPT_MONOLITHIC is not set | ||
780 | # CONFIG_CRYPTO_SHA1_S390 is not set | 821 | # CONFIG_CRYPTO_SHA1_S390 is not set |
781 | # CONFIG_CRYPTO_SHA256_S390 is not set | 822 | # CONFIG_CRYPTO_SHA256_S390 is not set |
782 | # CONFIG_CRYPTO_DES_S390 is not set | 823 | # CONFIG_CRYPTO_DES_S390 is not set |
783 | # CONFIG_CRYPTO_AES_S390 is not set | 824 | # CONFIG_CRYPTO_AES_S390 is not set |
784 | CONFIG_S390_PRNG=m | 825 | CONFIG_S390_PRNG=m |
785 | CONFIG_ZCRYPT=m | ||
786 | # CONFIG_ZCRYPT_MONOLITHIC is not set | ||
787 | 826 | ||
788 | # | 827 | # |
789 | # Library routines | 828 | # Library routines |
@@ -794,5 +833,7 @@ CONFIG_BITREVERSE=m | |||
794 | # CONFIG_CRC_ITU_T is not set | 833 | # CONFIG_CRC_ITU_T is not set |
795 | CONFIG_CRC32=m | 834 | CONFIG_CRC32=m |
796 | CONFIG_CRC7=m | 835 | CONFIG_CRC7=m |
797 | # CONFIG_LIBCRC32C is not set | 836 | CONFIG_LIBCRC32C=m |
837 | CONFIG_LZO_COMPRESS=m | ||
838 | CONFIG_LZO_DECOMPRESS=m | ||
798 | CONFIG_PLIST=y | 839 | CONFIG_PLIST=y |
diff --git a/arch/s390/kernel/binfmt_elf32.c b/arch/s390/kernel/binfmt_elf32.c index f1e40ca00d8d..3e1c315b736d 100644 --- a/arch/s390/kernel/binfmt_elf32.c +++ b/arch/s390/kernel/binfmt_elf32.c | |||
@@ -134,6 +134,7 @@ static inline int dump_task_fpu(struct task_struct *tsk, elf_fpregset_t *fpregs) | |||
134 | } | 134 | } |
135 | 135 | ||
136 | #include <asm/processor.h> | 136 | #include <asm/processor.h> |
137 | #include <asm/pgalloc.h> | ||
137 | #include <linux/module.h> | 138 | #include <linux/module.h> |
138 | #include <linux/elfcore.h> | 139 | #include <linux/elfcore.h> |
139 | #include <linux/binfmts.h> | 140 | #include <linux/binfmts.h> |
@@ -183,6 +184,16 @@ struct elf_prpsinfo32 | |||
183 | #undef start_thread | 184 | #undef start_thread |
184 | #define start_thread start_thread31 | 185 | #define start_thread start_thread31 |
185 | 186 | ||
187 | static inline void start_thread31(struct pt_regs *regs, unsigned long new_psw, | ||
188 | unsigned long new_stackp) | ||
189 | { | ||
190 | set_fs(USER_DS); | ||
191 | regs->psw.mask = psw_user32_bits; | ||
192 | regs->psw.addr = new_psw; | ||
193 | regs->gprs[15] = new_stackp; | ||
194 | crst_table_downgrade(current->mm, 1UL << 31); | ||
195 | } | ||
196 | |||
186 | MODULE_DESCRIPTION("Binary format loader for compatibility with 32bit Linux for S390 binaries," | 197 | MODULE_DESCRIPTION("Binary format loader for compatibility with 32bit Linux for S390 binaries," |
187 | " Copyright 2000 IBM Corporation"); | 198 | " Copyright 2000 IBM Corporation"); |
188 | MODULE_AUTHOR("Gerhard Tonn <ton@de.ibm.com>"); | 199 | MODULE_AUTHOR("Gerhard Tonn <ton@de.ibm.com>"); |
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index 062c3d4c0394..743d54f0b8db 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -1712,3 +1712,23 @@ sys_fallocate_wrapper: | |||
1712 | sllg %r5,%r6,32 # get high word of 64bit loff_t | 1712 | sllg %r5,%r6,32 # get high word of 64bit loff_t |
1713 | l %r5,164(%r15) # get low word of 64bit loff_t | 1713 | l %r5,164(%r15) # get low word of 64bit loff_t |
1714 | jg sys_fallocate | 1714 | jg sys_fallocate |
1715 | |||
1716 | .globl sys_timerfd_create_wrapper | ||
1717 | sys_timerfd_create_wrapper: | ||
1718 | lgfr %r2,%r2 # int | ||
1719 | lgfr %r3,%r3 # int | ||
1720 | jg sys_timerfd_create | ||
1721 | |||
1722 | .globl compat_sys_timerfd_settime_wrapper | ||
1723 | compat_sys_timerfd_settime_wrapper: | ||
1724 | lgfr %r2,%r2 # int | ||
1725 | lgfr %r3,%r3 # int | ||
1726 | llgtr %r4,%r4 # struct compat_itimerspec * | ||
1727 | llgtr %r5,%r5 # struct compat_itimerspec * | ||
1728 | jg compat_sys_timerfd_settime | ||
1729 | |||
1730 | .globl compat_sys_timerfd_gettime_wrapper | ||
1731 | compat_sys_timerfd_gettime_wrapper: | ||
1732 | lgfr %r2,%r2 # int | ||
1733 | llgtr %r3,%r3 # struct compat_itimerspec * | ||
1734 | jg compat_sys_timerfd_gettime | ||
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 0e7aca039307..a6a4729e0e94 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
30 | #include <linux/vmalloc.h> | 30 | #include <linux/vmalloc.h> |
31 | #include <linux/user.h> | 31 | #include <linux/user.h> |
32 | #include <linux/a.out.h> | ||
33 | #include <linux/interrupt.h> | 32 | #include <linux/interrupt.h> |
34 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
35 | #include <linux/reboot.h> | 34 | #include <linux/reboot.h> |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index f9f8779022a0..290e504061a3 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/ptrace.h> | 24 | #include <linux/ptrace.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/user.h> | 26 | #include <linux/user.h> |
27 | #include <linux/a.out.h> | ||
28 | #include <linux/tty.h> | 27 | #include <linux/tty.h> |
29 | #include <linux/ioport.h> | 28 | #include <linux/ioport.h> |
30 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index 25eac7802fc4..c87ec687d4c6 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
@@ -327,3 +327,6 @@ SYSCALL(sys_utimensat,sys_utimensat,compat_sys_utimensat_wrapper) /* 315 */ | |||
327 | SYSCALL(sys_signalfd,sys_signalfd,compat_sys_signalfd_wrapper) | 327 | SYSCALL(sys_signalfd,sys_signalfd,compat_sys_signalfd_wrapper) |
328 | NI_SYSCALL /* 317 old sys_timer_fd */ | 328 | NI_SYSCALL /* 317 old sys_timer_fd */ |
329 | SYSCALL(sys_eventfd,sys_eventfd,sys_eventfd_wrapper) | 329 | SYSCALL(sys_eventfd,sys_eventfd,sys_eventfd_wrapper) |
330 | SYSCALL(sys_timerfd_create,sys_timerfd_create,sys_timerfd_create_wrapper) | ||
331 | SYSCALL(sys_timerfd_settime,sys_timerfd_settime,compat_sys_timerfd_settime_wrapper) /* 320 */ | ||
332 | SYSCALL(sys_timerfd_gettime,sys_timerfd_gettime,compat_sys_timerfd_gettime_wrapper) | ||
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index a4d29025ddbd..60f728aeaf12 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c | |||
@@ -60,6 +60,7 @@ int sysctl_userprocess_debug = 0; | |||
60 | extern pgm_check_handler_t do_protection_exception; | 60 | extern pgm_check_handler_t do_protection_exception; |
61 | extern pgm_check_handler_t do_dat_exception; | 61 | extern pgm_check_handler_t do_dat_exception; |
62 | extern pgm_check_handler_t do_monitor_call; | 62 | extern pgm_check_handler_t do_monitor_call; |
63 | extern pgm_check_handler_t do_asce_exception; | ||
63 | 64 | ||
64 | #define stack_pointer ({ void **sp; asm("la %0,0(15)" : "=&d" (sp)); sp; }) | 65 | #define stack_pointer ({ void **sp; asm("la %0,0(15)" : "=&d" (sp)); sp; }) |
65 | 66 | ||
@@ -730,7 +731,7 @@ void __init trap_init(void) | |||
730 | pgm_check_table[0x12] = &translation_exception; | 731 | pgm_check_table[0x12] = &translation_exception; |
731 | pgm_check_table[0x13] = &special_op_exception; | 732 | pgm_check_table[0x13] = &special_op_exception; |
732 | #ifdef CONFIG_64BIT | 733 | #ifdef CONFIG_64BIT |
733 | pgm_check_table[0x38] = &do_dat_exception; | 734 | pgm_check_table[0x38] = &do_asce_exception; |
734 | pgm_check_table[0x39] = &do_dat_exception; | 735 | pgm_check_table[0x39] = &do_dat_exception; |
735 | pgm_check_table[0x3A] = &do_dat_exception; | 736 | pgm_check_table[0x3A] = &do_dat_exception; |
736 | pgm_check_table[0x3B] = &do_dat_exception; | 737 | pgm_check_table[0x3B] = &do_dat_exception; |
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 2456b52ed068..ed13d429a487 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <asm/system.h> | 32 | #include <asm/system.h> |
33 | #include <asm/pgtable.h> | 33 | #include <asm/pgtable.h> |
34 | #include <asm/s390_ext.h> | 34 | #include <asm/s390_ext.h> |
35 | #include <asm/mmu_context.h> | ||
35 | 36 | ||
36 | #ifndef CONFIG_64BIT | 37 | #ifndef CONFIG_64BIT |
37 | #define __FAIL_ADDR_MASK 0x7ffff000 | 38 | #define __FAIL_ADDR_MASK 0x7ffff000 |
@@ -444,6 +445,45 @@ void __kprobes do_dat_exception(struct pt_regs *regs, unsigned long error_code) | |||
444 | do_exception(regs, error_code & 0xff, 0); | 445 | do_exception(regs, error_code & 0xff, 0); |
445 | } | 446 | } |
446 | 447 | ||
448 | #ifdef CONFIG_64BIT | ||
449 | void __kprobes do_asce_exception(struct pt_regs *regs, unsigned long error_code) | ||
450 | { | ||
451 | struct mm_struct *mm; | ||
452 | struct vm_area_struct *vma; | ||
453 | unsigned long address; | ||
454 | int space; | ||
455 | |||
456 | mm = current->mm; | ||
457 | address = S390_lowcore.trans_exc_code & __FAIL_ADDR_MASK; | ||
458 | space = check_space(current); | ||
459 | |||
460 | if (unlikely(space == 0 || in_atomic() || !mm)) | ||
461 | goto no_context; | ||
462 | |||
463 | local_irq_enable(); | ||
464 | |||
465 | down_read(&mm->mmap_sem); | ||
466 | vma = find_vma(mm, address); | ||
467 | up_read(&mm->mmap_sem); | ||
468 | |||
469 | if (vma) { | ||
470 | update_mm(mm, current); | ||
471 | return; | ||
472 | } | ||
473 | |||
474 | /* User mode accesses just cause a SIGSEGV */ | ||
475 | if (regs->psw.mask & PSW_MASK_PSTATE) { | ||
476 | current->thread.prot_addr = address; | ||
477 | current->thread.trap_no = error_code; | ||
478 | do_sigsegv(regs, error_code, SEGV_MAPERR, address); | ||
479 | return; | ||
480 | } | ||
481 | |||
482 | no_context: | ||
483 | do_no_context(regs, error_code, address); | ||
484 | } | ||
485 | #endif | ||
486 | |||
447 | #ifdef CONFIG_PFAULT | 487 | #ifdef CONFIG_PFAULT |
448 | /* | 488 | /* |
449 | * 'pfault' pseudo page faults routines. | 489 | * 'pfault' pseudo page faults routines. |
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index 983ec6ec0e7c..8053245fe259 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
@@ -112,6 +112,7 @@ void __init paging_init(void) | |||
112 | init_mm.pgd = swapper_pg_dir; | 112 | init_mm.pgd = swapper_pg_dir; |
113 | S390_lowcore.kernel_asce = __pa(init_mm.pgd) & PAGE_MASK; | 113 | S390_lowcore.kernel_asce = __pa(init_mm.pgd) & PAGE_MASK; |
114 | #ifdef CONFIG_64BIT | 114 | #ifdef CONFIG_64BIT |
115 | /* A three level page table (4TB) is enough for the kernel space. */ | ||
115 | S390_lowcore.kernel_asce |= _ASCE_TYPE_REGION3 | _ASCE_TABLE_LENGTH; | 116 | S390_lowcore.kernel_asce |= _ASCE_TYPE_REGION3 | _ASCE_TABLE_LENGTH; |
116 | pgd_type = _REGION3_ENTRY_EMPTY; | 117 | pgd_type = _REGION3_ENTRY_EMPTY; |
117 | #else | 118 | #else |
@@ -184,7 +185,7 @@ void kernel_map_pages(struct page *page, int numpages, int enable) | |||
184 | pmd = pmd_offset(pud, address); | 185 | pmd = pmd_offset(pud, address); |
185 | pte = pte_offset_kernel(pmd, address); | 186 | pte = pte_offset_kernel(pmd, address); |
186 | if (!enable) { | 187 | if (!enable) { |
187 | ptep_invalidate(address, pte); | 188 | ptep_invalidate(&init_mm, address, pte); |
188 | continue; | 189 | continue; |
189 | } | 190 | } |
190 | *pte = mk_pte_phys(address, __pgprot(_PAGE_TYPE_RW)); | 191 | *pte = mk_pte_phys(address, __pgprot(_PAGE_TYPE_RW)); |
diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c index 356257c171de..5932a824547a 100644 --- a/arch/s390/mm/mmap.c +++ b/arch/s390/mm/mmap.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/personality.h> | 27 | #include <linux/personality.h> |
28 | #include <linux/mm.h> | 28 | #include <linux/mm.h> |
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <asm/pgalloc.h> | ||
30 | 31 | ||
31 | /* | 32 | /* |
32 | * Top of mmap area (just below the process stack). | 33 | * Top of mmap area (just below the process stack). |
@@ -62,6 +63,8 @@ static inline int mmap_is_legacy(void) | |||
62 | current->signal->rlim[RLIMIT_STACK].rlim_cur == RLIM_INFINITY; | 63 | current->signal->rlim[RLIMIT_STACK].rlim_cur == RLIM_INFINITY; |
63 | } | 64 | } |
64 | 65 | ||
66 | #ifndef CONFIG_64BIT | ||
67 | |||
65 | /* | 68 | /* |
66 | * This function, called very early during the creation of a new | 69 | * This function, called very early during the creation of a new |
67 | * process VM image, sets up which VM layout function to use: | 70 | * process VM image, sets up which VM layout function to use: |
@@ -84,3 +87,65 @@ void arch_pick_mmap_layout(struct mm_struct *mm) | |||
84 | } | 87 | } |
85 | EXPORT_SYMBOL_GPL(arch_pick_mmap_layout); | 88 | EXPORT_SYMBOL_GPL(arch_pick_mmap_layout); |
86 | 89 | ||
90 | #else | ||
91 | |||
92 | static unsigned long | ||
93 | s390_get_unmapped_area(struct file *filp, unsigned long addr, | ||
94 | unsigned long len, unsigned long pgoff, unsigned long flags) | ||
95 | { | ||
96 | struct mm_struct *mm = current->mm; | ||
97 | int rc; | ||
98 | |||
99 | addr = arch_get_unmapped_area(filp, addr, len, pgoff, flags); | ||
100 | if (addr & ~PAGE_MASK) | ||
101 | return addr; | ||
102 | if (unlikely(mm->context.asce_limit < addr + len)) { | ||
103 | rc = crst_table_upgrade(mm, addr + len); | ||
104 | if (rc) | ||
105 | return (unsigned long) rc; | ||
106 | } | ||
107 | return addr; | ||
108 | } | ||
109 | |||
110 | static unsigned long | ||
111 | s390_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, | ||
112 | const unsigned long len, const unsigned long pgoff, | ||
113 | const unsigned long flags) | ||
114 | { | ||
115 | struct mm_struct *mm = current->mm; | ||
116 | unsigned long addr = addr0; | ||
117 | int rc; | ||
118 | |||
119 | addr = arch_get_unmapped_area_topdown(filp, addr, len, pgoff, flags); | ||
120 | if (addr & ~PAGE_MASK) | ||
121 | return addr; | ||
122 | if (unlikely(mm->context.asce_limit < addr + len)) { | ||
123 | rc = crst_table_upgrade(mm, addr + len); | ||
124 | if (rc) | ||
125 | return (unsigned long) rc; | ||
126 | } | ||
127 | return addr; | ||
128 | } | ||
129 | /* | ||
130 | * This function, called very early during the creation of a new | ||
131 | * process VM image, sets up which VM layout function to use: | ||
132 | */ | ||
133 | void arch_pick_mmap_layout(struct mm_struct *mm) | ||
134 | { | ||
135 | /* | ||
136 | * Fall back to the standard layout if the personality | ||
137 | * bit is set, or if the expected stack growth is unlimited: | ||
138 | */ | ||
139 | if (mmap_is_legacy()) { | ||
140 | mm->mmap_base = TASK_UNMAPPED_BASE; | ||
141 | mm->get_unmapped_area = s390_get_unmapped_area; | ||
142 | mm->unmap_area = arch_unmap_area; | ||
143 | } else { | ||
144 | mm->mmap_base = mmap_base(); | ||
145 | mm->get_unmapped_area = s390_get_unmapped_area_topdown; | ||
146 | mm->unmap_area = arch_unmap_area_topdown; | ||
147 | } | ||
148 | } | ||
149 | EXPORT_SYMBOL_GPL(arch_pick_mmap_layout); | ||
150 | |||
151 | #endif | ||
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index 019f518cd5a0..fd072013f88c 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c | |||
@@ -23,11 +23,18 @@ | |||
23 | #include <asm/pgalloc.h> | 23 | #include <asm/pgalloc.h> |
24 | #include <asm/tlb.h> | 24 | #include <asm/tlb.h> |
25 | #include <asm/tlbflush.h> | 25 | #include <asm/tlbflush.h> |
26 | #include <asm/mmu_context.h> | ||
26 | 27 | ||
27 | #ifndef CONFIG_64BIT | 28 | #ifndef CONFIG_64BIT |
28 | #define ALLOC_ORDER 1 | 29 | #define ALLOC_ORDER 1 |
30 | #define TABLES_PER_PAGE 4 | ||
31 | #define FRAG_MASK 15UL | ||
32 | #define SECOND_HALVES 10UL | ||
29 | #else | 33 | #else |
30 | #define ALLOC_ORDER 2 | 34 | #define ALLOC_ORDER 2 |
35 | #define TABLES_PER_PAGE 2 | ||
36 | #define FRAG_MASK 3UL | ||
37 | #define SECOND_HALVES 2UL | ||
31 | #endif | 38 | #endif |
32 | 39 | ||
33 | unsigned long *crst_table_alloc(struct mm_struct *mm, int noexec) | 40 | unsigned long *crst_table_alloc(struct mm_struct *mm, int noexec) |
@@ -45,52 +52,179 @@ unsigned long *crst_table_alloc(struct mm_struct *mm, int noexec) | |||
45 | } | 52 | } |
46 | page->index = page_to_phys(shadow); | 53 | page->index = page_to_phys(shadow); |
47 | } | 54 | } |
55 | spin_lock(&mm->page_table_lock); | ||
56 | list_add(&page->lru, &mm->context.crst_list); | ||
57 | spin_unlock(&mm->page_table_lock); | ||
48 | return (unsigned long *) page_to_phys(page); | 58 | return (unsigned long *) page_to_phys(page); |
49 | } | 59 | } |
50 | 60 | ||
51 | void crst_table_free(unsigned long *table) | 61 | void crst_table_free(struct mm_struct *mm, unsigned long *table) |
52 | { | 62 | { |
53 | unsigned long *shadow = get_shadow_table(table); | 63 | unsigned long *shadow = get_shadow_table(table); |
64 | struct page *page = virt_to_page(table); | ||
54 | 65 | ||
66 | spin_lock(&mm->page_table_lock); | ||
67 | list_del(&page->lru); | ||
68 | spin_unlock(&mm->page_table_lock); | ||
55 | if (shadow) | 69 | if (shadow) |
56 | free_pages((unsigned long) shadow, ALLOC_ORDER); | 70 | free_pages((unsigned long) shadow, ALLOC_ORDER); |
57 | free_pages((unsigned long) table, ALLOC_ORDER); | 71 | free_pages((unsigned long) table, ALLOC_ORDER); |
58 | } | 72 | } |
59 | 73 | ||
74 | #ifdef CONFIG_64BIT | ||
75 | int crst_table_upgrade(struct mm_struct *mm, unsigned long limit) | ||
76 | { | ||
77 | unsigned long *table, *pgd; | ||
78 | unsigned long entry; | ||
79 | |||
80 | BUG_ON(limit > (1UL << 53)); | ||
81 | repeat: | ||
82 | table = crst_table_alloc(mm, mm->context.noexec); | ||
83 | if (!table) | ||
84 | return -ENOMEM; | ||
85 | spin_lock(&mm->page_table_lock); | ||
86 | if (mm->context.asce_limit < limit) { | ||
87 | pgd = (unsigned long *) mm->pgd; | ||
88 | if (mm->context.asce_limit <= (1UL << 31)) { | ||
89 | entry = _REGION3_ENTRY_EMPTY; | ||
90 | mm->context.asce_limit = 1UL << 42; | ||
91 | mm->context.asce_bits = _ASCE_TABLE_LENGTH | | ||
92 | _ASCE_USER_BITS | | ||
93 | _ASCE_TYPE_REGION3; | ||
94 | } else { | ||
95 | entry = _REGION2_ENTRY_EMPTY; | ||
96 | mm->context.asce_limit = 1UL << 53; | ||
97 | mm->context.asce_bits = _ASCE_TABLE_LENGTH | | ||
98 | _ASCE_USER_BITS | | ||
99 | _ASCE_TYPE_REGION2; | ||
100 | } | ||
101 | crst_table_init(table, entry); | ||
102 | pgd_populate(mm, (pgd_t *) table, (pud_t *) pgd); | ||
103 | mm->pgd = (pgd_t *) table; | ||
104 | table = NULL; | ||
105 | } | ||
106 | spin_unlock(&mm->page_table_lock); | ||
107 | if (table) | ||
108 | crst_table_free(mm, table); | ||
109 | if (mm->context.asce_limit < limit) | ||
110 | goto repeat; | ||
111 | update_mm(mm, current); | ||
112 | return 0; | ||
113 | } | ||
114 | |||
115 | void crst_table_downgrade(struct mm_struct *mm, unsigned long limit) | ||
116 | { | ||
117 | pgd_t *pgd; | ||
118 | |||
119 | if (mm->context.asce_limit <= limit) | ||
120 | return; | ||
121 | __tlb_flush_mm(mm); | ||
122 | while (mm->context.asce_limit > limit) { | ||
123 | pgd = mm->pgd; | ||
124 | switch (pgd_val(*pgd) & _REGION_ENTRY_TYPE_MASK) { | ||
125 | case _REGION_ENTRY_TYPE_R2: | ||
126 | mm->context.asce_limit = 1UL << 42; | ||
127 | mm->context.asce_bits = _ASCE_TABLE_LENGTH | | ||
128 | _ASCE_USER_BITS | | ||
129 | _ASCE_TYPE_REGION3; | ||
130 | break; | ||
131 | case _REGION_ENTRY_TYPE_R3: | ||
132 | mm->context.asce_limit = 1UL << 31; | ||
133 | mm->context.asce_bits = _ASCE_TABLE_LENGTH | | ||
134 | _ASCE_USER_BITS | | ||
135 | _ASCE_TYPE_SEGMENT; | ||
136 | break; | ||
137 | default: | ||
138 | BUG(); | ||
139 | } | ||
140 | mm->pgd = (pgd_t *) (pgd_val(*pgd) & _REGION_ENTRY_ORIGIN); | ||
141 | crst_table_free(mm, (unsigned long *) pgd); | ||
142 | } | ||
143 | update_mm(mm, current); | ||
144 | } | ||
145 | #endif | ||
146 | |||
60 | /* | 147 | /* |
61 | * page table entry allocation/free routines. | 148 | * page table entry allocation/free routines. |
62 | */ | 149 | */ |
63 | unsigned long *page_table_alloc(int noexec) | 150 | unsigned long *page_table_alloc(struct mm_struct *mm) |
64 | { | 151 | { |
65 | struct page *page = alloc_page(GFP_KERNEL); | 152 | struct page *page; |
66 | unsigned long *table; | 153 | unsigned long *table; |
154 | unsigned long bits; | ||
67 | 155 | ||
68 | if (!page) | 156 | bits = mm->context.noexec ? 3UL : 1UL; |
69 | return NULL; | 157 | spin_lock(&mm->page_table_lock); |
70 | page->index = 0; | 158 | page = NULL; |
71 | if (noexec) { | 159 | if (!list_empty(&mm->context.pgtable_list)) { |
72 | struct page *shadow = alloc_page(GFP_KERNEL); | 160 | page = list_first_entry(&mm->context.pgtable_list, |
73 | if (!shadow) { | 161 | struct page, lru); |
74 | __free_page(page); | 162 | if ((page->flags & FRAG_MASK) == ((1UL << TABLES_PER_PAGE) - 1)) |
163 | page = NULL; | ||
164 | } | ||
165 | if (!page) { | ||
166 | spin_unlock(&mm->page_table_lock); | ||
167 | page = alloc_page(GFP_KERNEL|__GFP_REPEAT); | ||
168 | if (!page) | ||
75 | return NULL; | 169 | return NULL; |
76 | } | 170 | pgtable_page_ctor(page); |
77 | table = (unsigned long *) page_to_phys(shadow); | 171 | page->flags &= ~FRAG_MASK; |
172 | table = (unsigned long *) page_to_phys(page); | ||
78 | clear_table(table, _PAGE_TYPE_EMPTY, PAGE_SIZE); | 173 | clear_table(table, _PAGE_TYPE_EMPTY, PAGE_SIZE); |
79 | page->index = (addr_t) table; | 174 | spin_lock(&mm->page_table_lock); |
175 | list_add(&page->lru, &mm->context.pgtable_list); | ||
80 | } | 176 | } |
81 | pgtable_page_ctor(page); | ||
82 | table = (unsigned long *) page_to_phys(page); | 177 | table = (unsigned long *) page_to_phys(page); |
83 | clear_table(table, _PAGE_TYPE_EMPTY, PAGE_SIZE); | 178 | while (page->flags & bits) { |
179 | table += 256; | ||
180 | bits <<= 1; | ||
181 | } | ||
182 | page->flags |= bits; | ||
183 | if ((page->flags & FRAG_MASK) == ((1UL << TABLES_PER_PAGE) - 1)) | ||
184 | list_move_tail(&page->lru, &mm->context.pgtable_list); | ||
185 | spin_unlock(&mm->page_table_lock); | ||
84 | return table; | 186 | return table; |
85 | } | 187 | } |
86 | 188 | ||
87 | void page_table_free(unsigned long *table) | 189 | void page_table_free(struct mm_struct *mm, unsigned long *table) |
88 | { | 190 | { |
89 | unsigned long *shadow = get_shadow_pte(table); | 191 | struct page *page; |
192 | unsigned long bits; | ||
90 | 193 | ||
91 | pgtable_page_dtor(virt_to_page(table)); | 194 | bits = mm->context.noexec ? 3UL : 1UL; |
92 | if (shadow) | 195 | bits <<= (__pa(table) & (PAGE_SIZE - 1)) / 256 / sizeof(unsigned long); |
93 | free_page((unsigned long) shadow); | 196 | page = pfn_to_page(__pa(table) >> PAGE_SHIFT); |
94 | free_page((unsigned long) table); | 197 | spin_lock(&mm->page_table_lock); |
198 | page->flags ^= bits; | ||
199 | if (page->flags & FRAG_MASK) { | ||
200 | /* Page now has some free pgtable fragments. */ | ||
201 | list_move(&page->lru, &mm->context.pgtable_list); | ||
202 | page = NULL; | ||
203 | } else | ||
204 | /* All fragments of the 4K page have been freed. */ | ||
205 | list_del(&page->lru); | ||
206 | spin_unlock(&mm->page_table_lock); | ||
207 | if (page) { | ||
208 | pgtable_page_dtor(page); | ||
209 | __free_page(page); | ||
210 | } | ||
211 | } | ||
95 | 212 | ||
213 | void disable_noexec(struct mm_struct *mm, struct task_struct *tsk) | ||
214 | { | ||
215 | struct page *page; | ||
216 | |||
217 | spin_lock(&mm->page_table_lock); | ||
218 | /* Free shadow region and segment tables. */ | ||
219 | list_for_each_entry(page, &mm->context.crst_list, lru) | ||
220 | if (page->index) { | ||
221 | free_pages((unsigned long) page->index, ALLOC_ORDER); | ||
222 | page->index = 0; | ||
223 | } | ||
224 | /* "Free" second halves of page tables. */ | ||
225 | list_for_each_entry(page, &mm->context.pgtable_list, lru) | ||
226 | page->flags &= ~SECOND_HALVES; | ||
227 | spin_unlock(&mm->page_table_lock); | ||
228 | mm->context.noexec = 0; | ||
229 | update_mm(mm, tsk); | ||
96 | } | 230 | } |
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c index 7c1287ccf788..35d90a4720fd 100644 --- a/arch/s390/mm/vmem.c +++ b/arch/s390/mm/vmem.c | |||
@@ -69,7 +69,19 @@ static void __ref *vmem_alloc_pages(unsigned int order) | |||
69 | return alloc_bootmem_pages((1 << order) * PAGE_SIZE); | 69 | return alloc_bootmem_pages((1 << order) * PAGE_SIZE); |
70 | } | 70 | } |
71 | 71 | ||
72 | #define vmem_pud_alloc() ({ BUG(); ((pud_t *) NULL); }) | 72 | static inline pud_t *vmem_pud_alloc(void) |
73 | { | ||
74 | pud_t *pud = NULL; | ||
75 | |||
76 | #ifdef CONFIG_64BIT | ||
77 | pud = vmem_alloc_pages(2); | ||
78 | if (!pud) | ||
79 | return NULL; | ||
80 | pud_val(*pud) = _REGION3_ENTRY_EMPTY; | ||
81 | memcpy(pud + 1, pud, (PTRS_PER_PUD - 1)*sizeof(pud_t)); | ||
82 | #endif | ||
83 | return pud; | ||
84 | } | ||
73 | 85 | ||
74 | static inline pmd_t *vmem_pmd_alloc(void) | 86 | static inline pmd_t *vmem_pmd_alloc(void) |
75 | { | 87 | { |
@@ -84,13 +96,18 @@ static inline pmd_t *vmem_pmd_alloc(void) | |||
84 | return pmd; | 96 | return pmd; |
85 | } | 97 | } |
86 | 98 | ||
87 | static inline pte_t *vmem_pte_alloc(void) | 99 | static pte_t __init_refok *vmem_pte_alloc(void) |
88 | { | 100 | { |
89 | pte_t *pte = vmem_alloc_pages(0); | 101 | pte_t *pte; |
90 | 102 | ||
103 | if (slab_is_available()) | ||
104 | pte = (pte_t *) page_table_alloc(&init_mm); | ||
105 | else | ||
106 | pte = alloc_bootmem(PTRS_PER_PTE * sizeof(pte_t)); | ||
91 | if (!pte) | 107 | if (!pte) |
92 | return NULL; | 108 | return NULL; |
93 | clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY, PAGE_SIZE); | 109 | clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY, |
110 | PTRS_PER_PTE * sizeof(pte_t)); | ||
94 | return pte; | 111 | return pte; |
95 | } | 112 | } |
96 | 113 | ||
@@ -360,6 +377,9 @@ void __init vmem_map_init(void) | |||
360 | { | 377 | { |
361 | int i; | 378 | int i; |
362 | 379 | ||
380 | INIT_LIST_HEAD(&init_mm.context.crst_list); | ||
381 | INIT_LIST_HEAD(&init_mm.context.pgtable_list); | ||
382 | init_mm.context.noexec = 0; | ||
363 | NODE_DATA(0)->node_mem_map = VMEM_MAP; | 383 | NODE_DATA(0)->node_mem_map = VMEM_MAP; |
364 | for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) | 384 | for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) |
365 | vmem_add_mem(memory_chunk[i].addr, memory_chunk[i].size); | 385 | vmem_add_mem(memory_chunk[i].addr, memory_chunk[i].size); |