rpms/kernel/devel patch-2.6.22-git14.bz2.sign, NONE, 1.1 .cvsignore, 1.652, 1.653 Makefile, 1.55, 1.56 config-debug, 1.1, 1.2 config-generic, 1.5, 1.6 config-nodebug, 1.1, 1.2 config-powerpc-generic, 1.1, 1.2 config-s390x, 1.1, 1.2 config-x86-generic, 1.2, 1.3 config-x86_64-generic, 1.1, 1.2 kernel.spec, 1.18, 1.19 linux-2.6-build-nonintconfig.patch, 1.8, 1.9 linux-2.6-compile-fixes.patch, 1.153, 1.154 linux-2.6-debug-taint-vm.patch, 1.14, 1.15 linux-2.6-devmem.patch, 1.16, 1.17 linux-2.6-execshield.patch, 1.60, 1.61 linux-2.6-utrace-core.patch, 1.1, 1.2 linux-2.6-utrace-ptrace-compat-avr32.patch, 1.1, 1.2 linux-2.6-utrace-ptrace-compat.patch, 1.1, 1.2 linux-2.6-utrace-regset-avr32.patch, 1.1, 1.2 linux-2.6-utrace-regset-s390.patch, 1.1, 1.2 linux-2.6-utrace-regset.patch, 1.1, 1.2 linux-2.6-utrace-tracehook-avr32.patch, 1.1, 1.2 linux-2.6-utrace-tracehook-s390.patch, 1.1, 1.2 linux-2.6-utrace-tracehook-sparc64.patch, 1.1, 1.2 linux-2.6-utrace-tracehook-um.patch, 1.1, 1.2 linux-2.6-utrace-tracehook.patch, 1.2, 1.3 linux-2.6-x86_64-vdso.patch, 1.2, 1.3 sources, 1.616, 1.617 upstream, 1.538, 1.539 linux-2.6-debug-extra-warnings.patch, 1.7, NONE linux-2.6-debug-must_check.patch, 1.2, NONE linux-2.6-debug-slub-debug.patch, 1.1, NONE linux-2.6-kvm-suspend.patch, 1.1, NONE linux-2.6-softlockup-disable.patch, 1.5, NONE patch-2.6.22-git6.bz2.sign, 1.1, NONE
Dave Jones (davej)
fedora-extras-commits at redhat.com
Fri Jul 20 19:53:05 UTC 2007
Author: davej
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27716
Modified Files:
.cvsignore Makefile config-debug config-generic config-nodebug
config-powerpc-generic config-s390x config-x86-generic
config-x86_64-generic kernel.spec
linux-2.6-build-nonintconfig.patch
linux-2.6-compile-fixes.patch linux-2.6-debug-taint-vm.patch
linux-2.6-devmem.patch linux-2.6-execshield.patch
linux-2.6-utrace-core.patch
linux-2.6-utrace-ptrace-compat-avr32.patch
linux-2.6-utrace-ptrace-compat.patch
linux-2.6-utrace-regset-avr32.patch
linux-2.6-utrace-regset-s390.patch
linux-2.6-utrace-regset.patch
linux-2.6-utrace-tracehook-avr32.patch
linux-2.6-utrace-tracehook-s390.patch
linux-2.6-utrace-tracehook-sparc64.patch
linux-2.6-utrace-tracehook-um.patch
linux-2.6-utrace-tracehook.patch linux-2.6-x86_64-vdso.patch
sources upstream
Added Files:
patch-2.6.22-git14.bz2.sign
Removed Files:
linux-2.6-debug-extra-warnings.patch
linux-2.6-debug-must_check.patch
linux-2.6-debug-slub-debug.patch linux-2.6-kvm-suspend.patch
linux-2.6-softlockup-disable.patch patch-2.6.22-git6.bz2.sign
Log Message:
* Fri Jul 20 2007 Dave Jones <davej at redhat.com>
- 2.6.22-git14
--- NEW FILE patch-2.6.22-git14.bz2.sign ---
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: See http://www.kernel.org/signature.html for info
iD8DBQBGoF6ryGugalF9Dw4RAuPfAJ9ExiEctw9Pa7kXCGJhi+Zo5scqAgCgiqk2
0NX45pqmI/HpTPdS0GAZEs0=
=qn9x
-----END PGP SIGNATURE-----
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/.cvsignore,v
retrieving revision 1.652
retrieving revision 1.653
diff -u -r1.652 -r1.653
--- .cvsignore 16 Jul 2007 13:53:58 -0000 1.652
+++ .cvsignore 20 Jul 2007 19:52:27 -0000 1.653
@@ -3,4 +3,4 @@
temp-*
kernel-2.6.22
linux-2.6.22.tar.bz2
-patch-2.6.22-git6.bz2
+patch-2.6.22-git14.bz2
Index: Makefile
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/Makefile,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- Makefile 16 Jul 2007 15:22:52 -0000 1.55
+++ Makefile 20 Jul 2007 19:52:27 -0000 1.56
@@ -33,6 +33,8 @@
include Makefile.config
debug:
+ @perl -pi -e 's/# CONFIG_SLUB_DEBUG_ON is not set/CONFIG_SLUB_DEBUG_ON=y/' configs/config-nodebug
+ @perl -pi -e 's/# CONFIG_LOCK_STAT is not set/CONFIG_LOCK_STAT=y/' configs/config-nodebug
@perl -pi -e 's/# CONFIG_DEBUG_IGNORE_QUIET is not set/CONFIG_DEBUG_IGNORE_QUIET=y/' configs/config-nodebug
@perl -pi -e 's/# CONFIG_DEBUG_SLAB is not set/CONFIG_DEBUG_SLAB=y/' configs/config-nodebug
@perl -pi -e 's/# CONFIG_DEBUG_MUTEXES is not set/CONFIG_DEBUG_MUTEXES=y/' configs/config-nodebug
@@ -55,6 +57,8 @@
@perl -pi -e 's/^%define debugbuildsenabled 1/%define debugbuildsenabled 0/' kernel.spec
release:
+ @perl -pi -e 's/CONFIG_SLUB_DEBUG_ON=y/# CONFIG_SLUB_DEBUG_ON is not set/' configs/config-nodebug
+ @perl -pi -e 's/CONFIG_LOCK_STAT=y/# CONFIG_LOCK_STAT is not set/' configs/config-nodebug
@perl -pi -e 's/CONFIG_DEBUG_IGNORE_QUIET=y/# CONFIG_DEBUG_IGNORE_QUIET is not set/' configs/config-nodebug
@perl -pi -e 's/CONFIG_DEBUG_SLAB=y/# CONFIG_DEBUG_SLAB is not set/' configs/config-nodebug
@perl -pi -e 's/CONFIG_DEBUG_MUTEXES=y/# CONFIG_DEBUG_MUTEXES is not set/' configs/config-nodebug
Index: config-debug
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-debug,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- config-debug 12 Jul 2007 19:15:37 -0000 1.1
+++ config-debug 20 Jul 2007 19:52:27 -0000 1.2
@@ -17,3 +17,7 @@
CONFIG_FAIL_MAKE_REQUEST=y
CONFIG_FAULT_INJECTION_DEBUG_FS=y
CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y
+
+CONFIG_SLUB_DEBUG_ON=y
+
+CONFIG_LOCK_STAT=y
Index: config-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-generic,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- config-generic 16 Jul 2007 13:53:58 -0000 1.5
+++ config-generic 20 Jul 2007 19:52:27 -0000 1.6
@@ -39,6 +39,7 @@
CONFIG_IOSCHED_CFQ=y
CONFIG_DEFAULT_CFQ=y
CONFIG_IPC_NS=y
+CONFIG_USER_NS=y
CONFIG_POSIX_MQUEUE=y
# CONFIG_PREEMPT_NONE is not set
CONFIG_PREEMPT_VOLUNTARY=y
@@ -47,6 +48,8 @@
CONFIG_SLUB=y
+CONFIG_MISC_DEVICES=y
+
#
# Loadable module support
#
@@ -1717,6 +1720,7 @@
# I2C Hardware Sensors Chip support
#
CONFIG_SENSORS_ABITUGURU=m
+CONFIG_SENSORS_ABITUGURU3=m
CONFIG_SENSORS_AD7418=m
CONFIG_SENSORS_ADM1021=m
CONFIG_SENSORS_ADM1025=m
@@ -1728,6 +1732,7 @@
CONFIG_SENSORS_ASB100=m
CONFIG_SENSORS_ATXP1=m
CONFIG_SENSORS_CORETEMP=m
+CONFIG_SENSORS_DME1737=m
CONFIG_SENSORS_DS1621=m
CONFIG_SENSORS_DS1337=m
CONFIG_SENSORS_DS1374=m
@@ -1751,6 +1756,7 @@
CONFIG_SENSORS_LM87=m
CONFIG_SENSORS_LM90=m
CONFIG_SENSORS_LM92=m
+CONFIG_SENSORS_LM93=m
CONFIG_SENSORS_MAX1619=m
CONFIG_SENSORS_MAX6650=m
CONFIG_SENSORS_MAX6875=m
@@ -1857,6 +1863,9 @@
CONFIG_RTC_DRV_DS1742=m
# CONFIG_RTC_DRV_EP93XX is not set
CONFIG_RTC_DRV_ISL1208=m
+CONFIG_RTC_DRV_M41T80=m
+CONFIG_RTC_DRV_M41T80_WDT=y
+CONFIG_RTC_DRV_M48T59=m
CONFIG_RTC_DRV_MAX6900=m
# CONFIG_RTC_DRV_M48T86 is not set
CONFIG_RTC_DRV_PCF8563=m
@@ -2002,6 +2011,7 @@
CONFIG_VIDEO_ZORAN_LML33=m
CONFIG_VIDEO_ZORAN_LML33R10=m
CONFIG_TUNER_3036=m
+# CONFIG_TUNER_TEA5761 is not set
#
@@ -2073,6 +2083,8 @@
CONFIG_DVB_USB=m
# CONFIG_DVB_USB_DEBUG is not set
CONFIG_DVB_USB_A800=m
+CONFIG_DVB_USB_AF9005=m
+CONFIG_DVB_USB_AF9005_REMOTE=m
CONFIG_DVB_USB_AU6610=m
CONFIG_DVB_USB_CXUSB=m
CONFIG_DVB_USB_DIBUSB_MB=m
@@ -2197,6 +2209,7 @@
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
# CONFIG_FONTS is not set
@@ -2876,6 +2889,7 @@
# Cryptographic options
#
CONFIG_CRYPTO=y
+CONFIG_CRYPTO_HW=y
CONFIG_CRYPTO_MANAGER=m
# CONFIG_CRYPTO_CRYPTD is not set
CONFIG_CRYPTO_AES=m
@@ -2978,6 +2992,7 @@
CONFIG_PM_DEBUG=y
CONFIG_PM_TRACE=y
# CONFIG_DISABLE_CONSOLE_SUSPEND is not set
+# CONFIG_PM_VERBOSE is not set
CONFIG_CRASH=m
@@ -3194,3 +3209,11 @@
CONFIG_BATTERY_PMU=m
# CONFIG_PDA_POWER is not set
+CONFIG_AUXDISPLAY=y
+
+CONFIG_UIO=m
+CONFIG_UIO_CIF=m
+
+CONFIG_INSTRUMENTATION=y
+# CONFIG_CRC7 is not set
+
Index: config-nodebug
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-nodebug,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- config-nodebug 12 Jul 2007 19:15:37 -0000 1.1
+++ config-nodebug 20 Jul 2007 19:52:27 -0000 1.2
@@ -17,3 +17,7 @@
CONFIG_FAIL_MAKE_REQUEST=y
CONFIG_FAULT_INJECTION_DEBUG_FS=y
CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y
+
+CONFIG_SLUB_DEBUG_ON=y
+
+CONFIG_LOCK_STAT=y
Index: config-powerpc-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-powerpc-generic,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- config-powerpc-generic 12 Jul 2007 19:15:37 -0000 1.1
+++ config-powerpc-generic 20 Jul 2007 19:52:27 -0000 1.2
@@ -38,6 +38,7 @@
CONFIG_BLK_DEV_IDE_PMAC=y
CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
CONFIG_BLK_DEV_IDEDMA_PMAC=y
+CONFIG_ELECTRA_IDE=y
CONFIG_ADB=y
CONFIG_ADB_PMU=y
@@ -199,3 +200,7 @@
CONFIG_PMAC_APM_EMU=m
CONFIG_HW_RANDOM_PASEMI=m
+CONFIG_EDAC=y
+# CONFIG_EDAC_DEBUG is not set
+CONFIG_EDAC_MM_EDAC=m
+CONFIG_EDAC_PASEMI=m
Index: config-s390x
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-s390x,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- config-s390x 12 Jul 2007 19:15:37 -0000 1.1
+++ config-s390x 20 Jul 2007 19:52:27 -0000 1.2
@@ -194,3 +194,6 @@
CONFIG_S390_EXEC_PROTECT=y
CONFIG_AFIUCV=m
CONFIG_S390_PRNG=m
+
+CONFIG_S390_VMUR=m
+
Index: config-x86-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-x86-generic,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- config-x86-generic 13 Jul 2007 19:58:04 -0000 1.2
+++ config-x86-generic 20 Jul 2007 19:52:27 -0000 1.3
@@ -279,10 +279,13 @@
CONFIG_EDAC_AMD76X=m
CONFIG_EDAC_E7XXX=m
CONFIG_EDAC_E752X=m
-CONFIG_EDAC_I82875P=m
CONFIG_EDAC_I82860=m
-CONFIG_EDAC_R82600=m
+CONFIG_EDAC_I82875P=m
+CONFIG_EDAC_I82975X=m
+CONFIG_EDAC_I3000=m
+CONFIG_EDAC_I5000=m
CONFIG_EDAC_K8=m
+CONFIG_EDAC_R82600=m
CONFIG_SCHED_MC=y
@@ -305,7 +308,8 @@
# CONFIG_SMSC37B787_WDT is not set
CONFIG_W83697HF_WDT=m
-# CONFIG_PARAVIRT is not set
+CONFIG_PARAVIRT=y
+
CONFIG_RELOCATABLE=y
CONFIG_PHYSICAL_ALIGN=0x400000
CONFIG_PHYSICAL_START=0x1000000
@@ -335,3 +339,8 @@
CONFIG_DMIID=y
+CONFIG_VIRTUALIZATION=y
+CONFIG_VMI=y
+CONFIG_LGUEST=m
+# CONFIG_XEN is not set
+# CONFIG_HVC_XEN is not set
Index: config-x86_64-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-x86_64-generic,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- config-x86_64-generic 12 Jul 2007 19:15:37 -0000 1.1
+++ config-x86_64-generic 20 Jul 2007 19:52:27 -0000 1.2
@@ -156,10 +156,12 @@
CONFIG_EDAC_AMD76X=m
CONFIG_EDAC_E7XXX=m
CONFIG_EDAC_E752X=m
+CONFIG_EDAC_I5000=m
CONFIG_EDAC_I82875P=m
CONFIG_EDAC_I82860=m
-CONFIG_EDAC_R82600=m
+CONFIG_EDAC_I82975X=m
CONFIG_EDAC_K8=m
+CONFIG_EDAC_R82600=m
CONFIG_SCHED_MC=y
@@ -219,3 +221,5 @@
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
+
+CONFIG_VIRTUALIZATION=y
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- kernel.spec 19 Jul 2007 20:42:37 -0000 1.18
+++ kernel.spec 20 Jul 2007 19:52:27 -0000 1.19
@@ -47,7 +47,7 @@
# The rc snapshot level
%define rcrev 0
# The git snapshot level
-%define gitrev 6
+%define gitrev 14
# Set rpm version accordingly
%define rpmversion 2.6.%{upstream_sublevel}
%endif
@@ -351,7 +351,7 @@
# We don't build a kernel on i386; we only do kernel-headers there,
# and we no longer build for 31bit S390.
-%define nobuildarches i386 s390 ppc64
+%define nobuildarches i386 s390
%ifarch %nobuildarches
%define with_up 0
@@ -538,7 +538,6 @@
Patch42: linux-2.6-x86-tune-generic.patch
Patch70: linux-2.6-x86_64-silence-up-apic-errors.patch
Patch71: linux-2.6-x86_64-vdso.patch
-Patch95: linux-2.6-kvm-suspend.patch
Patch100: linux-2.6-g5-therm-shutdown.patch
Patch120: linux-2.6-ppc32-ucmpdi2.patch
Patch130: linux-2.6-ibmvscsi-schizo.patch
@@ -556,9 +555,6 @@
Patch260: linux-2.6-debug-nmi-timeout.patch
Patch270: linux-2.6-debug-taint-vm.patch
Patch280: linux-2.6-debug-spinlock-taint.patch
-Patch290: linux-2.6-debug-extra-warnings.patch
-Patch300: linux-2.6-debug-slub-debug.patch
-Patch320: linux-2.6-debug-must_check.patch
Patch330: linux-2.6-debug-no-quiet.patch
Patch340: linux-2.6-debug-boot-delay.patch
Patch350: linux-2.6-devmem.patch
@@ -570,7 +566,6 @@
Patch450: linux-2.6-input-kill-stupid-messages.patch
Patch460: linux-2.6-serial-460800.patch
Patch480: linux-2.6-proc-self-maps-fix.patch
-Patch490: linux-2.6-softlockup-disable.patch
Patch510: linux-2.6-silence-noise.patch
Patch570: linux-2.6-selinux-mprotect-checks.patch
Patch590: linux-2.6-unexport-symbols.patch
@@ -1043,7 +1038,7 @@
# Assorted dyntick/clock/timer fixes.
#ApplyPatch linux-2.6-clockevents-fix-resume-logic.patch
-ApplyPatch linux-2.6-highres-timers.patch
+#ApplyPatch linux-2.6-highres-timers.patch
# Roland's utrace ptrace replacement.
# Main patch includes i386, x86_64, powerpc.
@@ -1089,8 +1084,6 @@
#ApplyPatch linux-2.6-x86_64-silence-up-apic-errors.patch
# Add vDSO for x86-64 with gettimeofday/clock_gettime/getcpu
ApplyPatch linux-2.6-x86_64-vdso.patch
-# patch to fix suspend with kvm loaded and guests running
-ApplyPatch linux-2.6-kvm-suspend.patch
#
# PowerPC
@@ -1128,15 +1121,6 @@
ApplyPatch linux-2.6-debug-nmi-timeout.patch
ApplyPatch linux-2.6-debug-taint-vm.patch
ApplyPatch linux-2.6-debug-spinlock-taint.patch
-
-%if !%{debugbuildsenabled}
-# Only spew extra warnings on rawhide builds.
-ApplyPatch linux-2.6-debug-extra-warnings.patch
-# Turn slub debug on by default in rawhide
-ApplyPatch linux-2.6-debug-slub-debug.patch
-%endif
-
-ApplyPatch linux-2.6-debug-must_check.patch
ApplyPatch linux-2.6-debug-no-quiet.patch
ApplyPatch linux-2.6-debug-boot-delay.patch
@@ -1171,8 +1155,6 @@
ApplyPatch linux-2.6-input-kill-stupid-messages.patch
# Allow to use 480600 baud on 16C950 UARTs
ApplyPatch linux-2.6-serial-460800.patch
-# Add a safety net to softlockup so that it doesn't prevent installs.
-ApplyPatch linux-2.6-softlockup-disable.patch
# Silence some useless messages that still get printed with 'quiet'
ApplyPatch linux-2.6-silence-noise.patch
@@ -1204,9 +1186,9 @@
ApplyPatch linux-2.6-libata-sb700-sata-ids.patch
# Add the wireless stack updates and drivers from wireless-dev
-ApplyPatch git-wireless-dev.patch
+#ApplyPatch git-wireless-dev.patch
# Add iwlwifi from intellinuxwireless.org
-ApplyPatch git-iwlwifi.patch
+#ApplyPatch git-iwlwifi.patch
# add patch from markmc so that e1000 supports ICH9
ApplyPatch linux-2.6-e1000-ich9.patch
# avoid bcm3xx vs bcm43xx-mac80211 PCI ID conflicts
@@ -1224,10 +1206,10 @@
#
# misc small stuff to make things compile or otherwise improve performance
#
-ApplyPatch linux-2.6-compile-fixes.patch
+#ApplyPatch linux-2.6-compile-fixes.patch
# core dump enhancement
-ApplyPatch linux-2.6-elf-core-sysctl.patch
+#ApplyPatch linux-2.6-elf-core-sysctl.patch
# END OF PATCH APPLICATIONS
@@ -2151,6 +2133,9 @@
%endif
%changelog
+* Fri Jul 20 2007 Dave Jones <davej at redhat.com>
+- 2.6.22-git14
+
* Thu Jul 19 2007 John W. Linville <linville at redhat.com>
- Update git-wireless-dev.patch
linux-2.6-build-nonintconfig.patch:
Index: linux-2.6-build-nonintconfig.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-build-nonintconfig.patch,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- linux-2.6-build-nonintconfig.patch 8 Jun 2007 20:24:24 -0000 1.8
+++ linux-2.6-build-nonintconfig.patch 20 Jul 2007 19:52:27 -0000 1.9
@@ -1,6 +1,6 @@
---- linux-2.6.17/scripts/kconfig/Makefile.nonintconfig
-+++ linux-2.6.17/scripts/kconfig/Makefile
-@@ -23,6 +23,11 @@ oldconfig: $(obj)/conf
+--- linux-2.6.22.noarch/scripts/kconfig/Makefile~ 2007-07-20 13:44:34.000000000 -0400
++++ linux-2.6.22.noarch/scripts/kconfig/Makefile 2007-07-20 13:44:58.000000000 -0400
+@@ -22,6 +22,12 @@ oldconfig: $(obj)/conf
silentoldconfig: $(obj)/conf
$< -s arch/$(ARCH)/Kconfig
@@ -9,9 +9,10 @@
+loose_nonint_oldconfig: $(obj)/conf
+ $< -B arch/$(ARCH)/Kconfig
+
- update-po-config: $(obj)/kxgettext
- xgettext --default-domain=linux \
- --add-comments --keyword=_ --keyword=N_ \
++
+ # Create new linux.po file
+ # Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files
+ # The symlink is used to repair a deficiency in arch/um
--- linux-2.6.17/scripts/kconfig/conf.c.nonintconfig
+++ linux-2.6.17/scripts/kconfig/conf.c
@@ -21,6 +21,8 @@ enum {
linux-2.6-compile-fixes.patch:
Index: linux-2.6-compile-fixes.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-compile-fixes.patch,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -r1.153 -r1.154
--- linux-2.6-compile-fixes.patch 16 Jul 2007 15:47:03 -0000 1.153
+++ linux-2.6-compile-fixes.patch 20 Jul 2007 19:52:27 -0000 1.154
@@ -5,259 +5,3 @@
# to do a compile to figure out what your diff is fixing. Thanks.
#
-net/sunrpc/auth_gss/auth_gss.c:1002: error: implicit declaration of function 'lock_kernel'
-net/sunrpc/auth_gss/auth_gss.c:1004: error: implicit declaration of function 'unlock_kernel'
-
-
-From davej Sat Jul 14 13:08:20 2007
-Return-path: <linux-kernel-owner+davej=40kernelslacker.org-S1759976AbXGNRDd at vger.kernel.org>
-X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham
- version=3.2.1
-Envelope-to: davej at kernelslacker.org
-Delivery-date: Sat, 14 Jul 2007 18:03:42 +0100
-Received: from testure.choralone.org [194.9.77.134]
- by gelk.kernelslacker.org with IMAP (fetchmail-6.3.7)
- for <davej at localhost> (single-drop); Sat, 14 Jul 2007 13:08:20 -0400 (EDT)
-Received: from vger.kernel.org ([209.132.176.167])
- by testure.choralone.org with esmtp (Exim 4.67)
- (envelope-from <linux-kernel-owner+davej=40kernelslacker.org-S1759976AbXGNRDd at vger.kernel.org>)
- id 1I9l1y-0001zg-BC
- for davej at kernelslacker.org; Sat, 14 Jul 2007 18:03:42 +0100
-Received: (majordomo at vger.kernel.org) by vger.kernel.org via listexpand
- id S1759976AbXGNRDd (ORCPT <rfc822;davej at kernelslacker.org>);
- Sat, 14 Jul 2007 13:03:33 -0400
-Received: (majordomo at vger.kernel.org) by vger.kernel.org id S1756871AbXGNRDY
- (ORCPT <rfc822;linux-kernel-outgoing>);
- Sat, 14 Jul 2007 13:03:24 -0400
-Received: from mx2.netapp.com ([216.240.18.37]:1452 "EHLO mx2.netapp.com"
- rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
- id S1756771AbXGNRDX (ORCPT <rfc822;linux-kernel at vger.kernel.org>);
- Sat, 14 Jul 2007 13:03:23 -0400
-X-Greylist: delayed 582 seconds by postgrey-1.27 at vger.kernel.org; Sat, 14 Jul 2007 13:03:22 EDT
-X-IronPort-AV: E=Sophos;i="4.16,539,1175497200";
- d="scan'208";a="81951363"
-Received: from smtp1.corp.netapp.com ([10.57.156.124])
- by mx2-out.netapp.com with ESMTP; 14 Jul 2007 09:53:39 -0700
-Received: from svlexrs01.hq.netapp.com (svlexrs01.corp.netapp.com [10.57.156.158])
- by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id l6EGrb0C028183;
- Sat, 14 Jul 2007 09:53:37 -0700 (PDT)
-Received: from exsvlrb02.hq.netapp.com ([10.56.8.63]) by svlexrs01.hq.netapp.com with Microsoft SMTPSVC(6.0.3790.1830);
- Sat, 14 Jul 2007 09:53:37 -0700
-Received: from exsvl03.hq.netapp.com ([10.56.8.64]) by exsvlrb02.hq.netapp.com with Microsoft SMTPSVC(6.0.3790.1830);
- Sat, 14 Jul 2007 09:53:36 -0700
-Received: from 10.58.53.86 ([10.58.53.86]) by exsvl03.hq.netapp.com ([10.56.8.64]) with Microsoft Exchange Server HTTP-DAV ;
- Sat, 14 Jul 2007 16:53:36 +0000
-Received: from heimdal.trondhjem.org by exsvl03.hq.netapp.com; 14 Jul 2007 12:53:35 -0400
-Subject: Re: new 2.6.22-git5 warnings
-From: Trond Myklebust <Trond.Myklebust at netapp.com>
-To: Randy Dunlap <randy.dunlap at oracle.com>
-Cc: lkml <linux-kernel at vger.kernel.org>, bfields at citi.umich.edu
-In-Reply-To: <20070714083754.2c3f1d0a.randy.dunlap at oracle.com>
-References: <20070714083754.2c3f1d0a.randy.dunlap at oracle.com>
-Content-Type: multipart/mixed; boundary="=-9pi3/AD788TKpM8YFwiu"
-Organization: Network Appliance Inc
-Date: Sat, 14 Jul 2007 12:53:35 -0400
-Message-Id: <1184432015.20296.1.camel at heimdal.trondhjem.org>
-Mime-Version: 1.0
-X-Mailer: Evolution 2.10.1
-X-OriginalArrivalTime: 14 Jul 2007 16:53:36.0746 (UTC) FILETIME=[856E7CA0:01C7C637]
-Sender: linux-kernel-owner at vger.kernel.org
-Precedence: bulk
-X-Mailing-List: linux-kernel at vger.kernel.org
-Status: RO
-Content-Length: 8052
-Lines: 231
-
-
-On Sat, 2007-07-14 at 08:37 -0700, Randy Dunlap wrote:
->
-> net/sunrpc/auth_gss/auth_gss.c:1002: warning: implicit declaration of function 'lock_kernel'
-> net/sunrpc/auth_gss/auth_gss.c:1004: warning: implicit declaration of function 'unlock_kernel'
->
->
-> allmodconfig or allyesconfig on x86_64.
-
-Yup. Sorry about that. Bruce has proposed a cleanup which should also
-fix this problem. See attachment
-
-Cheers
- Trond
-
-
-From: J. Bruce Fields <bfields at citi.umich.edu>
-
-Since every invocation of xdr encode or decode functions takes the BKL now,
-there's a lot of redundant lock_kernel/unlock_kernel pairs that we can pull out
-into a common function.
-
-Signed-off-by: J. Bruce Fields <bfields at citi.umich.edu>
----
- include/linux/sunrpc/xdr.h | 16 ++++++++++++++++
- net/sunrpc/auth.c | 12 ++----------
- net/sunrpc/auth_gss/auth_gss.c | 20 +++++---------------
- 3 files changed, 23 insertions(+), 25 deletions(-)
-
-> It's fine to keep it as a separate patch, but you're going to have to do
-> something about the name: do_xdrproc() breaks with the standard sunrpc
-> namespace conventions. How about naming it rpc_call_xdrproc().
-
-Sounds fine. Here's take two, with the new name and an additional
-comment.
-
---b.
-
-diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h
-index 9e340fa..c6b53d1 100644
---- a/include/linux/sunrpc/xdr.h
-+++ b/include/linux/sunrpc/xdr.h
-@@ -12,6 +12,7 @@
- #include <linux/uio.h>
- #include <asm/byteorder.h>
- #include <linux/scatterlist.h>
-+#include <linux/smp_lock.h>
-
- /*
- * Buffer adjustment
-@@ -36,6 +37,21 @@ struct xdr_netobj {
- typedef int (*kxdrproc_t)(void *rqstp, __be32 *data, void *obj);
-
- /*
-+ * We're still requiring the BKL in the xdr code until it's been
-+ * more carefully audited, at which point this wrapper will become
-+ * unnecessary.
-+ */
-+static inline int rpc_call_xdrproc(kxdrproc_t xdrproc, void *rqstp, __be32 *data, void *obj)
-+{
-+ int ret;
-+
-+ lock_kernel();
-+ ret = xdrproc(rqstp, data, obj);
-+ unlock_kernel();
-+ return ret;
-+}
-+
-+/*
- * Basic structure for transmission/reception of a client XDR message.
- * Features a header (for a linear buffer containing RPC headers
- * and the data payload for short messages), and then an array of
-diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c
-index e04da66..cd31cbd 100644
---- a/net/sunrpc/auth.c
-+++ b/net/sunrpc/auth.c
-@@ -359,17 +359,13 @@ rpcauth_wrap_req(struct rpc_task *task, kxdrproc_t encode, void *rqstp,
- __be32 *data, void *obj)
- {
- struct rpc_cred *cred = task->tk_msg.rpc_cred;
-- int ret;
-
- dprintk("RPC: %5u using %s cred %p to wrap rpc data\n",
- task->tk_pid, cred->cr_ops->cr_name, cred);
- if (cred->cr_ops->crwrap_req)
- return cred->cr_ops->crwrap_req(task, encode, rqstp, data, obj);
- /* By default, we encode the arguments normally. */
-- lock_kernel();
-- ret = encode(rqstp, data, obj);
-- unlock_kernel();
-- return ret;
-+ return rpc_call_xdrproc(encode, rqstp, data, obj);
- }
-
- int
-@@ -377,7 +373,6 @@ rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp,
- __be32 *data, void *obj)
- {
- struct rpc_cred *cred = task->tk_msg.rpc_cred;
-- int ret;
-
- dprintk("RPC: %5u using %s cred %p to unwrap rpc data\n",
- task->tk_pid, cred->cr_ops->cr_name, cred);
-@@ -385,10 +380,7 @@ rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp,
- return cred->cr_ops->crunwrap_resp(task, decode, rqstp,
- data, obj);
- /* By default, we decode the arguments normally. */
-- lock_kernel();
-- ret = decode(rqstp, data, obj);
-- unlock_kernel();
-- return ret;
-+ return rpc_call_xdrproc(decode, rqstp, data, obj);
- }
-
- int
-diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
-index a001973..73fd24c 100644
---- a/net/sunrpc/auth_gss/auth_gss.c
-+++ b/net/sunrpc/auth_gss/auth_gss.c
-@@ -917,9 +917,7 @@ gss_wrap_req_integ(struct rpc_cred *cred, struct gss_cl_ctx *ctx,
- offset = (u8 *)p - (u8 *)snd_buf->head[0].iov_base;
- *p++ = htonl(rqstp->rq_seqno);
-
-- lock_kernel();
-- status = encode(rqstp, p, obj);
-- unlock_kernel();
-+ status = rpc_call_xdrproc(encode, rqstp, p, obj);
- if (status)
- return status;
-
-@@ -1013,9 +1011,7 @@ gss_wrap_req_priv(struct rpc_cred *cred, struct gss_cl_ctx *ctx,
- offset = (u8 *)p - (u8 *)snd_buf->head[0].iov_base;
- *p++ = htonl(rqstp->rq_seqno);
-
-- lock_kernel();
-- status = encode(rqstp, p, obj);
-- unlock_kernel();
-+ status = rpc_call_xdrproc(encode, rqstp, p, obj);
- if (status)
- return status;
-
-@@ -1074,16 +1070,12 @@ gss_wrap_req(struct rpc_task *task,
- /* The spec seems a little ambiguous here, but I think that not
- * wrapping context destruction requests makes the most sense.
- */
-- lock_kernel();
-- status = encode(rqstp, p, obj);
-- unlock_kernel();
-+ status = rpc_call_xdrproc(encode, rqstp, p, obj);
- goto out;
- }
- switch (gss_cred->gc_service) {
- case RPC_GSS_SVC_NONE:
-- lock_kernel();
-- status = encode(rqstp, p, obj);
-- unlock_kernel();
-+ status = rpc_call_xdrproc(encode, rqstp, p, obj);
- break;
- case RPC_GSS_SVC_INTEGRITY:
- status = gss_wrap_req_integ(cred, ctx, encode,
-@@ -1199,9 +1191,7 @@ gss_unwrap_resp(struct rpc_task *task,
- task->tk_auth->au_rslack = task->tk_auth->au_verfsize + (p - savedp)
- + (savedlen - head->iov_len);
- out_decode:
-- lock_kernel();
-- status = decode(rqstp, p, obj);
-- unlock_kernel();
-+ status = rpc_call_xdrproc(decode, rqstp, p, obj);
- out:
- gss_put_ctx(ctx);
- dprintk("RPC: %5u gss_unwrap_resp returning %d\n", task->tk_pid,
-
-
-fs/9p/v9fs.c: In function 'v9fs_parse_options':
-fs/9p/v9fs.c:134: error: 'p9_debug_level' undeclared (first use in this function)
-
-Signed-off-by: Dave Jones <davej at redhat.com>
-
---- linux-2.6.22.noarch/fs/9p/v9fs.c~ 2007-07-16 11:45:56.000000000 -0400
-+++ linux-2.6.22.noarch/fs/9p/v9fs.c 2007-07-16 11:46:12.000000000 -0400
-@@ -131,7 +131,9 @@ static void v9fs_parse_options(char *opt
- switch (token) {
- case Opt_debug:
- v9ses->debug = option;
-+#ifdef CONFIG_NET_9P_DEBUG
- p9_debug_level = option;
-+#endif
- break;
- case Opt_port:
- v9ses->port = option;
linux-2.6-debug-taint-vm.patch:
Index: linux-2.6-debug-taint-vm.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-debug-taint-vm.patch,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- linux-2.6-debug-taint-vm.patch 28 May 2007 03:29:08 -0000 1.14
+++ linux-2.6-debug-taint-vm.patch 20 Jul 2007 19:52:27 -0000 1.15
@@ -72,8 +72,6 @@
print_objinfo(cachep, objp, 0);
}
/* Hexdump the affected line */
---- linux-2.6.21.noarch/mm/slab.c~ 2007-05-14 11:51:33.000000000 -0400
-+++ linux-2.6.21.noarch/mm/slab.c 2007-05-14 11:53:00.000000000 -0400
@@ -2924,8 +2924,8 @@ static void check_slabp(struct kmem_cach
if (entries != cachep->num - slabp->inuse) {
bad:
@@ -85,36 +83,14 @@
for (i = 0;
i < sizeof(*slabp) + cachep->num * sizeof(kmem_bufctl_t);
i++) {
---- linux-2.6.21.noarch/mm/slub.c~ 2007-05-27 22:51:45.000000000 -0400
-+++ linux-2.6.21.noarch/mm/slub.c 2007-05-27 22:56:48.000000000 -0400
-@@ -446,8 +446,8 @@ static void object_err(struct kmem_cache
- {
- u8 *addr = page_address(page);
-
-- printk(KERN_ERR "*** SLUB %s: %s at 0x%p slab 0x%p\n",
-- s->name, reason, object, page);
-+ printk(KERN_ERR "*** SLUB %s: %s at 0x%p slab 0x%p [%s]\n",
-+ s->name, reason, object, page, print_tainted());
- printk(KERN_ERR " offset=%tu flags=0x%04lx inuse=%u freelist=0x%p\n",
- object - addr, page->flags, page->inuse, page->freelist);
- if (object > addr + 16)
-@@ -465,8 +465,8 @@ static void slab_err(struct kmem_cache *
- va_start(args, reason);
- vsnprintf(buf, sizeof(buf), reason, args);
+--- linux-2.6.22.noarch/mm/slub.c~ 2007-07-20 14:15:05.000000000 -0400
++++ linux-2.6.22.noarch/mm/slub.c 2007-07-20 14:17:37.000000000 -0400
+@@ -450,7 +450,7 @@ static void slab_bug(struct kmem_cache *
va_end(args);
-- printk(KERN_ERR "*** SLUB %s: %s in slab @0x%p\n", s->name, buf,
-- page);
-+ printk(KERN_ERR "*** SLUB %s: %s in slab @0x%p [%s]\n", s->name, buf,
-+ page, print_tainted());
- dump_stack();
- }
-
-@@ -737,7 +737,7 @@ static int on_freelist(struct kmem_cache
- s->objects - nr);
- page->inuse = s->objects - nr;
- printk(KERN_ERR "@@@ SLUB %s: Object count adjusted. "
-- "Slab @0x%p\n", s->name, page);
-+ "Slab @0x%p [%s]\n", s->name, page, print_tainted());
- }
- return search == NULL;
+ printk(KERN_ERR "========================================"
+ "=====================================\n");
+- printk(KERN_ERR "BUG %s: %s\n", s->name, buf);
++ printk(KERN_ERR "BUG %s (%s): %s\n", s->name, print_tainted(), buf);
+ printk(KERN_ERR "----------------------------------------"
+ "-------------------------------------\n\n");
}
linux-2.6-devmem.patch:
Index: linux-2.6-devmem.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-devmem.patch,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- linux-2.6-devmem.patch 4 Jun 2007 21:41:02 -0000 1.16
+++ linux-2.6-devmem.patch 20 Jul 2007 19:52:27 -0000 1.17
@@ -539,13 +539,11 @@
#endif /* __KERNEL__ */
#endif /* _S390_PAGE_H */
-Index: linux-2.6/include/asm-sh/page.h
-===================================================================
---- linux-2.6.orig/include/asm-sh/page.h
-+++ linux-2.6/include/asm-sh/page.h
-@@ -124,5 +124,7 @@ typedef struct { unsigned long pgprot; }
- #define __HAVE_ARCH_GATE_AREA
- #endif
+--- linux-2.6.22.noarch/include/asm-sh/page.h~ 2007-07-20 14:22:49.000000000 -0400
++++ linux-2.6.22.noarch/include/asm-sh/page.h 2007-07-20 14:22:54.000000000 -0400
+@@ -158,5 +158,7 @@ typedef struct { unsigned long pgd; } pg
+ #define ARCH_KMALLOC_MINALIGN 4
+ #define ARCH_SLAB_MINALIGN 4
+#define devmem_is_allowed(x) 1
+
linux-2.6-execshield.patch:
Index: linux-2.6-execshield.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-execshield.patch,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- linux-2.6-execshield.patch 13 Jul 2007 19:58:04 -0000 1.60
+++ linux-2.6-execshield.patch 20 Jul 2007 19:52:27 -0000 1.61
@@ -89,16 +89,16 @@
+ current->mm->brk = new_brk;
+}
+
---- linux-2.6.20.noarch/arch/i386/kernel/smp.c~ 2007-02-17 21:43:47.000000000 -0500
-+++ linux-2.6.20.noarch/arch/i386/kernel/smp.c 2007-02-17 21:43:53.000000000 -0500
-@@ -23,6 +23,7 @@
+--- linux-2.6.22.noarch/arch/i386/kernel/smp.c~ 2007-07-20 13:48:03.000000000 -0400
++++ linux-2.6.22.noarch/arch/i386/kernel/smp.c 2007-07-20 13:48:08.000000000 -0400
+@@ -22,6 +22,7 @@
#include <asm/mtrr.h>
#include <asm/tlbflush.h>
+#include <asm/desc.h>
+ #include <asm/mmu_context.h>
#include <mach_apic.h>
- /*
@@ -325,6 +326,8 @@ fastcall void smp_invalidate_interrupt(s
unsigned long cpu;
@@ -129,11 +129,11 @@
if (IS_ERR_VALUE(addr)) {
ret = addr;
goto up_fail;
---- linux-2.6.21.noarch/kernel/sysctl.c~ 2007-05-27 22:30:01.000000000 -0400
-+++ linux-2.6.21.noarch/kernel/sysctl.c 2007-05-27 22:30:30.000000000 -0400
-@@ -79,6 +79,26 @@ extern int compat_log;
- extern int maps_protect;
+--- linux-2.6.22.noarch/kernel/sysctl.c~ 2007-07-20 13:48:52.000000000 -0400
++++ linux-2.6.22.noarch/kernel/sysctl.c 2007-07-20 13:49:22.000000000 -0400
+@@ -80,6 +80,26 @@ extern int maps_protect;
extern int sysctl_stat_interval;
+ extern int audit_argv_kb;
+int exec_shield = (1<<0);
+/* exec_shield is a bitmask:
@@ -158,7 +158,7 @@
/* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */
static int maxolduid = 65535;
static int minolduid;
-@@ -331,6 +351,22 @@
+@@ -331,6 +351,14 @@
.proc_handler = &proc_dointvec,
},
{
@@ -170,14 +170,6 @@
+ .proc_handler = &proc_dointvec,
+ },
+ {
-+ .ctl_name = KERN_PRINT_FATAL,
-+ .procname = "print-fatal-signals",
-+ .data = &print_fatal_signals,
-+ .maxlen = sizeof(int),
-+ .mode = 0644,
-+ .proc_handler = &proc_dointvec,
-+ },
-+ {
.ctl_name = KERN_CORE_USES_PID,
.procname = "core_uses_pid",
.data = &core_uses_pid,
@@ -375,16 +367,13 @@
/*
* Walk the list again, actually closing and freeing it,
-Index: linux-2.6/arch/i386/kernel/traps.c
-===================================================================
---- linux-2.6.orig/arch/i386/kernel/traps.c
-+++ linux-2.6/arch/i386/kernel/traps.c
-@@ -638,7 +638,84 @@ DO_ERROR(10, SIGSEGV, "invalid TSS", inv
+--- linux-2.6.22.noarch/arch/i386/kernel/traps.c~ 2007-07-20 13:50:07.000000000 -0400
++++ linux-2.6.22.noarch/arch/i386/kernel/traps.c 2007-07-20 13:52:09.000000000 -0400
+@@ -573,7 +573,84 @@ DO_ERROR(10, SIGSEGV, "invalid TSS", inv
DO_ERROR(11, SIGBUS, "segment not present", segment_not_present)
DO_ERROR(12, SIGBUS, "stack segment", stack_segment)
- DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, 0)
--DO_ERROR_INFO(32, SIGSEGV, "iret exception", iret_error, ILL_BADSTK, 0)
-+
+ DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, 0, 0)
+-DO_ERROR_INFO(32, SIGSEGV, "iret exception", iret_error, ILL_BADSTK, 0, 1)
+
+/*
+ * lazy-check for CS validity on exec-shield binaries:
@@ -395,9 +384,9 @@
+static int
+check_lazy_exec_limit(int cpu, struct pt_regs *regs, long error_code)
+{
-+ struct desc_struct *desc1, *desc2;
-+ struct vm_area_struct *vma;
-+ unsigned long limit;
++struct desc_struct *desc1, *desc2;
++struct vm_area_struct *vma;
++unsigned long limit;
+
+ if (current->mm == NULL)
+ return 0;
@@ -430,7 +419,7 @@
+ error_code, error_code/8, regs->eip, smp_processor_id());
+ printk(KERN_ERR "exec_limit: %08lx, user_cs: %08lx/%08lx, CPU_cs: %08lx/%08lx.\n",
+ current->mm->context.exec_limit, desc1->a, desc1->b, desc2->a, desc2->b);
-+ }
++ }
+ load_user_cs_desc(cpu, current->mm);
+ return 1;
+ }
@@ -449,19 +438,20 @@
+ */
+fastcall void do_iret_error(struct pt_regs *regs, long error_code)
+{
-+ int ok = check_lazy_exec_limit(get_cpu(), regs, error_code);
-+ put_cpu();
-+ if (!ok && notify_die(DIE_TRAP, "iret exception", regs,
-+ error_code, 32, SIGSEGV) != NOTIFY_STOP) {
-+ siginfo_t info;
-+ info.si_signo = SIGSEGV;
-+ info.si_errno = 0;
-+ info.si_code = ILL_BADSTK;
-+ info.si_addr = 0;
-+ do_trap(32, SIGSEGV, "iret exception", 0, regs, error_code,
-+ &info);
-+ }
++ int ok = check_lazy_exec_limit(get_cpu(), regs, error_code);
++ put_cpu();
++ if (!ok && notify_die(DIE_TRAP, "iret exception", regs,
++ error_code, 32, SIGSEGV) != NOTIFY_STOP) {
++ siginfo_t info;
++ info.si_signo = SIGSEGV;
++ info.si_errno = 0;
++ info.si_code = ILL_BADSTK;
++ info.si_addr = 0;
++ do_trap(32, SIGSEGV, "iret exception", 0, regs, error_code,
++ &info);
++ }
+}
++
fastcall void __kprobes do_general_protection(struct pt_regs * regs,
long error_code)
@@ -602,19 +592,6 @@
kpte = lookup_address(address);
if (!kpte)
return -EINVAL;
-Index: linux-2.6/arch/ia64/ia32/binfmt_elf32.c
-===================================================================
---- linux-2.6.orig/arch/ia64/ia32/binfmt_elf32.c
-+++ linux-2.6/arch/ia64/ia32/binfmt_elf32.c
-@@ -266,7 +266,7 @@ elf32_set_personality (void)
- }
-
- static unsigned long
--elf32_map (struct file *filep, unsigned long addr, struct elf_phdr *eppnt, int prot, int type)
-+elf32_map (struct file *filep, unsigned long addr, struct elf_phdr *eppnt, int prot, int type, unsigned long unused)
- {
- unsigned long pgoff = (eppnt->p_vaddr) & ~IA32_PAGE_MASK;
-
Index: linux-2.6/arch/x86_64/ia32/ia32_binfmt.c
===================================================================
--- linux-2.6.orig/arch/x86_64/ia32/ia32_binfmt.c
@@ -855,149 +832,7 @@
/*
--- linux-2.6.21.noarch/fs/binfmt_elf.c~ 2007-05-27 22:36:34.000000000 -0400
+++ linux-2.6.21.noarch/fs/binfmt_elf.c 2007-05-27 22:36:45.000000000 -0400
-@@ -45,7 +45,7 @@
-
- static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs);
- static int load_elf_library(struct file *);
--static unsigned long elf_map (struct file *, unsigned long, struct elf_phdr *, int, int);
-+static unsigned long elf_map (struct file *, unsigned long, struct elf_phdr *, int, int, unsigned long);
-
- /*
- * If we don't support core dumping, then supply a NULL so we
-@@ -285,33 +285,71 @@ create_elf_tables(struct linux_binprm *b
- #ifndef elf_map
-
- static unsigned long elf_map(struct file *filep, unsigned long addr,
-- struct elf_phdr *eppnt, int prot, int type)
-+ struct elf_phdr *eppnt, int prot, int type,
-+ unsigned long total_size)
- {
- unsigned long map_addr;
-- unsigned long pageoffset = ELF_PAGEOFFSET(eppnt->p_vaddr);
-+ unsigned long size = eppnt->p_filesz + ELF_PAGEOFFSET(eppnt->p_vaddr);
-+ unsigned long off = eppnt->p_offset - ELF_PAGEOFFSET(eppnt->p_vaddr);
-+
-+ addr = ELF_PAGESTART(addr);
-+ size = ELF_PAGEALIGN(size);
-
-- down_write(¤t->mm->mmap_sem);
- /* mmap() will return -EINVAL if given a zero size, but a
- * segment with zero filesize is perfectly valid */
-- if (eppnt->p_filesz + pageoffset)
-- map_addr = do_mmap(filep, ELF_PAGESTART(addr),
-- eppnt->p_filesz + pageoffset, prot, type,
-- eppnt->p_offset - pageoffset);
-- else
-- map_addr = ELF_PAGESTART(addr);
-+ if (!size)
-+ return addr;
-+
-+ down_write(¤t->mm->mmap_sem);
-+ /*
-+ * total_size is the size of the ELF (interpreter) image.
-+ * The _first_ mmap needs to know the full size, otherwise
-+ * randomization might put this image into an overlapping
-+ * position with the ELF binary image. (since size < total_size)
-+ * So we first map the 'big' image - and unmap the remainder at
-+ * the end. (which unmap is needed for ELF images with holes.)
-+ */
-+ if (total_size) {
-+ total_size = ELF_PAGEALIGN(total_size);
-+ map_addr = do_mmap(filep, addr, total_size, prot, type, off);
-+ if (!BAD_ADDR(map_addr))
-+ do_munmap(current->mm, map_addr+size, total_size-size);
-+ } else
-+ map_addr = do_mmap(filep, addr, size, prot, type, off);
-+
- up_write(¤t->mm->mmap_sem);
- return(map_addr);
- }
-
- #endif /* !elf_map */
-
-+static inline unsigned long total_mapping_size(struct elf_phdr *cmds, int nr)
-+{
-+ int i, first_idx = -1, last_idx = -1;
-+
-+ for (i = 0; i < nr; i++)
-+ if (cmds[i].p_type == PT_LOAD) {
-+ last_idx = i;
-+ if (first_idx == -1)
-+ first_idx = i;
-+ }
-+
-+ if (first_idx == -1)
-+ return 0;
-+
-+ return cmds[last_idx].p_vaddr + cmds[last_idx].p_memsz -
-+ ELF_PAGESTART(cmds[first_idx].p_vaddr);
-+}
-+
-+
- /* This is much more generalized than the library routine read function,
- so we keep this separate. Technically the library read function
- is only provided so that we can read a.out libraries that have
- an ELF header */
-
- static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
-- struct file *interpreter, unsigned long *interp_load_addr)
-+ struct file *interpreter, unsigned long *interp_map_addr,
-+ unsigned long no_base)
- {
- struct elf_phdr *elf_phdata;
- struct elf_phdr *eppnt;
-@@ -319,6 +357,7 @@ static unsigned long load_elf_interp(str
- int load_addr_set = 0;
- unsigned long last_bss = 0, elf_bss = 0;
- unsigned long error = ~0UL;
-+ unsigned long total_size;
- int retval, i, size;
-
- /* First of all, some simple consistency checks */
-@@ -357,6 +396,10 @@ static unsigned long load_elf_interp(str
- goto out_close;
- }
-
-+ total_size = total_mapping_size(elf_phdata, interp_elf_ex->e_phnum);
-+ if (!total_size)
-+ goto out_close;
-+
- eppnt = elf_phdata;
- for (i = 0; i < interp_elf_ex->e_phnum; i++, eppnt++) {
- if (eppnt->p_type == PT_LOAD) {
-@@ -374,9 +417,14 @@ static unsigned long load_elf_interp(str
- vaddr = eppnt->p_vaddr;
- if (interp_elf_ex->e_type == ET_EXEC || load_addr_set)
- elf_type |= MAP_FIXED;
-+ else if (no_base && interp_elf_ex->e_type == ET_DYN)
-+ load_addr = -vaddr;
-
- map_addr = elf_map(interpreter, load_addr + vaddr,
-- eppnt, elf_prot, elf_type);
-+ eppnt, elf_prot, elf_type, total_size);
-+ total_size = 0;
-+ if (!*interp_map_addr)
-+ *interp_map_addr = map_addr;
- error = map_addr;
- if (BAD_ADDR(map_addr))
- goto out_close;
-@@ -442,8 +490,7 @@ static unsigned long load_elf_interp(str
- goto out_close;
- }
-
-- *interp_load_addr = load_addr;
-- error = ((unsigned long)interp_elf_ex->e_entry) + load_addr;
-+ error = load_addr;
-
- out_close:
- kfree(elf_phdata);
-@@ -586,12 +586,12 @@ static int load_elf_binary(struct linux_
- int elf_exec_fileno;
- int retval, i;
- unsigned int size;
-- unsigned long elf_entry, interp_load_addr = 0;
-+ unsigned long elf_entry, interp_load_addr = 0, interp_map_addr = 0;
- unsigned long start_code, end_code, start_data, end_data;
+@@ -608,7 +608,7 @@ static int load_elf_binary(struct linux_
unsigned long reloc_func_desc = 0;
char passed_fileno[6];
struct files_struct *files;
@@ -1006,15 +841,15 @@
unsigned long def_flags = 0;
struct {
struct elfhdr elf_ex;
-@@ -700,6 +747,8 @@ static int load_elf_binary(struct linux_
- }
+@@ -675,6 +675,8 @@ static int load_elf_binary(struct linux_
+ fd_install(elf_exec_fileno = retval, bprm->file);
elf_ppnt = elf_phdata;
+ executable_stack = EXSTACK_DEFAULT;
+
- for (i = 0; i < loc->elf_ex.e_phnum; i++, elf_ppnt++)
- if (elf_ppnt->p_type == PT_GNU_STACK) {
- if (elf_ppnt->p_flags & PF_X)
+ elf_bss = 0;
+ elf_brk = 0;
+
@@ -767,6 +767,11 @@ static int load_elf_binary(struct linux_
break;
}
@@ -1053,47 +888,6 @@
current->personality |= READ_IMPLIES_EXEC;
if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space)
-@@ -872,9 +872,8 @@ static int load_elf_binary(struct linux_
- current->mm->start_stack = bprm->p;
-
- /* Now we do a little grungy work by mmaping the ELF image into
-- the correct location in memory. At this point, we assume that
-- the image should be loaded at fixed address, not at a variable
-- address. */
-+ * the correct location in memory.
-+ */
- for(i = 0, elf_ppnt = elf_phdata;
- i < loc->elf_ex.e_phnum; i++, elf_ppnt++) {
- int elf_prot = 0, elf_flags;
-@@ -927,7 +927,7 @@ static int load_elf_binary(struct linux_
- }
-
- error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt,
-- elf_prot, elf_flags);
-+ elf_prot, elf_flags, 0);
- if (BAD_ADDR(error)) {
- send_sig(SIGKILL, current, 0);
- goto out_free_dentry;
-@@ -936,10 +998,17 @@ static int load_elf_binary(struct linux_
- if (interpreter_type == INTERPRETER_AOUT)
- elf_entry = load_aout_interp(&loc->interp_ex,
- interpreter);
-- else
-+ else {
- elf_entry = load_elf_interp(&loc->interp_elf_ex,
- interpreter,
-- &interp_load_addr);
-+ &interp_map_addr,
-+ load_bias);
-+ if (!IS_ERR((void *)elf_entry)) {
-+ /* load_elf_interp() returns relocation adjustment */
-+ interp_load_addr = elf_entry;
-+ elf_entry += loc->interp_elf_ex.e_entry;
-+ }
-+ }
- if (BAD_ADDR(elf_entry)) {
- force_sig(SIGSEGV, current);
- retval = IS_ERR((void *)elf_entry) ?
@@ -960,21 +1029,22 @@ static int load_elf_binary(struct linux_
}
}
@@ -1132,15 +926,13 @@
if (current->personality & MMAP_PAGE_ZERO) {
/* Why this, you ask??? Well SVr4 maps page 0 as read-only,
and some applications "depend" upon this behavior.
---- linux-2.6.21.noarch/fs/proc/array.c~ 2007-05-27 22:43:03.000000000 -0400
-+++ linux-2.6.21.noarch/fs/proc/array.c 2007-05-27 22:44:00.000000000 -0400
-@@ -395,8 +395,12 @@ static int do_task_stat(struct task_stru
- }
+--- linux-2.6.22.noarch/fs/proc/array.c~ 2007-07-20 14:07:45.000000000 -0400
++++ linux-2.6.22.noarch/fs/proc/array.c 2007-07-20 14:10:13.000000000 -0400
+@@ -440,7 +440,11 @@ static int do_task_stat(struct task_stru
rcu_read_unlock();
-- if (!whole || num_threads<2)
+ if (!whole || num_threads < 2)
- wchan = get_wchan(task);
-+ if (!whole || num_threads < 2) {
+ wchan = 0;
+ if (current->uid == task->uid || current->euid == task->uid ||
+ capable(CAP_SYS_NICE))
@@ -1253,19 +1045,17 @@
/*
* Print the dentry name for named mappings, and a
-Index: linux-2.6/include/asm-i386/a.out.h
-===================================================================
---- linux-2.6.orig/include/asm-i386/a.out.h
-+++ linux-2.6/include/asm-i386/a.out.h
+--- linux-2.6.22.noarch/include/asm-i386/a.out.h~ 2007-07-20 14:10:41.000000000 -0400
++++ linux-2.6.22.noarch/include/asm-i386/a.out.h 2007-07-20 14:10:52.000000000 -0400
@@ -19,7 +19,7 @@ struct exec
#ifdef __KERNEL__
-#define STACK_TOP TASK_SIZE
+#define STACK_TOP (TASK_SIZE - PAGE_SIZE) /* 1 page for vdso */
+ #define STACK_TOP_MAX STACK_TOP
#endif
-
--- linux-2.6.19.noarch/include/asm-i386/desc.h~ 2006-12-08 06:52:55.000000000 -0500
+++ linux-2.6.19.noarch/include/asm-i386/desc.h 2006-12-08 06:53:14.000000000 -0500
@@ -185,6 +185,20 @@ static inline unsigned long get_desc_bas
@@ -1517,66 +1307,14 @@
===================================================================
--- linux-2.6.orig/include/linux/sysctl.h
+++ linux-2.6/include/linux/sysctl.h
-@@ -100,6 +100,8 @@ enum
+@@ -100,6 +100,7 @@ enum
KERN_CAP_BSET=14, /* int: capability bounding set */
KERN_PANIC=15, /* int: panic timeout */
+ KERN_EXEC_SHIELD=1000, /* int: exec-shield enabled (0/1/2) */
-+ KERN_PRINT_FATAL=1001, /* int: print fatal signals (0/1/2) */
KERN_REALROOTDEV=16, /* real root device to mount after initrd */
KERN_SPARC_REBOOT=21, /* reboot command on Sparc */
-Index: linux-2.6/kernel/signal.c
-===================================================================
---- linux-2.6.orig/kernel/signal.c
-+++ linux-2.6/kernel/signal.c
-@@ -764,6 +764,37 @@ out_set:
- #define LEGACY_QUEUE(sigptr, sig) \
- (((sig) < SIGRTMIN) && sigismember(&(sigptr)->signal, (sig)))
-
-+int print_fatal_signals = 0;
-+
-+static void print_fatal_signal(struct pt_regs *regs, int signr)
-+{
-+ printk(KERN_INFO "%s/%d: potentially unexpected fatal signal %d.\n",
-+ current->comm, current->pid, signr);
-+
-+#ifdef __i386__
-+ printk(KERN_INFO "code at %08lx: ", regs->eip);
-+ {
-+ int i;
-+ for (i = 0; i < 16; i++) {
-+ unsigned char insn;
-+
-+ __get_user(insn, (unsigned char *)(regs->eip + i));
-+ printk("%02x ", insn);
-+ }
-+ }
-+#endif
-+ printk("\n");
-+ show_regs(regs);
-+}
-+
-+static int __init setup_print_fatal_signals(char *str)
-+{
-+ get_option (&str, &print_fatal_signals);
-+
-+ return 1;
-+}
-+
-+__setup("print-fatal-signals=", setup_print_fatal_signals);
-
- static int
- specific_send_sig_info(int sig, struct siginfo *info, struct task_struct *t)
-@@ -1795,6 +1826,8 @@ relock:
- * Anything else is fatal, maybe with a core dump.
- */
- current->flags |= PF_SIGNALED;
-+ if (print_fatal_signals)
-+ print_fatal_signal(regs, signr);
- if (sig_kernel_coredump(signr)) {
- /*
- * If it was able to dump core, this kills all
Index: linux-2.6/mm/mprotect.c
===================================================================
--- linux-2.6.orig/mm/mprotect.c
linux-2.6-utrace-core.patch:
Index: linux-2.6-utrace-core.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-utrace-core.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-utrace-core.patch 12 Jul 2007 19:40:19 -0000 1.1
+++ linux-2.6-utrace-core.patch 20 Jul 2007 19:52:27 -0000 1.2
@@ -36,8 +36,8 @@
--- linux-2.6/kernel/Makefile
+++ linux-2.6/kernel/Makefile
-@@ -51,6 +51,7 @@ obj-$(CONFIG_SYSCTL) += utsname_sysctl.o
- obj-$(CONFIG_UTS_NS) += utsname.o
+@@ -51,6 +51,7 @@ obj-$(CONFIG_RELAY) += relay.o
+ obj-$(CONFIG_SYSCTL) += utsname_sysctl.o
obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o
obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o
+obj-$(CONFIG_UTRACE) += utrace.o
@@ -3755,7 +3755,7 @@
+#endif /* linux/utrace.h */
--- linux-2.6/include/linux/sched.h
+++ linux-2.6/include/linux/sched.h
-@@ -1029,6 +1029,11 @@ struct task_struct {
+@@ -1057,6 +1057,11 @@ struct task_struct {
struct audit_context *audit_context;
seccomp_t seccomp;
@@ -3769,9 +3769,9 @@
u32 self_exec_id;
--- linux-2.6/init/Kconfig
+++ linux-2.6/init/Kconfig
-@@ -686,4 +686,24 @@ config STOP_MACHINE
+@@ -675,4 +675,24 @@ config STOP_MACHINE
+ help
Need stop_machine() primitive.
- endmenu
+menu "Block layer"
source "block/Kconfig"
linux-2.6-utrace-ptrace-compat-avr32.patch:
Index: linux-2.6-utrace-ptrace-compat-avr32.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-utrace-ptrace-compat-avr32.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-utrace-ptrace-compat-avr32.patch 12 Jul 2007 19:40:19 -0000 1.1
+++ linux-2.6-utrace-ptrace-compat-avr32.patch 20 Jul 2007 19:52:27 -0000 1.2
@@ -12,12 +12,12 @@
---
- arch/avr32/kernel/ptrace.c | 107 +++++++-------------------------------------
- 1 files changed, 18 insertions(+), 89 deletions(-)
+ arch/avr32/kernel/ptrace.c | 98 ++++++++------------------------------------
+ 1 files changed, 18 insertions(+), 80 deletions(-)
--- linux-2.6/arch/avr32/kernel/ptrace.c
+++ linux-2.6/arch/avr32/kernel/ptrace.c
-@@ -78,115 +78,44 @@ const struct utrace_regset_view *utrace_
+@@ -78,106 +78,44 @@ const struct utrace_regset_view *utrace_
}
#endif /* CONFIG_UTRACE */
@@ -34,7 +34,6 @@
+ struct utrace_attached_engine *engine,
+ unsigned long addr, unsigned long data, long *val)
{
-- unsigned long tmp;
- int ret;
-
pr_debug("arch_ptrace(%ld, %d, %#lx, %#lx)\n",
@@ -48,11 +47,7 @@
- /* Read the word at location addr in the child process */
- case PTRACE_PEEKTEXT:
- case PTRACE_PEEKDATA:
-- ret = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
-- if (ret == sizeof(tmp))
-- ret = put_user(tmp, (unsigned long __user *)data);
-- else
-- ret = -EIO;
+- ret = generic_ptrace_peekdata(child, addr, data);
- break;
-
+ switch (*request) {
@@ -64,11 +59,7 @@
- /* Write the word in data at location addr */
- case PTRACE_POKETEXT:
- case PTRACE_POKEDATA:
-- ret = access_process_vm(child, addr, &data, sizeof(data), 1);
-- if (ret == sizeof(data))
-- ret = 0;
-- else
-- ret = -EIO;
+- ret = generic_ptrace_pokedata(child, addr, data);
- break;
+ return ptrace_peekusr(child, engine, avr32_uarea, addr, data);
linux-2.6-utrace-ptrace-compat.patch:
Index: linux-2.6-utrace-ptrace-compat.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-utrace-ptrace-compat.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-utrace-ptrace-compat.patch 12 Jul 2007 19:40:19 -0000 1.1
+++ linux-2.6-utrace-ptrace-compat.patch 20 Jul 2007 19:52:27 -0000 1.2
@@ -17,12 +17,14 @@
arch/x86_64/ia32/ptrace32.c | 56 +
arch/x86_64/ia32/ia32entry.S | 2
arch/x86_64/kernel/ptrace.c | 46 +
- arch/powerpc/kernel/ptrace.c | 250 +++++
+ arch/powerpc/kernel/ptrace.c | 452 +++++----
arch/powerpc/kernel/signal_32.c | 52 +
+ arch/powerpc/kernel/Makefile | 2
+ arch/powerpc/kernel/ptrace32.c | 408 --------
arch/powerpc/lib/sstep.c | 3
kernel/fork.c | 2
kernel/exit.c | 13
- kernel/ptrace.c | 2051 +++++++++++++++++++++++++++++++++++++--
+ kernel/ptrace.c | 2054 +++++++++++++++++++++++++++++++++++++--
kernel/sys_ni.c | 4
kernel/Makefile | 3
include/linux/sched.h | 4
@@ -30,7 +32,8 @@
include/asm-x86_64/tracehook.h | 1
include/asm-x86_64/ptrace-abi.h | 3
init/Kconfig | 15
- 18 files changed, 2632 insertions(+), 174 deletions(-)
+ 20 files changed, 2641 insertions(+), 780 deletions(-)
+ delete arch/powerpc/kernel/ptrace32.c
--- linux-2.6/fs/proc/base.c
+++ linux-2.6/fs/proc/base.c
@@ -61,7 +64,7 @@
+ return -EPERM;
+ smp_rmb();
+ if (task->mm)
-+ dumpable = task->mm->dumpable;
++ dumpable = get_dumpable(task->mm);
+ if (!dumpable && !capable(CAP_SYS_PTRACE))
+ return -EPERM;
+
@@ -83,7 +86,7 @@
struct task_struct *task = get_proc_task(inode);
--- linux-2.6/arch/i386/kernel/ptrace.c
+++ linux-2.6/arch/i386/kernel/ptrace.c
-@@ -735,6 +735,46 @@ const struct utrace_regset_view *utrace_
+@@ -743,6 +743,46 @@ const struct utrace_regset_view *utrace_
return &utrace_i386_native;
}
@@ -212,7 +215,7 @@
.quad sys_pause
--- linux-2.6/arch/x86_64/kernel/ptrace.c
+++ linux-2.6/arch/x86_64/kernel/ptrace.c
-@@ -714,6 +714,52 @@ const struct utrace_regset_view *utrace_
+@@ -723,6 +723,52 @@ const struct utrace_regset_view *utrace_
}
@@ -267,40 +270,67 @@
/* do the secure computing check first */
--- linux-2.6/arch/powerpc/kernel/ptrace.c
+++ linux-2.6/arch/powerpc/kernel/ptrace.c
-@@ -456,13 +456,6 @@ static const struct utrace_regset_view u
- .name = "ppc", .e_machine = EM_PPC,
- .regsets = ppc32_regsets, .n = ARRAY_SIZE(ppc32_regsets)
- };
--
--
--long compat_sys_ptrace(int request, int pid, unsigned long addr,
-- unsigned long data)
--{
-- return -ENOSYS;
--}
- #endif
-
- const struct utrace_regset_view *utrace_native_view(struct task_struct *tsk)
-@@ -475,6 +468,249 @@ const struct utrace_regset_view *utrace_
+@@ -559,249 +559,315 @@ const struct utrace_regset_view *utrace_
}
+#ifdef CONFIG_PTRACE
-+static const struct ptrace_layout_segment ppc_uarea[] = {
-+ {0, PT_FPR0 * sizeof(long), 0, 0},
-+ {PT_FPR0 * sizeof(long), (PT_FPSCR + 1) * sizeof(long), 1, 0},
-+ {0, 0, -1, 0}
-+};
-+
-+int arch_ptrace(long *request, struct task_struct *child,
-+ struct utrace_attached_engine *engine,
-+ unsigned long addr, unsigned long data, long *val)
-+{
+ /*
+ * Here are the old "legacy" powerpc specific getregs/setregs ptrace calls,
+ * we mark them as obsolete now, they will be removed in a future version
+ */
+-static long arch_ptrace_old(struct task_struct *child, long request, long addr,
+- long data)
++static int arch_ptrace_old(long *request, struct task_struct *child,
++ struct utrace_attached_engine *engine,
++ unsigned long addr, unsigned long data, long *val)
+ {
+- int ret = -EPERM;
+-
+- switch(request) {
+- case PPC_PTRACE_GETREGS: { /* Get GPRs 0 - 31. */
+- int i;
+- unsigned long *reg = &((unsigned long *)child->thread.regs)[0];
+- unsigned long __user *tmp = (unsigned long __user *)addr;
+-
+- for (i = 0; i < 32; i++) {
+- ret = put_user(*reg, tmp);
+- if (ret)
+- break;
+- reg++;
+- tmp++;
+- }
+- break;
+- }
+-
+- case PPC_PTRACE_SETREGS: { /* Set GPRs 0 - 31. */
+- int i;
+- unsigned long *reg = &((unsigned long *)child->thread.regs)[0];
+- unsigned long __user *tmp = (unsigned long __user *)addr;
+-
+- for (i = 0; i < 32; i++) {
+- ret = get_user(*reg, tmp);
+- if (ret)
+- break;
+- reg++;
+- tmp++;
+- }
+- break;
+- }
+-
+- case PPC_PTRACE_GETFPREGS: { /* Get FPRs 0 - 31. */
+- flush_fp_to_thread(child);
+-/* ret = get_fpregs((void __user *)addr, child, 0);*/
+- break;
+- }
+-
+- case PPC_PTRACE_SETFPREGS: { /* Get FPRs 0 - 31. */
+- flush_fp_to_thread(child);
+-/* ret = set_fpregs((void __user *)addr, child, 0);*/
+- break;
+- }
+-
+ switch (*request) {
-+ case PTRACE_PEEKUSR:
-+ return ptrace_peekusr(child, engine, ppc_uarea, addr, data);
-+ case PTRACE_POKEUSR:
-+ return ptrace_pokeusr(child, engine, ppc_uarea, addr, data);
+ case PPC_PTRACE_GETREGS: /* Get GPRs 0 - 31. */
+ case PPC_PTRACE_SETREGS: /* Set GPRs 0 - 31. */
+ return ptrace_regset_access(child, engine,
@@ -315,14 +345,73 @@
+ 0, 32 * sizeof(double),
+ (void __user *)addr,
+ *request == PPC_PTRACE_SETFPREGS);
-+#ifdef CONFIG_PPC64
+ }
+- return ret;
++ return -ENOSYS;
+ }
+
+-long arch_ptrace(struct task_struct *child, long request, long addr, long data)
++static const struct ptrace_layout_segment ppc_uarea[] = {
++ {0, PT_FPR0 * sizeof(long), 0, 0},
++ {PT_FPR0 * sizeof(long), (PT_FPSCR + 1) * sizeof(long), 1, 0},
++ {0, 0, -1, 0}
++};
++
++int arch_ptrace(long *request, struct task_struct *child,
++ struct utrace_attached_engine *engine,
++ unsigned long addr, unsigned long data, long *val)
+ {
+- int ret = -EPERM;
++ switch (*request) {
++ case PTRACE_PEEKUSR:
++ return ptrace_peekusr(child, engine, ppc_uarea, addr, data);
++ case PTRACE_POKEUSR:
++ return ptrace_pokeusr(child, engine, ppc_uarea, addr, data);
+
+- switch (request) {
+- /* when I and D space are separate, these will need to be fixed. */
+- case PTRACE_PEEKTEXT: /* read word at location addr. */
+- case PTRACE_PEEKDATA:
+- ret = generic_ptrace_peekdata(child, addr, data);
+- break;
+ case PTRACE_GET_DEBUGREG:
+ case PTRACE_SET_DEBUGREG:
+ return ptrace_onereg_access(child, engine,
+ utrace_native_view(current), 3,
+ addr, (unsigned long __user *)data,
+ *request == PTRACE_SET_DEBUGREG);
-+#endif /* CONFIG_PPC64 */
+
+- /* read the word at location addr in the USER area. */
+- case PTRACE_PEEKUSR: {
+- unsigned long index, tmp;
++#ifdef CONFIG_PPC64
++ case PTRACE_GETREGS64:
++ case PTRACE_SETREGS64:
++#endif
++ case PTRACE_GETREGS:
++ case PTRACE_SETREGS:
++ /*
++ * This is called from 32-bit processors via arch_compat_ptrace.
++ * So we can't use utrace_native_view here.
++ */
++ return ptrace_regset_access(child, engine,
++ &utrace_ppc_native_view, 0,
++ 0, sizeof(struct pt_regs),
++ (void __user *)addr,
++ *request == PTRACE_SETREGS ||
++ *request == PTRACE_SETREGS64);
++
++ case PTRACE_GETFPREGS:
++ return ptrace_whole_regset(child, engine, data, 1, 0);
++ case PTRACE_SETFPREGS:
++ return ptrace_whole_regset(child, engine, data, 1, 1);
+
+- ret = -EIO;
+- /* convert to index and check */
+-#ifdef CONFIG_PPC32
+- index = (unsigned long) addr >> 2;
+- if ((addr & 3) || (index > PT_FPSCR)
+- || (child->thread.regs == NULL))
+#ifdef CONFIG_ALTIVEC
+ case PTRACE_GETVRREGS:
+ return ptrace_whole_regset(child, engine, data, 2, 0);
@@ -332,22 +421,70 @@
+#ifdef CONFIG_SPE
+#ifdef CONFIG_ALTIVEC
+#define REGSET_EVR 3
-+#else
+ #else
+- index = (unsigned long) addr >> 3;
+- if ((addr & 7) || (index > PT_FPSCR))
+#define REGSET_EVR 2
+#endif
+ case PTRACE_GETEVRREGS:
+ return ptrace_whole_regset(child, engine, data, REGSET_EVR, 0);
+ case PTRACE_SETEVRREGS:
+ return ptrace_whole_regset(child, engine, data, REGSET_EVR, 1);
-+#endif
+ #endif
+- break;
+
+- CHECK_FULL_REGS(child->thread.regs);
+- if (index < PT_FPR0) {
+- tmp = 0;/*ptrace_get_reg(child, (int) index);*/
+- } else {
+- flush_fp_to_thread(child);
+- tmp = ((unsigned long *)child->thread.fpr)[index - PT_FPR0];
+- }
+- ret = put_user(tmp,(unsigned long __user *) data);
+- break;
++ /* Old reverse args ptrace callss */
++ case PPC_PTRACE_GETREGS: /* Get GPRs 0 - 31. */
++ case PPC_PTRACE_SETREGS: /* Set GPRs 0 - 31. */
++ case PPC_PTRACE_GETFPREGS: /* Get FPRs 0 - 31. */
++ case PPC_PTRACE_SETFPREGS: /* Get FPRs 0 - 31. */
++ return arch_ptrace_old(request, child, engine, addr, data, val);
+ }
+
+- /* If I and D space are separate, this will have to be fixed. */
+- case PTRACE_POKETEXT: /* write the word at location addr. */
+- case PTRACE_POKEDATA:
+- ret = generic_ptrace_pokedata(child, addr, data);
+- break;
++ return -ENOSYS;
++}
+
+- /* write the word at location addr in the USER area */
+- case PTRACE_POKEUSR: {
+- unsigned long index;
++#ifdef CONFIG_PPC64
++/*
++ * Here are the old "legacy" powerpc specific getregs/setregs ptrace calls,
++ * we mark them as obsolete now, they will be removed in a future version
++ */
++static int compat_ptrace_old(compat_long_t *request,
++ struct task_struct *child,
++ struct utrace_attached_engine *engine,
++ compat_ulong_t addr, compat_ulong_t data,
++ compat_long_t *val)
++{
++ void __user *uaddr = (void __user *) (unsigned long) addr;
++ switch (*request) {
++ case PPC_PTRACE_GETREGS: /* Get GPRs 0 - 31. */
++ case PPC_PTRACE_SETREGS: /* Set GPRs 0 - 31. */
++ return ptrace_regset_access(child, engine,
++ utrace_native_view(current), 0,
++ 0, 32 * sizeof(compat_long_t),
++ uaddr,
++ *request == PPC_PTRACE_SETREGS);
+ }
+ return -ENOSYS;
+}
+
-+#ifdef CONFIG_COMPAT
-+#include <linux/mm.h>
-+#include <asm/uaccess.h>
-+
+static const struct ptrace_layout_segment ppc32_uarea[] = {
+ {0, PT_FPR0 * sizeof(u32), 0, 0},
+ {PT_FPR0 * sizeof(u32), (PT_FPSCR32 + 1) * sizeof(u32), 1, 0},
@@ -360,6 +497,7 @@
+ compat_ulong_t addr, compat_ulong_t data,
+ compat_long_t *val)
+{
++ long lrequest = *request;
+ void __user *uaddr = (void __user *) (unsigned long) addr;
+ int ret = -ENOSYS;
+
@@ -371,35 +509,6 @@
+ return ptrace_compat_pokeusr(child, engine, ppc32_uarea,
+ addr, data);
+
-+ case PPC_PTRACE_GETREGS: /* Get GPRs 0 - 31. */
-+ case PPC_PTRACE_SETREGS: /* Set GPRs 0 - 31. */
-+ return ptrace_regset_access(child, engine,
-+ utrace_native_view(current), 0,
-+ 0, 32 * sizeof(compat_long_t),
-+ uaddr,
-+ *request == PPC_PTRACE_SETREGS);
-+ case PPC_PTRACE_GETFPREGS: /* Get FPRs 0 - 31. */
-+ case PPC_PTRACE_SETFPREGS: /* Get FPRs 0 - 31. */
-+ return ptrace_regset_access(child, engine,
-+ utrace_native_view(current), 1,
-+ 0, 32 * sizeof(double),
-+ uaddr,
-+ *request == PPC_PTRACE_SETFPREGS);
-+#ifdef CONFIG_ALTIVEC
-+ case PTRACE_GETVRREGS:
-+ return ptrace_whole_regset(child, engine, data, 2, 0);
-+ case PTRACE_SETVRREGS:
-+ return ptrace_whole_regset(child, engine, data, 2, 1);
-+#endif
-+ case PTRACE_GET_DEBUGREG:
-+ case PTRACE_SET_DEBUGREG:
-+ return ptrace_onereg_access(child, engine,
-+ utrace_native_view(current), 3,
-+ addr,
-+ (unsigned long __user *)
-+ (unsigned long) data,
-+ *request == PTRACE_SET_DEBUGREG);
-+
+ /*
+ * Read 4 bytes of the other process' storage
+ * data is a pointer specifying where the user wants the
@@ -414,22 +523,51 @@
+ u32 tmp;
+ int copied;
+ u32 __user * addrOthers;
-+
-+ ret = -EIO;
-+
+
+ ret = -EIO;
+- /* convert to index and check */
+-#ifdef CONFIG_PPC32
+- index = (unsigned long) addr >> 2;
+- if ((addr & 3) || (index > PT_FPSCR)
+- || (child->thread.regs == NULL))
+-#else
+- index = (unsigned long) addr >> 3;
+- if ((addr & 7) || (index > PT_FPSCR))
+-#endif
+- break;
+
+- CHECK_FULL_REGS(child->thread.regs);
+- if (index < PT_FPR0) {
+-/* ret = ptrace_put_reg(child, index, data);*/
+- } else {
+- flush_fp_to_thread(child);
+- ((unsigned long *)child->thread.fpr)[index - PT_FPR0] = data;
+- ret = 0;
+- }
+- break;
+- }
+ /* Get the addr in the other process that we want to read */
+ if (get_user(addrOthers, ((u32 __user * __user *)
+ (unsigned long) addr)) != 0)
+ break;
-+
+
+- case PTRACE_GET_DEBUGREG: {
+- ret = -EINVAL;
+- /* We only support one DABR and no IABRS at the moment */
+- if (addr > 0)
+ copied = access_process_vm(child, (u64)addrOthers, &tmp,
+ sizeof(tmp), 0);
+ if (copied != sizeof(tmp))
-+ break;
+ break;
+- ret = put_user(child->thread.dabr,
+- (unsigned long __user *)data);
+ ret = put_user(tmp, (u32 __user *)(unsigned long)data);
-+ break;
-+ }
-+
+ break;
+ }
+
+- case PTRACE_SET_DEBUGREG:
+-/* ret = ptrace_set_debugreg(child, addr, data);*/
+- break;
+ /*
+ * Write 4 bytes into the other process' storage
+ * data is the 4 bytes that the user wants written
@@ -443,20 +581,47 @@
+ case PPC_PTRACE_POKEDATA_3264: {
+ u32 tmp = data;
+ u32 __user * addrOthers;
-+
+
+- case PTRACE_DETACH:
+- ret = ptrace_detach(child, data);
+- break;
+-
+-#ifdef CONFIG_PPC64
+- case PTRACE_GETREGS64:
+-#endif
+- case PTRACE_GETREGS: { /* Get all pt_regs from the child. */
+- int ui;
+- if (!access_ok(VERIFY_WRITE, (void __user *)data,
+- sizeof(struct pt_regs))) {
+- ret = -EIO;
+ /* Get the addr in the other process that we want to write into */
+ ret = -EIO;
+ if (get_user(addrOthers, ((u32 __user * __user *)
+ (unsigned long) addr)) != 0)
-+ break;
-+ ret = 0;
+ break;
+- }
+ ret = 0;
+- for (ui = 0; ui < PT_REGS_COUNT; ui ++) {
+-/* ret |= __put_user(ptrace_get_reg(child, ui),
+- (unsigned long __user *) data);*/
+- data += sizeof(long);
+- }
+ if (access_process_vm(child, (u64)addrOthers, &tmp,
+ sizeof(tmp), 1) == sizeof(tmp))
+ break;
+ ret = -EIO;
-+ break;
-+ }
-+
+ break;
+ }
+
+-#ifdef CONFIG_PPC64
+- case PTRACE_SETREGS64:
+-#endif
+- case PTRACE_SETREGS: { /* Set all gp regs in the child. */
+- unsigned long tmp;
+- int ui;
+- if (!access_ok(VERIFY_READ, (void __user *)data,
+- sizeof(struct pt_regs))) {
+- ret = -EIO;
+ /*
+ * This is like PTRACE_PEEKUSR on a 64-bit process,
+ * but here we access only 4 bytes at a time.
@@ -472,13 +637,21 @@
+
+ ret = -EIO;
+ if ((addr & 3) || addr > PT_FPSCR*8)
-+ break;
+ break;
+
+ setno = 0;
+ if (addr >= PT_FPR0*8) {
+ setno = 1;
+ addr -= PT_FPR0*8;
-+ }
+ }
+- ret = 0;
+- for (ui = 0; ui < PT_REGS_COUNT; ui ++) {
+- ret = __get_user(tmp, (unsigned long __user *) data);
+- if (ret)
+- break;
+-/* ptrace_put_reg(child, ui, tmp);*/
+- data += sizeof(long);
+- }
+ regset = utrace_regset(child, NULL,
+ &utrace_ppc_native_view, setno);
+ ret = (*regset->get)(child, regset, addr &~ 7,
@@ -486,9 +659,14 @@
+ if (ret == 0)
+ ret = put_user(reg.half[(addr >> 2) & 1],
+ (u32 __user *)(unsigned long)data);
-+ break;
-+ }
-+
+ break;
+ }
+
+- case PTRACE_GETFPREGS: { /* Get the child FPU state (FPR0...31 + FPSCR) */
+- flush_fp_to_thread(child);
+-/* ret = get_fpregs((void __user *)data, child, 1);*/
+- break;
+- }
+ /*
+ * This is like PTRACE_POKEUSR on a 64-bit process,
+ * but here we access only 4 bytes at a time.
@@ -501,7 +679,10 @@
+ } reg;
+ int setno;
+ const struct utrace_regset *regset;
-+
+
+- case PTRACE_SETFPREGS: { /* Set the child FPU state (FPR0...31 + FPSCR) */
+- flush_fp_to_thread(child);
+-/* ret = set_fpregs((void __user *)data, child, 1);*/
+ ret = -EIO;
+ if ((addr & 3) || addr > PT_FPSCR*8)
+ break;
@@ -519,21 +700,88 @@
+ reg.half[(addr >> 2) & 1] = data;
+ ret = (*regset->set)(child, regset, addr &~ 7,
+ sizeof(reg.whole), ®.whole, NULL);
-+ break;
-+ }
-+ }
-+ return ret;
-+}
-+#endif /* CONFIG_COMPAT */
-+#endif /* CONFIG_PTRACE */
+ break;
+ }
+
+-#ifdef CONFIG_ALTIVEC
+- case PTRACE_GETVRREGS:
+- /* Get the child altivec register state. */
+- flush_altivec_to_thread(child);
+-/* ret = get_vrregs((unsigned long __user *)data, child);*/
+- break;
++ case PTRACE_GET_DEBUGREG:
++ case PTRACE_SET_DEBUGREG:
++ return ptrace_onereg_access(child, engine,
++ utrace_native_view(current), 3,
++ addr,
++ (u32 __user *) (unsigned long) data,
++ *request == PTRACE_SET_DEBUGREG);
+
++ case PTRACE_GETREGS:
++ case PTRACE_SETREGS:
++ return ptrace_regset_access(child, engine,
++ utrace_native_view(current), 0,
++ 0, PT_REGS_COUNT * sizeof(int),
++ uaddr,
++ *request == PTRACE_SETREGS);
+
++ case PTRACE_GETFPREGS:
++ case PTRACE_SETFPREGS:
++ case PTRACE_GETVRREGS:
+ case PTRACE_SETVRREGS:
+- /* Set the child altivec register state. */
+- flush_altivec_to_thread(child);
+-/* ret = set_vrregs(child, (unsigned long __user *)data);*/
+- break;
+-#endif
+-#ifdef CONFIG_SPE
+- case PTRACE_GETEVRREGS:
+- /* Get the child spe register state. */
+- if (child->thread.regs->msr & MSR_SPE)
+- giveup_spe(child);
+-/* ret = get_evrregs((unsigned long __user *)data, child);*/
+- break;
+-
+- case PTRACE_SETEVRREGS:
+- /* Set the child spe register state. */
+- /* this is to clear the MSR_SPE bit to force a reload
+- * of register state from memory */
+- if (child->thread.regs->msr & MSR_SPE)
+- giveup_spe(child);
+-/* ret = set_evrregs(child, (unsigned long __user *)data);*/
+- break;
+-#endif
++ case PTRACE_GETREGS64:
++ case PTRACE_SETREGS64:
++ case PPC_PTRACE_GETFPREGS:
++ case PPC_PTRACE_SETFPREGS:
++ return arch_ptrace(&lrequest, child, engine, addr, data, NULL);
+
+ /* Old reverse args ptrace callss */
+ case PPC_PTRACE_GETREGS: /* Get GPRs 0 - 31. */
+ case PPC_PTRACE_SETREGS: /* Set GPRs 0 - 31. */
+- case PPC_PTRACE_GETFPREGS: /* Get FPRs 0 - 31. */
+- case PPC_PTRACE_SETFPREGS: /* Get FPRs 0 - 31. */
+- ret = arch_ptrace_old(child, request, addr, data);
+- break;
+-
+- default:
+- ret = ptrace_request(child, request, addr, data);
+- break;
++ return compat_ptrace_old(request, child, engine,
++ addr, data, val);
+ }
+
+ return ret;
+ }
++#endif /* CONFIG_PPC64 */
++#endif /* CONFIG_PTRACE */
+
void do_syscall_trace_enter(struct pt_regs *regs)
{
- secure_computing(regs->gpr[0]);
--- linux-2.6/arch/powerpc/kernel/signal_32.c
+++ linux-2.6/arch/powerpc/kernel/signal_32.c
-@@ -631,6 +631,58 @@ int copy_siginfo_to_user32(struct compat
+@@ -622,6 +622,58 @@ int copy_siginfo_to_user32(struct compat
#define copy_siginfo_to_user copy_siginfo_to_user32
@@ -592,6 +840,428 @@
/*
* Note: it is necessary to treat pid and sig as unsigned ints, with the
* corresponding cast to a signed int to insure that the proper conversion
+--- linux-2.6/arch/powerpc/kernel/Makefile
++++ linux-2.6/arch/powerpc/kernel/Makefile
+@@ -18,7 +18,7 @@ obj-y := semaphore.o cputable.o ptrac
+ signal.o
+ obj-y += vdso32/
+ obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \
+- signal_64.o ptrace32.o \
++ signal_64.o \
+ paca.o cpu_setup_ppc970.o \
+ cpu_setup_pa6t.o \
+ firmware.o sysfs.o nvram_64.o
+--- linux-2.6/arch/powerpc/kernel/ptrace32.c
++++ linux-2.6/arch/powerpc/kernel/ptrace32.c
+@@ -1,408 +0,0 @@
+-/*
+- * ptrace for 32-bit processes running on a 64-bit kernel.
+- *
+- * PowerPC version
+- * Copyright (C) 1995-1996 Gary Thomas (gdt at linuxppc.org)
+- *
+- * Derived from "arch/m68k/kernel/ptrace.c"
+- * Copyright (C) 1994 by Hamish Macdonald
+- * Taken from linux/kernel/ptrace.c and modified for M680x0.
+- * linux/kernel/ptrace.c is by Ross Biro 1/23/92, edited by Linus Torvalds
+- *
+- * Modified by Cort Dougan (cort at hq.fsmlabs.com)
+- * and Paul Mackerras (paulus at samba.org).
+- *
+- * This file is subject to the terms and conditions of the GNU General
+- * Public License. See the file COPYING in the main directory of
+- * this archive for more details.
+- */
+-
+-#include <linux/kernel.h>
+-#include <linux/sched.h>
+-#include <linux/mm.h>
+-#include <linux/smp.h>
+-#include <linux/smp_lock.h>
+-#include <linux/errno.h>
+-#include <linux/ptrace.h>
+-#include <linux/tracehook.h>
+-#include <linux/user.h>
+-#include <linux/security.h>
+-#include <linux/signal.h>
+-
+-#include <asm/uaccess.h>
+-#include <asm/page.h>
+-#include <asm/pgtable.h>
+-#include <asm/system.h>
+-#include <asm/tracehook.h>
+-
+-
+-/*
+- * Here are the old "legacy" powerpc specific getregs/setregs ptrace calls,
+- * we mark them as obsolete now, they will be removed in a future version
+- */
+-static long compat_ptrace_old(struct task_struct *child, long request,
+- long addr, long data)
+-{
+- int ret = -EPERM;
+-
+- switch(request) {
+- case PPC_PTRACE_GETREGS: { /* Get GPRs 0 - 31. */
+- int i;
+- unsigned long *reg = &((unsigned long *)child->thread.regs)[0];
+- unsigned int __user *tmp = (unsigned int __user *)addr;
+-
+- for (i = 0; i < 32; i++) {
+- ret = put_user(*reg, tmp);
+- if (ret)
+- break;
+- reg++;
+- tmp++;
+- }
+- break;
+- }
+-
+- case PPC_PTRACE_SETREGS: { /* Set GPRs 0 - 31. */
+- int i;
+- unsigned long *reg = &((unsigned long *)child->thread.regs)[0];
+- unsigned int __user *tmp = (unsigned int __user *)addr;
+-
+- for (i = 0; i < 32; i++) {
+- ret = get_user(*reg, tmp);
+- if (ret)
+- break;
+- reg++;
+- tmp++;
+- }
+- break;
+- }
+-
+- }
+- return ret;
+-}
+-
+-long compat_sys_ptrace(int request, int pid, unsigned long addr,
+- unsigned long data)
+-{
+- struct task_struct *child;
+- int ret;
+-
+- if (request == PTRACE_TRACEME)
+- return -ENOSYS;
+-
+- lock_kernel();
+- if (request == PTRACE_TRACEME) {
+- ret = ptrace_traceme();
+- goto out;
+- }
+-
+- child = ptrace_get_task_struct(pid);
+- if (IS_ERR(child)) {
+- ret = PTR_ERR(child);
+- goto out;
+- }
+-
+- if (request == PTRACE_ATTACH) {
+- ret = ptrace_attach(child);
+- goto out_tsk;
+- }
+-
+- ret = ptrace_check_attach(child, request == PTRACE_KILL);
+- if (ret < 0)
+- goto out_tsk;
+-
+- switch (request) {
+- /* when I and D space are separate, these will need to be fixed. */
+- case PTRACE_PEEKTEXT: /* read word at location addr. */
+- case PTRACE_PEEKDATA: {
+- unsigned int tmp;
+- int copied;
+-
+- copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
+- ret = -EIO;
+- if (copied != sizeof(tmp))
+- break;
+- ret = put_user(tmp, (u32 __user *)data);
+- break;
+- }
+-
+- /*
+- * Read 4 bytes of the other process' storage
+- * data is a pointer specifying where the user wants the
+- * 4 bytes copied into
+- * addr is a pointer in the user's storage that contains an 8 byte
+- * address in the other process of the 4 bytes that is to be read
+- * (this is run in a 32-bit process looking at a 64-bit process)
+- * when I and D space are separate, these will need to be fixed.
+- */
+- case PPC_PTRACE_PEEKTEXT_3264:
+- case PPC_PTRACE_PEEKDATA_3264: {
+- u32 tmp;
+- int copied;
+- u32 __user * addrOthers;
+-
+- ret = -EIO;
+-
+- /* Get the addr in the other process that we want to read */
+- if (get_user(addrOthers, (u32 __user * __user *)addr) != 0)
+- break;
+-
+- copied = access_process_vm(child, (u64)addrOthers, &tmp,
+- sizeof(tmp), 0);
+- if (copied != sizeof(tmp))
+- break;
+- ret = put_user(tmp, (u32 __user *)data);
+- break;
+- }
+-
+- /* Read a register (specified by ADDR) out of the "user area" */
+- case PTRACE_PEEKUSR: {
+- int index;
+- unsigned long tmp;
+-
+- ret = -EIO;
+- /* convert to index and check */
+- index = (unsigned long) addr >> 2;
+- if ((addr & 3) || (index > PT_FPSCR32))
+- break;
+-
+- if (index < PT_FPR0) {
+- tmp = 0;/*ptrace_get_reg(child, index);*/
+- } else {
+- flush_fp_to_thread(child);
+- /*
+- * the user space code considers the floating point
+- * to be an array of unsigned int (32 bits) - the
+- * index passed in is based on this assumption.
+- */
+- tmp = ((unsigned int *)child->thread.fpr)[index - PT_FPR0];
+- }
+- ret = put_user((unsigned int)tmp, (u32 __user *)data);
+- break;
+- }
+-
+- /*
+- * Read 4 bytes out of the other process' pt_regs area
+- * data is a pointer specifying where the user wants the
+- * 4 bytes copied into
+- * addr is the offset into the other process' pt_regs structure
+- * that is to be read
+- * (this is run in a 32-bit process looking at a 64-bit process)
+- */
+- case PPC_PTRACE_PEEKUSR_3264: {
+- u32 index;
+- u32 reg32bits;
+- u64 tmp;
+- u32 numReg;
+- u32 part;
+-
+- ret = -EIO;
+- /* Determine which register the user wants */
+- index = (u64)addr >> 2;
+- numReg = index / 2;
+- /* Determine which part of the register the user wants */
+- if (index % 2)
+- part = 1; /* want the 2nd half of the register (right-most). */
+- else
+- part = 0; /* want the 1st half of the register (left-most). */
+-
+- /* Validate the input - check to see if address is on the wrong boundary
+- * or beyond the end of the user area
+- */
+- if ((addr & 3) || numReg > PT_FPSCR)
+- break;
+-
+- if (numReg >= PT_FPR0) {
+- flush_fp_to_thread(child);
+- tmp = ((unsigned long int *)child->thread.fpr)[numReg - PT_FPR0];
+- } else { /* register within PT_REGS struct */
+-/* tmp = ptrace_get_reg(child, numReg);*/
+- }
+- reg32bits = ((u32*)&tmp)[part];
+- ret = put_user(reg32bits, (u32 __user *)data);
+- break;
+- }
+-
+- /* If I and D space are separate, this will have to be fixed. */
+- case PTRACE_POKETEXT: /* write the word at location addr. */
+- case PTRACE_POKEDATA: {
+- unsigned int tmp;
+- tmp = data;
+- ret = 0;
+- if (access_process_vm(child, addr, &tmp, sizeof(tmp), 1)
+- == sizeof(tmp))
+- break;
+- ret = -EIO;
+- break;
+- }
+-
+- /*
+- * Write 4 bytes into the other process' storage
+- * data is the 4 bytes that the user wants written
+- * addr is a pointer in the user's storage that contains an
+- * 8 byte address in the other process where the 4 bytes
+- * that is to be written
+- * (this is run in a 32-bit process looking at a 64-bit process)
+- * when I and D space are separate, these will need to be fixed.
+- */
+- case PPC_PTRACE_POKETEXT_3264:
+- case PPC_PTRACE_POKEDATA_3264: {
+- u32 tmp = data;
+- u32 __user * addrOthers;
+-
+- /* Get the addr in the other process that we want to write into */
+- ret = -EIO;
+- if (get_user(addrOthers, (u32 __user * __user *)addr) != 0)
+- break;
+- ret = 0;
+- if (access_process_vm(child, (u64)addrOthers, &tmp,
+- sizeof(tmp), 1) == sizeof(tmp))
+- break;
+- ret = -EIO;
+- break;
+- }
+-
+- /* write the word at location addr in the USER area */
+- case PTRACE_POKEUSR: {
+- unsigned long index;
+-
+- ret = -EIO;
+- /* convert to index and check */
+- index = (unsigned long) addr >> 2;
+- if ((addr & 3) || (index > PT_FPSCR32))
+- break;
+-
+- if (index < PT_FPR0) {
+-/* ret = ptrace_put_reg(child, index, data);*/
+- } else {
+- flush_fp_to_thread(child);
+- /*
+- * the user space code considers the floating point
+- * to be an array of unsigned int (32 bits) - the
+- * index passed in is based on this assumption.
+- */
+- ((unsigned int *)child->thread.fpr)[index - PT_FPR0] = data;
+- ret = 0;
+- }
+- break;
+- }
+-
+- /*
+- * Write 4 bytes into the other process' pt_regs area
+- * data is the 4 bytes that the user wants written
+- * addr is the offset into the other process' pt_regs structure
+- * that is to be written into
+- * (this is run in a 32-bit process looking at a 64-bit process)
+- */
+- case PPC_PTRACE_POKEUSR_3264: {
+- u32 index;
+- u32 numReg;
+-
+- ret = -EIO;
+- /* Determine which register the user wants */
+- index = (u64)addr >> 2;
+- numReg = index / 2;
+-
+- /*
+- * Validate the input - check to see if address is on the
+- * wrong boundary or beyond the end of the user area
+- */
+- if ((addr & 3) || (numReg > PT_FPSCR))
+- break;
+- if (numReg < PT_FPR0) {
+- unsigned long freg = 0;/*ptrace_get_reg(child, numReg);*/
+- if (index % 2)
+- freg = (freg & ~0xfffffffful) | (data & 0xfffffffful);
+- else
+- freg = (freg & 0xfffffffful) | (data << 32);
+-/* ret = ptrace_put_reg(child, numReg, freg);*/
+- } else {
+- flush_fp_to_thread(child);
+- ((unsigned int *)child->thread.regs)[index] = data;
+- ret = 0;
+- }
+- break;
+- }
+-
+- case PTRACE_GET_DEBUGREG: {
+- ret = -EINVAL;
+- /* We only support one DABR and no IABRS at the moment */
+- if (addr > 0)
+- break;
+- ret = put_user(child->thread.dabr, (u32 __user *)data);
+- break;
+- }
+-
+-#if 0 /* XXX */
+- case PTRACE_GETEVENTMSG:
+- ret = put_user(child->ptrace_message, (unsigned int __user *) data);
+- break;
+-#endif
+-
+- case PTRACE_GETREGS: { /* Get all pt_regs from the child. */
+- int ui;
+- if (!access_ok(VERIFY_WRITE, (void __user *)data,
+- PT_REGS_COUNT * sizeof(int))) {
+- ret = -EIO;
+- break;
+- }
+- ret = 0;
+- for (ui = 0; ui < PT_REGS_COUNT; ui ++) {
+-/* ret |= __put_user(ptrace_get_reg(child, ui),
+- (unsigned int __user *) data);*/
+- data += sizeof(int);
+- }
+- break;
+- }
+-
+- case PTRACE_SETREGS: { /* Set all gp regs in the child. */
+- unsigned long tmp;
+- int ui;
+- if (!access_ok(VERIFY_READ, (void __user *)data,
+- PT_REGS_COUNT * sizeof(int))) {
+- ret = -EIO;
+- break;
+- }
+- ret = 0;
+- for (ui = 0; ui < PT_REGS_COUNT; ui ++) {
+- ret = __get_user(tmp, (unsigned int __user *) data);
+- if (ret)
+- break;
+-/* ptrace_put_reg(child, ui, tmp);*/
+- data += sizeof(int);
+- }
+- break;
+- }
+-
+- case PTRACE_GETFPREGS:
+- case PTRACE_SETFPREGS:
+- case PTRACE_GETVRREGS:
+- case PTRACE_SETVRREGS:
+- case PTRACE_GETREGS64:
+- case PTRACE_SETREGS64:
+- case PPC_PTRACE_GETFPREGS:
+- case PPC_PTRACE_SETFPREGS:
+- case PTRACE_KILL:
+- case PTRACE_SINGLESTEP:
+- case PTRACE_DETACH:
+- case PTRACE_SET_DEBUGREG:
+- case PTRACE_SYSCALL:
+- case PTRACE_CONT:
+- ret = arch_ptrace(child, request, addr, data);
+- break;
+-
+- /* Old reverse args ptrace callss */
+- case PPC_PTRACE_GETREGS: /* Get GPRs 0 - 31. */
+- case PPC_PTRACE_SETREGS: /* Set GPRs 0 - 31. */
+- ret = compat_ptrace_old(child, request, addr, data);
+- break;
+-
+- default:
+- ret = ptrace_request(child, request, addr, data);
+- break;
+- }
+-out_tsk:
+- put_task_struct(child);
+-out:
+- unlock_kernel();
+- return ret;
+-}
--- linux-2.6/arch/powerpc/lib/sstep.c
+++ linux-2.6/arch/powerpc/lib/sstep.c
@@ -13,6 +13,9 @@
@@ -611,10 +1281,10 @@
#include <linux/taskstats_kern.h>
#include <linux/random.h>
+#include <linux/ptrace.h>
+ #include <linux/tty.h>
#include <asm/pgtable.h>
- #include <asm/pgalloc.h>
-@@ -1033,6 +1034,7 @@ static struct task_struct *copy_process(
+@@ -1038,6 +1039,7 @@ static struct task_struct *copy_process(
INIT_LIST_HEAD(&p->sibling);
p->vfork_done = NULL;
spin_lock_init(&p->alloc_lock);
@@ -632,7 +1302,7 @@
#include <linux/profile.h>
#include <linux/signalfd.h>
#include <linux/mount.h>
-@@ -849,6 +850,8 @@ fastcall NORET_TYPE void do_exit(long co
+@@ -894,6 +895,8 @@ fastcall NORET_TYPE void do_exit(long co
tsk->flags |= PF_EXITING;
spin_unlock_irq(&tsk->pi_lock);
@@ -641,7 +1311,7 @@
if (unlikely(in_atomic()))
printk(KERN_INFO "note: %s[%d] exited with preempt_count %d\n",
current->comm, current->pid,
-@@ -1473,9 +1476,15 @@ check_continued:
+@@ -1521,9 +1524,15 @@ check_continued:
break;
}
}
@@ -661,7 +1331,7 @@
tsk = next_thread(tsk);
--- linux-2.6/kernel/ptrace.c
+++ linux-2.6/kernel/ptrace.c
-@@ -19,194 +19,2007 @@
+@@ -19,213 +19,2007 @@
#include <linux/security.h>
#include <linux/signal.h>
#include <linux/syscalls.h>
@@ -907,7 +1577,7 @@
- return -EPERM;
- smp_rmb();
- if (task->mm)
-- dumpable = task->mm->dumpable;
+- dumpable = get_dumpable(task->mm);
- if (!dumpable && !capable(CAP_SYS_PTRACE))
- return -EPERM;
-
@@ -937,11 +1607,12 @@
+ NO_LOCKS;
+
+ return ret;
-+}
-+
+ }
+
+-int ptrace_attach(struct task_struct *task)
+
+static int ptrace_traceme(void)
-+{
+ {
+ struct utrace_attached_engine *engine;
+ struct ptrace_state *state;
+ int retval;
@@ -993,11 +1664,10 @@
+ NO_LOCKS;
+
+ return retval;
- }
-
--int ptrace_attach(struct task_struct *task)
++}
++
+static int ptrace_attach(struct task_struct *task)
- {
++{
+ struct utrace_attached_engine *engine;
+ struct ptrace_state *state;
int retval;
@@ -1541,13 +2211,7 @@
+ if (child->state == TASK_STOPPED)
+ ret = 0;
+ unlock_task_sighand(child, &flags);
- }
-- if (copy_to_user(dst, buf, retval))
-- return -EFAULT;
-- copied += retval;
-- src += retval;
-- dst += retval;
-- len -= retval;
++ }
+ if (ret == 0) {
+ ret = ptrace_update(child, state,
+ UTRACE_ACTION_QUIESCE, 0);
@@ -1561,7 +2225,13 @@
+ pr_debug("%d not stopped (%lu)\n",
+ child->pid, child->state);
+ goto out_tsk_rcu;
-+ }
+ }
+- if (copy_to_user(dst, buf, retval))
+- return -EFAULT;
+- copied += retval;
+- src += retval;
+- dst += retval;
+- len -= retval;
+
+ ret = -ESRCH; /* Return value for exit_state bail-out. */
}
@@ -1767,7 +2437,8 @@
- dst += retval;
- len -= retval;
+ goto out_tsk;
-+ }
+ }
+- return copied;
+
+ switch (request) {
+ default:
@@ -1785,8 +2456,7 @@
+ break;
+ ret = put_user(tmp, (unsigned long __user *) data);
+ break;
- }
-- return copied;
++ }
+
+ case PTRACE_POKETEXT: /* write the word at location addr. */
+ case PTRACE_POKEDATA:
@@ -1930,13 +2600,13 @@
+ struct task_struct *p, struct ptrace_state *state)
{
- int ret = -EPERM;
-+ int detach_error;
-+ struct utrace_attached_engine *engine;
-
+-
- ret = security_ptrace(current->parent, current);
- if (ret)
- return -EPERM;
--
++ int detach_error;
++ struct utrace_attached_engine *engine;
+
- return -ENOSYS;
+restart:
+ NO_LOCKS;
@@ -2261,7 +2931,7 @@
- get_task_struct(child);
+ if (unlikely(parent->signal == NULL))
+ goto out;
-
++
+ sighand = parent->sighand;
+ spin_lock_irqsave(&sighand->siglock, flags);
+ if (sighand->action[SIGCHLD-1].sa.sa_handler != SIG_IGN &&
@@ -2272,7 +2942,7 @@
+ */
+ wake_up_interruptible_sync(&parent->signal->wait_chldexit);
+ spin_unlock_irqrestore(&sighand->siglock, flags);
-+
+
+out:
read_unlock(&tasklist_lock);
- if (!child)
@@ -2334,18 +3004,25 @@
+
+ return UTRACE_ACTION_RESUME;
}
-+
+
+-int generic_ptrace_peekdata(struct task_struct *tsk, long addr, long data)
+static inline u32
+ptrace_event(struct utrace_attached_engine *engine,
+ struct task_struct *tsk,
+ struct ptrace_state *state,
+ int event)
+ __releases(RCU)
-+{
+ {
+- unsigned long tmp;
+- int copied;
+ state->syscall = 0;
+ return ptrace_report(engine, tsk, state, (event << 8) | SIGTRAP);
+}
-+
+
+- copied = access_process_vm(tsk, addr, &tmp, sizeof(tmp), 0);
+- if (copied != sizeof(tmp))
+- return -EIO;
+- return put_user(tmp, (unsigned long __user *)data);
+/*
+ * Unlike other report callbacks, this can't be called while ptrace_exit
+ * is doing ptrace_done in parallel, so we don't need get_ptrace_state.
@@ -2501,13 +3178,15 @@
+ NO_LOCKS;
+ printk(KERN_ERR "ptrace out of memory, lost child %d of %d",
+ child->pid, parent->pid);
-+}
-+
+ }
+
+-int generic_ptrace_pokedata(struct task_struct *tsk, long addr, long data)
+static u32
+ptrace_report_clone(struct utrace_attached_engine *engine,
+ struct task_struct *parent,
+ unsigned long clone_flags, struct task_struct *child)
-+{
+ {
+- int copied;
+ int event, option;
+ struct ptrace_state *state;
+
@@ -2538,7 +3217,9 @@
+ }
+ else
+ event = 0;
-+
+
+- copied = access_process_vm(tsk, addr, &data, sizeof(data), 1);
+- return (copied == sizeof(data)) ? 0 : -EIO;
+ if (!(clone_flags & CLONE_UNTRACED)
+ && (event || (clone_flags & CLONE_PTRACE))) {
+ /*
@@ -2598,7 +3279,7 @@
+ state->have_eventmsg = 0;
+ state->u.siginfo = info;
+ return ptrace_report(engine, tsk, state, signo) | UTRACE_SIGNAL_IGN;
-+}
+ }
+
+static u32
+ptrace_report_jctl(struct utrace_attached_engine *engine,
@@ -2790,7 +3471,7 @@
+};
--- linux-2.6/kernel/sys_ni.c
+++ linux-2.6/kernel/sys_ni.c
-@@ -113,6 +113,10 @@ cond_syscall(sys_vm86);
+@@ -114,6 +114,10 @@ cond_syscall(sys_vm86);
cond_syscall(compat_sys_ipc);
cond_syscall(compat_sys_sysctl);
@@ -2807,12 +3488,12 @@
obj-y = sched.o fork.o exec_domain.o panic.o printk.o profile.o \
exit.o itimer.o time.o softirq.o resource.o \
-- sysctl.o capability.o ptrace.o timer.o user.o \
-+ sysctl.o capability.o timer.o user.o \
+- sysctl.o capability.o ptrace.o timer.o user.o user_namespace.o \
++ sysctl.o capability.o timer.o user.o user_namespace.o \
signal.o sys.o kmod.o workqueue.o pid.o \
rcupdate.o extable.o params.o posix-timers.o \
kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \
-@@ -52,6 +52,7 @@ obj-$(CONFIG_UTS_NS) += utsname.o
+@@ -52,6 +52,7 @@ obj-$(CONFIG_SYSCTL) += utsname_sysctl.o
obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o
obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o
obj-$(CONFIG_UTRACE) += utrace.o
@@ -2822,7 +3503,7 @@
# According to Alan Modra <alan at linuxcare.com.au>, the -fno-omit-frame-pointer is
--- linux-2.6/include/linux/sched.h
+++ linux-2.6/include/linux/sched.h
-@@ -1127,6 +1127,10 @@ struct task_struct {
+@@ -1155,6 +1155,10 @@ struct task_struct {
atomic_t fs_excl; /* holding fs exclusive resources */
struct rcu_head rcu;
@@ -2835,7 +3516,7 @@
*/
--- linux-2.6/include/linux/ptrace.h
+++ linux-2.6/include/linux/ptrace.h
-@@ -49,50 +49,197 @@
+@@ -49,49 +49,196 @@
#include <asm/ptrace.h>
#ifdef __KERNEL__
@@ -2886,7 +3567,7 @@
-extern int ptrace_request(struct task_struct *child, long request, long addr, long data);
extern int ptrace_may_attach(struct task_struct *task);
-
++
+#ifdef CONFIG_PTRACE
+#include <asm/tracehook.h>
+#include <linux/tracehook.h>
@@ -3066,10 +3747,9 @@
+}
+#endif /* CONFIG_PTRACE */
+
-+
- #ifndef force_successful_syscall_return
- /*
- * System call handlers that, upon successful completion, need to return a
+ int generic_ptrace_peekdata(struct task_struct *tsk, long addr, long data);
+ int generic_ptrace_pokedata(struct task_struct *tsk, long addr, long data);
+
--- linux-2.6/include/asm-x86_64/tracehook.h
+++ linux-2.6/include/asm-x86_64/tracehook.h
@@ -15,6 +15,7 @@
@@ -3092,7 +3772,7 @@
#endif
--- linux-2.6/init/Kconfig
+++ linux-2.6/init/Kconfig
-@@ -692,10 +692,21 @@ endmenu
+@@ -681,10 +681,21 @@ endmenu
menu "Process debugging support"
linux-2.6-utrace-regset-avr32.patch:
Index: linux-2.6-utrace-regset-avr32.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-utrace-regset-avr32.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-utrace-regset-avr32.patch 12 Jul 2007 19:40:19 -0000 1.1
+++ linux-2.6-utrace-regset-avr32.patch 20 Jul 2007 19:52:27 -0000 1.2
@@ -152,4 +152,4 @@
+#if 0
long arch_ptrace(struct task_struct *child, long request, long addr, long data)
{
- unsigned long tmp;
+ int ret;
linux-2.6-utrace-regset-s390.patch:
Index: linux-2.6-utrace-regset-s390.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-utrace-regset-s390.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-utrace-regset-s390.patch 12 Jul 2007 19:40:19 -0000 1.1
+++ linux-2.6-utrace-regset-s390.patch 20 Jul 2007 19:52:27 -0000 1.2
@@ -9,8 +9,8 @@
---
arch/s390/kernel/Makefile | 2
- arch/s390/kernel/ptrace.c | 952 ++++++++++++++++++---------------------------
- 2 files changed, 390 insertions(+), 564 deletions(-)
+ arch/s390/kernel/ptrace.c | 943 ++++++++++++++++++---------------------------
+ 2 files changed, 389 insertions(+), 556 deletions(-)
--- linux-2.6/arch/s390/kernel/Makefile
+++ linux-2.6/arch/s390/kernel/Makefile
@@ -38,7 +38,7 @@
#ifdef CONFIG_COMPAT
#include "compat_ptrace.h"
-@@ -116,640 +118,462 @@ tracehook_single_step_enabled(struct tas
+@@ -116,633 +118,462 @@ tracehook_single_step_enabled(struct tas
return task->thread.per_info.single_step;
}
@@ -374,20 +374,18 @@
+ unsigned int pos, unsigned int count,
+ const void *kbuf, const void __user *ubuf)
{
-- unsigned long tmp;
- ptrace_area parea;
- int copied, ret;
--
++ int ret = utrace_regset_copyin(&pos, &count, &kbuf, &ubuf,
++ &target->thread.per_info, 0, -1);
+
- switch (request) {
- case PTRACE_PEEKTEXT:
- case PTRACE_PEEKDATA:
- /* Remove high order bit from address (only for 31 bit). */
- addr &= PSW_ADDR_INSN;
- /* read word at location addr. */
-- copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
-- if (copied != sizeof(tmp))
-- return -EIO;
-- return put_user(tmp, (unsigned long __force __user *) data);
+- return generic_ptrace_peekdata(child, addr, data);
-
- case PTRACE_PEEKUSR:
- /* read the word at location addr in the USER area. */
@@ -398,10 +396,7 @@
- /* Remove high order bit from address (only for 31 bit). */
- addr &= PSW_ADDR_INSN;
- /* write the word at location addr. */
-- copied = access_process_vm(child, addr, &data, sizeof(data),1);
-- if (copied != sizeof(data))
-- return -EIO;
-- return 0;
+- return generic_ptrace_pokedata(child, addr, data);
-
- case PTRACE_POKEUSR:
- /* write the word at location addr in the USER area */
@@ -434,9 +429,6 @@
- return 0;
- }
- return ptrace_request(child, request, addr, data);
-+ int ret = utrace_regset_copyin(&pos, &count, &kbuf, &ubuf,
-+ &target->thread.per_info, 0, -1);
-+
+ FixPerRegisters(target);
+
+ return ret;
@@ -585,9 +577,7 @@
+ pos += sizeof(u32);
+ count -= sizeof(u32);
+ }
-
-- } else
-- tmp = 0;
++
+ /* The ACRs are kept in the thread_struct. */
+ if (ret == 0 && count > 0 && pos < PT_ACR0 / 2 + NUM_ACRS * ACR_SIZE) {
+ if (target == current)
@@ -599,7 +589,8 @@
+ PT_ACR0 / 2 + NUM_ACRS * ACR_SIZE);
+ }
-- return put_user(tmp, (__u32 __user *) data);
+- } else
+- tmp = 0;
+ /* Finally, the ORIG_GPR2 value. */
+ if (count > 0) {
+ if (kbuf)
@@ -608,7 +599,8 @@
+ (u32 __user *) ubuf))
+ return -EFAULT;
+ }
-+
+
+- return put_user(tmp, (__u32 __user *) data);
+ return 0;
}
linux-2.6-utrace-regset.patch:
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.1 -r 1.2 linux-2.6-utrace-regset.patch
Index: linux-2.6-utrace-regset.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-utrace-regset.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-utrace-regset.patch 12 Jul 2007 19:40:19 -0000 1.1
+++ linux-2.6-utrace-regset.patch 20 Jul 2007 19:52:27 -0000 1.2
@@ -11,23 +11,20 @@
---
- arch/i386/kernel/i387.c | 143 +++---
- arch/i386/kernel/ptrace.c | 822 ++++++++++++++++++++---------------
- arch/x86_64/ia32/ptrace32.c | 719 ++++++++++++++++++++-----------
- arch/x86_64/ia32/fpu32.c | 92 +++-
- arch/x86_64/kernel/ptrace.c | 730 +++++++++++++++++++------------
- arch/powerpc/kernel/Makefile | 4
- arch/powerpc/kernel/ptrace32.c | 443 -------------------
- arch/powerpc/kernel/ptrace.c | 718 +++++++++++++++----------------
- arch/powerpc/kernel/ptrace-common.h | 145 ------
- kernel/ptrace.c | 8
- include/linux/tracehook.h | 244 ++++++++++
- include/asm-i386/i387.h | 13 -
- include/asm-x86_64/fpu32.h | 3
- include/asm-x86_64/tracehook.h | 8
- 14 files changed, 2124 insertions(+), 1968 deletions(-)
- delete arch/powerpc/kernel/ptrace32.c
- delete arch/powerpc/kernel/ptrace-common.h
+ arch/i386/kernel/i387.c | 143 ++++---
+ arch/i386/kernel/ptrace.c | 807 +++++++++++++++++++++++-----------------
+ arch/x86_64/ia32/ptrace32.c | 719 +++++++++++++++++++++++-------------
+ arch/x86_64/ia32/fpu32.c | 92 ++++-
+ arch/x86_64/kernel/ptrace.c | 723 ++++++++++++++++++++++--------------
+ arch/powerpc/kernel/Makefile | 2
+ arch/powerpc/kernel/ptrace32.c | 20 -
+ arch/powerpc/kernel/ptrace.c | 612 ++++++++++++++++++++----------
+ kernel/ptrace.c | 8
+ include/linux/tracehook.h | 244 ++++++++++++
+ include/asm-i386/i387.h | 13 -
+ include/asm-x86_64/fpu32.h | 3
+ include/asm-x86_64/tracehook.h | 8
+ 13 files changed, 2177 insertions(+), 1217 deletions(-)
--- linux-2.6/arch/i386/kernel/i387.c
+++ linux-2.6/arch/i386/kernel/i387.c
@@ -374,7 +371,7 @@
}
return retval;
}
-@@ -230,11 +240,11 @@ void tracehook_enable_single_step(struct
+@@ -238,11 +248,11 @@ void tracehook_enable_single_step(struct
/*
* If TF was already set, don't do anything else
*/
@@ -388,7 +385,7 @@
/*
* ..but if TF is changed by the instruction we will trace,
-@@ -255,29 +265,311 @@ void tracehook_disable_single_step(struc
+@@ -263,29 +273,311 @@ void tracehook_disable_single_step(struc
/* But touch TF only if it was set by us.. */
if (test_and_clear_tsk_thread_flag(child, TIF_FORCED_TF)) {
struct pt_regs *regs = get_child_regs(child);
@@ -464,7 +461,8 @@
+
+static int
+fpregs_active(struct task_struct *target, const struct utrace_regset *regset)
-+{
+ {
+- tracehook_disable_single_step(child);
+ return tsk_used_math(target) ? regset->n : 0;
+}
+
@@ -592,8 +590,7 @@
+ const struct utrace_regset *regset,
+ unsigned int pos, unsigned int count,
+ void *kbuf, void __user *ubuf)
- {
-- tracehook_disable_single_step(child);
++{
+ /*
+ * The hardware updates the status register on a debug trap,
+ * but do_debug (traps.c) save it for us when that happens.
@@ -712,27 +709,12 @@
/*
* Get the current Thread-Local Storage area:
-@@ -299,23 +591,29 @@ ptrace_get_thread_area(struct task_struc
+@@ -307,23 +599,29 @@ ptrace_get_thread_area(struct task_struc
#define GET_PRESENT(desc) (((desc)->b >> 15) & 1)
#define GET_USEABLE(desc) (((desc)->b >> 20) & 1)
- if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX)
- return -EINVAL;
--
-- desc = child->thread.tls_array + idx - GDT_ENTRY_TLS_MIN;
--
-- info.entry_number = idx;
-- info.base_addr = GET_BASE(desc);
-- info.limit = GET_LIMIT(desc);
-- info.seg_32bit = GET_32BIT(desc);
-- info.contents = GET_CONTENTS(desc);
-- info.read_exec_only = !GET_WRITABLE(desc);
-- info.limit_in_pages = GET_LIMIT_PAGES(desc);
-- info.seg_not_present = !GET_PRESENT(desc);
-- info.useable = GET_USEABLE(desc);
--
-- if (copy_to_user(user_desc, &info, sizeof(info)))
-- return -EFAULT;
+ desc = &target->thread.tls_array[pos / sizeof(struct user_desc)];
+ ip = kbuf ?: &info;
+ memset(ip, 0, sizeof *ip);
@@ -747,7 +729,21 @@
+ ip->limit_in_pages = GET_LIMIT_PAGES(desc);
+ ip->seg_not_present = !GET_PRESENT(desc);
+ ip->useable = GET_USEABLE(desc);
-+
+
+- desc = child->thread.tls_array + idx - GDT_ENTRY_TLS_MIN;
+-
+- info.entry_number = idx;
+- info.base_addr = GET_BASE(desc);
+- info.limit = GET_LIMIT(desc);
+- info.seg_32bit = GET_32BIT(desc);
+- info.contents = GET_CONTENTS(desc);
+- info.read_exec_only = !GET_WRITABLE(desc);
+- info.limit_in_pages = GET_LIMIT_PAGES(desc);
+- info.seg_not_present = !GET_PRESENT(desc);
+- info.useable = GET_USEABLE(desc);
+-
+- if (copy_to_user(user_desc, &info, sizeof(info)))
+- return -EFAULT;
+ if (kbuf)
+ ++ip;
+ else {
@@ -759,7 +755,7 @@
return 0;
}
-@@ -324,304 +622,120 @@ ptrace_get_thread_area(struct task_struc
+@@ -332,293 +630,120 @@ ptrace_get_thread_area(struct task_struc
* Perform set_thread_area on behalf of the traced child.
*/
static int
@@ -800,17 +796,9 @@
- switch (request) {
- /* when I and D space are separate, these will need to be fixed. */
- case PTRACE_PEEKTEXT: /* read word at location addr. */
-- case PTRACE_PEEKDATA: {
-- unsigned long tmp;
-- int copied;
--
-- copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
-- ret = -EIO;
-- if (copied != sizeof(tmp))
-- break;
-- ret = put_user(tmp, datap);
+- case PTRACE_PEEKDATA:
+- ret = generic_ptrace_peekdata(child, addr, data);
- break;
-- }
-
- /* read the word at location addr in the USER area. */
- case PTRACE_PEEKUSR: {
@@ -829,64 +817,23 @@
- addr -= (long) &dummy->u_debugreg[0];
- addr = addr >> 2;
- tmp = child->thread.debugreg[addr];
-+ struct desc_struct newtls[GDT_ENTRY_TLS_ENTRIES];
-+ unsigned int i;
-+ int cpu;
-+
-+ pos /= sizeof(struct user_desc);
-+ count /= sizeof(struct user_desc);
-+
-+ desc = newtls;
-+ for (i = 0; i < count; ++i, ++desc) {
-+ const struct user_desc *ip;
-+ if (kbuf) {
-+ ip = kbuf;
-+ kbuf += sizeof(struct user_desc);
-+ }
-+ else {
-+ ip = &info;
-+ if (__copy_from_user(&info, ubuf, sizeof(info)))
-+ return -EFAULT;
-+ ubuf += sizeof(struct user_desc);
-+ }
-+
-+ if (LDT_empty(ip)) {
-+ desc->a = 0;
-+ desc->b = 0;
-+ } else {
-+ desc->a = LDT_entry_a(ip);
-+ desc->b = LDT_entry_b(ip);
- }
+- }
- ret = put_user(tmp, datap);
- break;
[...2404 lines suppressed...]
-- * last word (offset 12) within that quadword. Quadword 33 contains the
-- * vrsave as the first word (offset 0) within the quadword.
-- *
-- * This definition of the VMX state is compatible with the current PPC32
-- * ptrace interface. This allows signal handling and ptrace to use the
-- * same structures. This also simplifies the implementation of a bi-arch
-- * (combined (32- and 64-bit) gdb.
-- */
--
--/*
-- * Get contents of AltiVec register state in task TASK
-- */
--static inline int get_vrregs(unsigned long __user *data,
-- struct task_struct *task)
--{
-- unsigned long regsize;
--
-- /* copy AltiVec registers VR[0] .. VR[31] */
-- regsize = 32 * sizeof(vector128);
-- if (copy_to_user(data, task->thread.vr, regsize))
-- return -EFAULT;
-- data += (regsize / sizeof(unsigned long));
--
-- /* copy VSCR */
-- regsize = 1 * sizeof(vector128);
-- if (copy_to_user(data, &task->thread.vscr, regsize))
-- return -EFAULT;
-- data += (regsize / sizeof(unsigned long));
--
-- /* copy VRSAVE */
-- if (put_user(task->thread.vrsave, (u32 __user *)data))
-- return -EFAULT;
--
-- return 0;
--}
--
--/*
-- * Write contents of AltiVec register state into task TASK.
-- */
--static inline int set_vrregs(struct task_struct *task,
-- unsigned long __user *data)
--{
-- unsigned long regsize;
--
-- /* copy AltiVec registers VR[0] .. VR[31] */
-- regsize = 32 * sizeof(vector128);
-- if (copy_from_user(task->thread.vr, data, regsize))
-- return -EFAULT;
-- data += (regsize / sizeof(unsigned long));
--
-- /* copy VSCR */
-- regsize = 1 * sizeof(vector128);
-- if (copy_from_user(&task->thread.vscr, data, regsize))
-- return -EFAULT;
-- data += (regsize / sizeof(unsigned long));
-
-- /* copy VRSAVE */
-- if (get_user(task->thread.vrsave, (u32 __user *)data))
-- return -EFAULT;
--
-- return 0;
--}
--#endif
--
--static inline int ptrace_set_debugreg(struct task_struct *task,
-- unsigned long addr, unsigned long data)
--{
-- /* We only support one DABR and no IABRS at the moment */
-- if (addr > 0)
-- return -EINVAL;
--
-- /* The bottom 3 bits are flags */
-- if ((data & ~0x7UL) >= TASK_SIZE)
-- return -EIO;
--
-- /* Ensure translation is on */
-- if (data && !(data & DABR_TRANSLATION))
-- return -EIO;
--
-- task->thread.dabr = data;
-- return 0;
--}
+- case PTRACE_SINGLESTEP: { /* set the trap flag. */
+- ret = -EIO;
+- if (!valid_signal(data))
+- break;
+- clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+- tracehook_enable_single_step(child);
+- child->exit_code = data;
+- /* give it a chance to run. */
+- wake_up_process(child);
+- ret = 0;
+- break;
+- }
-
--#endif /* _PPC64_PTRACE_COMMON_H */
+ case PTRACE_GET_DEBUGREG: {
+ ret = -EINVAL;
+ /* We only support one DABR and no IABRS at the moment */
+@@ -501,7 +697,7 @@ long arch_ptrace(struct task_struct *chi
+ }
+
+ case PTRACE_SET_DEBUGREG:
+- ret = ptrace_set_debugreg(child, addr, data);
++/* ret = ptrace_set_debugreg(child, addr, data);*/
+ break;
+
+ case PTRACE_DETACH:
+@@ -520,8 +716,8 @@ long arch_ptrace(struct task_struct *chi
+ }
+ ret = 0;
+ for (ui = 0; ui < PT_REGS_COUNT; ui ++) {
+- ret |= __put_user(ptrace_get_reg(child, ui),
+- (unsigned long __user *) data);
++/* ret |= __put_user(ptrace_get_reg(child, ui),
++ (unsigned long __user *) data);*/
+ data += sizeof(long);
+ }
+ break;
+@@ -543,7 +739,7 @@ long arch_ptrace(struct task_struct *chi
+ ret = __get_user(tmp, (unsigned long __user *) data);
+ if (ret)
+ break;
+- ptrace_put_reg(child, ui, tmp);
++/* ptrace_put_reg(child, ui, tmp);*/
+ data += sizeof(long);
+ }
+ break;
+@@ -551,13 +747,13 @@ long arch_ptrace(struct task_struct *chi
+
+ case PTRACE_GETFPREGS: { /* Get the child FPU state (FPR0...31 + FPSCR) */
+ flush_fp_to_thread(child);
+- ret = get_fpregs((void __user *)data, child, 1);
++/* ret = get_fpregs((void __user *)data, child, 1);*/
+ break;
+ }
+
+ case PTRACE_SETFPREGS: { /* Set the child FPU state (FPR0...31 + FPSCR) */
+ flush_fp_to_thread(child);
+- ret = set_fpregs((void __user *)data, child, 1);
++/* ret = set_fpregs((void __user *)data, child, 1);*/
+ break;
+ }
+
+@@ -565,13 +761,13 @@ long arch_ptrace(struct task_struct *chi
+ case PTRACE_GETVRREGS:
+ /* Get the child altivec register state. */
+ flush_altivec_to_thread(child);
+- ret = get_vrregs((unsigned long __user *)data, child);
++/* ret = get_vrregs((unsigned long __user *)data, child);*/
+ break;
+
+ case PTRACE_SETVRREGS:
+ /* Set the child altivec register state. */
+ flush_altivec_to_thread(child);
+- ret = set_vrregs(child, (unsigned long __user *)data);
++/* ret = set_vrregs(child, (unsigned long __user *)data);*/
+ break;
+ #endif
+ #ifdef CONFIG_SPE
+@@ -579,7 +775,7 @@ long arch_ptrace(struct task_struct *chi
+ /* Get the child spe register state. */
+ if (child->thread.regs->msr & MSR_SPE)
+ giveup_spe(child);
+- ret = get_evrregs((unsigned long __user *)data, child);
++/* ret = get_evrregs((unsigned long __user *)data, child);*/
+ break;
+
+ case PTRACE_SETEVRREGS:
+@@ -588,7 +784,7 @@ long arch_ptrace(struct task_struct *chi
+ * of register state from memory */
+ if (child->thread.regs->msr & MSR_SPE)
+ giveup_spe(child);
+- ret = set_evrregs(child, (unsigned long __user *)data);
++/* ret = set_evrregs(child, (unsigned long __user *)data);*/
+ break;
+ #endif
+
--- linux-2.6/kernel/ptrace.c
+++ linux-2.6/kernel/ptrace.c
@@ -99,12 +99,6 @@ int ptrace_detach(struct task_struct *ch
@@ -4392,7 +3826,7 @@
return -ENOSYS;
}
-@@ -212,9 +206,7 @@ struct task_struct *ptrace_get_task_stru
+@@ -212,12 +206,10 @@ struct task_struct *ptrace_get_task_stru
return child;
}
@@ -4402,6 +3836,9 @@
return -ENOSYS;
}
-#endif /* __ARCH_SYS_PTRACE */
+
+ int generic_ptrace_peekdata(struct task_struct *tsk, long addr, long data)
+ {
--- linux-2.6/include/linux/tracehook.h
+++ linux-2.6/include/linux/tracehook.h
@@ -52,10 +52,10 @@ struct pt_regs;
linux-2.6-utrace-tracehook-avr32.patch:
Index: linux-2.6-utrace-tracehook-avr32.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-utrace-tracehook-avr32.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-utrace-tracehook-avr32.patch 12 Jul 2007 19:40:19 -0000 1.1
+++ linux-2.6-utrace-tracehook-avr32.patch 20 Jul 2007 19:52:27 -0000 1.2
@@ -97,7 +97,7 @@
/*
* Read the word at offset "offset" into the task's "struct user". We
* actually access the pt_regs struct stored on the kernel stack.
-@@ -257,32 +208,31 @@ long arch_ptrace(struct task_struct *chi
+@@ -248,32 +199,31 @@ long arch_ptrace(struct task_struct *chi
pr_debug("sys_ptrace returning %d (DC = 0x%08lx)\n", ret, __mfdr(DBGREG_DC));
return ret;
}
@@ -149,7 +149,7 @@
}
asmlinkage void do_debug_priv(struct pt_regs *regs)
-@@ -361,10 +311,10 @@ asmlinkage void do_debug(struct pt_regs
+@@ -352,10 +302,10 @@ asmlinkage void do_debug(struct pt_regs
__mtdr(DBGREG_DC, dc);
clear_thread_flag(TIF_SINGLE_STEP);
linux-2.6-utrace-tracehook-s390.patch:
Index: linux-2.6-utrace-tracehook-s390.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-utrace-tracehook-s390.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-utrace-tracehook-s390.patch 12 Jul 2007 19:40:19 -0000 1.1
+++ linux-2.6-utrace-tracehook-s390.patch 20 Jul 2007 19:52:27 -0000 1.2
@@ -26,7 +26,7 @@
#include <linux/timer.h>
#include <linux/mm.h>
#include <linux/smp.h>
-@@ -338,7 +338,7 @@ void __kprobes do_single_step(struct pt_
+@@ -339,7 +339,7 @@ void __kprobes do_single_step(struct pt_
SIGTRAP) == NOTIFY_STOP){
return;
}
@@ -35,7 +35,7 @@
force_sig(SIGTRAP, current);
}
-@@ -439,7 +439,7 @@ static void illegal_op(struct pt_regs *
+@@ -440,7 +440,7 @@ static void illegal_op(struct pt_regs *
if (get_user(*((__u16 *) opcode), (__u16 __user *) location))
return;
if (*((__u16 *) opcode) == S390_BREAKPOINT_U16) {
@@ -122,7 +122,7 @@
}
#ifndef CONFIG_64BIT
-@@ -593,6 +611,7 @@ do_ptrace_emu31(struct task_struct *chil
+@@ -586,6 +604,7 @@ do_ptrace_emu31(struct task_struct *chil
copied += sizeof(unsigned int);
}
return 0;
@@ -130,7 +130,7 @@
case PTRACE_GETEVENTMSG:
return put_user((__u32) child->ptrace_message,
(unsigned int __force __user *) data);
-@@ -658,7 +677,7 @@ do_ptrace(struct task_struct *child, lon
+@@ -651,7 +670,7 @@ do_ptrace(struct task_struct *child, lon
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
child->exit_code = data;
/* make sure the single step bit is not set. */
@@ -139,7 +139,7 @@
wake_up_process(child);
return 0;
-@@ -672,7 +691,7 @@ do_ptrace(struct task_struct *child, lon
+@@ -665,7 +684,7 @@ do_ptrace(struct task_struct *child, lon
return 0;
child->exit_code = SIGKILL;
/* make sure the single step bit is not set. */
@@ -148,7 +148,7 @@
wake_up_process(child);
return 0;
-@@ -685,7 +704,7 @@ do_ptrace(struct task_struct *child, lon
+@@ -678,7 +697,7 @@ do_ptrace(struct task_struct *child, lon
if (data)
set_tsk_thread_flag(child, TIF_SINGLE_STEP);
else
@@ -157,7 +157,7 @@
/* give it a chance to run. */
wake_up_process(child);
return 0;
-@@ -738,30 +757,17 @@ syscall_trace(struct pt_regs *regs, int
+@@ -731,30 +750,17 @@ syscall_trace(struct pt_regs *regs, int
if (unlikely(current->audit_context) && entryexit)
audit_syscall_exit(AUDITSC_RESULT(regs->gprs[2]), regs->gprs[2]);
linux-2.6-utrace-tracehook-sparc64.patch:
Index: linux-2.6-utrace-tracehook-sparc64.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-utrace-tracehook-sparc64.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-utrace-tracehook-sparc64.patch 12 Jul 2007 19:40:19 -0000 1.1
+++ linux-2.6-utrace-tracehook-sparc64.patch 20 Jul 2007 19:52:27 -0000 1.2
@@ -103,7 +103,7 @@
#include <asm/uaccess.h>
#include <asm/ptrace.h>
-@@ -490,6 +491,7 @@ static inline void handle_signal(unsigne
+@@ -481,6 +482,7 @@ static inline void handle_signal(unsigne
sigaddset(¤t->blocked,signr);
recalc_sigpending();
spin_unlock_irq(¤t->sighand->siglock);
linux-2.6-utrace-tracehook-um.patch:
Index: linux-2.6-utrace-tracehook-um.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-utrace-tracehook-um.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-utrace-tracehook-um.patch 12 Jul 2007 19:40:19 -0000 1.1
+++ linux-2.6-utrace-tracehook-um.patch 20 Jul 2007 19:52:27 -0000 1.2
@@ -19,7 +19,7 @@
---
- arch/um/kernel/ptrace.c | 327 ++++-----------------------------------
+ arch/um/kernel/ptrace.c | 315 ++++-----------------------------------
arch/um/kernel/skas/syscall.c | 4
arch/um/kernel/signal.c | 5 -
arch/um/kernel/exec.c | 1
@@ -30,12 +30,12 @@
include/asm-um/ptrace-i386.h | 2
include/asm-um/tracehook.h | 57 +++++++
include/asm-um/thread_info.h | 3
- 11 files changed, 106 insertions(+), 308 deletions(-)
+ 11 files changed, 106 insertions(+), 296 deletions(-)
create include/asm-um/tracehook.h
--- linux-2.6/arch/um/kernel/ptrace.c
+++ linux-2.6/arch/um/kernel/ptrace.c
-@@ -3,261 +3,21 @@
+@@ -3,249 +3,21 @@
* Licensed under the GPL
*/
@@ -93,17 +93,9 @@
- switch (request) {
- /* when I and D space are separate, these will need to be fixed. */
- case PTRACE_PEEKTEXT: /* read word at location addr. */
-- case PTRACE_PEEKDATA: {
-- unsigned long tmp;
-- int copied;
--
-- ret = -EIO;
-- copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
-- if (copied != sizeof(tmp))
-- break;
-- ret = put_user(tmp, p);
+- case PTRACE_PEEKDATA:
+- ret = generic_ptrace_peekdata(child, addr, data);
- break;
-- }
-
- /* read the word at location addr in the USER area. */
- case PTRACE_PEEKUSR:
@@ -113,11 +105,7 @@
- /* when I and D space are separate, this will have to be fixed. */
- case PTRACE_POKETEXT: /* write the word at location addr. */
- case PTRACE_POKEDATA:
-- ret = -EIO;
-- if (access_process_vm(child, addr, &data, sizeof(data),
-- 1) != sizeof(data))
-- break;
-- ret = 0;
+- ret = generic_ptrace_pokedata(child, addr, data);
- break;
-
- case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
@@ -304,7 +292,7 @@
{
struct siginfo info;
-@@ -266,56 +26,39 @@ void send_sigtrap(struct task_struct *ts
+@@ -254,56 +26,39 @@ void send_sigtrap(struct task_struct *ts
info.si_code = TRAP_BRKPT;
/* User-mode eip? */
@@ -447,7 +435,7 @@
#endif
--- linux-2.6/arch/um/kernel/process.c
+++ linux-2.6/arch/um/kernel/process.c
-@@ -403,11 +403,11 @@ int singlestepping(void * t)
+@@ -387,11 +387,11 @@ int singlestepping(void * t)
{
struct task_struct *task = t ? t : current;
@@ -578,7 +566,7 @@
+#endif
--- linux-2.6/include/asm-um/thread_info.h
+++ linux-2.6/include/asm-um/thread_info.h
-@@ -71,6 +71,8 @@ static inline struct thread_info *curren
+@@ -82,6 +82,8 @@ static inline struct thread_info *curren
#define TIF_MEMDIE 5
#define TIF_SYSCALL_AUDIT 6
#define TIF_RESTORE_SIGMASK 7
@@ -587,7 +575,7 @@
#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
-@@ -79,5 +81,6 @@ static inline struct thread_info *curren
+@@ -90,5 +92,6 @@ static inline struct thread_info *curren
#define _TIF_MEMDIE (1 << TIF_MEMDIE)
#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
linux-2.6-utrace-tracehook.patch:
Index: linux-2.6-utrace-tracehook.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-utrace-tracehook.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-utrace-tracehook.patch 13 Jul 2007 19:58:04 -0000 1.2
+++ linux-2.6-utrace-tracehook.patch 20 Jul 2007 19:52:27 -0000 1.3
@@ -67,13 +67,11 @@
arch/mips/kernel/sysirix.c | 2
arch/mips/kernel/ptrace.c | 21 --
arch/powerpc/kernel/sys_ppc32.c | 5
- arch/powerpc/kernel/ptrace-common.h | 16 -
- arch/powerpc/kernel/ptrace32.c | 13 +
- arch/powerpc/kernel/ptrace.c | 76 +-----
+ arch/powerpc/kernel/ptrace32.c | 7 +
+ arch/powerpc/kernel/ptrace.c | 49 +---
+ arch/powerpc/kernel/signal.c | 3
arch/powerpc/kernel/asm-offsets.c | 2
- arch/powerpc/kernel/signal_64.c | 3
arch/powerpc/kernel/process.c | 5
- arch/powerpc/kernel/signal_32.c | 3
arch/arm26/kernel/ptrace.c | 32 +--
arch/alpha/kernel/asm-offsets.c | 2
arch/alpha/kernel/entry.S | 4
@@ -84,8 +82,8 @@
arch/ia64/kernel/mca.c | 2
arch/ia64/kernel/asm-offsets.c | 2
arch/ia64/kernel/fsys.S | 16 +
- kernel/exit.c | 244 +++++----------------
- kernel/ptrace.c | 299 +------------------------
+ kernel/exit.c | 252 ++++++---------------
+ kernel/ptrace.c | 298 +------------------------
kernel/timer.c | 6 -
kernel/signal.c | 212 ++++--------------
kernel/tsacct.c | 2
@@ -98,12 +96,12 @@
include/asm-i386/tracehook.h | 52 ++++
include/asm-i386/thread_info.h | 7 -
include/asm-i386/signal.h | 4
- include/asm-powerpc/tracehook.h | 74 ++++++
+ include/asm-powerpc/tracehook.h | 49 ++++
include/asm-x86_64/tracehook.h | 51 ++++
include/asm-x86_64/thread_info.h | 3
drivers/connector/cn_proc.c | 4
mm/nommu.c | 4
- 70 files changed, 934 insertions(+), 1216 deletions(-)
+ 68 files changed, 913 insertions(+), 1167 deletions(-)
create include/linux/tracehook.h
create include/asm-i386/tracehook.h
create include/asm-powerpc/tracehook.h
@@ -139,9 +137,9 @@
#include <linux/security.h>
#include <linux/ptrace.h>
+#include <linux/tracehook.h>
- #include <linux/seccomp.h>
#include <linux/cpuset.h>
#include <linux/audit.h>
+ #include <linux/poll.h>
@@ -192,13 +193,6 @@ static int proc_root_link(struct inode *
return result;
}
@@ -156,7 +154,7 @@
static int proc_pid_environ(struct task_struct *task, char * buffer)
{
int res = 0;
-@@ -523,7 +517,8 @@ static ssize_t mem_read(struct file * fi
+@@ -528,7 +522,8 @@ static ssize_t mem_read(struct file * fi
if (!task)
goto out_no_task;
@@ -166,7 +164,7 @@
goto out;
ret = -ENOMEM;
-@@ -549,7 +544,8 @@ static ssize_t mem_read(struct file * fi
+@@ -554,7 +549,8 @@ static ssize_t mem_read(struct file * fi
this_len = (count > PAGE_SIZE) ? PAGE_SIZE : count;
retval = access_process_vm(task, src, page, this_len, 0);
@@ -176,7 +174,7 @@
if (!ret)
ret = -EIO;
break;
-@@ -593,7 +589,8 @@ static ssize_t mem_write(struct file * f
+@@ -598,7 +594,8 @@ static ssize_t mem_write(struct file * f
if (!task)
goto out_no_task;
@@ -188,7 +186,7 @@
copied = -ENOMEM;
--- linux-2.6/fs/proc/array.c
+++ linux-2.6/fs/proc/array.c
-@@ -73,6 +73,7 @@
+@@ -75,6 +75,7 @@
#include <linux/file.h>
#include <linux/times.h>
#include <linux/cpuset.h>
@@ -196,9 +194,9 @@
#include <linux/rcupdate.h>
#include <linux/delayacct.h>
-@@ -158,11 +159,16 @@ static inline const char * get_task_stat
+@@ -158,11 +159,16 @@ static inline const char *get_task_state
- static inline char * task_state(struct task_struct *p, char *buffer)
+ static inline char *task_state(struct task_struct *p, char *buffer)
{
+ struct task_struct *tracer;
+ pid_t tracer_pid;
@@ -213,18 +211,18 @@
buffer += sprintf(buffer,
"State:\t%s\n"
"Tgid:\t%d\n"
-@@ -173,8 +179,8 @@ static inline char * task_state(struct t
+@@ -173,8 +179,8 @@ static inline char *task_state(struct ta
"Gid:\t%d\t%d\t%d\t%d\n",
get_task_state(p),
- p->tgid, p->pid,
-- pid_alive(p) ? rcu_dereference(p->real_parent)->tgid : 0,
+ p->tgid, p->pid,
+- pid_alive(p) ? rcu_dereference(p->real_parent)->tgid : 0,
- pid_alive(p) && p->ptrace ? rcu_dereference(p->parent)->pid : 0,
-+ pid_alive(p) ? rcu_dereference(p->parent)->tgid : 0,
++ pid_alive(p) ? rcu_dereference(p->parent)->tgid : 0,
+ tracer_pid,
p->uid, p->euid, p->suid, p->fsuid,
p->gid, p->egid, p->sgid, p->fsgid);
-@@ -418,7 +424,7 @@ static int do_task_stat(struct task_stru
+@@ -427,7 +433,7 @@ static int do_task_stat(struct task_stru
sid = signal_session(sig);
pgid = process_group(task);
@@ -260,7 +258,7 @@
#include <linux/mount.h>
#include <linux/security.h>
#include <linux/syscalls.h>
-@@ -964,13 +964,7 @@ EXPORT_SYMBOL(prepare_binprm);
+@@ -1158,13 +1158,7 @@ EXPORT_SYMBOL(prepare_binprm);
static int unsafe_exec(struct task_struct *p)
{
@@ -275,7 +273,7 @@
if (atomic_read(&p->fs->count) > 1 ||
atomic_read(&p->files->count) > 1 ||
atomic_read(&p->sighand->count) > 1)
-@@ -1113,6 +1107,7 @@ int search_binary_handler(struct linux_b
+@@ -1306,6 +1300,7 @@ int search_binary_handler(struct linux_b
bprm->file = NULL;
current->did_exec = 1;
proc_exec_connector(current);
@@ -285,7 +283,7 @@
read_lock(&binfmt_lock);
--- linux-2.6/fs/binfmt_elf.c
+++ linux-2.6/fs/binfmt_elf.c
-@@ -1026,12 +1026,6 @@ static int load_elf_binary(struct linux_
+@@ -1099,12 +1099,6 @@ static int load_elf_binary(struct linux_
#endif
start_thread(regs, elf_entry, bprm->p);
@@ -469,7 +467,7 @@
asm volatile("sfpc %0,%0" : : "d" (0));
--- linux-2.6/arch/frv/kernel/ptrace.c
+++ linux-2.6/arch/frv/kernel/ptrace.c
-@@ -699,24 +699,11 @@ asmlinkage void do_syscall_trace(int lea
+@@ -689,24 +689,11 @@ asmlinkage void do_syscall_trace(int lea
if (!test_thread_flag(TIF_SYSCALL_TRACE))
return;
@@ -535,7 +533,7 @@
/*
* does not yet catch signals sent when the child dies.
-@@ -214,7 +216,7 @@ static inline int is_setting_trap_flag(s
+@@ -222,7 +224,7 @@ static inline int is_setting_trap_flag(s
return 0;
}
@@ -544,7 +542,7 @@
{
struct pt_regs *regs = get_child_regs(child);
-@@ -242,19 +244,18 @@ static void set_singlestep(struct task_s
+@@ -250,19 +252,18 @@ static void set_singlestep(struct task_s
if (is_setting_trap_flag(child, regs))
return;
@@ -567,7 +565,7 @@
}
}
-@@ -265,9 +266,7 @@ static void clear_singlestep(struct task
+@@ -273,9 +274,7 @@ static void clear_singlestep(struct task
*/
void ptrace_disable(struct task_struct *child)
{
@@ -578,7 +576,7 @@
}
/*
-@@ -479,18 +478,18 @@ long arch_ptrace(struct task_struct *chi
+@@ -476,18 +475,18 @@ long arch_ptrace(struct task_struct *chi
if (!valid_signal(data))
break;
if (request == PTRACE_SYSEMU) {
@@ -601,7 +599,7 @@
wake_up_process(child);
ret = 0;
break;
-@@ -506,7 +505,7 @@ long arch_ptrace(struct task_struct *chi
+@@ -503,7 +502,7 @@ long arch_ptrace(struct task_struct *chi
break;
child->exit_code = SIGKILL;
/* make sure the single step bit is not set. */
@@ -610,7 +608,7 @@
wake_up_process(child);
break;
-@@ -516,13 +515,8 @@ long arch_ptrace(struct task_struct *chi
+@@ -513,13 +512,8 @@ long arch_ptrace(struct task_struct *chi
if (!valid_signal(data))
break;
@@ -625,7 +623,7 @@
child->exit_code = data;
/* give it a chance to run. */
wake_up_process(child);
-@@ -650,78 +644,24 @@ void send_sigtrap(struct task_struct *ts
+@@ -647,78 +641,24 @@ void send_sigtrap(struct task_struct *ts
* - triggered by current->work.syscall_trace
*/
__attribute__((regparm(3)))
@@ -793,7 +791,7 @@
return ret;
--- linux-2.6/arch/i386/kernel/process.c
+++ linux-2.6/arch/i386/kernel/process.c
-@@ -774,9 +774,6 @@ asmlinkage int sys_execve(struct pt_regs
+@@ -779,9 +779,6 @@ asmlinkage int sys_execve(struct pt_regs
(char __user * __user *) regs.edx,
®s);
if (error == 0) {
@@ -839,7 +837,7 @@
jnz syscall_trace_entry
cmpl $(nr_syscalls), %eax
jae syscall_badsys
-@@ -514,9 +514,6 @@ syscall_trace_entry:
+@@ -512,9 +512,6 @@ syscall_trace_entry:
movl %esp, %eax
xorl %edx,%edx
call do_syscall_trace
@@ -938,7 +936,7 @@
LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */
--- linux-2.6/arch/x86_64/kernel/traps.c
+++ linux-2.6/arch/x86_64/kernel/traps.c
-@@ -863,14 +863,6 @@ asmlinkage void __kprobes do_debug(struc
+@@ -876,14 +876,6 @@ asmlinkage void __kprobes do_debug(struc
*/
if (!user_mode(regs))
goto clear_TF_reenable;
@@ -963,7 +961,7 @@
#include <linux/ptrace.h>
#include <linux/user.h>
#include <linux/security.h>
-@@ -164,7 +165,7 @@ static int is_setting_trap_flag(struct t
+@@ -173,7 +174,7 @@ static int is_setting_trap_flag(struct t
return 0;
}
@@ -972,7 +970,7 @@
{
struct pt_regs *regs = task_pt_regs(child);
-@@ -192,19 +193,18 @@ static void set_singlestep(struct task_s
+@@ -201,19 +202,18 @@ static void set_singlestep(struct task_s
if (is_setting_trap_flag(child, regs))
return;
@@ -995,7 +993,7 @@
}
}
-@@ -215,7 +215,7 @@ static void clear_singlestep(struct task
+@@ -224,7 +224,7 @@ static void clear_singlestep(struct task
*/
void ptrace_disable(struct task_struct *child)
{
@@ -1004,7 +1002,7 @@
}
static int putreg(struct task_struct *child,
-@@ -444,7 +444,7 @@ long arch_ptrace(struct task_struct *chi
+@@ -442,7 +442,7 @@ long arch_ptrace(struct task_struct *chi
clear_tsk_thread_flag(child, TIF_SINGLESTEP);
child->exit_code = data;
/* make sure the single step bit is not set. */
@@ -1013,7 +1011,7 @@
wake_up_process(child);
ret = 0;
break;
-@@ -491,7 +491,7 @@ long arch_ptrace(struct task_struct *chi
+@@ -489,7 +489,7 @@ long arch_ptrace(struct task_struct *chi
clear_tsk_thread_flag(child, TIF_SINGLESTEP);
child->exit_code = SIGKILL;
/* make sure the single step bit is not set. */
@@ -1022,7 +1020,7 @@
wake_up_process(child);
break;
-@@ -500,7 +500,7 @@ long arch_ptrace(struct task_struct *chi
+@@ -498,7 +498,7 @@ long arch_ptrace(struct task_struct *chi
if (!valid_signal(data))
break;
clear_tsk_thread_flag(child,TIF_SYSCALL_TRACE);
@@ -1031,7 +1029,7 @@
child->exit_code = data;
/* give it a chance to run. */
wake_up_process(child);
-@@ -574,37 +574,13 @@ long arch_ptrace(struct task_struct *chi
+@@ -572,37 +572,13 @@ long arch_ptrace(struct task_struct *chi
return ret;
}
@@ -1071,7 +1069,7 @@
if (unlikely(current->audit_context)) {
if (test_thread_flag(TIF_IA32)) {
-@@ -626,8 +602,11 @@ asmlinkage void syscall_trace_leave(stru
+@@ -624,8 +600,11 @@ asmlinkage void syscall_trace_leave(stru
if (unlikely(current->audit_context))
audit_syscall_exit(AUDITSC_RESULT(regs->rax), regs->rax);
@@ -1207,7 +1205,7 @@
(tsk->sighand->action[sig-1].sa.sa_handler == SIG_DFL);
--- linux-2.6/arch/arm/kernel/ptrace.c
+++ linux-2.6/arch/arm/kernel/ptrace.c
-@@ -806,8 +806,6 @@ asmlinkage int syscall_trace(int why, st
+@@ -795,8 +795,6 @@ asmlinkage int syscall_trace(int why, st
if (!test_thread_flag(TIF_SYSCALL_TRACE))
return scno;
@@ -1216,7 +1214,7 @@
/*
* Save IP. IP is used to denote syscall entry/exit:
-@@ -818,20 +816,7 @@ asmlinkage int syscall_trace(int why, st
+@@ -807,20 +805,7 @@ asmlinkage int syscall_trace(int why, st
current_thread_info()->syscall = scno;
@@ -1251,7 +1249,7 @@
--- linux-2.6/arch/mips/kernel/ptrace.c
+++ linux-2.6/arch/mips/kernel/ptrace.c
-@@ -486,26 +486,9 @@ asmlinkage void do_syscall_trace(struct
+@@ -474,26 +474,9 @@ asmlinkage void do_syscall_trace(struct
audit_syscall_exit(AUDITSC_RESULT(regs->regs[2]),
regs->regs[2]);
@@ -1294,31 +1292,6 @@
putname(filename);
out:
---- linux-2.6/arch/powerpc/kernel/ptrace-common.h
-+++ linux-2.6/arch/powerpc/kernel/ptrace-common.h
-@@ -54,22 +54,6 @@ static inline int put_reg(struct task_st
- return -EIO;
- }
-
--static inline void set_single_step(struct task_struct *task)
--{
-- struct pt_regs *regs = task->thread.regs;
-- if (regs != NULL)
-- regs->msr |= MSR_SE;
-- set_tsk_thread_flag(task, TIF_SINGLESTEP);
--}
--
--static inline void clear_single_step(struct task_struct *task)
--{
-- struct pt_regs *regs = task->thread.regs;
-- if (regs != NULL)
-- regs->msr &= ~MSR_SE;
-- clear_tsk_thread_flag(task, TIF_SINGLESTEP);
--}
--
- #ifdef CONFIG_ALTIVEC
- /*
- * Get/set all the altivec registers vr0..vr31, vscr, vrsave, in one go.
--- linux-2.6/arch/powerpc/kernel/ptrace32.c
+++ linux-2.6/arch/powerpc/kernel/ptrace32.c
@@ -24,6 +24,7 @@
@@ -1335,9 +1308,9 @@
#include <asm/system.h>
+#include <asm/tracehook.h>
- #include "ptrace-common.h"
-
-@@ -46,6 +48,9 @@ long compat_sys_ptrace(int request, int
+ /*
+ * does not yet catch signals sent when the child dies.
+@@ -88,6 +90,9 @@ long compat_sys_ptrace(int request, int
struct task_struct *child;
int ret;
@@ -1347,34 +1320,7 @@
lock_kernel();
if (request == PTRACE_TRACEME) {
ret = ptrace_traceme();
-@@ -290,7 +295,7 @@ long compat_sys_ptrace(int request, int
- clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
- child->exit_code = data;
- /* make sure the single step bit is not set. */
-- clear_single_step(child);
-+ tracehook_disable_single_step(child);
- wake_up_process(child);
- ret = 0;
- break;
-@@ -307,7 +312,7 @@ long compat_sys_ptrace(int request, int
- break;
- child->exit_code = SIGKILL;
- /* make sure the single step bit is not set. */
-- clear_single_step(child);
-+ tracehook_disable_single_step(child);
- wake_up_process(child);
- break;
- }
-@@ -317,7 +322,7 @@ long compat_sys_ptrace(int request, int
- if (!valid_signal(data))
- break;
- clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
-- set_single_step(child);
-+ tracehook_enable_single_step(child);
- child->exit_code = data;
- /* give it a chance to run. */
- wake_up_process(child);
-@@ -406,6 +411,7 @@ long compat_sys_ptrace(int request, int
+@@ -331,9 +336,11 @@ long compat_sys_ptrace(int request, int
break;
}
@@ -1382,14 +1328,10 @@
case PTRACE_GETEVENTMSG:
ret = put_user(child->ptrace_message, (unsigned int __user *) data);
break;
-@@ -423,6 +429,7 @@ long compat_sys_ptrace(int request, int
- ret = set_vrregs(child, (unsigned long __user *)data);
- break;
- #endif
+#endif
- default:
- ret = ptrace_request(child, request, addr, data);
+ case PTRACE_GETREGS: { /* Get all pt_regs from the child. */
+ int ui;
--- linux-2.6/arch/powerpc/kernel/ptrace.c
+++ linux-2.6/arch/powerpc/kernel/ptrace.c
@@ -21,6 +21,7 @@
@@ -1406,48 +1348,28 @@
#include <asm/system.h>
+#include <asm/tracehook.h>
- #ifdef CONFIG_PPC64
- #include "ptrace-common.h"
-@@ -204,38 +206,6 @@ static inline int set_evrregs(struct tas
- return 0;
+ /*
+ * does not yet catch signals sent when the child dies.
+@@ -255,8 +257,7 @@ static int set_evrregs(struct task_struc
}
#endif /* CONFIG_SPE */
+
-
--static inline void
--set_single_step(struct task_struct *task)
--{
-- struct pt_regs *regs = task->thread.regs;
--
-- if (regs != NULL) {
--#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
-- task->thread.dbcr0 = DBCR0_IDM | DBCR0_IC;
-- regs->msr |= MSR_DE;
--#else
-- regs->msr |= MSR_SE;
--#endif
-- }
-- set_tsk_thread_flag(task, TIF_SINGLESTEP);
--}
--
--static inline void
--clear_single_step(struct task_struct *task)
--{
-- struct pt_regs *regs = task->thread.regs;
--
-- if (regs != NULL) {
--#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
-- task->thread.dbcr0 = 0;
-- regs->msr &= ~MSR_DE;
--#else
-- regs->msr &= ~MSR_SE;
--#endif
-- }
-- clear_tsk_thread_flag(task, TIF_SINGLESTEP);
--}
- #endif /* CONFIG_PPC32 */
+-static void set_single_step(struct task_struct *task)
++void tracehook_enable_single_step(struct task_struct *task)
+ {
+ struct pt_regs *regs = task->thread.regs;
- /*
-@@ -246,7 +216,7 @@ clear_single_step(struct task_struct *ta
+@@ -271,7 +272,7 @@ static void set_single_step(struct task_
+ set_tsk_thread_flag(task, TIF_SINGLESTEP);
+ }
+
+-static void clear_single_step(struct task_struct *task)
++void tracehook_disable_single_step(struct task_struct *task)
+ {
+ struct pt_regs *regs = task->thread.regs;
+
+@@ -313,7 +314,7 @@ static int ptrace_set_debugreg(struct ta
void ptrace_disable(struct task_struct *child)
{
/* make sure the single step bit is not set. */
@@ -1455,8 +1377,8 @@
+ tracehook_disable_single_step(child);
}
- long arch_ptrace(struct task_struct *child, long request, long addr, long data)
-@@ -349,7 +319,7 @@ long arch_ptrace(struct task_struct *chi
+ /*
+@@ -454,7 +455,7 @@ long arch_ptrace(struct task_struct *chi
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
child->exit_code = data;
/* make sure the single step bit is not set. */
@@ -1465,7 +1387,7 @@
wake_up_process(child);
ret = 0;
break;
-@@ -366,7 +336,7 @@ long arch_ptrace(struct task_struct *chi
+@@ -471,7 +472,7 @@ long arch_ptrace(struct task_struct *chi
break;
child->exit_code = SIGKILL;
/* make sure the single step bit is not set. */
@@ -1474,7 +1396,7 @@
wake_up_process(child);
break;
}
-@@ -376,7 +346,7 @@ long arch_ptrace(struct task_struct *chi
+@@ -481,7 +482,7 @@ long arch_ptrace(struct task_struct *chi
if (!valid_signal(data))
break;
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
@@ -1483,7 +1405,7 @@
child->exit_code = data;
/* give it a chance to run. */
wake_up_process(child);
-@@ -507,31 +477,12 @@ long arch_ptrace(struct task_struct *chi
+@@ -606,31 +607,12 @@ long arch_ptrace(struct task_struct *chi
return ret;
}
@@ -1517,7 +1439,7 @@
if (unlikely(current->audit_context)) {
#ifdef CONFIG_PPC64
-@@ -557,8 +508,11 @@ void do_syscall_trace_leave(struct pt_re
+@@ -656,8 +638,11 @@ void do_syscall_trace_leave(struct pt_re
audit_syscall_exit((regs->ccr&0x10000000)?AUDITSC_FAILURE:AUDITSC_SUCCESS,
regs->result);
@@ -1533,6 +1455,25 @@
+ tracehook_report_syscall_step(regs);
+ }
}
+--- linux-2.6/arch/powerpc/kernel/signal.c
++++ linux-2.6/arch/powerpc/kernel/signal.c
+@@ -10,6 +10,7 @@
+ */
+
+ #include <linux/ptrace.h>
++#include <linux/tracehook.h>
+ #include <linux/signal.h>
+ #include <asm/uaccess.h>
+ #include <asm/unistd.h>
+@@ -167,6 +168,8 @@ int do_signal(sigset_t *oldset, struct p
+ */
+ if (test_thread_flag(TIF_RESTORE_SIGMASK))
+ clear_thread_flag(TIF_RESTORE_SIGMASK);
++
++ tracehook_report_handle_signal(signr, &ka, oldset, regs);
+ }
+
+ return ret;
--- linux-2.6/arch/powerpc/kernel/asm-offsets.c
+++ linux-2.6/arch/powerpc/kernel/asm-offsets.c
@@ -59,7 +59,6 @@ int main(void)
@@ -1551,25 +1492,6 @@
#endif
#ifdef CONFIG_SPE
DEFINE(THREAD_EVR0, offsetof(struct thread_struct, evr[0]));
---- linux-2.6/arch/powerpc/kernel/signal_64.c
-+++ linux-2.6/arch/powerpc/kernel/signal_64.c
-@@ -23,6 +23,7 @@
- #include <linux/stddef.h>
- #include <linux/elf.h>
- #include <linux/ptrace.h>
-+#include <linux/tracehook.h>
- #include <linux/module.h>
-
- #include <asm/sigcontext.h>
-@@ -462,6 +463,8 @@ static int handle_signal(unsigned long s
- sigaddset(¤t->blocked,sig);
- recalc_sigpending();
- spin_unlock_irq(¤t->sighand->siglock);
-+
-+ tracehook_report_handle_signal(sig, ka, oldset, regs);
- }
-
- return ret;
--- linux-2.6/arch/powerpc/kernel/process.c
+++ linux-2.6/arch/powerpc/kernel/process.c
@@ -809,11 +809,6 @@ int sys_execve(unsigned long a0, unsigne
@@ -1584,28 +1506,9 @@
putname(filename);
out:
return error;
---- linux-2.6/arch/powerpc/kernel/signal_32.c
-+++ linux-2.6/arch/powerpc/kernel/signal_32.c
-@@ -24,6 +24,7 @@
- #include <linux/signal.h>
- #include <linux/errno.h>
- #include <linux/elf.h>
-+#include <linux/tracehook.h>
- #ifdef CONFIG_PPC64
- #include <linux/syscalls.h>
- #include <linux/compat.h>
-@@ -1225,6 +1226,8 @@ no_signal:
- its frame, and we can clear the TIF_RESTORE_SIGMASK flag */
- if (test_thread_flag(TIF_RESTORE_SIGMASK))
- clear_thread_flag(TIF_RESTORE_SIGMASK);
-+
-+ tracehook_report_handle_signal(signr, &ka, oldset, regs);
- }
-
- return ret;
--- linux-2.6/arch/arm26/kernel/ptrace.c
+++ linux-2.6/arch/arm26/kernel/ptrace.c
-@@ -652,30 +652,16 @@ asmlinkage void syscall_trace(int why, s
+@@ -641,30 +641,16 @@ asmlinkage void syscall_trace(int why, s
{
unsigned long ip;
@@ -1688,7 +1591,7 @@
--- linux-2.6/arch/sparc64/kernel/process.c
+++ linux-2.6/arch/sparc64/kernel/process.c
-@@ -819,9 +819,6 @@ asmlinkage int sparc_execve(struct pt_re
+@@ -830,9 +830,6 @@ asmlinkage int sparc_execve(struct pt_re
current_thread_info()->xfsr[0] = 0;
current_thread_info()->fpsaved[0] = 0;
regs->tstate &= ~TSTATE_PEF;
@@ -1802,7 +1705,7 @@
#include <linux/profile.h>
#include <linux/signalfd.h>
#include <linux/mount.h>
-@@ -154,11 +154,12 @@ void release_task(struct task_struct * p
+@@ -156,11 +156,12 @@ void release_task(struct task_struct * p
{
struct task_struct *leader;
int zap_leader;
@@ -1817,7 +1720,7 @@
__exit_signal(p);
/*
-@@ -167,10 +168,14 @@ repeat:
+@@ -169,10 +170,14 @@ repeat:
* group leader's parent process. (if it wants notification.)
*/
zap_leader = 0;
@@ -1833,7 +1736,22 @@
/*
* If we were the last child thread and the leader has
* exited already, and the leader's parent ignores SIGCHLD,
-@@ -190,6 +195,13 @@ repeat:
+@@ -182,6 +187,14 @@ repeat:
+ * that case.
+ */
+ zap_leader = (leader->exit_signal == -1);
++ if (zap_leader) {
++ /*
++ * Preserve the invariant that release_task()
++ * can only be called on a task in EXIT_DEAD.
++ */
++ zap_leader = xchg(&leader->exit_state, EXIT_DEAD);
++ BUG_ON(zap_leader != EXIT_ZOMBIE);
++ }
+ }
+
+ write_unlock_irq(&tasklist_lock);
+@@ -192,6 +205,13 @@ repeat:
p = leader;
if (unlikely(zap_leader))
goto repeat;
@@ -1847,7 +1765,7 @@
}
/*
-@@ -229,10 +241,10 @@ static int will_become_orphaned_pgrp(str
+@@ -231,10 +251,10 @@ static int will_become_orphaned_pgrp(str
do_each_pid_task(pgrp, PIDTYPE_PGID, p) {
if (p == ignored_task
|| p->exit_state
@@ -1861,7 +1779,7 @@
ret = 0;
break;
}
-@@ -281,10 +293,9 @@ static void reparent_to_kthreadd(void)
+@@ -283,10 +303,9 @@ static void reparent_to_kthreadd(void)
{
write_lock_irq(&tasklist_lock);
@@ -1873,7 +1791,7 @@
add_parent(current);
/* Set the exit signal to SIGCHLD so we signal init on exit */
-@@ -600,45 +611,23 @@ choose_new_parent(struct task_struct *p,
+@@ -609,45 +628,23 @@ choose_new_parent(struct task_struct *p,
* the parent is not a zombie.
*/
BUG_ON(p == reaper || reaper->exit_state);
@@ -1923,7 +1841,7 @@
return;
/* We don't want people slaying init. */
-@@ -648,7 +637,8 @@ reparent_thread(struct task_struct *p, s
+@@ -657,7 +654,8 @@ reparent_thread(struct task_struct *p, s
/* If we'd notified the old parent about this child's death,
* also notify the new parent.
*/
@@ -1933,7 +1851,7 @@
p->exit_signal != -1 && thread_group_empty(p))
do_notify_parent(p, p->exit_signal);
-@@ -678,7 +668,7 @@ reparent_thread(struct task_struct *p, s
+@@ -687,7 +685,7 @@ reparent_thread(struct task_struct *p, s
* space.
*/
static void
@@ -1942,7 +1860,7 @@
{
struct task_struct *p, *reaper = father;
struct list_head *_p, *_n;
-@@ -691,48 +681,10 @@ forget_original_parent(struct task_struc
+@@ -700,48 +698,10 @@ forget_original_parent(struct task_struc
}
} while (reaper->exit_state);
@@ -1992,7 +1910,7 @@
}
}
-@@ -744,8 +696,9 @@ static void exit_notify(struct task_stru
+@@ -753,8 +713,9 @@ static void exit_notify(struct task_stru
{
int state;
struct task_struct *t;
@@ -2003,7 +1921,7 @@
if (signal_pending(tsk) && !(tsk->signal->flags & SIGNAL_GROUP_EXIT)
&& !thread_group_empty(tsk)) {
-@@ -778,10 +731,8 @@ static void exit_notify(struct task_stru
+@@ -787,10 +748,8 @@ static void exit_notify(struct task_stru
* jobs, send them a SIGHUP and then a SIGCONT. (POSIX 3.2.2.2)
*/
@@ -2015,7 +1933,7 @@
/*
* Check to see if any process groups have become orphaned
-@@ -793,7 +744,7 @@ static void exit_notify(struct task_stru
+@@ -802,7 +761,7 @@ static void exit_notify(struct task_stru
* is about to become orphaned.
*/
@@ -2024,7 +1942,7 @@
pgrp = task_pgrp(tsk);
if ((task_pgrp(t) != pgrp) &&
-@@ -826,32 +777,18 @@ static void exit_notify(struct task_stru
+@@ -835,32 +794,18 @@ static void exit_notify(struct task_stru
&& !capable(CAP_KILL))
tsk->exit_signal = SIGCHLD;
@@ -2062,7 +1980,7 @@
/* If the process is dead, release it - nobody will wait for it */
if (state == EXIT_DEAD)
-@@ -879,10 +816,7 @@ fastcall NORET_TYPE void do_exit(long co
+@@ -916,10 +861,7 @@ fastcall NORET_TYPE void do_exit(long co
}
@@ -2074,7 +1992,7 @@
/*
* We're taking recursive faults here in do_exit. Safest is to just
-@@ -1076,10 +1010,9 @@ static int eligible_child(pid_t pid, int
+@@ -1116,10 +1058,9 @@ static int eligible_child(pid_t pid, int
}
/*
@@ -2087,7 +2005,7 @@
return 0;
/* Wait for all children (clone and not) if __WALL is set;
-@@ -1151,7 +1084,7 @@ static int wait_task_zombie(struct task_
+@@ -1191,7 +1132,7 @@ static int wait_task_zombie(struct task_
if (unlikely(p->exit_state != EXIT_ZOMBIE))
return 0;
@@ -2096,7 +2014,7 @@
return 0;
get_task_struct(p);
read_unlock(&tasklist_lock);
-@@ -1175,15 +1108,9 @@ static int wait_task_zombie(struct task_
+@@ -1215,15 +1156,9 @@ static int wait_task_zombie(struct task_
BUG_ON(state != EXIT_DEAD);
return 0;
}
@@ -2114,7 +2032,7 @@
struct signal_struct *psig;
struct signal_struct *sig;
-@@ -1271,28 +1198,8 @@ static int wait_task_zombie(struct task_
+@@ -1311,28 +1246,8 @@ static int wait_task_zombie(struct task_
return retval;
}
retval = p->pid;
@@ -2145,7 +2063,7 @@
BUG_ON(!retval);
return retval;
}
-@@ -1311,7 +1218,7 @@ static int wait_task_stopped(struct task
+@@ -1351,7 +1266,7 @@ static int wait_task_stopped(struct task
if (!p->exit_code)
return 0;
@@ -2154,7 +2072,7 @@
p->signal && p->signal->group_stop_count > 0)
/*
* A group stop is in progress and this is the group leader.
-@@ -1332,14 +1239,13 @@ static int wait_task_stopped(struct task
+@@ -1372,14 +1287,13 @@ static int wait_task_stopped(struct task
if (unlikely(noreap)) {
pid_t pid = p->pid;
uid_t uid = p->uid;
@@ -2171,7 +2089,7 @@
infop, ru);
}
-@@ -1395,9 +1301,7 @@ bail_ref:
+@@ -1435,9 +1349,7 @@ bail_ref:
if (!retval && infop)
retval = put_user(0, &infop->si_errno);
if (!retval && infop)
@@ -2182,7 +2100,7 @@
if (!retval && infop)
retval = put_user(exit_code, &infop->si_status);
if (!retval && infop)
-@@ -1465,22 +1369,6 @@ static int wait_task_continued(struct ta
+@@ -1505,22 +1417,6 @@ static int wait_task_continued(struct ta
}
@@ -2205,7 +2123,7 @@
static long do_wait(pid_t pid, int options, struct siginfo __user *infop,
int __user *stat_addr, struct rusage __user *ru)
{
-@@ -1520,26 +1408,17 @@ repeat:
+@@ -1560,26 +1456,17 @@ repeat:
switch (p->state) {
case TASK_TRACED:
@@ -2236,7 +2154,7 @@
continue;
retval = wait_task_stopped(p, ret == 2,
(options & WNOWAIT),
-@@ -1564,6 +1443,10 @@ repeat:
+@@ -1604,6 +1491,10 @@ repeat:
goto check_continued;
if (!likely(options & WEXITED))
continue;
@@ -2247,7 +2165,7 @@
retval = wait_task_zombie(
p, (options & WNOWAIT),
infop, stat_addr, ru);
-@@ -1580,6 +1463,8 @@ check_continued:
+@@ -1620,6 +1511,8 @@ check_continued:
flag = 1;
if (!unlikely(options & WCONTINUED))
continue;
@@ -2256,7 +2174,7 @@
retval = wait_task_continued(
p, (options & WNOWAIT),
infop, stat_addr, ru);
-@@ -1589,14 +1474,7 @@ check_continued:
+@@ -1629,14 +1522,7 @@ check_continued:
}
}
if (!flag) {
@@ -2272,7 +2190,7 @@
}
if (options & __WNOTHREAD)
break;
-@@ -1623,7 +1501,7 @@ end:
+@@ -1663,7 +1549,7 @@ end:
remove_wait_queue(¤t->signal->wait_chldexit,&wait);
if (infop) {
if (retval > 0)
@@ -2391,7 +2309,15 @@
}
static int may_attach(struct task_struct *task)
-@@ -168,65 +82,18 @@ int ptrace_attach(struct task_struct *ta
+@@ -161,7 +75,6 @@ int ptrace_may_attach(struct task_struct
+ int ptrace_attach(struct task_struct *task)
+ {
+ int retval;
+- unsigned long flags;
+
+ audit_ptrace(task);
+
+@@ -169,63 +82,18 @@ int ptrace_attach(struct task_struct *ta
if (task->pid <= 1)
goto out;
if (task->tgid == current->tgid)
@@ -2408,9 +2334,7 @@
- * cpu's that may have task_lock).
- */
- task_lock(task);
-- local_irq_disable();
-- if (!write_trylock(&tasklist_lock)) {
-- local_irq_enable();
+- if (!write_trylock_irqsave(&tasklist_lock, flags)) {
- task_unlock(task);
- do {
- cpu_relax();
@@ -2439,7 +2363,7 @@
+ retval = -ENOSYS;
bad:
-- write_unlock_irq(&tasklist_lock);
+- write_unlock_irqrestore(&tasklist_lock, flags);
- task_unlock(task);
out:
return retval;
@@ -2458,7 +2382,7 @@
int ptrace_detach(struct task_struct *child, unsigned int data)
{
if (!valid_signal(data))
-@@ -235,13 +102,10 @@ int ptrace_detach(struct task_struct *ch
+@@ -234,13 +102,10 @@ int ptrace_detach(struct task_struct *ch
/* Architecture-specific hardware disable .. */
ptrace_disable(child);
@@ -2475,7 +2399,7 @@
}
int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len)
-@@ -294,103 +158,10 @@ int ptrace_writedata(struct task_struct
+@@ -293,103 +158,10 @@ int ptrace_writedata(struct task_struct
return copied;
}
@@ -2580,7 +2504,7 @@
}
/**
-@@ -403,20 +174,11 @@ int ptrace_traceme(void)
+@@ -402,20 +174,11 @@ int ptrace_traceme(void)
{
int ret = -EPERM;
@@ -2606,7 +2530,7 @@
}
/**
-@@ -453,41 +215,6 @@ struct task_struct *ptrace_get_task_stru
+@@ -452,42 +215,7 @@ struct task_struct *ptrace_get_task_stru
#ifndef __ARCH_SYS_PTRACE
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
{
@@ -2649,9 +2573,10 @@
+ return -ENOSYS;
}
#endif /* __ARCH_SYS_PTRACE */
+
--- linux-2.6/kernel/timer.c
+++ linux-2.6/kernel/timer.c
-@@ -943,9 +943,9 @@ asmlinkage long sys_getpid(void)
+@@ -957,9 +957,9 @@ asmlinkage long sys_getpid(void)
}
/*
@@ -2663,7 +2588,7 @@
* release_task()->call_rcu(delayed_put_task_struct).
*/
asmlinkage long sys_getppid(void)
-@@ -953,7 +953,7 @@ asmlinkage long sys_getppid(void)
+@@ -967,7 +967,7 @@ asmlinkage long sys_getppid(void)
int pid;
rcu_read_lock();
@@ -2730,7 +2655,7 @@
/*
* Handle magic process-wide effects of stop/continue signals.
-@@ -852,7 +849,7 @@ __group_complete_signal(int sig, struct
+@@ -883,7 +880,7 @@ __group_complete_signal(int sig, struct
*/
if (sig_fatal(p, sig) && !(p->signal->flags & SIGNAL_GROUP_EXIT) &&
!sigismember(&t->real_blocked, sig) &&
@@ -2739,7 +2664,7 @@
/*
* This signal will be fatal to the whole group.
*/
-@@ -1407,8 +1404,7 @@ void do_notify_parent(struct task_struct
+@@ -1438,8 +1435,7 @@ void do_notify_parent(struct task_struct
/* do_notify_parent_cldstop should have been called instead. */
BUG_ON(tsk->state & (TASK_STOPPED|TASK_TRACED));
@@ -2749,7 +2674,7 @@
info.si_signo = sig;
info.si_errno = 0;
-@@ -1433,7 +1429,7 @@ void do_notify_parent(struct task_struct
+@@ -1464,7 +1460,7 @@ void do_notify_parent(struct task_struct
psig = tsk->parent->sighand;
spin_lock_irqsave(&psig->siglock, flags);
@@ -2758,7 +2683,7 @@
(psig->action[SIGCHLD-1].sa.sa_handler == SIG_IGN ||
(psig->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDWAIT))) {
/*
-@@ -1461,20 +1457,13 @@ void do_notify_parent(struct task_struct
+@@ -1492,20 +1488,13 @@ void do_notify_parent(struct task_struct
spin_unlock_irqrestore(&psig->siglock, flags);
}
@@ -2780,7 +2705,7 @@
info.si_signo = SIGCHLD;
info.si_errno = 0;
info.si_pid = tsk->pid;
-@@ -1499,6 +1488,15 @@ static void do_notify_parent_cldstop(str
+@@ -1530,6 +1519,15 @@ static void do_notify_parent_cldstop(str
BUG();
}
@@ -2796,7 +2721,7 @@
sighand = parent->sighand;
spin_lock_irqsave(&sighand->siglock, flags);
if (sighand->action[SIGCHLD-1].sa.sa_handler != SIG_IGN &&
-@@ -1511,111 +1509,6 @@ static void do_notify_parent_cldstop(str
+@@ -1542,111 +1540,6 @@ static void do_notify_parent_cldstop(str
spin_unlock_irqrestore(&sighand->siglock, flags);
}
@@ -2908,7 +2833,7 @@
static void
finish_stop(int stop_count)
{
-@@ -1624,7 +1517,7 @@ finish_stop(int stop_count)
+@@ -1655,7 +1548,7 @@ finish_stop(int stop_count)
* a group stop in progress and we are the last to stop,
* report to the parent. When ptraced, every thread reports itself.
*/
@@ -2917,7 +2842,7 @@
read_lock(&tasklist_lock);
do_notify_parent_cldstop(current, CLD_STOPPED);
read_unlock(&tasklist_lock);
-@@ -1751,44 +1644,24 @@ relock:
+@@ -1782,44 +1675,24 @@ relock:
handle_group_stop())
goto relock;
@@ -2978,7 +2903,7 @@
if (ka->sa.sa_handler == SIG_IGN) /* Do nothing. */
continue;
if (ka->sa.sa_handler != SIG_DFL) {
-@@ -1837,7 +1710,7 @@ relock:
+@@ -1868,7 +1741,7 @@ relock:
spin_lock_irq(¤t->sighand->siglock);
}
@@ -2987,7 +2912,7 @@
/* It released the siglock. */
goto relock;
}
-@@ -1864,13 +1737,13 @@ relock:
+@@ -1897,13 +1770,13 @@ relock:
* first and our do_group_exit call below will use
* that value and ignore the one we pass it.
*/
@@ -3003,7 +2928,7 @@
/* NOTREACHED */
}
spin_unlock_irq(¤t->sighand->siglock);
-@@ -1882,7 +1755,6 @@ EXPORT_SYMBOL_GPL(dequeue_signal);
+@@ -1915,7 +1788,6 @@ EXPORT_SYMBOL_GPL(dequeue_signal);
EXPORT_SYMBOL(flush_signals);
EXPORT_SYMBOL(force_sig);
EXPORT_SYMBOL(kill_proc);
@@ -3024,7 +2949,7 @@
stats->ac_stime = cputime_to_msecs(tsk->stime) * USEC_PER_MSEC;
--- linux-2.6/kernel/sys.c
+++ linux-2.6/kernel/sys.c
-@@ -1456,7 +1456,7 @@ asmlinkage long sys_setpgid(pid_t pid, p
+@@ -1467,7 +1467,7 @@ asmlinkage long sys_setpgid(pid_t pid, p
if (!thread_group_leader(p))
goto out;
@@ -3044,9 +2969,9 @@
#include <linux/mount.h>
#include <linux/audit.h>
#include <linux/profile.h>
-@@ -922,8 +922,7 @@ static inline void copy_flags(unsigned l
+@@ -927,8 +927,7 @@ static inline void copy_flags(unsigned l
- new_flags &= ~(PF_SUPERPRIV | PF_NOFREEZE);
+ new_flags &= ~PF_SUPERPRIV;
new_flags |= PF_FORKNOEXEC;
- if (!(clone_flags & CLONE_PTRACE))
- p->ptrace = 0;
@@ -3054,7 +2979,7 @@
p->flags = new_flags;
}
-@@ -1173,8 +1172,6 @@ static struct task_struct *copy_process(
+@@ -1180,8 +1179,6 @@ static struct task_struct *copy_process(
*/
p->group_leader = p;
INIT_LIST_HEAD(&p->thread_group);
@@ -3063,7 +2988,7 @@
/* Perform scheduler related setup. Assign this task to a CPU. */
sched_fork(p, clone_flags);
-@@ -1201,10 +1198,9 @@ static struct task_struct *copy_process(
+@@ -1208,10 +1205,9 @@ static struct task_struct *copy_process(
/* CLONE_PARENT re-uses the old parent */
if (clone_flags & (CLONE_PARENT|CLONE_THREAD))
@@ -3076,7 +3001,7 @@
spin_lock(¤t->sighand->siglock);
-@@ -1246,8 +1242,7 @@ static struct task_struct *copy_process(
+@@ -1253,8 +1249,7 @@ static struct task_struct *copy_process(
if (likely(p->pid)) {
add_parent(p);
@@ -3086,7 +3011,7 @@
if (thread_group_leader(p)) {
p->signal->tty = current->signal->tty;
-@@ -1331,22 +1326,6 @@ struct task_struct * __cpuinit fork_idle
+@@ -1338,22 +1333,6 @@ struct task_struct * __cpuinit fork_idle
return task;
}
@@ -3109,7 +3034,7 @@
/*
* Ok, this is the main fork-routine.
*
-@@ -1361,18 +1340,12 @@ long do_fork(unsigned long clone_flags,
+@@ -1368,18 +1347,12 @@ long do_fork(unsigned long clone_flags,
int __user *child_tidptr)
{
struct task_struct *p;
@@ -3128,7 +3053,7 @@
p = copy_process(clone_flags, stack_start, regs, stack_size, parent_tidptr, child_tidptr, pid);
/*
-@@ -1380,6 +1353,10 @@ long do_fork(unsigned long clone_flags,
+@@ -1387,6 +1360,10 @@ long do_fork(unsigned long clone_flags,
* might get invalid after that point, if the thread exits quickly.
*/
if (!IS_ERR(p)) {
@@ -3139,7 +3064,7 @@
struct completion vfork;
if (clone_flags & CLONE_VFORK) {
-@@ -1387,32 +1364,31 @@ long do_fork(unsigned long clone_flags,
+@@ -1394,32 +1371,31 @@ long do_fork(unsigned long clone_flags,
init_completion(&vfork);
}
@@ -3217,12 +3142,12 @@
- __ptrace_unlink(child);
-}
-
+ int generic_ptrace_peekdata(struct task_struct *tsk, long addr, long data);
+ int generic_ptrace_pokedata(struct task_struct *tsk, long addr, long data);
- #ifndef force_successful_syscall_return
- /*
--- linux-2.6/include/linux/sched.h
+++ linux-2.6/include/linux/sched.h
-@@ -893,7 +893,6 @@ struct task_struct {
+@@ -920,7 +920,6 @@ struct task_struct {
void *stack;
atomic_t usage;
unsigned int flags; /* per process flags, defined below */
@@ -3230,7 +3155,7 @@
int lock_depth; /* BKL lock depth */
-@@ -922,12 +921,6 @@ struct task_struct {
+@@ -949,12 +948,6 @@ struct task_struct {
#endif
struct list_head tasks;
@@ -3243,7 +3168,7 @@
struct mm_struct *mm, *active_mm;
-@@ -947,15 +940,13 @@ struct task_struct {
+@@ -974,15 +967,13 @@ struct task_struct {
unsigned long stack_canary;
#endif
/*
@@ -3261,7 +3186,7 @@
*/
struct list_head children; /* list of my children */
struct list_head sibling; /* linkage in my parent's children list */
-@@ -1094,8 +1085,6 @@ struct task_struct {
+@@ -1122,8 +1113,6 @@ struct task_struct {
struct io_context *io_context;
@@ -3270,7 +3195,7 @@
/*
* current io wait handle: wait queue entry to use for io waits
* If this thread is processing aio, this points at the waitqueue
-@@ -1465,6 +1454,7 @@ extern int kill_pgrp(struct pid *pid, in
+@@ -1500,6 +1489,7 @@ extern int kill_pgrp(struct pid *pid, in
extern int kill_pid(struct pid *pid, int sig, int priv);
extern int kill_proc_info(int, struct siginfo *, pid_t);
extern void do_notify_parent(struct task_struct *, int);
@@ -3280,7 +3205,7 @@
extern int send_sig(int, struct task_struct *, int);
--- linux-2.6/include/linux/init_task.h
+++ linux-2.6/include/linux/init_task.h
-@@ -133,9 +133,6 @@ extern struct group_info init_groups;
+@@ -135,9 +135,6 @@ extern struct group_info init_groups;
.ioprio = 0, \
.time_slice = HZ, \
.tasks = LIST_HEAD_INIT(tsk.tasks), \
@@ -3772,15 +3697,15 @@
#define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */
#define TIF_SECCOMP 8 /* secure computing */
#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */
-@@ -137,6 +136,7 @@ static inline struct thread_info *curren
- #define TIF_DEBUG 17 /* uses debug registers */
+@@ -138,6 +137,7 @@ static inline struct thread_info *curren
#define TIF_IO_BITMAP 18 /* uses I/O bitmap */
#define TIF_FREEZE 19 /* is freezing for suspend */
-+#define TIF_FORCED_TF 20 /* true if TF in eflags artificially */
+ #define TIF_NOTSC 20 /* TSC is not accessible in userland */
++#define TIF_FORCED_TF 21 /* true if TF in eflags artificially */
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
-@@ -144,18 +144,17 @@ static inline struct thread_info *curren
+@@ -145,7 +145,6 @@ static inline struct thread_info *curren
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP)
#define _TIF_IRET (1<<TIF_IRET)
@@ -3788,9 +3713,10 @@
#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)
#define _TIF_SECCOMP (1<<TIF_SECCOMP)
#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
- #define _TIF_DEBUG (1<<TIF_DEBUG)
+@@ -153,11 +152,11 @@ static inline struct thread_info *curren
#define _TIF_IO_BITMAP (1<<TIF_IO_BITMAP)
#define _TIF_FREEZE (1<<TIF_FREEZE)
+ #define _TIF_NOTSC (1<<TIF_NOTSC)
+#define _TIF_FORCED_TF (1<<TIF_FORCED_TF)
/* work to do on interrupt/exception return */
@@ -3817,7 +3743,7 @@
#endif /* __KERNEL__ */
--- linux-2.6/include/asm-powerpc/tracehook.h
+++ linux-2.6/include/asm-powerpc/tracehook.h
-@@ -0,0 +1,74 @@
+@@ -0,0 +1,49 @@
+/*
+ * Tracing hooks, PowerPC CPU support
+ *
@@ -3842,33 +3768,8 @@
+
+#define ARCH_HAS_SINGLE_STEP (1)
+
-+static inline void tracehook_enable_single_step(struct task_struct *task)
-+{
-+ struct pt_regs *regs = task->thread.regs;
-+ if (regs != NULL) {
-+#if defined(CONFIG_PPC32) && (defined(CONFIG_40x) || defined(CONFIG_BOOKE))
-+ task->thread.dbcr0 = DBCR0_IDM | DBCR0_IC;
-+ regs->msr |= MSR_DE;
-+#else
-+ regs->msr |= MSR_SE;
-+#endif
-+ }
-+ set_tsk_thread_flag(task, TIF_SINGLESTEP);
-+}
-+
-+static inline void tracehook_disable_single_step(struct task_struct *task)
-+{
-+ struct pt_regs *regs = task->thread.regs;
-+ if (regs != NULL) {
-+#if defined(CONFIG_PPC32) && (defined(CONFIG_40x) || defined(CONFIG_BOOKE))
-+ task->thread.dbcr0 = 0;
-+ regs->msr &= ~MSR_DE;
-+#else
-+ regs->msr &= ~MSR_SE;
-+#endif
-+ }
-+ clear_tsk_thread_flag(task, TIF_SINGLESTEP);
-+}
++void tracehook_enable_single_step(struct task_struct *task);
++void tracehook_disable_single_step(struct task_struct *task);
+
+static inline int tracehook_single_step_enabled(struct task_struct *tsk)
+{
@@ -3887,7 +3788,7 @@
+
+static inline void tracehook_abort_syscall(struct pt_regs *regs)
+{
-+ regs->orig_gpr3 = -1L;
++ regs->gpr[0] = -1L;
+}
+
+
@@ -3989,7 +3890,7 @@
#include <linux/blkdev.h>
#include <linux/backing-dev.h>
#include <linux/mount.h>
-@@ -682,7 +682,7 @@ static unsigned long determine_vm_flags(
+@@ -687,7 +687,7 @@ static unsigned long determine_vm_flags(
* it's being traced - otherwise breakpoints set in it may interfere
* with another untraced process
*/
linux-2.6-x86_64-vdso.patch:
Index: linux-2.6-x86_64-vdso.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-x86_64-vdso.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-x86_64-vdso.patch 4 Jul 2007 18:03:59 -0000 1.2
+++ linux-2.6-x86_64-vdso.patch 20 Jul 2007 19:52:27 -0000 1.3
@@ -792,16 +792,16 @@
write_sequnlock_irqrestore(&vsyscall_gtod_data.lock, flags);
}
---- linux-2.6.21.noarch/arch/x86_64/kernel/time.c~ 2007-07-04 13:58:26.000000000 -0400
-+++ linux-2.6.21.noarch/arch/x86_64/kernel/time.c 2007-07-04 13:58:49.000000000 -0400
-@@ -45,6 +45,7 @@
+--- linux-2.6.22.noarch/arch/x86_64/kernel/time.c~ 2007-07-20 13:46:40.000000000 -0400
++++ linux-2.6.22.noarch/arch/x86_64/kernel/time.c 2007-07-20 13:46:45.000000000 -0400
+@@ -44,6 +44,7 @@
#include <asm/hpet.h>
#include <asm/mpspec.h>
#include <asm/nmi.h>
+#include <asm/vgtod.h>
- #include <asm/delay.h>
- DEFINE_SPINLOCK(rtc_lock);
+ static char *timename = NULL;
+
Index: linux/include/asm-x86_64/vgtod.h
===================================================================
--- /dev/null
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/sources,v
retrieving revision 1.616
retrieving revision 1.617
diff -u -r1.616 -r1.617
--- sources 16 Jul 2007 13:53:58 -0000 1.616
+++ sources 20 Jul 2007 19:52:27 -0000 1.617
@@ -1,2 +1,2 @@
2e230d005c002fb3d38a3ca07c0200d0 linux-2.6.22.tar.bz2
-1fa6a7235ea9513f17216230026bd358 patch-2.6.22-git6.bz2
+c0d13c7f0685ad329996d04ae92ded94 patch-2.6.22-git14.bz2
Index: upstream
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/upstream,v
retrieving revision 1.538
retrieving revision 1.539
diff -u -r1.538 -r1.539
--- upstream 16 Jul 2007 13:53:58 -0000 1.538
+++ upstream 20 Jul 2007 19:52:27 -0000 1.539
@@ -1,2 +1,2 @@
linux-2.6.22.tar.bz2
-patch-2.6.22-git6.bz2
+patch-2.6.22-git14.bz2
--- linux-2.6-debug-extra-warnings.patch DELETED ---
--- linux-2.6-debug-must_check.patch DELETED ---
--- linux-2.6-debug-slub-debug.patch DELETED ---
--- linux-2.6-kvm-suspend.patch DELETED ---
--- linux-2.6-softlockup-disable.patch DELETED ---
--- patch-2.6.22-git6.bz2.sign DELETED ---
More information about the fedora-extras-commits
mailing list