[kernel/f16] Bring in Linux-3.1-rc2

Josh Boyer jwboyer at fedoraproject.org
Tue Aug 16 15:47:56 UTC 2011


commit 9765980dfcba8e290b18190f68928ca3e9b8d6c8
Author: Josh Boyer <jwboyer at redhat.com>
Date:   Tue Aug 16 10:32:18 2011 -0400

    Bring in Linux-3.1-rc2

 Makefile.config                                    |   18 +-
 add-appleir-usb-driver.patch                       |    5 +-
 config-arm-generic                                 |    5 +-
 config-arm-omap-generic                            |    9 +
 config-debug                                       |    2 +
 config-generic                                     |   53 +-
 config-ia64-generic                                |    1 +
 config-nodebug                                     |    2 +
 config-powerpc-generic                             |    7 +
 config-powerpc64                                   |    6 +
 config-s390x                                       |    1 -
 config-sparc64-generic                             |    2 -
 config-x86-32-generic                              |  206 ++
 config-x86-generic                                 |  279 +--
 config-x86_64-generic                              |  375 +---
 dmar-disable-when-ricoh-multifunction.patch        |    4 +-
 epoll-fix-spurious-lockdep-warnings.patch          |    2 +-
 fix-cdc-ncm-dma-stack-vars.patch                   |   97 +-
 hda_intel-prealloc-4mb-dmabuffer.patch             |   47 -
 ...ure-bio-requests-are-not-smaller-than-the.patch |  315 --
 kernel.spec                                        |   33 +-
 linux-2.6-crash-driver.patch                       |   61 +-
 linux-2.6-intel-iommu-igfx.patch                   |    4 +-
 linux-2.6-silence-noise.patch                      |    4 +-
 ...1rw-fix-invalid-signal-values-from-device.patch |   82 -
 linux-2.6.30-no-pcspkr-modalias.patch              |   13 +-
 rcu-avoid-just-onlined-cpu-resched.patch           |   47 +
 sources                                            |    2 +-
 ums-realtek-driver-uses-stack-memory-for-DMA.patch |   89 +-
 utrace.patch                                       | 3045 ++++++++++++--------
 30 files changed, 2512 insertions(+), 2304 deletions(-)
---
diff --git a/Makefile.config b/Makefile.config
index 35060e3..0e71c35 100644
--- a/Makefile.config
+++ b/Makefile.config
@@ -39,16 +39,22 @@ temp-arm-generic: config-arm-generic temp-generic
 temp-armv7l-omap-generic: config-arm-omap-generic temp-arm-generic
 	perl merge.pl $^  > $@
 
-temp-x86-generic: config-x86-generic temp-generic
+temp-x86-32: config-x86-32-generic config-x86-generic
 	perl merge.pl $^  > $@
 
-temp-x86-debug-generic: config-x86-generic temp-debug-generic
+temp-x86-32-generic: temp-x86-32 temp-generic
 	perl merge.pl $^  > $@
 
-temp-x86_64-generic: config-x86_64-generic temp-generic
+temp-x86-debug-generic: temp-x86-32 temp-debug-generic
 	perl merge.pl $^  > $@
 
-temp-x86_64-debug-generic: config-x86_64-generic temp-debug-generic
+temp-x86-64: config-x86_64-generic config-x86-generic
+	perl merge.pl $^  > $@
+
+temp-x86_64-generic: temp-x86-64 temp-generic
+	perl merge.pl $^  > $@
+
+temp-x86_64-debug-generic: temp-x86-64 temp-debug-generic
 	perl merge.pl $^  > $@
 
 temp-sparc64-generic: config-sparc64-generic temp-generic
@@ -69,13 +75,13 @@ temp-s390-generic: config-s390x temp-generic
 temp-ia64-generic: config-ia64-generic temp-generic
 	perl merge.pl $^ > $@
 
-kernel-$(VERSION)-i686-PAE.config: config-i686-PAE temp-x86-generic
+kernel-$(VERSION)-i686-PAE.config: config-i686-PAE temp-x86-32-generic
 	perl merge.pl $^ i386 > $@
 
 kernel-$(VERSION)-i686-PAEdebug.config: config-i686-PAE temp-x86-debug-generic
 	perl merge.pl $^ i386 > $@
 
-kernel-$(VERSION)-i686.config: /dev/null temp-x86-generic
+kernel-$(VERSION)-i686.config: /dev/null temp-x86-32-generic
 	perl merge.pl $^ i386 > $@
 
 kernel-$(VERSION)-i686-debug.config: /dev/null temp-x86-debug-generic
diff --git a/add-appleir-usb-driver.patch b/add-appleir-usb-driver.patch
index 26477cc..0ab0ed6 100644
--- a/add-appleir-usb-driver.patch
+++ b/add-appleir-usb-driver.patch
@@ -140,9 +140,8 @@ diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
 index 60de906..2f2f2e7 100644
 --- a/drivers/input/misc/Kconfig
 +++ b/drivers/input/misc/Kconfig
-@@ -209,6 +209,19 @@ config INPUT_KEYSPAN_REMOTE
- 	  To compile this driver as a module, choose M here: the module will
- 	  be called keyspan_remote.
+ 	help
+ 	  Say Y here if you need accelerometer to work in polling mode.
  
 +config INPUT_APPLEIR
 +	tristate "Apple infrared receiver (built in)"
diff --git a/config-arm-generic b/config-arm-generic
index 5b79fe2..dec4241 100644
--- a/config-arm-generic
+++ b/config-arm-generic
@@ -9,6 +9,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_ARCH_VERSATILE=y
 CONFIG_ARCH_VERSATILE_PB=y
 CONFIG_MACH_VERSATILE_AB=y
+CONFIG_MACH_VERSATILE_DT=y
 
 CONFIG_HIGHMEM=y
 # CONFIG_HIGHPTE is not set
@@ -146,6 +147,8 @@ CONFIG_USE_OF=y
 CONFIG_PROC_DEVICETREE=y
 CONFIG_MTD_PHYSMAP_OF=m
 CONFIG_SERIAL_OF_PLATFORM=m
-# CONFIG_LEDS_GPIO_OF is not set
 CONFIG_MMC_SDHCI_OF=m
+CONFIG_MMC_SDHCI_PXAV3=m
+CONFIG_MMC_SDHCI_PXAV2=m
 
+CONFIG_FTGMAC100=m
diff --git a/config-arm-omap-generic b/config-arm-omap-generic
index 34b5389..df7ab06 100644
--- a/config-arm-omap-generic
+++ b/config-arm-omap-generic
@@ -275,6 +275,7 @@ CONFIG_TI_DAC7512=m
 CONFIG_BMP085=m
 CONFIG_C2PORT=m
 CONFIG_EEPROM_AT25=m
+CONFIG_EEPROM_93XX46=m
 # CONFIG_IWMC3200TOP_DEBUGFS is not set
 # CONFIG_SCSI_PROC_FS is not set
 # CONFIG_BLK_DEV_SR_VENDOR is not set
@@ -387,6 +388,7 @@ CONFIG_INPUT_AD714X_SPI=m
 # CONFIG_INPUT_APPLEIR is not set
 CONFIG_INPUT_TWL4030_PWRBUTTON=y
 CONFIG_INPUT_TWL4030_VIBRA=y
+CONFIG_INPUT_TWL6040_VIBRA=y
 CONFIG_INPUT_UINPUT=y
 # CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set
 CONFIG_INPUT_ADXL34X=m
@@ -445,6 +447,7 @@ CONFIG_ARCH_REQUIRE_GPIOLIB=y
 CONFIG_GPIOLIB=y
 # CONFIG_DEBUG_GPIO is not set
 CONFIG_GPIO_SYSFS=y
+# CONFIG_GPIO_GENERIC_PLATFORM is not set
 
 #
 # Memory mapped GPIO expanders:
@@ -568,6 +571,7 @@ CONFIG_OMAP_WATCHDOG=y
 CONFIG_SSB=y
 # CONFIG_SSB_SDIOHOST is not set
 CONFIG_MFD_CORE=y
+# CONFIG_MFD_AAT2870_CORE is not set
 # CONFIG_MFD_88PM860X is not set
 # CONFIG_MFD_SM501 is not set
 # CONFIG_MFD_ASIC3 is not set
@@ -597,6 +601,8 @@ CONFIG_TWL4030_CODEC=y
 CONFIG_MFD_OMAP_USB_HOST=y
 # CONFIG_MFD_TPS6586X is not set
 # CONFIG_MFD_TPS65910 is not set
+# CONFIG_MFD_TPS65912_I2C is not set
+# CONFIG_MFD_TPS65912_SPI is not set
 # CONFIG_MFD_WL1273_CORE is not set
 CONFIG_REGULATOR=y
 # CONFIG_REGULATOR_DEBUG is not set
@@ -640,6 +646,7 @@ CONFIG_VIDEO_SAA717X=m
 CONFIG_VIDEO_SAA7127=m
 CONFIG_VIDEO_UPD64031A=m
 CONFIG_VIDEO_UPD64083=m
+CONFIG_VIDEO_ADP1653=m
 #
 # CONFIG_VIDEO_TVAUDIO is not set
 # CONFIG_VIDEO_TDA7432 is not set
@@ -736,6 +743,7 @@ CONFIG_PANEL_TPO_TD043MTEA1=y
 # CONFIG_LCD_VGG2432A4 is not set
 # CONFIG_LCD_PLATFORM is not set
 # CONFIG_LCD_S6E63M0 is not set
+# CONFIG_LCD_AMS369FG06 is not set
 CONFIG_BACKLIGHT_GENERIC=m
 CONFIG_DISPLAY_SUPPORT=y
 # CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
@@ -790,6 +798,7 @@ CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=y
 CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE=y
 CONFIG_SND_OMAP_SOC_ZOOM2=y
 CONFIG_SND_OMAP_SOC_IGEP0020=y
+CONFIG_SND_OMAP_SOC_OMAP4_HDMI=y
 CONFIG_SND_SOC_I2C_AND_SPI=y
 # CONFIG_SND_SOC_ALL_CODECS is not set
 CONFIG_SND_SOC_TLV320AIC23=y
diff --git a/config-debug b/config-debug
index 7bbaa0b..21e52bf 100644
--- a/config-debug
+++ b/config-debug
@@ -2,6 +2,8 @@ CONFIG_SND_VERBOSE_PRINTK=y
 CONFIG_SND_DEBUG=y
 CONFIG_SND_PCM_XRUN_DEBUG=y
 
+CONFIG_DEBUG_ATOMIC_SLEEP=y
+
 CONFIG_DEBUG_MUTEXES=y
 CONFIG_DEBUG_RT_MUTEXES=y
 CONFIG_DEBUG_LOCK_ALLOC=y
diff --git a/config-generic b/config-generic
index 6332764..e320aef 100644
--- a/config-generic
+++ b/config-generic
@@ -528,6 +528,7 @@ CONFIG_MEGARAID_LEGACY=m
 CONFIG_MEGARAID_SAS=m
 CONFIG_SCSI_MVSAS=m
 # CONFIG_SCSI_MVSAS_DEBUG is not set
+CONFIG_SCSI_MVSAS_TASKLET=y
 CONFIG_SCSI_MPT2SAS=m
 CONFIG_SCSI_MPT2SAS_MAX_SGE=128
 CONFIG_SCSI_MPT2SAS_LOGGING=y
@@ -734,6 +735,10 @@ CONFIG_FIREWIRE_NOSY=m
 # CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set
 
 #
+# Virtualization support drivers
+#
+# CONFIG_VIRT_DRIVERS is not set
+
 # Networking support
 #
 CONFIG_NET=y
@@ -1041,6 +1046,7 @@ CONFIG_IP_SET_HASH_IPPORTIP=m
 CONFIG_IP_SET_HASH_IPPORTNET=m
 CONFIG_IP_SET_HASH_NET=m
 CONFIG_IP_SET_HASH_NETPORT=m
+CONFIG_IP_SET_HASH_NETIFACE=m
 CONFIG_IP_SET_LIST_SET=m
 
 #
@@ -1345,6 +1351,7 @@ CONFIG_R8169=m
 CONFIG_R8169_VLAN=y
 CONFIG_SKGE=m
 # CONFIG_SKGE_DEBUG is not set
+CONFIG_SKGE_GENESIS=y
 CONFIG_TIGON3=m
 CONFIG_SKY2=m
 # CONFIG_SKY2_DEBUG is not set
@@ -1470,6 +1477,7 @@ CONFIG_ATMEL=m
 CONFIG_B43=m
 CONFIG_B43_PCMCIA=y
 CONFIG_B43_SDIO=y
+CONFIG_B43_BCMA=y
 CONFIG_B43_DEBUG=y
 CONFIG_B43_PHY_LP=y
 CONFIG_B43_PHY_N=y
@@ -1583,6 +1591,7 @@ CONFIG_WL1271_SPI=m
 CONFIG_RTL8192CE=m
 CONFIG_RTL8192SE=m
 CONFIG_RTL8192CU=m
+CONFIG_RTL8192DE=m
 
 CONFIG_MWIFIEX=m
 CONFIG_MWIFIEX_SDIO=m
@@ -1663,6 +1672,8 @@ CONFIG_BAYCOM_PAR=m
 CONFIG_BAYCOM_EPP=m
 CONFIG_YAM=m
 
+CONFIG_NFC=m
+
 #
 # IrDA (infrared) support
 #
@@ -2033,6 +2044,10 @@ CONFIG_INPUT_APPLEIR=m
 
 # CONFIG_INPUT_AD714X is not set
 # CONFIG_INPUT_PCF8574 is not set
+CONFIG_INPUT_MMA8450=m
+CONFIG_INPUT_MPU3050=m
+CONFIG_INPUT_KXTJ9=m
+# CONFIG_INPUT_KXTJ9_POLLED_MODE is not set
 
 #
 # Character devices
@@ -2229,6 +2244,7 @@ CONFIG_SENSORS_LM93=m
 CONFIG_SENSORS_LTC4245=m
 CONFIG_SENSORS_MAX1619=m
 CONFIG_SENSORS_MAX6650=m
+CONFIG_SENSORS_NTC_THERMISTOR=m
 CONFIG_SENSORS_PC87360=m
 CONFIG_SENSORS_PC87427=m
 CONFIG_SENSORS_PCF8591=m
@@ -2259,6 +2275,7 @@ CONFIG_SENSORS_W83792D=m
 CONFIG_SENSORS_W83793=m
 CONFIG_SENSORS_LTC4215=m
 CONFIG_SENSORS_LM95241=m
+CONFIG_SENSORS_LM95245=m
 CONFIG_SENSORS_TMP421=m
 CONFIG_SENSORS_WM8350=m
 CONFIG_SENSORS_WM831X=m
@@ -2282,6 +2299,7 @@ CONFIG_SENSORS_LINEAGE=m
 CONFIG_SENSORS_LTC4151=m
 CONFIG_SENSORS_MAX6639=m
 CONFIG_SENSORS_SCH5627=m
+CONFIG_SENSORS_SCH5636=m
 CONFIG_SENSORS_ADS1015=m
 CONFIG_SENSORS_MAX16065=m
 CONFIG_SENSORS_MAX6642=m
@@ -2293,13 +2311,16 @@ CONFIG_SENSORS_EMC6W201=m
 CONFIG_PMBUS=m
 CONFIG_SENSORS_PMBUS=m
 CONFIG_SENSORS_MAX16064=m
+CONFIG_SENSORS_LM25066=m
 CONFIG_SENSORS_MAX34440=m
 CONFIG_SENSORS_MAX8688=m
+CONFIG_SENSORS_MAX1668=m
 
 # CONFIG_HMC6352 is not set
 # CONFIG_BMP085 is not set
 # CONFIG_PCH_PHUB is not set
 # CONFIG_SERIAL_PCH_UART is not set
+# CONFIG_USB_SWITCH_FSA9480 is not set
 
 CONFIG_W1=m
 CONFIG_W1_CON=y
@@ -2339,6 +2360,7 @@ CONFIG_IPMI_POWEROFF=m
 # Watchdog Cards
 #
 CONFIG_WATCHDOG=y
+CONFIG_WATCHDOG_CORE=y
 # CONFIG_WATCHDOG_NOWAYOUT is not set
 CONFIG_SOFT_WATCHDOG=m
 CONFIG_WDTPCI=m
@@ -2373,6 +2395,7 @@ CONFIG_USBPCWATCHDOG=m
 CONFIG_WM8350_WATCHDOG=m
 CONFIG_WM831X_WATCHDOG=m
 # CONFIG_MAX63XX_WATCHDOG is not set
+# CONFIG_DW_WATCHDOG is not set
 
 CONFIG_HW_RANDOM=y
 CONFIG_HW_RANDOM_TIMERIOMEM=m
@@ -2524,6 +2547,7 @@ CONFIG_VIDEO_CX88_VP3054=m
 CONFIG_VIDEO_EM28XX=m
 CONFIG_VIDEO_EM28XX_ALSA=m
 CONFIG_VIDEO_EM28XX_DVB=m
+CONFIG_VIDEO_EM28XX_RC=y
 CONFIG_VIDEO_CX231XX=m
 CONFIG_VIDEO_CX231XX_ALSA=m
 CONFIG_VIDEO_CX231XX_DVB=m
@@ -2585,6 +2609,7 @@ CONFIG_MEDIA_TUNER_MT2131=m
 CONFIG_MEDIA_TUNER_QT1010=m
 CONFIG_MEDIA_TUNER_XC2028=m
 CONFIG_MEDIA_TUNER_XC5000=m
+CONFIG_MEDIA_TUNER_XC4000=m
 CONFIG_MEDIA_TUNER_MXL5005S=m
 CONFIG_MEDIA_TUNER_MXL5007T=m
 CONFIG_MEDIA_TUNER_MC44S803=m
@@ -2597,6 +2622,7 @@ CONFIG_MEDIA_TUNER_TDA18212=m
 #
 CONFIG_DVB_CAPTURE_DRIVERS=y
 CONFIG_DVB_CORE=m
+CONFIG_DVB_NET=y
 CONFIG_DVB_MAX_ADAPTERS=8
 CONFIG_DVB_DYNAMIC_MINORS=y
 
@@ -2605,6 +2631,8 @@ CONFIG_DVB_STB0899=m
 CONFIG_DVB_STB6100=m
 CONFIG_DVB_STV090x=m
 CONFIG_DVB_STV6110x=m
+CONFIG_DVB_DRXK=m
+CONFIG_DVB_TDA18271C2DD=m
 CONFIG_DVB_CX24110=m
 CONFIG_DVB_CX24123=m
 CONFIG_DVB_MT312=m
@@ -2690,6 +2718,7 @@ CONFIG_DVB_LGS8GL5=m
 CONFIG_DVB_DUMMY_FE=m
 CONFIG_DVB_FIREDTV=m
 CONFIG_DVB_NGENE=m
+CONFIG_DVB_DDBRIDGE=m
 CONFIG_DVB_MB86A20S=m
 CONFIG_DVB_USB_TECHNISAT_USB2=m
 CONFIG_DVB_DIB9000=m
@@ -2767,6 +2796,7 @@ CONFIG_IR_RC6_DECODER=m
 CONFIG_IR_JVC_DECODER=m
 CONFIG_IR_SONY_DECODER=m
 CONFIG_IR_RC5_SZ_DECODER=m
+CONFIG_IR_MCE_KBD_DECODER=m
 CONFIG_IR_LIRC_CODEC=m
 CONFIG_IR_IMON=m
 CONFIG_IR_MCEUSB=m
@@ -2986,6 +3016,7 @@ CONFIG_SND_HDA_INPUT_JACK=y
 CONFIG_SND_HDA_PATCH_LOADER=y
 CONFIG_SND_HDA_HWDEP=y
 CONFIG_SND_HDA_CODEC_REALTEK=y
+CONFIG_SND_HDA_ENABLE_REALTEK_QUIRKS=y
 CONFIG_SND_HDA_CODEC_CA0110=y
 CONFIG_SND_HDA_CODEC_ANALOG=y
 CONFIG_SND_HDA_CODEC_SIGMATEL=y
@@ -2998,10 +3029,12 @@ CONFIG_SND_HDA_CODEC_INTELHDMI=y
 CONFIG_SND_HDA_CODEC_SI3054=y
 CONFIG_SND_HDA_CODEC_NVHDMI=y
 CONFIG_SND_HDA_CODEC_HDMI=y
+CONFIG_SND_HDA_CODEC_CA0132=y
 CONFIG_SND_HDA_GENERIC=y
 CONFIG_SND_HDA_POWER_SAVE=y
 CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
 CONFIG_SND_HDA_RECONFIG=y
+CONFIG_SND_HDA_PREALLOC_SIZE=4096
 CONFIG_SND_HDSPM=m
 CONFIG_SND_HIFIER=m
 CONFIG_SND_ICE1712=m
@@ -3193,6 +3226,10 @@ CONFIG_HID_KEYTOUCH=m
 CONFIG_HID_LCPOWER=m
 CONFIG_HID_ROCCAT_ARVO=m
 CONFIG_HID_ROCCAT_KOVAPLUS=m
+CONFIG_HID_HOLTEK=m
+CONFIG_HOLTEK_FF=y
+CONFIG_HID_SPEEDLINK=m
+CONFIG_HID_WIIMOTE=m
 
 #
 # USB Imaging devices
@@ -3254,6 +3291,7 @@ CONFIG_USB_GSPCA_SQ930X=m
 CONFIG_USB_GSPCA_NW80X=m
 CONFIG_USB_GSPCA_VICAM=m
 CONFIG_USB_GSPCA_KINECT=m
+CONFIG_USB_GSPCA_SE401=m
 
 CONFIG_USB_IBMCAM=m
 CONFIG_USB_KONICAWC=m
@@ -3277,6 +3315,7 @@ CONFIG_SOC_CAMERA_MT9T112=m
 CONFIG_SOC_CAMERA_RJ54N1=m
 CONFIG_SOC_CAMERA_OV9640=m
 CONFIG_SOC_CAMERA_OV6650=m
+CONFIG_SOC_CAMERA_OV5642=m
 CONFIG_SOC_CAMERA_IMX074=m
 CONFIG_SOC_CAMERA_OV2640=m
 CONFIG_SOC_CAMERA_OV9740=m
@@ -3510,7 +3549,7 @@ CONFIG_MFD_WM8400=m
 # CONFIG_MFD_RDC321X is not set
 # CONFIG_MFD_JANZ_CMODIO is not set
 # CONFIG_MFD_WM831X_I2C is not set
-CONFIG_MFD_CS5535=m
+# CONFIG_MFD_CS5535 is not set
 
 #
 # File systems
@@ -3631,6 +3670,7 @@ CONFIG_SQUASHFS=m
 CONFIG_SQUASHFS_XATTR=y
 CONFIG_SQUASHFS_LZO=y
 CONFIG_SQUASHFS_XZ=y
+CONFIG_SQUASHFS_ZLIB=y
 # CONFIG_SQUASHFS_EMBEDDED is not set
 CONFIG_VXFS_FS=m
 # CONFIG_HPFS_FS is not set
@@ -3664,6 +3704,7 @@ CONFIG_NFS_FSCACHE=y
 # CONFIG_NFS_USE_NEW_IDMAPPER is not set
 # CONFIG_NFSD_DEPRECATED is not set
 CONFIG_PNFS_OBJLAYOUT=m
+CONFIG_PNFS_BLOCK=m
 CONFIG_LOCKD=m
 CONFIG_LOCKD_V4=y
 CONFIG_EXPORTFS=y
@@ -3921,6 +3962,8 @@ CONFIG_CRC32=m
 CONFIG_CRC_CCITT=m
 CONFIG_CRC_ITU_T=m
 CONFIG_CRC_T10DIF=m
+CONFIG_CRC8=m
+CONFIG_CORDIC=m
 
 CONFIG_CRYPTO_ZLIB=m
 CONFIG_ZLIB_INFLATE=y
@@ -4177,6 +4220,7 @@ CONFIG_LEDS_CLASS=y
 # CONFIG_LEDS_AMS_DELTA is not set
 # CONFIG_LEDS_LOCOMO is not set
 # CONFIG_LEDS_NET48XX is not set
+# CONFIG_LEDS_NET5501 is not set
 # CONFIG_LEDS_PCA9532 is not set
 # CONFIG_LEDS_PCA955X is not set
 # CONFIG_LEDS_BD2802 is not set
@@ -4229,6 +4273,7 @@ CONFIG_FUNCTION_TRACER=y
 CONFIG_STACK_TRACER=y
 
 CONFIG_KPROBES=y
+CONFIG_JUMP_LABEL=y
 CONFIG_OPTPROBES=y
 
 # CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
@@ -4320,7 +4365,6 @@ CONFIG_RESOURCE_COUNTERS=y
 
 #FIXME: x86 generic?
 CONFIG_LEDS_CLEVO_MAIL=m
-CONFIG_I8K=m
 CONFIG_INPUT_APANEL=m
 
 # CONFIG_INTEL_MENLOW is not set
@@ -4638,8 +4682,10 @@ CONFIG_EVENT_POWER_TRACING_DEPRECATED=y
 
 CONFIG_NFC_DEVICES=y
 CONFIG_PN544_NFC=m
+CONFIG_NFC_PN533=m
 
 CONFIG_TARGET_CORE=m
+CONFIG_ISCSI_TARGET=m
 CONFIG_LOOPBACK_TARGET=m
 # CONFIG_LOOPBACK_TARGET_CDB_DEBUG is not set
 CONFIG_TCM_IBLOCK=m
@@ -4663,3 +4709,6 @@ CONFIG_TEST_KSTRTOX=m
 
 # CONFIG_GOOGLE_FIRMWARE is not set
 CONFIG_INTEL_MID_PTI=m
+
+CONFIG_IOMMU_SUPPORT=y
+
diff --git a/config-ia64-generic b/config-ia64-generic
index f469b96..ca97689 100644
--- a/config-ia64-generic
+++ b/config-ia64-generic
@@ -191,6 +191,7 @@ CONFIG_HP_ILO=m
 
 CONFIG_PARAVIRT_GUEST=y
 CONFIG_PARAVIRT=y
+CONFIG_PARAVIRT_TIME_ACCOUNTING=y
 
 CONFIG_DMAR_DEFAULT_ON=y
 
diff --git a/config-nodebug b/config-nodebug
index 5730cd1..a3fbf94 100644
--- a/config-nodebug
+++ b/config-nodebug
@@ -2,6 +2,8 @@ CONFIG_SND_VERBOSE_PRINTK=y
 CONFIG_SND_DEBUG=y
 CONFIG_SND_PCM_XRUN_DEBUG=y
 
+CONFIG_DEBUG_ATOMIC_SLEEP=y
+
 CONFIG_DEBUG_MUTEXES=y
 CONFIG_DEBUG_RT_MUTEXES=y
 CONFIG_DEBUG_LOCK_ALLOC=y
diff --git a/config-powerpc-generic b/config-powerpc-generic
index 0bf87f7..5e1ddf7 100644
--- a/config-powerpc-generic
+++ b/config-powerpc-generic
@@ -314,16 +314,19 @@ CONFIG_SERIAL_GRLIB_GAISLER_APBUART=m
 # CONFIG_MFD_88PM8607 is not set
 # CONFIG_MFD_MAX8997 is not set
 # CONFIG_MFD_TPS65910 is not set
+# CONFIG_MFD_TPS65912_I2C is not set
 # CONFIG_MFD_WL1273_CORE is not set
 # CONFIG_XPS_USB_HCD_XILINX is not set
 # CONFIG_MMC_SDHCI_OF_ESDHC is not set
 # CONFIG_MMC_SDHCI_OF_HLWD is not set
 
 # CONFIG_MFD_TC35892 is not set
+# CONFIG_MFD_AAT2870_CORE is not set
 
 # CONFIG_GPIO_SCH is not set
 
 # CONFIG_PPC_MPC512x is not set
+# CONFIG_RTC_DRV_MPC5121 is not set
 
 CONFIG_MPC512X_DMA=m
 
@@ -342,3 +345,7 @@ CONFIG_CRYPTO_DEV_FSL_CAAM_INTC=y
 CONFIG_CRYPTO_DEV_FSL_CAAM_INTC_COUNT_THLD=255
 CONFIG_CRYPTO_DEV_FSL_CAAM_INTC_TIME_THLD=2048
 CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=m
+
+# CONFIG_GPIO_GENERIC_PLATFORM is not set
+# CONFIG_GPIO_MCP23S08 is not set
+
diff --git a/config-powerpc64 b/config-powerpc64
index 8866a53..f27f5b3 100644
--- a/config-powerpc64
+++ b/config-powerpc64
@@ -44,6 +44,7 @@ CONFIG_LPARCFG=y
 CONFIG_SERIAL_ICOM=m
 CONFIG_HVCS=m
 CONFIG_HVC_CONSOLE=y
+# CONFIG_HVC_OLD_HVSI is not set
 CONFIG_HOTPLUG_PCI=y
 CONFIG_THERM_PM72=y
 CONFIG_IBMVETH=m
@@ -174,6 +175,8 @@ CONFIG_PERF_EVENTS=y
 CONFIG_EVENT_PROFILE=y
 
 CONFIG_KVM_BOOK3S_64=m
+#-- Enable _HV once publicly available POWER7 hardware can use it
+# CONFIG_KVM_BOOK3S_64_HV is not set
 # CONFIG_KVM_EXIT_TIMING is not set
 
 #-- bz#607175
@@ -188,3 +191,6 @@ CONFIG_PSERIES_ENERGY=m
 CONFIG_PPC_ICSWX=y
 CONFIG_IO_EVENT_IRQ=y
 CONFIG_HW_RANDOM_AMD=m
+
+CONFIG_BPF_JIT=y
+CONFIG_CPU_FREQ_MAPLE=y
diff --git a/config-s390x b/config-s390x
index da9db13..5251b5b 100644
--- a/config-s390x
+++ b/config-s390x
@@ -236,5 +236,4 @@ CONFIG_STRICT_DEVMEM=y
 
 # CONFIG_WARN_DYNAMIC_STACK is not set
 
-CONFIG_JUMP_LABEL=y
 CONFIG_CRYPTO_GHASH_S390=m
diff --git a/config-sparc64-generic b/config-sparc64-generic
index 8cc28f7..e5ee2c4 100644
--- a/config-sparc64-generic
+++ b/config-sparc64-generic
@@ -191,8 +191,6 @@ CONFIG_FB_XVR1000=y
 
 CONFIG_CRYPTO_DEV_NIAGARA2=y
 
-CONFIG_JUMP_LABEL=y
-
 # CONFIG_MTD_OF_PARTS is not set
 # CONFIG_MTD_PHYSMAP_OF is not set
 # CONFIG_MMC_SDHCI_OF is not set
diff --git a/config-x86-32-generic b/config-x86-32-generic
new file mode 100644
index 0000000..8b66c92
--- /dev/null
+++ b/config-x86-32-generic
@@ -0,0 +1,206 @@
+# CONFIG_64BIT is not set
+
+CONFIG_X86_32_NON_STANDARD=y
+
+# CONFIG_X86_ELAN is not set
+# CONFIG_X86_NUMAQ is not set
+# CONFIG_X86_SUMMIT is not set
+CONFIG_X86_BIGSMP=y
+# CONFIG_X86_VISWS is not set
+# CONFIG_X86_RDC321X is not set
+# CONFIG_X86_ES7000 is not set
+# CONFIG_M386 is not set
+# CONFIG_M486 is not set
+# CONFIG_M586 is not set
+# CONFIG_M586TSC is not set
+# CONFIG_M586MMX is not set
+CONFIG_M686=y
+# CONFIG_MPENTIUMII is not set
+# CONFIG_MPENTIUMIII is not set
+# CONFIG_MPENTIUMM is not set
+# CONFIG_MPENTIUM4 is not set
+# CONFIG_MK6 is not set
+# CONFIG_MK7 is not set
+# CONFIG_MK8 is not set
+# CONFIG_MCRUSOE is not set
+# CONFIG_MWINCHIPC6 is not set
+# CONFIG_MWINCHIP3D is not set
+# CONFIG_MCYRIXIII is not set
+# CONFIG_MVIAC3_2 is not set
+
+CONFIG_NR_CPUS=64
+CONFIG_X86_GENERIC=y
+# CONFIG_X86_PPRO_FENCE is not set
+
+CONFIG_TOSHIBA=m
+
+CONFIG_SONYPI=m
+CONFIG_SONYPI_COMPAT=y
+
+# CONFIG_NUMA is not set
+
+# CONFIG_NOHIGHMEM is not set
+CONFIG_HIGHMEM4G=y
+# CONFIG_HIGHMEM64G is not set
+CONFIG_HIGHMEM=y
+CONFIG_HIGHPTE=y
+
+# CONFIG_MATH_EMULATION is not set
+
+CONFIG_FB_GEODE=y
+CONFIG_FB_GEODE_LX=y
+CONFIG_FB_GEODE_GX=y
+# CONFIG_FB_GEODE_GX1 is not set
+
+# CONFIG_PCI_GOBIOS is not set
+# CONFIG_PCI_GODIRECT is not set
+# CONFIG_PCI_GOMMCONFIG is not set
+CONFIG_PCI_GOANY=y
+
+# FIXME: wtf? "x86 specific drivers"
+CONFIG_PCMCIA_FDOMAIN=m
+CONFIG_SCSI_FUTURE_DOMAIN=m
+CONFIG_IBM_ASM=m
+
+#
+# APM (Advanced Power Management) BIOS Support
+#
+CONFIG_APM=y
+# CONFIG_APM_IGNORE_USER_SUSPEND is not set
+# CONFIG_APM_DO_ENABLE is not set
+CONFIG_APM_CPU_IDLE=y
+# CONFIG_APM_DISPLAY_BLANK is not set
+# CONFIG_APM_ALLOW_INTS is not set
+
+CONFIG_ACPI_BLACKLIST_YEAR=1999
+
+
+# CONFIG_X86_POWERNOW_K6 is not set
+CONFIG_X86_POWERNOW_K7=y
+# CONFIG_X86_GX_SUSPMOD is not set
+CONFIG_X86_SPEEDSTEP_ICH=y
+CONFIG_X86_SPEEDSTEP_SMI=y
+CONFIG_X86_SPEEDSTEP_LIB=y
+# CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set
+CONFIG_X86_LONGRUN=y
+# CONFIG_X86_LONGHAUL is not set
+# CONFIG_X86_CPUFREQ_NFORCE2 is not set
+# e_powersaver is dangerous
+# CONFIG_X86_E_POWERSAVER is not set
+
+CONFIG_X86_HT=y
+CONFIG_X86_TRAMPOLINE=y
+
+
+# CONFIG_4KSTACKS is not set
+
+CONFIG_PCI_DIRECT=y
+
+# SHPC has half-arsed PCI probing, which makes it load on too many systems
+# CONFIG_HOTPLUG_PCI_SHPC is not set
+
+CONFIG_BLK_DEV_AMD74XX=y
+
+CONFIG_I2C_ALI1535=m
+CONFIG_I2C_ALI15X3=m
+CONFIG_I2C_ALI1563=m
+CONFIG_I2C_SIS5595=m
+CONFIG_I2C_SIS630=m
+
+CONFIG_SCx200_ACB=m
+
+# CONFIG_X86_REBOOTFIXUPS is not set
+
+CONFIG_PC8736x_GPIO=m
+# CONFIG_NSC_GPIO is not set
+CONFIG_CS5535_GPIO=m
+CONFIG_GPIO_SCH=m
+
+CONFIG_SND_ISA=y
+CONFIG_SND_ES18XX=m
+
+CONFIG_HW_RANDOM_GEODE=m
+
+# CONFIG_SGI_IOC4 is not set
+
+CONFIG_TC1100_WMI=m
+
+CONFIG_IB700_WDT=m
+
+CONFIG_PHYSICAL_ALIGN=0x400000
+CONFIG_PHYSICAL_START=0x400000
+
+# CONFIG_KEXEC_JUMP is not set
+
+CONFIG_CRYPTO_AES_586=y
+CONFIG_CRYPTO_DEV_GEODE=m
+CONFIG_CRYPTO_TWOFISH_586=m
+
+CONFIG_VIDEO_CAFE_CCIC=m
+
+CONFIG_VMI=y
+
+CONFIG_XEN_MAX_DOMAIN_MEMORY=8
+
+CONFIG_MTD_NAND_CAFE=m
+
+# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set
+
+
+CONFIG_OLPC=y
+CONFIG_OLPC_OPENFIRMWARE=y
+CONFIG_BATTERY_OLPC=y
+CONFIG_MOUSE_PS2_OLPC=y
+CONFIG_OLPC_XO1_PM=y
+CONFIG_OLPC_XO15_SCI=y
+CONFIG_OLPC_XO1_RTC=y
+CONFIG_OLPC_XO1_SCI=y
+# staging
+# CONFIG_FB_OLPC_DCON is not set
+
+# CONFIG_SPARSE_IRQ is not set
+
+CONFIG_RCU_FANOUT=32
+
+# CONFIG_X86_ANCIENT_MCE is not set
+
+# CONFIG_X86_MRST is not set
+
+CONFIG_I2C_PXA=m
+# CONFIG_GPIO_LANGWELL is not set
+
+# CONFIG_INTEL_TXT is not set
+
+CONFIG_GEODE_WDT=m
+CONFIG_CS5535_MFGPT=m
+CONFIG_CS5535_CLOCK_EVENT_SRC=m
+
+CONFIG_LEDS_INTEL_SS4200=m
+
+CONFIG_OLPC_XO1=m
+CONFIG_XO1_RFKILL=m
+
+CONFIG_X86_32_IRIS=m
+
+
+CONFIG_MTD_OF_PARTS=m
+CONFIG_MTD_PHYSMAP_OF=m
+CONFIG_PROC_DEVICETREE=y
+CONFIG_SERIAL_OF_PLATFORM=m
+CONFIG_SERIAL_GRLIB_GAISLER_APBUART=m
+# CONFIG_MMC_SDHCI_OF is not set
+
+# CONFIG_X86_INTEL_MID is not set
+
+CONFIG_MFD_CS5535=m
+
+# I2O enabled only for 32-bit x86, disabled for PAE kernel
+CONFIG_I2O=m
+CONFIG_I2O_BLOCK=m
+CONFIG_I2O_SCSI=m
+CONFIG_I2O_PROC=m
+CONFIG_I2O_CONFIG=y
+CONFIG_I2O_EXT_ADAPTEC=y
+CONFIG_I2O_CONFIG_OLD_IOCTL=y
+CONFIG_I2O_BUS=m
+
diff --git a/config-x86-generic b/config-x86-generic
index 231db7a..0f1216e 100644
--- a/config-x86-generic
+++ b/config-x86-generic
@@ -1,68 +1,30 @@
 CONFIG_UID16=y
-# CONFIG_64BIT is not set
-# CONFIG_KERNEL_LZMA is not set
 
-#
-# Processor type and features
-#
-#
-# Enable summit and co via the generic arch
-#
 CONFIG_X86_EXTENDED_PLATFORM=y
-CONFIG_X86_32_NON_STANDARD=y
-
-# CONFIG_X86_ELAN is not set
-# CONFIG_X86_NUMAQ is not set
-# CONFIG_X86_SUMMIT is not set
-CONFIG_X86_BIGSMP=y
-# CONFIG_X86_VISWS is not set
-# CONFIG_X86_RDC321X is not set
-# CONFIG_X86_ES7000 is not set
-# CONFIG_M386 is not set
-# CONFIG_M486 is not set
-# CONFIG_M586 is not set
-# CONFIG_M586TSC is not set
-# CONFIG_M586MMX is not set
-CONFIG_M686=y
-# CONFIG_MPENTIUMII is not set
-# CONFIG_MPENTIUMIII is not set
-# CONFIG_MPENTIUMM is not set
-# CONFIG_MPENTIUM4 is not set
-# CONFIG_MK6 is not set
-# CONFIG_MK7 is not set
-# CONFIG_MK8 is not set
-# CONFIG_MCRUSOE is not set
-# CONFIG_MWINCHIPC6 is not set
-# CONFIG_MWINCHIP3D is not set
-# CONFIG_MCYRIXIII is not set
-# CONFIG_MVIAC3_2 is not set
+
 CONFIG_SMP=y
-CONFIG_NR_CPUS=64
+
 CONFIG_X86_GENERIC=y
-# CONFIG_X86_PPRO_FENCE is not set
+
 CONFIG_HPET=y
 CONFIG_HPET_TIMER=y
 # CONFIG_HPET_MMAP is not set
-CONFIG_X86_MCE=y
-CONFIG_TOSHIBA=m
+
 CONFIG_I8K=m
-CONFIG_SONYPI=m
 CONFIG_SONYPI_COMPAT=y
 CONFIG_MICROCODE=m
+CONFIG_MICROCODE_INTEL=y
+CONFIG_MICROCODE_AMD=y
+
 CONFIG_X86_MSR=y
 CONFIG_X86_CPUID=y
 CONFIG_EDD=m
 # CONFIG_EDD_OFF is not set
-# CONFIG_NUMA is not set
 
-# CONFIG_NOHIGHMEM is not set
-CONFIG_HIGHMEM4G=y
-# CONFIG_HIGHMEM64G is not set
-CONFIG_HIGHMEM=y
-CONFIG_HIGHPTE=y
-
-# CONFIG_MATH_EMULATION is not set
 CONFIG_MTRR=y
+CONFIG_MTRR_SANITIZER=y
+CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=1
+CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1
 CONFIG_X86_PAT=y
 CONFIG_X86_PM_TIMER=y
 
@@ -70,60 +32,30 @@ CONFIG_EFI=y
 CONFIG_EFI_VARS=y
 CONFIG_EFI_PCDP=y
 CONFIG_FB_EFI=y
+
+# FIXME: 32bit only?
 # CONFIG_FB_N411 is not set
 
 CONFIG_DMAR=y
 CONFIG_DMAR_BROKEN_GFX_WA=y
 CONFIG_DMAR_FLOPPY_WA=y
 CONFIG_DMAR_DEFAULT_ON=y
-
-CONFIG_FB_GEODE=y
-CONFIG_FB_GEODE_LX=y
-CONFIG_FB_GEODE_GX=y
-# CONFIG_FB_GEODE_GX1 is not set
-
-# CONFIG_PCI_GOBIOS is not set
-# CONFIG_PCI_GODIRECT is not set
-# CONFIG_PCI_GOMMCONFIG is not set
-CONFIG_PCI_GOANY=y
-
-#
-# x86 specific drivers
-#
-CONFIG_PCMCIA_FDOMAIN=m
-CONFIG_SCSI_FUTURE_DOMAIN=m
 CONFIG_SCSI_ADVANSYS=m
 
-CONFIG_CC_STACKPROTECTOR=y
-
 CONFIG_SECCOMP=y
 
 CONFIG_CAPI_EICON=y
 
-# I2O enabled only for 32-bit x86, disabled for PAE kernel
-CONFIG_I2O=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-CONFIG_I2O_CONFIG=y
-CONFIG_I2O_EXT_ADAPTEC=y
-CONFIG_I2O_CONFIG_OLD_IOCTL=y
-CONFIG_I2O_BUS=m
-
-#
-# APM (Advanced Power Management) BIOS Support
-#
-CONFIG_APM=y
-# CONFIG_APM_IGNORE_USER_SUSPEND is not set
-# CONFIG_APM_DO_ENABLE is not set
-CONFIG_APM_CPU_IDLE=y
-# CONFIG_APM_DISPLAY_BLANK is not set
-# CONFIG_APM_ALLOW_INTS is not set
-
 #
 # Kernel debugging
 #
 CONFIG_X86_MPPARSE=y
+# CONFIG_X86_VERBOSE_BOOTUP is not set
+# CONFIG_MMIOTRACE_TEST is not set
+# CONFIG_DEBUG_PER_CPU_MAPS is not set
+CONFIG_DEBUG_RODATA=y
+CONFIG_DEBUG_STACKOVERFLOW=y
+CONFIG_DEBUG_NMI_TIMEOUT=5
 
 CONFIG_ACPI=y
 CONFIG_ACPI_AC=y
@@ -131,7 +63,6 @@ CONFIG_ACPI_AC=y
 CONFIG_ACPI_PROCFS_POWER=y
 CONFIG_ACPI_SYSFS_POWER=y
 CONFIG_ACPI_BATTERY=y
-CONFIG_ACPI_BLACKLIST_YEAR=1999
 CONFIG_ACPI_BUTTON=y
 CONFIG_ACPI_CONTAINER=m
 CONFIG_ACPI_DOCK=y
@@ -143,7 +74,6 @@ CONFIG_ACPI_PROCFS=y
 CONFIG_ACPI_SBS=m
 CONFIG_ACPI_SLEEP=y
 CONFIG_ACPI_THERMAL=y
-CONFIG_TOPSTAR_LAPTOP=m
 CONFIG_ACPI_TOSHIBA=m
 CONFIG_ACPI_VIDEO=m
 # CONFIG_ACPI_PROC_EVENT is not set
@@ -153,54 +83,32 @@ CONFIG_ACPI_PROCESSOR_AGGREGATOR=m
 CONFIG_ACPI_HED=m
 CONFIG_ACPI_APEI=y
 CONFIG_ACPI_APEI_PCIEAER=y
-CONFIG_ACPI_APEI_GHES=m
+CONFIG_ACPI_APEI_GHES=y
+CONFIG_ACPI_APEI_MEMORY_FAILURE=y
 # CONFIG_ACPI_APEI_EINJ is not set
 CONFIG_ACPI_IPMI=m
 CONFIG_ACPI_CUSTOM_METHOD=m
 
 CONFIG_X86_ACPI_CPUFREQ=y
 CONFIG_X86_PCC_CPUFREQ=y
-# CONFIG_X86_POWERNOW_K6 is not set
-CONFIG_X86_POWERNOW_K7=y
 CONFIG_X86_POWERNOW_K8=y
-# CONFIG_X86_GX_SUSPMOD is not set
-# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
-CONFIG_X86_SPEEDSTEP_ICH=y
-CONFIG_X86_SPEEDSTEP_SMI=y
-CONFIG_X86_SPEEDSTEP_LIB=y
-# CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set
 CONFIG_X86_P4_CLOCKMOD=y
-CONFIG_X86_LONGRUN=y
-# CONFIG_X86_LONGHAUL is not set
-# CONFIG_X86_CPUFREQ_NFORCE2 is not set
-# e_powersaver is dangerous
-# CONFIG_X86_E_POWERSAVER is not set
-
-CONFIG_X86_HT=y
-CONFIG_X86_TRAMPOLINE=y
+# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
 
 #
 # various x86 specific drivers
 #
 CONFIG_NVRAM=y
-CONFIG_IBM_ASM=m
-CONFIG_CRYPTO_TWOFISH_586=m
 CONFIG_CRYPTO_DEV_PADLOCK=m
 CONFIG_CRYPTO_DEV_PADLOCK_AES=m
 CONFIG_CRYPTO_DEV_PADLOCK_SHA=m
 
 CONFIG_GENERIC_ISA_DMA=y
-CONFIG_SCHED_SMT=y
+
 CONFIG_SUSPEND=y
 CONFIG_HIBERNATION=y
 CONFIG_PM_STD_PARTITION=""
 
-CONFIG_DEBUG_RODATA=y
-CONFIG_DEBUG_STACKOVERFLOW=y
-# CONFIG_4KSTACKS is not set
-CONFIG_DEBUG_NMI_TIMEOUT=5
-
-CONFIG_PCI_DIRECT=y
 CONFIG_PCI_MMCONFIG=y
 CONFIG_PCI_BIOS=y
 
@@ -209,8 +117,7 @@ CONFIG_HOTPLUG_PCI_COMPAQ=m
 # CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set
 CONFIG_HOTPLUG_PCI_IBM=m
 # CONFIG_HOTPLUG_PCI_CPCI is not set
-# SHPC has half-arsed PCI probing, which makes it load on too many systems
-# CONFIG_HOTPLUG_PCI_SHPC is not set
+
 CONFIG_PM=y
 
 CONFIG_IPW2100=m
@@ -223,9 +130,6 @@ CONFIG_IPW2200_QOS=y
 
 CONFIG_BLK_DEV_AMD74XX=y
 
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_ALI1563=m
 CONFIG_I2C_AMD756=m
 CONFIG_I2C_AMD756_S4882=m
 CONFIG_I2C_AMD8111=m
@@ -234,45 +138,35 @@ CONFIG_I2C_ISCH=m
 CONFIG_I2C_NFORCE2=m
 CONFIG_I2C_NFORCE2_S4985=m
 CONFIG_I2C_PIIX4=m
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
 CONFIG_I2C_SIS96X=m
-
 CONFIG_I2C_VIA=m
 CONFIG_I2C_VIAPRO=m
 
-CONFIG_SCx200_ACB=m
-
-# CONFIG_X86_REBOOTFIXUPS is not set
-
 CONFIG_DELL_RBU=m
 CONFIG_DCDBAS=m
 
-CONFIG_GPIO_SCH=m
-CONFIG_PC8736x_GPIO=m
-# CONFIG_NSC_GPIO is not set
-CONFIG_CS5535_GPIO=m
-
 CONFIG_EDAC=y
 # CONFIG_EDAC_DEBUG is not set
 CONFIG_EDAC_MM_EDAC=m
 CONFIG_EDAC_AMD76X=m
+CONFIG_EDAC_AMD8111=m
+CONFIG_EDAC_AMD8131=m
 CONFIG_EDAC_E7XXX=m
 CONFIG_EDAC_E752X=m
 CONFIG_EDAC_I82860=m
 CONFIG_EDAC_I82875P=m
 CONFIG_EDAC_I82975X=m
 CONFIG_EDAC_I3000=m
+CONFIG_EDAC_I3200=m
 CONFIG_EDAC_I5000=m
 CONFIG_EDAC_I5100=m
 CONFIG_EDAC_I5400=m
-CONFIG_EDAC_R82600=m
-CONFIG_EDAC_AMD8131=m
-CONFIG_EDAC_AMD8111=m
-CONFIG_EDAC_I7CORE=m
-CONFIG_EDAC_I3000=m
 CONFIG_EDAC_I7300=m
+CONFIG_EDAC_I7CORE=m
+CONFIG_EDAC_R82600=m
 CONFIG_EDAC_X38=m
+CONFIG_EDAC_MCE_INJ=m
+CONFIG_EDAC_DECODE_MCE=m
 
 CONFIG_SCHED_MC=y
 
@@ -283,77 +177,70 @@ CONFIG_TCG_INFINEON=m
 
 CONFIG_HW_RANDOM_INTEL=m
 CONFIG_HW_RANDOM_AMD=m
-CONFIG_HW_RANDOM_GEODE=m
 CONFIG_HW_RANDOM_VIA=m
 
-
 # CONFIG_COMPAT_VDSO is not set
 
-# CONFIG_SGI_IOC4 is not set
-
 CONFIG_X86_PLATFORM_DEVICES=y
+
 CONFIG_ASUS_LAPTOP=m
 CONFIG_COMPAL_LAPTOP=m
+CONFIG_DELL_LAPTOP=m
 CONFIG_EEEPC_LAPTOP=m
-CONFIG_EEEPC_WMI=m
 CONFIG_FUJITSU_LAPTOP=m
 # CONFIG_FUJITSU_LAPTOP_DEBUG is not set
 CONFIG_IDEAPAD_LAPTOP=m
 CONFIG_MSI_LAPTOP=m
+CONFIG_PANASONIC_LAPTOP=m
+CONFIG_SAMSUNG_LAPTOP=m
 CONFIG_SONY_LAPTOP=m
-CONFIG_DELL_LAPTOP=m
+CONFIG_TOPSTAR_LAPTOP=m
+
 CONFIG_ACPI_WMI=m
 CONFIG_ACER_WMI=m
 CONFIG_ACERHDF=m
-CONFIG_TC1100_WMI=m
+CONFIG_ASUS_WMI=m
+CONFIG_ASUS_NB_WMI=m
 CONFIG_HP_WMI=m
 # CONFIG_INTEL_SCU_IPC is not set
 CONFIG_DELL_WMI=m
 CONFIG_DELL_WMI_AIO=m
-CONFIG_ASUS_WMI=m
-CONFIG_ASUS_NB_WMI=m
-CONFIG_XO15_EBOOK=m
+CONFIG_EEEPC_WMI=m
 CONFIG_INTEL_OAKTRAIL=m
+CONFIG_SAMSUNG_Q10=m
+CONFIG_XO15_EBOOK=m
 
 # CONFIG_TOUCHSCREEN_INTEL_MID is not set
 
 # CONFIG_SMSC37B787_WDT is not set
 CONFIG_W83697HF_WDT=m
-CONFIG_IB700_WDT=m
 
-CONFIG_RELOCATABLE=y
-CONFIG_PHYSICAL_ALIGN=0x400000
-CONFIG_PHYSICAL_START=0x400000
 CONFIG_CRASH_DUMP=y
-# CONFIG_KEXEC_JUMP is not set
 CONFIG_PROC_VMCORE=y
 CONFIG_CRASH=m
 
-CONFIG_CRYPTO_DEV_GEODE=m
-
-CONFIG_VIDEO_CAFE_CCIC=m
-
 CONFIG_VIRTUALIZATION=y
 CONFIG_KVM=m
 CONFIG_KVM_INTEL=m
 CONFIG_KVM_AMD=m
 CONFIG_LGUEST=m
+CONFIG_LGUEST_GUEST=y
 
 CONFIG_PARAVIRT_GUEST=y
 CONFIG_PARAVIRT=y
+CONFIG_PARAVIRT_TIME_ACCOUNTING=y
 # CONFIG_PARAVIRT_DEBUG is not set
 
 # PARAVIRT_SPINLOCKS has a 5% perf hit
+# FIXME: Still true ? References?
 # CONFIG_PARAVIRT_SPINLOCKS is not set
+
 CONFIG_KVM_CLOCK=y
 CONFIG_KVM_GUEST=y
 CONFIG_KVM_MMU_AUDIT=y # default $x would be nice...
-CONFIG_LGUEST_GUEST=y
-CONFIG_VMI=y
 
 CONFIG_XEN=y
 # CONFIG_XEN_DEBUG is not set
-CONFIG_XEN_MAX_DOMAIN_MEMORY=8
 CONFIG_XEN_BALLOON=y
 CONFIG_XEN_SCRUB_PAGES=y
 CONFIG_XEN_SAVE_RESTORE=y
@@ -374,10 +261,11 @@ CONFIG_XEN_DEBUG_FS=y
 CONFIG_XEN_PLATFORM_PCI=m
 CONFIG_XEN_GNTDEV=m
 CONFIG_INPUT_XEN_KBDDEV_FRONTEND=m
+CONFIG_XEN_SELFBALLOONING=y
+CONFIG_XEN_PCIDEV_BACKEND=m
 
 CONFIG_MTD_ESB2ROM=m
 CONFIG_MTD_CK804XROM=m
-CONFIG_MTD_NAND_CAFE=m
 
 CONFIG_NO_HZ=y
 CONFIG_HIGH_RES_TIMERS=y
@@ -407,53 +295,34 @@ CONFIG_INTEL_IOATDMA=m
 CONFIG_SENSORS_I5K_AMB=m
 CONFIG_SENSORS_FAM15H_POWER=m
 CONFIG_SENSORS_ACPI_POWER=m
+CONFIG_SENSORS_PKGTEMP=m
 
 # CONFIG_CPA_DEBUG is not set
-# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set
 
 CONFIG_HP_WATCHDOG=m
 CONFIG_NV_TCO=m
 CONFIG_SP5100_TCO=m
 
-CONFIG_OLPC=y
-CONFIG_OLPC_OPENFIRMWARE=y
-CONFIG_BATTERY_OLPC=y
-CONFIG_MOUSE_PS2_OLPC=y
-
-# staging
-# CONFIG_FB_OLPC_DCON is not set
-
 CONFIG_STRICT_DEVMEM=y
 
 # CONFIG_NO_BOOTMEM is not set
 
 # CONFIG_MEMTEST is not set
 # CONFIG_MAXSMP is not set
-CONFIG_MTRR_SANITIZER=y
-CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=1
-CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1
-CONFIG_SYSPROF_TRACER=y
 
-# CONFIG_X86_VERBOSE_BOOTUP is not set
-# CONFIG_MMIOTRACE_TEST is not set
-
-# CONFIG_DEBUG_PER_CPU_MAPS is not set
+CONFIG_SYSPROF_TRACER=y
 
 CONFIG_HP_ILO=m
 
 CONFIG_BACKLIGHT_APPLE=m
 
 CONFIG_OPROFILE_IBS=y
-CONFIG_MICROCODE_INTEL=y
-CONFIG_MICROCODE_AMD=y
 
 # CONFIG_X86_CHECK_BIOS_CORRUPTION is not set
 CONFIG_X86_RESERVE_LOW_64K=y
 
 # CONFIG_CMDLINE_BOOL is not set
 
-CONFIG_PANASONIC_LAPTOP=m
-
 CONFIG_X86_PTRACE_BTS=y
 
 CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
@@ -461,47 +330,28 @@ CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
 CONFIG_POWER_TRACER=y
 CONFIG_HW_BRANCH_TRACER=y
 
-# CONFIG_SPARSE_IRQ is not set
-
-CONFIG_RCU_FANOUT=32
-
 # CONFIG_IOMMU_STRESS is not set
 
 CONFIG_PERF_COUNTERS=y
 CONFIG_PERF_EVENTS=y
 CONFIG_EVENT_PROFILE=y
 
+CONFIG_X86_MCE=y
 CONFIG_X86_MCE_INTEL=y
 CONFIG_X86_MCE_AMD=y
-# CONFIG_X86_ANCIENT_MCE is not set
 # CONFIG_X86_MCE_INJECT is not set
 
-# CONFIG_X86_MRST is not set
 CONFIG_SFI=y
 
 CONFIG_INPUT_WINBOND_CIR=m
 CONFIG_I2C_SCMI=m
-CONFIG_I2C_PXA=m
 CONFIG_SBC_FITPC2_WATCHDOG=m
-CONFIG_EDAC_I3200=m
-CONFIG_EDAC_DECODE_MCE=m
-
-# CONFIG_GPIO_LANGWELL is not set
-
-# CONFIG_INTEL_TXT is not set
-
-CONFIG_CS5535_MFGPT=m
-CONFIG_GEODE_WDT=m
-CONFIG_CS5535_CLOCK_EVENT_SRC=m
-
-CONFIG_LEDS_INTEL_SS4200=m
 
 CONFIG_X86_DECODER_SELFTEST=y
 
 CONFIG_ACPI_CMPC=m
 CONFIG_MSI_WMI=m
 CONFIG_TOSHIBA_BT_RFKILL=m
-CONFIG_SAMSUNG_LAPTOP=m
 
 CONFIG_VGA_SWITCHEROO=y
 CONFIG_LPC_SCH=m
@@ -510,46 +360,39 @@ CONFIG_PCI_CNB20LE_QUIRK=y
 
 CONFIG_ACPI_EC_DEBUGFS=m
 # CONFIG_ACPI_APEI_ERST_DEBUG is not set
+# CONFIG_ACPI_QUICKSTART is not set
+CONFIG_IDEAPAD_ACPI=m
+
 CONFIG_INTEL_IDLE=y
+
 # CONFIG_TOUCHSCREEN_CY8CTMG110 is not set
-CONFIG_SENSORS_PKGTEMP=m
 CONFIG_F71808E_WDT=m
 CONFIG_HPWDT_NMI_DECODING=y
 # CONFIG_MFD_TPS6586X is not set
 # CONFIG_INTEL_MID_DMAC is not set
 CONFIG_PCH_DMA=m
-# CONFIG_ACPI_QUICKSTART is not set
-CONFIG_IDEAPAD_ACPI=m
 CONFIG_INTEL_IPS=m
 # CONFIG_IBM_RTL is not set
 
-CONFIG_OLPC_XO1=m
-CONFIG_XO1_RFKILL=m
 CONFIG_VIDEO_VIA_CAMERA=m
 
-CONFIG_EDAC_MCE_INJ=m
 CONFIG_IRQ_TIME_ACCOUNTING=y
 CONFIG_X86_RESERVE_LOW=64
 
 CONFIG_PCH_GBE=m
 CONFIG_PCH_PHUB=m
 
-CONFIG_JUMP_LABEL=y
-
-CONFIG_X86_32_IRIS=m
-
 CONFIG_TRANSPARENT_HUGEPAGE=y
 
 CONFIG_CRYPTO_AES_NI_INTEL=y
-CONFIG_CRYPTO_AES_586=y
-
-CONFIG_MTD_OF_PARTS=m
-CONFIG_MTD_PHYSMAP_OF=m
-CONFIG_PROC_DEVICETREE=y
-CONFIG_SERIAL_OF_PLATFORM=m
-CONFIG_SERIAL_GRLIB_GAISLER_APBUART=m
-# CONFIG_MMC_SDHCI_OF is not set
 
 CONFIG_HP_ACCEL=m
 
 # CONFIG_RAPIDIO is not set
+
+# CONFIG_GPIO_GENERIC_PLATFORM is not set
+# CONFIG_GPIO_MCP23S08 is not set
+
+CONFIG_SCHED_SMT=y
+CONFIG_CC_STACKPROTECTOR=y
+CONFIG_RELOCATABLE=y
diff --git a/config-x86_64-generic b/config-x86_64-generic
index 85da0d9..15277d7 100644
--- a/config-x86_64-generic
+++ b/config-x86_64-generic
@@ -1,229 +1,59 @@
 CONFIG_64BIT=y
-CONFIG_UID16=y
-# CONFIG_KERNEL_LZMA is not set
 
 # CONFIG_MK8 is not set
 # CONFIG_MPSC is not set
 CONFIG_GENERIC_CPU=y
-CONFIG_X86_EXTENDED_PLATFORM=y
+
 # CONFIG_X86_VSMP is not set
 # CONFIG_X86_UV is not set
-CONFIG_X86_MSR=y
-CONFIG_X86_CPUID=y
-CONFIG_MTRR=y
 CONFIG_NUMA=y
 CONFIG_K8_NUMA=y
 CONFIG_AMD_NUMA=y
 CONFIG_X86_64_ACPI_NUMA=y
 # CONFIG_NUMA_EMU is not set
+
 CONFIG_NR_CPUS=512
-CONFIG_X86_POWERNOW_K8=y
-CONFIG_X86_P4_CLOCKMOD=y
+CONFIG_PHYSICAL_START=0x1000000
+
 CONFIG_IA32_EMULATION=y
 # CONFIG_IA32_AOUT is not set
+
+CONFIG_AMD_IOMMU=y
+CONFIG_AMD_IOMMU_STATS=y
 # CONFIG_IOMMU_DEBUG is not set
-CONFIG_DEBUG_RODATA=y
-CONFIG_MICROCODE=m
 CONFIG_SWIOTLB=y
 CONFIG_CALGARY_IOMMU=y
 CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y
-CONFIG_X86_PM_TIMER=y
-CONFIG_EDD=m
-# CONFIG_EDD_OFF is not set
-CONFIG_PCI_BIOS=y
-CONFIG_PCI_MMCONFIG=y
-CONFIG_DMAR=y
-CONFIG_DMAR_BROKEN_GFX_WA=y
-CONFIG_DMAR_FLOPPY_WA=y
-CONFIG_DMAR_DEFAULT_ON=y
 
 CONFIG_KEXEC_JUMP=y
 
-CONFIG_EFI=y
-CONFIG_EFI_VARS=y
-CONFIG_EFI_PCDP=y
-CONFIG_FB_EFI=y
-
-CONFIG_SCSI_ADVANSYS=m
-
-CONFIG_SECCOMP=y
-
-CONFIG_CAPI_EICON=y
-
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_SCHED_SMT=y
-CONFIG_SUSPEND=y
-CONFIG_HIBERNATION=y
-CONFIG_PM_STD_PARTITION=""
-
-# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
-CONFIG_X86_PCC_CPUFREQ=y
-CONFIG_X86_ACPI_CPUFREQ=y
-
-CONFIG_ACPI=y
-CONFIG_ACPI_AC=y
-# CONFIG_ACPI_ASUS is not set
-CONFIG_ACPI_PROCFS_POWER=y
-CONFIG_ACPI_SYSFS_POWER=y
-CONFIG_ACPI_BATTERY=y
 CONFIG_ACPI_BLACKLIST_YEAR=0
-CONFIG_ACPI_BUTTON=y
-CONFIG_ACPI_CONTAINER=m
-CONFIG_ACPI_DOCK=y
-CONFIG_ACPI_FAN=y
 CONFIG_ACPI_HOTPLUG_MEMORY=m
-CONFIG_ACPI_NUMA=y
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_PROCFS=y
-CONFIG_ACPI_SBS=m
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_THERMAL=y
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_VIDEO=m
-# CONFIG_ACPI_PROC_EVENT is not set
-CONFIG_ACPI_POWER_METER=m
-CONFIG_ACPI_PROCESSOR_AGGREGATOR=m
-CONFIG_ACPI_HED=m
-CONFIG_ACPI_APEI=y
-CONFIG_ACPI_APEI_PCIEAER=y
-CONFIG_ACPI_APEI_GHES=m
-# CONFIG_ACPI_APEI_EINJ is not set
-CONFIG_ACPI_IPMI=m
-CONFIG_ACPI_CUSTOM_METHOD=m
-
-CONFIG_X86_PLATFORM_DEVICES=y
-CONFIG_ASUS_LAPTOP=m
-CONFIG_COMPAL_LAPTOP=m
-CONFIG_FUJITSU_LAPTOP=m
-# CONFIG_FUJITSU_LAPTOP_DEBUG is not set
-CONFIG_MSI_LAPTOP=m
-CONFIG_SONY_LAPTOP=m
-CONFIG_SONYPI_COMPAT=y
-CONFIG_EEEPC_LAPTOP=m
-CONFIG_EEEPC_WMI=m
-CONFIG_DELL_LAPTOP=m
-CONFIG_ACPI_WMI=m
-CONFIG_ACER_WMI=m
-CONFIG_ACERHDF=m
-CONFIG_HP_WMI=m
-CONFIG_DELL_WMI=m
-CONFIG_DELL_WMI_AIO=m
-CONFIG_ASUS_WMI=m
-CONFIG_ASUS_NB_WMI=m
-# CONFIG_XO15_EBOOK is not set
-CONFIG_INTEL_OAKTRAIL=m
 
 # CONFIG_INTEL_SCU_IPC is not set
 
-# CONFIG_TOUCHSCREEN_INTEL_MID is not set
-
-CONFIG_THINKPAD_ACPI=m
-# CONFIG_THINKPAD_ACPI_DEBUG is not set
-# CONFIG_THINKPAD_ACPI_DEBUGFACILITIES is not set
-CONFIG_THINKPAD_ACPI_HOTKEY_POLL=y
-CONFIG_THINKPAD_ACPI_VIDEO=y
-CONFIG_THINKPAD_ACPI_ALSA_SUPPORT=y
-# CONFIG_THINKPAD_ACPI_UNSAFE_LEDS is not set
-
-CONFIG_HOTPLUG_PCI=y
-CONFIG_HOTPLUG_PCI_COMPAQ=m
-# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set
-CONFIG_HOTPLUG_PCI_IBM=m
-# CONFIG_HOTPLUG_PCI_CPCI is not set
 # SHPC has half-arsed PCI probing, which makes it load on too many systems
 CONFIG_HOTPLUG_PCI_SHPC=m
 
-CONFIG_HPET=y
-# CONFIG_HPET_MMAP is not set
-CONFIG_PM=y
-
-CONFIG_IPW2100=m
-CONFIG_IPW2100_MONITOR=y
-CONFIG_IPW2200=m
-CONFIG_IPW2200_MONITOR=y
-CONFIG_IPW2200_RADIOTAP=y
-CONFIG_IPW2200_PROMISCUOUS=y
-CONFIG_IPW2200_QOS=y
-
 CONFIG_PNP=y
-CONFIG_PNPACPI=y
 
+# Really ? not 32bit only ?
 CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_CRYPTO_DEV_PADLOCK=m
-CONFIG_CRYPTO_DEV_PADLOCK_AES=m
-CONFIG_CRYPTO_DEV_PADLOCK_SHA=m
 
 CONFIG_CRYPTO_AES_X86_64=y
-CONFIG_CRYPTO_AES_NI_INTEL=y
-
 CONFIG_CRYPTO_TWOFISH_X86_64=m
 CONFIG_CRYPTO_SALSA20_X86_64=m
-
-CONFIG_X86_MCE=y
-CONFIG_X86_MCE_INTEL=y
-CONFIG_X86_MCE_AMD=y
+CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL=m
 
 # CONFIG_I2C_ALI1535 is not set
 # CONFIG_I2C_ALI1563 is not set
 # CONFIG_I2C_ALI15X3 is not set
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD756_S4882=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-CONFIG_I2C_ISCH=m
-CONFIG_I2C_NFORCE2_S4985=m
-CONFIG_I2C_PIIX4=m
 # CONFIG_I2C_SIS5595 is not set
 # CONFIG_I2C_SIS630 is not set
 
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-
-CONFIG_NVRAM=y
-
-CONFIG_EDAC=y
-# CONFIG_EDAC_DEBUG is not set
-CONFIG_EDAC_MM_EDAC=m
-CONFIG_EDAC_AMD76X=m
-CONFIG_EDAC_E7XXX=m
-CONFIG_EDAC_E752X=m
-CONFIG_EDAC_I5000=m
-CONFIG_EDAC_I5100=m
-CONFIG_EDAC_I5400=m
-CONFIG_EDAC_I82875P=m
-CONFIG_EDAC_I82860=m
-CONFIG_EDAC_I82975X=m
-CONFIG_EDAC_R82600=m
-CONFIG_EDAC_AMD8131=m
-CONFIG_EDAC_AMD8111=m
 CONFIG_EDAC_AMD64=m
 # CONFIG_EDAC_AMD64_ERROR_INJECTION is not set
-CONFIG_EDAC_DECODE_MCE=m
-CONFIG_EDAC_I7CORE=m
-CONFIG_EDAC_I3000=m
-CONFIG_EDAC_I7300=m
-CONFIG_EDAC_X38=m
-
-CONFIG_SCHED_MC=y
-
-CONFIG_TCG_INFINEON=m
-
-CONFIG_HW_RANDOM_INTEL=m
-CONFIG_HW_RANDOM_AMD=m
-CONFIG_HW_RANDOM_VIA=m
-
-# CONFIG_HW_RANDOM_GEODE is not set
-
-
-CONFIG_DEBUG_STACKOVERFLOW=y
-CONFIG_DEBUG_NMI_TIMEOUT=5
 
-CONFIG_GPIO_SCH=m
 # CONFIG_PC8736x_GPIO is not set
 
 # CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -242,223 +72,46 @@ CONFIG_MEMORY_HOTREMOVE=y
 # CONFIG_BLK_DEV_CS5530 is not set
 # CONFIG_BLK_DEV_CS5535 is not set
 
-CONFIG_CC_STACKPROTECTOR=y
-
 CONFIG_SGI_IOC4=m
 CONFIG_SGI_XP=m
 CONFIG_SGI_GRU=m
 # CONFIG_SGI_GRU_DEBUG is not set
 
-# CONFIG_SMSC37B787_WDT is not set
-CONFIG_W83697HF_WDT=m
-
 # CONFIG_VIDEO_CAFE_CCIC is not set
 
-CONFIG_MTD_ESB2ROM=m
-CONFIG_MTD_CK804XROM=m
-
-CONFIG_RELOCATABLE=y
-CONFIG_MACINTOSH_DRIVERS=y
-
-CONFIG_CRASH_DUMP=y
-CONFIG_PHYSICAL_START=0x1000000
-CONFIG_PROC_VMCORE=y
-CONFIG_CRASH=m
-
-CONFIG_DMIID=y
-CONFIG_DMI_SYSFS=y
-
-CONFIG_ISCSI_IBFT_FIND=y
-CONFIG_ISCSI_IBFT=m
-
-
-CONFIG_NO_HZ=y
-CONFIG_HIGH_RES_TIMERS=y
-CONFIG_CPU_IDLE=y
-# CONFIG_CPU_IDLE_GOV_LADDER is not set
-CONFIG_CPU_IDLE_GOV_MENU=y
-
-CONFIG_VIRTUALIZATION=y
-CONFIG_KVM=m
-CONFIG_KVM_INTEL=m
-CONFIG_KVM_AMD=m
-
-CONFIG_PARAVIRT_GUEST=y
-CONFIG_PARAVIRT=y
-# CONFIG_PARAVIRT_DEBUG is not set
-# PARAVIRT_SPINLOCKS has a 5% perf hit
-# CONFIG_PARAVIRT_SPINLOCKS is not set
-CONFIG_KVM_CLOCK=y
-CONFIG_KVM_GUEST=y
-CONFIG_KVM_MMU_AUDIT=y
-
-CONFIG_XEN=y
-# CONFIG_XEN_DEBUG is not set
 CONFIG_XEN_MAX_DOMAIN_MEMORY=32
-CONFIG_XEN_BALLOON=y
-CONFIG_XEN_SCRUB_PAGES=y
-CONFIG_XEN_SAVE_RESTORE=y
-CONFIG_HVC_XEN=y
-CONFIG_XEN_FBDEV_FRONTEND=y
-CONFIG_XEN_KBDDEV_FRONTEND=y
-CONFIG_XEN_BLKDEV_FRONTEND=m
-CONFIG_XEN_NETDEV_FRONTEND=m
-CONFIG_XEN_NETDEV_BACKEND=m
-CONFIG_XEN_WDT=m
-CONFIG_XEN_GRANT_DEV_ALLOC=m
-CONFIG_XEN_PCIDEV_FRONTEND=m
-CONFIG_XENFS=m
-CONFIG_XEN_COMPAT_XENFS=y
+CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y
 CONFIG_XEN_DEV_EVTCHN=m
 CONFIG_XEN_SYS_HYPERVISOR=y
-CONFIG_XEN_BACKEND=y
-CONFIG_XEN_BLKDEV_BACKEND=m
-CONFIG_XEN_GNTDEV=m
-CONFIG_XEN_DEBUG_FS=y
-CONFIG_XEN_PLATFORM_PCI=m
-CONFIG_INPUT_XEN_KBDDEV_FRONTEND=m
-
-CONFIG_DMADEVICES=y
-CONFIG_INTEL_IOATDMA=m
 
-CONFIG_SENSORS_I5K_AMB=m
-CONFIG_SENSORS_FAM15H_POWER=m
-CONFIG_SENSORS_ACPI_POWER=m
-
-# CONFIG_COMPAT_VDSO is not set
 CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
-# CONFIG_DEBUG_PER_CPU_MAPS is not set
-# CONFIG_CPA_DEBUG is not set
-
-CONFIG_HP_WATCHDOG=m
-CONFIG_NV_TCO=m
-CONFIG_SP5100_TCO=m
 
 CONFIG_FRAME_WARN=2048
 
 CONFIG_NODES_SHIFT=9
-CONFIG_X86_PAT=y
-# FIXME: These should be 32bit only
-# CONFIG_FB_N411 is not set
-CONFIG_STRICT_DEVMEM=y
 
 CONFIG_DIRECT_GBPAGES=y
 
-# CONFIG_NO_BOOTMEM is not set
-
-# CONFIG_MEMTEST is not set
-CONFIG_AMD_IOMMU=y
-CONFIG_AMD_IOMMU_STATS=y
-# CONFIG_MAXSMP is not set
-CONFIG_MTRR_SANITIZER=y
-CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=1
-CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1
-CONFIG_SYSPROF_TRACER=y
-# CONFIG_X86_VERBOSE_BOOTUP is not set
-# CONFIG_MMIOTRACE_TEST is not set
-
 CONFIG_X86_MPPARSE=y
 
-CONFIG_BACKLIGHT_APPLE=m
-
-CONFIG_OPROFILE_IBS=y
-CONFIG_MICROCODE_INTEL=y
-CONFIG_MICROCODE_AMD=y
-
-# CONFIG_X86_CHECK_BIOS_CORRUPTION is not set
-CONFIG_X86_RESERVE_LOW_64K=y
-
-# CONFIG_CMDLINE_BOOL is not set
-
-CONFIG_PANASONIC_LAPTOP=m
-
-CONFIG_X86_PTRACE_BTS=y
-
 CONFIG_I7300_IDLE=m
 CONFIG_INTR_REMAP=y
 
-CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
-
-CONFIG_POWER_TRACER=y
-CONFIG_HW_BRANCH_TRACER=y
-
 CONFIG_X86_X2APIC=y
 CONFIG_SPARSE_IRQ=y
 
 CONFIG_RCU_FANOUT=64
 
-# CONFIG_IOMMU_STRESS is not set
-
-CONFIG_PERF_COUNTERS=y
-CONFIG_PERF_EVENTS=y
-CONFIG_EVENT_PROFILE=y
-
-# CONFIG_X86_MCE_INJECT is not set
-
-CONFIG_SFI=y
-CONFIG_INPUT_WINBOND_CIR=m
-CONFIG_I2C_SCMI=m
-CONFIG_SBC_FITPC2_WATCHDOG=m
-CONFIG_EDAC_I3200=m
-CONFIG_TOPSTAR_LAPTOP=m
 CONFIG_INTEL_TXT=y
+
 CONFIG_GPIO_LANGWELL=y
 
 CONFIG_FUNCTION_GRAPH_TRACER=y
 
-CONFIG_ACPI_CMPC=m
-CONFIG_MSI_WMI=m
-CONFIG_TOSHIBA_BT_RFKILL=m
-CONFIG_SAMSUNG_LAPTOP=m
-
-CONFIG_CS5535_MFGPT=m
-CONFIG_GEODE_WDT=m
-CONFIG_CS5535_CLOCK_EVENT_SRC=m
-
-CONFIG_X86_DECODER_SELFTEST=y
-
-CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL=m
-
-CONFIG_VGA_SWITCHEROO=y
-CONFIG_LPC_SCH=m
-
 CONFIG_I7300_IDLE=m
 
-CONFIG_PCI_CNB20LE_QUIRK=y
-
-CONFIG_ACPI_EC_DEBUGFS=m
-# CONFIG_ACPI_APEI_ERST_DEBUG is not set
-CONFIG_INTEL_IDLE=y
-# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set
-CONFIG_SENSORS_PKGTEMP=m
-CONFIG_F71808E_WDT=m
-CONFIG_HPWDT_NMI_DECODING=y
-# CONFIG_MFD_TPS6586X is not set
-# CONFIG_INTEL_MID_DMAC is not set
-CONFIG_PCH_DMA=m
-# CONFIG_ACPI_QUICKSTART is not set
-CONFIG_IDEAPAD_ACPI=m
-CONFIG_INTEL_IPS=m
-CONFIG_IDEAPAD_LAPTOP=m
-# CONFIG_IBM_RTL is not set
-
-CONFIG_EDAC_MCE_INJ=m
-CONFIG_IRQ_TIME_ACCOUNTING=y
-CONFIG_X86_RESERVE_LOW=64
-
-CONFIG_PCH_GBE=m
-CONFIG_PCH_PHUB=m
-
-CONFIG_VIDEO_VIA_CAMERA=m
-
-CONFIG_JUMP_LABEL=y
-
-CONFIG_HP_ILO=m
-
-CONFIG_TRANSPARENT_HUGEPAGE=y
-
-CONFIG_HP_ACCEL=m
+CONFIG_BPF_JIT=y
 
-# CONFIG_RAPIDIO is not set
+# Should be 32bit only, but lacks KConfig depends
+# CONFIG_XO15_EBOOK is not set
 
-CONFIG_BPF_JIT=y
diff --git a/dmar-disable-when-ricoh-multifunction.patch b/dmar-disable-when-ricoh-multifunction.patch
index 120730f..a452861 100644
--- a/dmar-disable-when-ricoh-multifunction.patch
+++ b/dmar-disable-when-ricoh-multifunction.patch
@@ -9,8 +9,8 @@ Subject: [PATCH] dmar: disable if ricoh multifunction detected
 
 diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
 index 4789f8e..5923914 100644
---- a/drivers/pci/intel-iommu.c
-+++ b/drivers/pci/intel-iommu.c
+--- a/drivers/iommu/intel-iommu.c
++++ b/drivers/iommu/intel-iommu.c
 @@ -3784,6 +3784,16 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0044, quirk_calpella_no_shadow_g
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0062, quirk_calpella_no_shadow_gtt);
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x006a, quirk_calpella_no_shadow_gtt);
diff --git a/epoll-fix-spurious-lockdep-warnings.patch b/epoll-fix-spurious-lockdep-warnings.patch
index 131796a..c163a86 100644
--- a/epoll-fix-spurious-lockdep-warnings.patch
+++ b/epoll-fix-spurious-lockdep-warnings.patch
@@ -113,4 +113,4 @@ index f9cfd16..0cb7bc6 100644
 --
 To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
 the body of a message to majordomo at vger.kernel.org
-More majordomo info at  http://vger.kernel.org/majordomo-info.html
\ No newline at end of file
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff --git a/fix-cdc-ncm-dma-stack-vars.patch b/fix-cdc-ncm-dma-stack-vars.patch
index 7f46a00..17b555a 100644
--- a/fix-cdc-ncm-dma-stack-vars.patch
+++ b/fix-cdc-ncm-dma-stack-vars.patch
@@ -1,4 +1,4 @@
-commit d072ef23b8ee6bcabc00beff0b5702e704a473cb
+commit 05511b61169da2f8dab464df61fa2bb952763a23
 Author: Josh Boyer <jwboyer at redhat.com>
 Date:   Tue Aug 2 08:09:56 2011 -0400
 
@@ -13,11 +13,11 @@ Date:   Tue Aug 2 08:09:56 2011 -0400
     Signed-off-by: Josh Boyer <jwboyer at redhat.com>
 
 diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
-index fd622a6..96dd386 100644
+index a03336e..f06fb78 100644
 --- a/drivers/net/usb/cdc_ncm.c
 +++ b/drivers/net/usb/cdc_ncm.c
-@@ -260,23 +260,38 @@ static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx)
- 		req.wIndex = cpu_to_le16(iface_no);
+@@ -228,23 +228,40 @@ static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx)
+ 	if (ctx->rx_max != le32_to_cpu(ctx->ncm_parm.dwNtbInMaxSize)) {
  
  		if (flags & USB_CDC_NCM_NCAP_NTB_INPUT_SIZE) {
 -			struct usb_cdc_ncm_ndp_input_size ndp_in_sz;
@@ -28,87 +28,82 @@ index fd622a6..96dd386 100644
 +				err = -ENOMEM;
 +				goto size_err;
 +			}
- 
- 			req.wLength = 8;
--			ndp_in_sz.dwNtbInMaxSize = cpu_to_le32(ctx->rx_max);
--			ndp_in_sz.wNtbInMaxDatagrams =
-+			ndp_in_sz->dwNtbInMaxSize = cpu_to_le32(ctx->rx_max);
-+			ndp_in_sz->wNtbInMaxDatagrams =
- 					cpu_to_le16(CDC_NCM_DPT_DATAGRAMS_MAX);
--			ndp_in_sz.wReserved = 0;
--			err = cdc_ncm_do_request(ctx, &req, &ndp_in_sz, 0, NULL,
-+			ndp_in_sz->wReserved = 0;
-+			err = cdc_ncm_do_request(ctx, &req, ndp_in_sz, 0, NULL,
- 									1000);
++
+ 			err = usb_control_msg(ctx->udev,
+ 					usb_sndctrlpipe(ctx->udev, 0),
+ 					USB_CDC_SET_NTB_INPUT_SIZE,
+ 					USB_TYPE_CLASS | USB_DIR_OUT
+ 					 | USB_RECIP_INTERFACE,
+-					0, iface_no, &ndp_in_sz, 8, 1000);
++					0, iface_no, ndp_in_sz, 8, 1000);
 +			kfree(ndp_in_sz);
  		} else {
 -			__le32 dwNtbInMaxSize = cpu_to_le32(ctx->rx_max);
 +			__le32 *dwNtbInMaxSize;
-+			dwNtbInMaxSize = kzalloc(sizeof(*dwNtbInMaxSize), GFP_KERNEL);
++			dwNtbInMaxSize = kzalloc(sizeof(*dwNtbInMaxSize),
++					GFP_KERNEL);
 +			if (!dwNtbInMaxSize) {
 +				err = -ENOMEM;
 +				goto size_err;
 +			}
 +			*dwNtbInMaxSize = cpu_to_le32(ctx->rx_max);
- 
- 			req.wLength = 4;
--			err = cdc_ncm_do_request(ctx, &req, &dwNtbInMaxSize, 0,
-+			err = cdc_ncm_do_request(ctx, &req, dwNtbInMaxSize, 0,
- 								NULL, 1000);
++
+ 			err = usb_control_msg(ctx->udev,
+ 					usb_sndctrlpipe(ctx->udev, 0),
+ 					USB_CDC_SET_NTB_INPUT_SIZE,
+ 					USB_TYPE_CLASS | USB_DIR_OUT
+ 					 | USB_RECIP_INTERFACE,
+-					0, iface_no, &dwNtbInMaxSize, 4, 1000);
++					0, iface_no, dwNtbInMaxSize, 4, 1000);
 +			kfree(dwNtbInMaxSize);
  		}
- 
+-
 +size_err:
- 		if (err)
+ 		if (err < 0)
  			pr_debug("Setting NTB Input Size failed\n");
  	}
-@@ -362,9 +377,15 @@ static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx)
+@@ -325,19 +342,29 @@ static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx)
  
  	/* set Max Datagram Size (MTU) */
  	if (flags & USB_CDC_NCM_NCAP_MAX_DATAGRAM_SIZE) {
 -		__le16 max_datagram_size;
 +		__le16 *max_datagram_size;
  		u16 eth_max_sz = le16_to_cpu(ctx->ether_desc->wMaxSegmentSize);
- 
-+		max_datagram_size = kzalloc(sizeof(*max_datagram_size), GFP_KERNEL);
++
++		max_datagram_size = kzalloc(sizeof(*max_datagram_size),
++				GFP_KERNEL);
 +		if (!max_datagram_size) {
 +			err = -ENOMEM;
 +			goto max_dgram_err;
 +		}
 +
- 		req.bmRequestType = USB_TYPE_CLASS | USB_DIR_IN |
- 							USB_RECIP_INTERFACE;
- 		req.bNotificationType = USB_CDC_GET_MAX_DATAGRAM_SIZE;
-@@ -372,13 +393,15 @@ static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx)
- 		req.wIndex = cpu_to_le16(iface_no);
- 		req.wLength = cpu_to_le16(2);
- 
--		err = cdc_ncm_do_request(ctx, &req, &max_datagram_size, 0, NULL,
-+		err = cdc_ncm_do_request(ctx, &req, max_datagram_size, 0, NULL,
- 									1000);
-+
- 		if (err) {
+ 		err = usb_control_msg(ctx->udev, usb_rcvctrlpipe(ctx->udev, 0),
+ 				USB_CDC_GET_MAX_DATAGRAM_SIZE,
+ 				USB_TYPE_CLASS | USB_DIR_IN
+ 				 | USB_RECIP_INTERFACE,
+-				0, iface_no, &max_datagram_size,
++				0, iface_no, max_datagram_size,
+ 				2, 1000);
+ 		if (err < 0) {
  			pr_debug("GET_MAX_DATAGRAM_SIZE failed, use size=%u\n",
  						CDC_NCM_MIN_DATAGRAM_SIZE);
 +			kfree(max_datagram_size);
  		} else {
 -			ctx->max_datagram_size = le16_to_cpu(max_datagram_size);
-+			ctx->max_datagram_size = le16_to_cpu(*max_datagram_size);
++			ctx->max_datagram_size =
++				le16_to_cpu(*max_datagram_size);
  			/* Check Eth descriptor value */
  			if (eth_max_sz < CDC_NCM_MAX_DATAGRAM_SIZE) {
  				if (ctx->max_datagram_size > eth_max_sz)
-@@ -401,10 +424,12 @@ static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx)
- 			req.wValue = 0;
- 			req.wIndex = cpu_to_le16(iface_no);
- 			req.wLength = 2;
--			max_datagram_size = cpu_to_le16(ctx->max_datagram_size);
-+			*max_datagram_size = cpu_to_le16(ctx->max_datagram_size);
- 
--			err = cdc_ncm_do_request(ctx, &req, &max_datagram_size,
-+			err = cdc_ncm_do_request(ctx, &req, max_datagram_size,
- 								0, NULL, 1000);
+@@ -360,8 +387,10 @@ static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx)
+ 						USB_TYPE_CLASS | USB_DIR_OUT
+ 						 | USB_RECIP_INTERFACE,
+ 						0,
+-						iface_no, &max_datagram_size,
++						iface_no, max_datagram_size,
+ 						2, 1000);
 +			kfree(max_datagram_size);
 +max_dgram_err:
- 			if (err)
+ 			if (err < 0)
  				pr_debug("SET_MAX_DATAGRAM_SIZE failed\n");
  		}
diff --git a/kernel.spec b/kernel.spec
index 1050a98..30e1829 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -6,7 +6,7 @@ Summary: The Linux kernel
 # For a stable, released kernel, released_kernel should be 1. For rawhide
 # and/or a kernel built from an rc or git snapshot, released_kernel should
 # be 0.
-%global released_kernel 1
+%global released_kernel 0
 
 # Save original buildid for later if it's defined
 %if 0%{?buildid:1}
@@ -51,7 +51,7 @@ Summary: The Linux kernel
 # For non-released -rc kernels, this will be prepended with "0.", so
 # for example a 3 here will become 0.3
 #
-%global baserelease 6
+%global baserelease 1
 %global fedora_build %{baserelease}
 
 # base_sublevel is the kernel version we're starting with and patching
@@ -63,7 +63,7 @@ Summary: The Linux kernel
 %if 0%{?released_kernel}
 
 # Do we have a -stable update to apply?
-%define stable_update 1
+%define stable_update 0
 # Is it a -stable RC?
 %define stable_rc 0
 # Set rpm version accordingly
@@ -80,10 +80,9 @@ Summary: The Linux kernel
 ## The not-released-kernel case ##
 %else
 # The next upstream release sublevel (base_sublevel+1)
-# % define upstream_sublevel %(echo $((%{base_sublevel} + 1)))
-%define upstream_sublevel 0
+%define upstream_sublevel %(echo $((%{base_sublevel} + 1)))
 # The rc snapshot level
-%define rcrev 0
+%define rcrev 2
 # The git snapshot level
 %define gitrev 0
 # Set rpm version accordingly
@@ -544,6 +543,7 @@ Source24: config-rhel-generic
 
 Source30: config-x86-generic
 Source31: config-i686-PAE
+Source32: config-x86-32-generic
 
 Source40: config-x86_64-generic
 
@@ -641,8 +641,6 @@ Patch470: die-floppy-die.patch
 Patch510: linux-2.6-silence-noise.patch
 Patch530: linux-2.6-silence-fbcon-logo.patch
 
-Patch610: hda_intel-prealloc-4mb-dmabuffer.patch
-
 Patch700: linux-2.6-e1000-ich9-montevina.patch
 
 Patch800: linux-2.6-crash-driver.patch
@@ -684,14 +682,14 @@ Patch12010: add-appleir-usb-driver.patch
 
 Patch12016: disable-i8042-check-on-apple-mac.patch
 
-Patch12020: linux-2.6-zd1211rw-fix-invalid-signal-values-from-device.patch
-
 Patch12021: udlfb-bind-framebuffer-to-interface.patch
 
 Patch12022: fix-cdc-ncm-dma-stack-vars.patch
 Patch12023: ums-realtek-driver-uses-stack-memory-for-DMA.patch
-Patch12024: block-stray-block-put-after-teardown.patch
-Patch12025: usb-add-quirk-for-logitech-webcams.patch
+Patch12024: epoll-fix-spurious-lockdep-warnings.patch
+Patch12025: rcu-avoid-just-onlined-cpu-resched.patch
+Patch12026: block-stray-block-put-after-teardown.patch
+Patch12027: usb-add-quirk-for-logitech-webcams.patch
 
 # Runtime power management
 Patch12203: linux-2.6-usb-pci-autosuspend.patch
@@ -700,9 +698,6 @@ Patch12205: runtime_pm_fixups.patch
 
 Patch12303: dmar-disable-when-ricoh-multifunction.patch
 
-Patch13001: epoll-fix-spurious-lockdep-warnings.patch
-Patch13002: hfsplus-ensure-bio-requests-are-not-smaller-than-the.patch
-
 Patch13003: efi-dont-map-boot-services-on-32bit.patch
 
 Patch20000: utrace.patch
@@ -1209,11 +1204,9 @@ ApplyPatch linux-2.6-defaults-aspm.patch
 # ACPI
 
 # ALSA
-ApplyPatch hda_intel-prealloc-4mb-dmabuffer.patch
 
 # Networking
 
-ApplyPatch linux-2.6-zd1211rw-fix-invalid-signal-values-from-device.patch
 
 # Misc fixes
 # The input layer spews crap no-one cares about.
@@ -1276,6 +1269,8 @@ ApplyPatch add-appleir-usb-driver.patch
 ApplyPatch udlfb-bind-framebuffer-to-interface.patch
 ApplyPatch fix-cdc-ncm-dma-stack-vars.patch
 ApplyPatch ums-realtek-driver-uses-stack-memory-for-DMA.patch
+ApplyPatch epoll-fix-spurious-lockdep-warnings.patch
+ApplyPatch rcu-avoid-just-onlined-cpu-resched.patch
 ApplyPatch block-stray-block-put-after-teardown.patch
 ApplyPatch usb-add-quirk-for-logitech-webcams.patch
 
@@ -1288,9 +1283,6 @@ ApplyPatch usb-add-quirk-for-logitech-webcams.patch
 # rhbz#605888
 ApplyPatch dmar-disable-when-ricoh-multifunction.patch
 
-ApplyPatch epoll-fix-spurious-lockdep-warnings.patch
-ApplyPatch hfsplus-ensure-bio-requests-are-not-smaller-than-the.patch
-
 ApplyPatch efi-dont-map-boot-services-on-32bit.patch
 
 # utrace.
@@ -1304,6 +1296,7 @@ ApplyPatch utrace.patch
 
 chmod +x scripts/checkpatch.pl
 
+# This Prevents scripts/setlocalversion from mucking with our version numbers.
 touch .scmversion
 
 # only deal with configs if we are going to build for the arch
diff --git a/linux-2.6-crash-driver.patch b/linux-2.6-crash-driver.patch
index b8377d3..239f0f6 100644
--- a/linux-2.6-crash-driver.patch
+++ b/linux-2.6-crash-driver.patch
@@ -1,17 +1,17 @@
-From df42d15cd28f468ecd4c30465b98a53cce90617c Mon Sep 17 00:00:00 2001
+From f72d640713d01b3b704c6e84ab49b62f19fc9c22 Mon Sep 17 00:00:00 2001
 From: Kyle McMartin <kyle at phobos.i.jkkm.org>
 Date: Tue, 30 Mar 2010 00:16:25 -0400
-Subject: dev-crash-driver.patch
+Subject: [PATCH] dev-crash-driver.patch
 
 ---
  arch/ia64/include/asm/crash.h |   90 +++++++++++++++++++++++++++++
  arch/ia64/kernel/ia64_ksyms.c |    3 +
  arch/x86/include/asm/crash.h  |   75 ++++++++++++++++++++++++
  arch/x86/mm/ioremap.c         |    2 +
- drivers/char/Kconfig          |    2 +
+ drivers/char/Kconfig          |    3 +
  drivers/char/Makefile         |    2 +
  drivers/char/crash.c          |  128 +++++++++++++++++++++++++++++++++++++++++
- 7 files changed, 302 insertions(+), 0 deletions(-)
+ 7 files changed, 303 insertions(+), 0 deletions(-)
  create mode 100644 arch/ia64/include/asm/crash.h
  create mode 100644 arch/x86/include/asm/crash.h
  create mode 100644 drivers/char/crash.c
@@ -208,7 +208,7 @@ index 0000000..dfcc006
 +
 +#endif /* _ASM_I386_CRASH_H */
 diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
-index 5eb1ba7..3e525d2 100644
+index be1ef57..ac659f7 100644
 --- a/arch/x86/mm/ioremap.c
 +++ b/arch/x86/mm/ioremap.c
 @@ -24,6 +24,8 @@
@@ -220,6 +220,30 @@ index 5eb1ba7..3e525d2 100644
  /*
   * Fix up the linear direct mapping of the kernel to avoid cache attribute
   * conflicts.
+diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
+index 423fd56..e04a561 100644
+--- a/drivers/char/Kconfig
++++ b/drivers/char/Kconfig
+@@ -4,6 +4,9 @@
+ 
+ menu "Character devices"
+ 
++config CRASH
++	tristate "Crash Utility memory driver"
++
+ source "drivers/tty/Kconfig"
+ 
+ config DEVKMEM
+diff --git a/drivers/char/Makefile b/drivers/char/Makefile
+index 32762ba..3d5d525 100644
+--- a/drivers/char/Makefile
++++ b/drivers/char/Makefile
+@@ -65,3 +65,5 @@ obj-$(CONFIG_JS_RTC)		+= js-rtc.o
+ js-rtc-y = rtc.o
+ 
+ obj-$(CONFIG_TILE_SROM)		+= tile-srom.o
++
++obj-$(CONFIG_CRASH)            += crash.o
 diff --git a/drivers/char/crash.c b/drivers/char/crash.c
 new file mode 100644
 index 0000000..e5437de
@@ -354,29 +378,6 @@ index 0000000..e5437de
 +module_exit(crash_cleanup_module);
 +
 +MODULE_LICENSE("GPL");
+-- 
+1.7.6
 
-diff --git a/drivers/char/Makefile b/drivers/char/Makefile
-index ba53ec9..6588b33 100644
---- a/drivers/char/Makefile
-+++ b/drivers/char/Makefile
-@@ -98,3 +98,5 @@ obj-$(CONFIG_RAMOOPS)		+= ramoops.o
- 
- obj-$(CONFIG_JS_RTC)		+= js-rtc.o
- js-rtc-y = rtc.o
-+
-+obj-$(CONFIG_CRASH)		+= crash.o
-
-diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
-index 04f8b2d..e8fb997 100644
---- a/drivers/char/Kconfig
-+++ b/drivers/char/Kconfig
-@@ -4,6 +4,9 @@
- 
- menu "Character devices"
- 
-+config CRASH
-+	tristate "Crash Utility memory driver"
-+
- source "drivers/tty/Kconfig"
- 
- config DEVKMEM
diff --git a/linux-2.6-intel-iommu-igfx.patch b/linux-2.6-intel-iommu-igfx.patch
index 44fd141..b2f8f19 100644
--- a/linux-2.6-intel-iommu-igfx.patch
+++ b/linux-2.6-intel-iommu-igfx.patch
@@ -43,8 +43,8 @@ index e7848a0..9914485 100644
  			for io virtual address below 32 bit forcing dual
 diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
 index 4173125..8f36786 100644
---- a/drivers/pci/intel-iommu.c
-+++ b/drivers/pci/intel-iommu.c
+--- a/drivers/iommu/intel-iommu.c
++++ b/drivers/iommu/intel-iommu.c
 @@ -340,7 +340,8 @@ int dmar_disabled = 0;
  int dmar_disabled = 1;
  #endif /*CONFIG_DMAR_DEFAULT_ON*/
diff --git a/linux-2.6-silence-noise.patch b/linux-2.6-silence-noise.patch
index 8aba3cd..1e4d7c5 100644
--- a/linux-2.6-silence-noise.patch
+++ b/linux-2.6-silence-noise.patch
@@ -46,8 +46,8 @@ Signed-off-by: Dave Jones <davej at redhat.com>
 +		 * In case of error we but don't return the error code immediately.
 +		 * Below we will return -EPROTONOSUPPORT
  		 */
--		if (err && printk_ratelimit())
--			printk(KERN_ERR "can: request_module "
+-		if (err)
+-			printk_ratelimited(KERN_ERR "can: request_module "
 -			       "(can-proto-%d) failed.\n", protocol);
  
  		cp = can_get_proto(protocol);
diff --git a/linux-2.6.30-no-pcspkr-modalias.patch b/linux-2.6.30-no-pcspkr-modalias.patch
index c703b88..439269c 100644
--- a/linux-2.6.30-no-pcspkr-modalias.patch
+++ b/linux-2.6.30-no-pcspkr-modalias.patch
@@ -1,11 +1,12 @@
-diff -up linux-2.6.30.noarch/drivers/input/misc/pcspkr.c.jx linux-2.6.30.noarch/drivers/input/misc/pcspkr.c
---- linux-2.6.30.noarch/drivers/input/misc/pcspkr.c.jx	2009-07-28 16:54:44.000000000 -0400
-+++ linux-2.6.30.noarch/drivers/input/misc/pcspkr.c	2009-07-28 16:59:36.000000000 -0400
-@@ -23,7 +23,6 @@
+diff --git a/drivers/input/misc/pcspkr.c b/drivers/input/misc/pcspkr.c
+index 34f4d2e..3e40c70 100644
+--- a/drivers/input/misc/pcspkr.c
++++ b/drivers/input/misc/pcspkr.c
+@@ -24,7 +24,6 @@
  MODULE_AUTHOR("Vojtech Pavlik <vojtech at ucw.cz>");
  MODULE_DESCRIPTION("PC Speaker beeper driver");
  MODULE_LICENSE("GPL");
 -MODULE_ALIAS("platform:pcspkr");
  
- #if defined(CONFIG_MIPS) || defined(CONFIG_X86)
- /* Use the global PIT lock ! */
+ static int pcspkr_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
+ {
diff --git a/rcu-avoid-just-onlined-cpu-resched.patch b/rcu-avoid-just-onlined-cpu-resched.patch
new file mode 100644
index 0000000..517f375
--- /dev/null
+++ b/rcu-avoid-just-onlined-cpu-resched.patch
@@ -0,0 +1,47 @@
+rcu: Avoid having just-onlined CPU resched itself when RCU is idle
+
+CPUs set rdp->qs_pending when coming online to resolve races with
+grace-period start.  However, this means that if RCU is idle, the
+just-onlined CPU might needlessly send itself resched IPIs.  Adjust
+the online-CPU initialization to avoid this, and also to correctly
+cause the CPU to respond to the current grace period if needed.
+
+Signed-off-by: Paul E. McKenney <paulmck at linux.vnet.ibm.com>
+---
+ kernel/rcutree.c |   13 +++++++++----
+ 1 files changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/kernel/rcutree.c b/kernel/rcutree.c
+index ba06207..472d6b2 100644
+--- a/kernel/rcutree.c
++++ b/kernel/rcutree.c
+@@ -1865,8 +1865,6 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp, int preemptible)
+ 
+ 	/* Set up local state, ensuring consistent view of global state. */
+ 	raw_spin_lock_irqsave(&rnp->lock, flags);
+-	rdp->passed_quiesc = 0;  /* We could be racing with new GP, */
+-	rdp->qs_pending = 1;	 /*  so set up to respond to current GP. */
+ 	rdp->beenonline = 1;	 /* We have now been online. */
+ 	rdp->preemptible = preemptible;
+ 	rdp->qlen_last_fqs_check = 0;
+@@ -1891,8 +1889,15 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp, int preemptible)
+ 		rnp->qsmaskinit |= mask;
+ 		mask = rnp->grpmask;
+ 		if (rnp == rdp->mynode) {
+-			rdp->gpnum = rnp->completed; /* if GP in progress... */
+-			rdp->completed = rnp->completed;
++			/*
++			 * If there is a grace period in progress, we will
++			 * set up to wait for it next time we run the
++			 * RCU core code.
++			 */
++			rdp->gpnum = rnp->completed;
++ 			rdp->completed = rnp->completed;
++			rdp->passed_quiesc = 0;
++			rdp->qs_pending = 0;
+ 			rdp->passed_quiesc_completed = rnp->completed - 1;
+ 		}
+ 		raw_spin_unlock(&rnp->lock); /* irqs already disabled. */
+-- 
+1.7.6
+
diff --git a/sources b/sources
index e117e49..e9feef6 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
 398e95866794def22b12dfbc15ce89c0  linux-3.0.tar.bz2
-ac49f7907f1fc85fbab92d0f1aa1552a  patch-3.0.1.bz2
+f358c354ab6d3b0da1265b504f85ec50  patch-3.1-rc2.bz2
diff --git a/ums-realtek-driver-uses-stack-memory-for-DMA.patch b/ums-realtek-driver-uses-stack-memory-for-DMA.patch
index 2564fdb..98c8b0c 100644
--- a/ums-realtek-driver-uses-stack-memory-for-DMA.patch
+++ b/ums-realtek-driver-uses-stack-memory-for-DMA.patch
@@ -1,22 +1,69 @@
-commit 82e632009bb7d6b97f8cabe9918c82703f4e5cd2
-Author: Josh Boyer <jwboyer at redhat.com>
-Date:   Tue Aug 2 08:37:53 2011 -0400
+From patchwork Tue Aug  2 05:04:11 2011
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 8bit
+Subject: ums-realtek driver uses stack memory for DMA
+Date: Tue, 02 Aug 2011 05:04:11 -0000
+From: Adam Cozzette <acozzette at cs.hmc.edu>
+X-Patchwork-Id: 1028062
+Message-Id: <20110802050411.GC3857@[192.168.0.12]>
+To: Josh Boyer <jwboyer at redhat.com>
+Cc: edwin_rong <edwin_rong at realsil.com.cn>, wwang <wei_wang at realsil.com.cn>, 
+ Greg Kroah-Hartman <gregkh at suse.de>, linux-usb at vger.kernel.org,
+ linux-kernel at vger.kernel.org
 
-    This patch changed rts51x_read_mem, rts51x_write_mem, and rts51x_read_status to
-    allocate temporary buffers with kmalloc. This way stack addresses are not used
-    for DMA when these functions call rts51x_bulk_transport.
-    
-    Signed-off-by: Adam Cozzette <acozzette at cs.hmc.edu>
-    Backported-by: Josh Boyer <jwboyer at redhat.com>
+On Mon, Aug 01, 2011 at 05:09:06PM -0400, Josh Boyer wrote:
+> Hello,
+> 
+> We have a report that the ums-realtek driver is generating a backtrace
+> due to using stack variables for DMA buffers.  The backtrace is below
+> and you can view the bug report here:
+> https://bugzilla.redhat.com/show_bug.cgi?id=720054
+> 
+> Looking through the code, it seems that every call to rts51x_read_mem,
+> rts51x_write_mem, and rts51x_read_status passes a stack variable to
+> rts51x_bulk_transport, which then calls usb_stor_bulk_transfer_buf with
+> this and generates the backtrace.  It is my understanding that the
+> driver should be passing variables that are not on the stack and have
+> been allocated with memory that will be suitable for the DMA api (e.g.
+> kmalloc).
+> 
+> Was this missed during the initial review and is anyone working on
+> adapting the driver to be compliant?
+
+Could you try out this patch if it looks ok to you? I have not tested it because
+unfortunately I don't have the hardware. Right now it generates some compile
+warnings like this one:
+
+drivers/usb/storage/realtek_cr.c:419:40: warning: ‘buf[0]’ may be used uninitialized in this function [-Wuninitialized]
+
+It think they are harmless but I didn't see an obvious way to get rid of them,
+so if you have any suggestions I would be glad to hear them.
+
+This patch changed rts51x_read_mem, rts51x_write_mem, and rts51x_read_status to
+allocate temporary buffers with kmalloc. This way stack addresses are not used
+for DMA when these functions call rts51x_bulk_transport.
+
+Signed-off-by: Adam Cozzette <acozzette at cs.hmc.edu>
+
+---
+realtek_cr.c |   35 ++++++++++++++++++++++++++++++-----
+ 1 file changed, 30 insertions(+), 5 deletions(-)
+
+--
+To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
+the body of a message to majordomo at vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+Please read the FAQ at  http://www.tux.org/lkml/
 
 diff --git a/drivers/usb/storage/realtek_cr.c b/drivers/usb/storage/realtek_cr.c
-index d509a4a..69a1bd3 100644
+index 34adc4b..232167a 100644
 --- a/drivers/usb/storage/realtek_cr.c
 +++ b/drivers/usb/storage/realtek_cr.c
-@@ -285,6 +285,11 @@ static int rts51x_read_mem(struct us_data *us, u16 addr, u8 *data, u16 len)
+@@ -320,6 +320,11 @@ static int rts51x_read_mem(struct us_data *us, u16 addr, u8 *data, u16 len)
  {
  	int retval;
- 	u8 cmnd[12] = {0};
+ 	u8 cmnd[12] = { 0 };
 +	u8 *buf;
 +
 +	buf = kmalloc(len, GFP_NOIO);
@@ -25,8 +72,8 @@ index d509a4a..69a1bd3 100644
  
  	US_DEBUGP("%s, addr = 0x%x, len = %d\n", __func__, addr, len);
  
-@@ -296,10 +301,14 @@ static int rts51x_read_mem(struct us_data *us, u16 addr, u8 *data, u16 len)
- 	cmnd[5] = (u8)len;
+@@ -331,10 +336,14 @@ static int rts51x_read_mem(struct us_data *us, u16 addr, u8 *data, u16 len)
+ 	cmnd[5] = (u8) len;
  
  	retval = rts51x_bulk_transport(us, 0, cmnd, 12,
 -				       data, len, DMA_FROM_DEVICE, NULL);
@@ -42,10 +89,10 @@ index d509a4a..69a1bd3 100644
  	return 0;
  }
  
-@@ -307,6 +316,12 @@ static int rts51x_write_mem(struct us_data *us, u16 addr, u8 *data, u16 len)
+@@ -342,6 +351,12 @@ static int rts51x_write_mem(struct us_data *us, u16 addr, u8 *data, u16 len)
  {
  	int retval;
- 	u8 cmnd[12] = {0};
+ 	u8 cmnd[12] = { 0 };
 +	u8 *buf;
 +
 +	buf = kmalloc(len, GFP_NOIO);
@@ -55,8 +102,8 @@ index d509a4a..69a1bd3 100644
  
  	US_DEBUGP("%s, addr = 0x%x, len = %d\n", __func__, addr, len);
  
-@@ -318,7 +333,8 @@ static int rts51x_write_mem(struct us_data *us, u16 addr, u8 *data, u16 len)
- 	cmnd[5] = (u8)len;
+@@ -353,7 +368,8 @@ static int rts51x_write_mem(struct us_data *us, u16 addr, u8 *data, u16 len)
+ 	cmnd[5] = (u8) len;
  
  	retval = rts51x_bulk_transport(us, 0, cmnd, 12,
 -				       data, len, DMA_TO_DEVICE, NULL);
@@ -65,10 +112,10 @@ index d509a4a..69a1bd3 100644
  	if (retval != USB_STOR_TRANSPORT_GOOD)
  		return -EIO;
  
-@@ -330,6 +346,11 @@ static int rts51x_read_status(struct us_data *us,
+@@ -365,6 +381,11 @@ static int rts51x_read_status(struct us_data *us,
  {
  	int retval;
- 	u8 cmnd[12] = {0};
+ 	u8 cmnd[12] = { 0 };
 +	u8 *buf;
 +
 +	buf = kmalloc(len, GFP_NOIO);
@@ -77,7 +124,7 @@ index d509a4a..69a1bd3 100644
  
  	US_DEBUGP("%s, lun = %d\n", __func__, lun);
  
-@@ -337,10 +358,14 @@ static int rts51x_read_status(struct us_data *us,
+@@ -372,10 +393,14 @@ static int rts51x_read_status(struct us_data *us,
  	cmnd[1] = 0x09;
  
  	retval = rts51x_bulk_transport(us, lun, cmnd, 12,
diff --git a/utrace.patch b/utrace.patch
index f70d0b1..c04ac77 100644
--- a/utrace.patch
+++ b/utrace.patch
@@ -1,42 +1,42 @@
-From davej  Sun Aug  7 15:19:08 2011
+From davej  Wed Aug  3 15:16:11 2011
 Return-Path: oleg at redhat.com
-Received: from mail.corp.redhat.com [10.5.5.51]
+Received: from mail.corp.redhat.com [10.5.5.52]
 	by gelk with IMAP (fetchmail-6.3.20)
-	for <davej at localhost> (single-drop); Sun, 07 Aug 2011 15:19:08 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
- zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
- mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:17:59 -0400 (EDT)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:16:11 -0400 (EDT)
+Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
+ zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:15:37 -0400 (EDT)
 Received: from localhost (localhost.localdomain [127.0.0.1])
-	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id F09A8A5D58;
-	Sun,  7 Aug 2011 15:17:58 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
-	by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
-	with ESMTP id 6mY7uBb0+l7B; Sun,  7 Aug 2011 15:17:58 -0400 (EDT)
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 92D6F9D8C5;
+	Wed,  3 Aug 2011 15:12:08 -0400 (EDT)
+Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+	by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+	with ESMTP id RRq2PiCBdMzK; Wed,  3 Aug 2011 15:12:08 -0400 (EDT)
 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
-	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id D1DFE9C7FA;
-	Sun,  7 Aug 2011 15:17:58 -0400 (EDT)
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 75C149D898;
+	Wed,  3 Aug 2011 15:12:08 -0400 (EDT)
 Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
-	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JHtc4027719;
-	Sun, 7 Aug 2011 15:17:56 -0400
+	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JC01d029136;
+	Wed, 3 Aug 2011 15:12:01 -0400
 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
-	oleg at redhat.com; Sun,  7 Aug 2011 21:15:19 +0200 (CEST)
-Date: Sun, 7 Aug 2011 21:15:17 +0200
+	oleg at redhat.com; Wed,  3 Aug 2011 21:09:28 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:09:26 +0200
 From: Oleg Nesterov <oleg at redhat.com>
-To: "Frank Ch. Eigler" <fche at redhat.com>, Kyle McMartin <kmcmartin at redhat.com>,
-        Dave Jones <davej at redhat.com>, Josh Stone <jistone at redhat.com>,
-        Matthew Garrett <mjg at redhat.com>, David Smith <dsmith at redhat.com>
-Cc: kernel at lists.fedoraproject.org
-Subject: [PATCH 01/22] utrace core
-Message-ID: <20110807191517.GA14365 at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 01/31] utrace core
+Message-ID: <20110803190926.GA30903 at redhat.com>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
-In-Reply-To: <20110807191434.GA13184 at redhat.com>
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
 User-Agent: Mutt/1.5.18 (2008-05-17)
 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
 Status: RO
-Content-Length: 148212
-Lines: 4118
+Content-Length: 139951
+Lines: 3867
 
 From: Roland McGrath <roland at redhat.com>
 
@@ -59,11 +59,11 @@ the next patches try to fix this.
 
 This is is same/old utrace-core patch except:
 
-	- use group_stop/GROUP_STOP_DEQUEUED instead of removed
+	- use task->jobctl/JOBCTL_STOP_DEQUEUED instead of removed
 	  signal->flags/SIGNAL_STOP_DEQUEUED in utrace_get_signal()
 
-	- rediff the changes in tracehook.h against the current code
-	  without PT_PTRACED tweaks which were needed for ptrace-utrace
+	- do not include the tracehook changes, this comes with the
+	  next patches
 
 Signed-off-by: Roland McGrath <roland at redhat.com>
 Signed-off-by: Oleg Nesterov <oleg at redhat.com>
@@ -72,30 +72,28 @@ Signed-off-by: Oleg Nesterov <oleg at redhat.com>
  Documentation/DocBook/utrace.tmpl |  589 +++++++++
  fs/proc/array.c                   |    3 +
  include/linux/sched.h             |    5 +
- include/linux/tracehook.h         |   85 ++-
  include/linux/utrace.h            |  692 +++++++++++
  init/Kconfig                      |    9 +
  kernel/Makefile                   |    1 +
- kernel/fork.c                     |    3 +
  kernel/utrace.c                   | 2440 +++++++++++++++++++++++++++++++++++++
- 10 files changed, 3827 insertions(+), 2 deletions(-)
+ 8 files changed, 3740 insertions(+), 1 deletions(-)
  create mode 100644 Documentation/DocBook/utrace.tmpl
  create mode 100644 include/linux/utrace.h
  create mode 100644 kernel/utrace.c
 
 diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
-index 3cebfa0..86c288b 100644
+index 66725a3..08ed954 100644
 --- a/Documentation/DocBook/Makefile
 +++ b/Documentation/DocBook/Makefile
 @@ -14,7 +14,7 @@ DOCBOOKS := z8530book.xml mcabook.xml device-drivers.xml \
  	    genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
  	    80211.xml debugobjects.xml sh.xml regulator.xml \
  	    alsa-driver-api.xml writing-an-alsa-driver.xml \
--	    tracepoint.xml media.xml drm.xml
-+	    tracepoint.xml utrace.xml media.xml drm.xml
+-	    tracepoint.xml drm.xml media_api.xml
++	    tracepoint.xml utrace.xml drm.xml media_api.xml
+ 
+ include $(srctree)/Documentation/DocBook/media/Makefile
  
- ###
- # The build process is as follows (targets):
 diff --git a/Documentation/DocBook/utrace.tmpl b/Documentation/DocBook/utrace.tmpl
 new file mode 100644
 index 0000000..0c40add
@@ -692,7 +690,7 @@ index 0000000..0c40add
 +
 +</book>
 diff --git a/fs/proc/array.c b/fs/proc/array.c
-index 9b45ee8..496fef3 100644
+index 3a1dafd..f0c0ea2 100644
 --- a/fs/proc/array.c
 +++ b/fs/proc/array.c
 @@ -81,6 +81,7 @@
@@ -713,10 +711,10 @@ index 9b45ee8..496fef3 100644
  	if (p->files)
  		fdt = files_fdtable(p->files);
 diff --git a/include/linux/sched.h b/include/linux/sched.h
-index a837b20..b87de83 100644
+index 20b03bf..c6d79af 100644
 --- a/include/linux/sched.h
 +++ b/include/linux/sched.h
-@@ -1397,6 +1397,11 @@ struct task_struct {
+@@ -1406,6 +1406,11 @@ struct task_struct {
  #endif
  	seccomp_t seccomp;
  
@@ -728,235 +726,6 @@ index a837b20..b87de83 100644
  /* Thread group tracking */
     	u32 parent_exec_id;
     	u32 self_exec_id;
-diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
-index e95f523..7d7bdde 100644
---- a/include/linux/tracehook.h
-+++ b/include/linux/tracehook.h
-@@ -49,6 +49,7 @@
- #include <linux/sched.h>
- #include <linux/ptrace.h>
- #include <linux/security.h>
-+#include <linux/utrace.h>
- struct linux_binprm;
- 
- /**
-@@ -63,6 +64,8 @@ struct linux_binprm;
-  */
- static inline int tracehook_expect_breakpoints(struct task_struct *task)
- {
-+	if (unlikely(task_utrace_flags(task) & UTRACE_EVENT(SIGNAL_CORE)))
-+		return 1;
- 	return (task_ptrace(task) & PT_PTRACED) != 0;
- }
- 
-@@ -111,6 +114,9 @@ static inline void ptrace_report_syscall(struct pt_regs *regs)
- static inline __must_check int tracehook_report_syscall_entry(
- 	struct pt_regs *regs)
- {
-+	if ((task_utrace_flags(current) & UTRACE_EVENT(SYSCALL_ENTRY)) &&
-+	    utrace_report_syscall_entry(regs))
-+		return 1;
- 	ptrace_report_syscall(regs);
- 	return 0;
- }
-@@ -134,6 +140,9 @@ static inline __must_check int tracehook_report_syscall_entry(
-  */
- static inline void tracehook_report_syscall_exit(struct pt_regs *regs, int step)
- {
-+	if (task_utrace_flags(current) & UTRACE_EVENT(SYSCALL_EXIT))
-+		utrace_report_syscall_exit(regs);
-+
- 	if (step) {
- 		siginfo_t info;
- 		user_single_step_siginfo(current, regs, &info);
-@@ -201,6 +210,8 @@ static inline void tracehook_report_exec(struct linux_binfmt *fmt,
- 					 struct linux_binprm *bprm,
- 					 struct pt_regs *regs)
- {
-+	if (unlikely(task_utrace_flags(current) & UTRACE_EVENT(EXEC)))
-+		utrace_report_exec(fmt, bprm, regs);
- 	if (!ptrace_event(PT_TRACE_EXEC, PTRACE_EVENT_EXEC, 0) &&
- 	    unlikely(task_ptrace(current) & PT_PTRACED))
- 		send_sig(SIGTRAP, current, 0);
-@@ -218,10 +229,37 @@ static inline void tracehook_report_exec(struct linux_binfmt *fmt,
-  */
- static inline void tracehook_report_exit(long *exit_code)
- {
-+	if (unlikely(task_utrace_flags(current) & UTRACE_EVENT(EXIT)))
-+		utrace_report_exit(exit_code);
- 	ptrace_event(PT_TRACE_EXIT, PTRACE_EVENT_EXIT, *exit_code);
- }
- 
- /**
-+ * tracehook_init_task - task_struct has just been copied
-+ * @task:		new &struct task_struct just copied from parent
-+ *
-+ * Called from do_fork() when @task has just been duplicated.
-+ * After this, @task will be passed to tracehook_free_task()
-+ * even if the rest of its setup fails before it is fully created.
-+ */
-+static inline void tracehook_init_task(struct task_struct *task)
-+{
-+	utrace_init_task(task);
-+}
-+
-+/**
-+ * tracehook_free_task - task_struct is being freed
-+ * @task:		dead &struct task_struct being freed
-+ *
-+ * Called from free_task() when @task is no longer in use.
-+ */
-+static inline void tracehook_free_task(struct task_struct *task)
-+{
-+	if (task_utrace_struct(task))
-+		utrace_free_task(task);
-+}
-+
-+/**
-  * tracehook_prepare_clone - prepare for new child to be cloned
-  * @clone_flags:	%CLONE_* flags from clone/fork/vfork system call
-  *
-@@ -285,6 +323,8 @@ static inline void tracehook_report_clone(struct pt_regs *regs,
- 					  unsigned long clone_flags,
- 					  pid_t pid, struct task_struct *child)
- {
-+	if (unlikely(task_utrace_flags(current) & UTRACE_EVENT(CLONE)))
-+		utrace_report_clone(clone_flags, child);
- 	if (unlikely(task_ptrace(child))) {
- 		/*
- 		 * It doesn't matter who attached/attaching to this
-@@ -317,6 +357,9 @@ static inline void tracehook_report_clone_complete(int trace,
- 						   pid_t pid,
- 						   struct task_struct *child)
- {
-+	if (unlikely(task_utrace_flags(current) & UTRACE_EVENT(CLONE)) &&
-+	    (clone_flags & CLONE_VFORK))
-+		utrace_finish_vfork(current);
- 	if (unlikely(trace))
- 		ptrace_event(0, trace, pid);
- }
-@@ -351,6 +394,10 @@ static inline void tracehook_report_vfork_done(struct task_struct *child,
-  */
- static inline void tracehook_prepare_release_task(struct task_struct *task)
- {
-+	/* see utrace_add_engine() about this barrier */
-+	smp_mb();
-+	if (task_utrace_flags(task))
-+		utrace_maybe_reap(task, task_utrace_struct(task), true);
- }
- 
- /**
-@@ -365,6 +412,7 @@ static inline void tracehook_prepare_release_task(struct task_struct *task)
- static inline void tracehook_finish_release_task(struct task_struct *task)
- {
- 	ptrace_release_task(task);
-+	BUG_ON(task->exit_state != EXIT_DEAD);
- }
- 
- /**
-@@ -386,6 +434,8 @@ static inline void tracehook_signal_handler(int sig, siginfo_t *info,
- 					    const struct k_sigaction *ka,
- 					    struct pt_regs *regs, int stepping)
- {
-+	if (task_utrace_flags(current))
-+		utrace_signal_handler(current, stepping);
- 	if (stepping)
- 		ptrace_notify(SIGTRAP);
- }
-@@ -403,6 +453,8 @@ static inline void tracehook_signal_handler(int sig, siginfo_t *info,
- static inline int tracehook_consider_ignored_signal(struct task_struct *task,
- 						    int sig)
- {
-+	if (unlikely(task_utrace_flags(task) & UTRACE_EVENT(SIGNAL_IGN)))
-+		return 1;
- 	return (task_ptrace(task) & PT_PTRACED) != 0;
- }
- 
-@@ -422,6 +474,9 @@ static inline int tracehook_consider_ignored_signal(struct task_struct *task,
- static inline int tracehook_consider_fatal_signal(struct task_struct *task,
- 						  int sig)
- {
-+	if (unlikely(task_utrace_flags(task) & (UTRACE_EVENT(SIGNAL_TERM) |
-+						UTRACE_EVENT(SIGNAL_CORE))))
-+		return 1;
- 	return (task_ptrace(task) & PT_PTRACED) != 0;
- }
- 
-@@ -436,6 +491,8 @@ static inline int tracehook_consider_fatal_signal(struct task_struct *task,
-  */
- static inline int tracehook_force_sigpending(void)
- {
-+	if (unlikely(task_utrace_flags(current)))
-+		return utrace_interrupt_pending();
- 	return 0;
- }
- 
-@@ -465,6 +522,8 @@ static inline int tracehook_get_signal(struct task_struct *task,
- 				       siginfo_t *info,
- 				       struct k_sigaction *return_ka)
- {
-+	if (unlikely(task_utrace_flags(task)))
-+		return utrace_get_signal(task, regs, info, return_ka);
- 	return 0;
- }
- 
-@@ -475,6 +534,8 @@ static inline int tracehook_get_signal(struct task_struct *task,
-  */
- static inline void tracehook_finish_jctl(void)
- {
-+	if (task_utrace_flags(current))
-+		utrace_finish_stop();
- }
- 
- #define DEATH_REAP			-1
-@@ -497,6 +558,8 @@ static inline void tracehook_finish_jctl(void)
- static inline int tracehook_notify_death(struct task_struct *task,
- 					 void **death_cookie, int group_dead)
- {
-+	*death_cookie = task_utrace_struct(task);
-+
- 	if (task_detached(task))
- 		return task->ptrace ? SIGCHLD : DEATH_REAP;
- 
-@@ -533,6 +596,15 @@ static inline void tracehook_report_death(struct task_struct *task,
- 					  int signal, void *death_cookie,
- 					  int group_dead)
- {
-+	/*
-+	 * If utrace_set_events() was just called to enable
-+	 * UTRACE_EVENT(DEATH), then we are obliged to call
-+	 * utrace_report_death() and not miss it.  utrace_set_events()
-+	 * checks @task->exit_state under tasklist_lock to synchronize
-+	 * with exit_notify(), the caller.
-+	 */
-+	if (task_utrace_flags(task) & _UTRACE_DEATH_EVENTS)
-+		utrace_report_death(task, death_cookie, group_dead, signal);
- }
- 
- #ifdef TIF_NOTIFY_RESUME
-@@ -562,10 +634,21 @@ static inline void set_notify_resume(struct task_struct *task)
-  * asynchronously, this will be called again before we return to
-  * user mode.
-  *
-- * Called without locks.
-+ * Called without locks.  However, on some machines this may be
-+ * called with interrupts disabled.
-  */
- static inline void tracehook_notify_resume(struct pt_regs *regs)
- {
-+	struct task_struct *task = current;
-+	/*
-+	 * Prevent the following store/load from getting ahead of the
-+	 * caller which clears TIF_NOTIFY_RESUME. This pairs with the
-+	 * implicit mb() before setting TIF_NOTIFY_RESUME in
-+	 * set_notify_resume().
-+	 */
-+	smp_mb();
-+	if (task_utrace_flags(task))
-+		utrace_resume(task, regs);
- }
- #endif	/* TIF_NOTIFY_RESUME */
- 
 diff --git a/include/linux/utrace.h b/include/linux/utrace.h
 new file mode 100644
 index 0000000..f251efe
@@ -1656,7 +1425,7 @@ index 0000000..f251efe
 +
 +#endif	/* linux/utrace.h */
 diff --git a/init/Kconfig b/init/Kconfig
-index 412c21b..a03ae51 100644
+index d627783..7afce1f 100644
 --- a/init/Kconfig
 +++ b/init/Kconfig
 @@ -372,6 +372,15 @@ config AUDIT_TREE
@@ -1676,7 +1445,7 @@ index 412c21b..a03ae51 100644
  
  menu "RCU Subsystem"
 diff --git a/kernel/Makefile b/kernel/Makefile
-index 2d64cfc..4a22e81 100644
+index d06467f..85828da 100644
 --- a/kernel/Makefile
 +++ b/kernel/Makefile
 @@ -68,6 +68,7 @@ obj-$(CONFIG_IKCONFIG) += configs.o
@@ -1687,30 +1456,9 @@ index 2d64cfc..4a22e81 100644
  obj-$(CONFIG_AUDIT) += audit.o auditfilter.o
  obj-$(CONFIG_AUDITSYSCALL) += auditsc.o
  obj-$(CONFIG_AUDIT_WATCH) += audit_watch.o
-diff --git a/kernel/fork.c b/kernel/fork.c
-index 0276c30..62caf3d 100644
---- a/kernel/fork.c
-+++ b/kernel/fork.c
-@@ -168,6 +168,7 @@ void free_task(struct task_struct *tsk)
- 	free_thread_info(tsk->stack);
- 	rt_mutex_debug_task_free(tsk);
- 	ftrace_graph_exit_task(tsk);
-+	tracehook_free_task(tsk);
- 	free_task_struct(tsk);
- }
- EXPORT_SYMBOL(free_task);
-@@ -1095,6 +1096,8 @@ static struct task_struct *copy_process(unsigned long clone_flags,
- 	if (!p)
- 		goto fork_out;
- 
-+	tracehook_init_task(p);
-+
- 	ftrace_graph_init_task(p);
- 
- 	rt_mutex_init_task(p);
 diff --git a/kernel/utrace.c b/kernel/utrace.c
 new file mode 100644
-index 0000000..f332d65
+index 0000000..ef856c9
 --- /dev/null
 +++ b/kernel/utrace.c
 @@ -0,0 +1,2440 @@
@@ -4000,7 +3748,7 @@ index 0000000..f332d65
 +		spin_lock_irq(&task->sighand->siglock);
 +
 +	if (sig_kernel_stop(signr))
-+		task->group_stop |= GROUP_STOP_DEQUEUED;
++		task->jobctl |= JOBCTL_STOP_DEQUEUED;
 +
 +	return signr;
 +}
@@ -4157,156 +3905,943 @@ index 0000000..f332d65
 -- 
 1.5.5.1
 
-From davej  Sun Aug  7 15:19:09 2011
+
+From davej  Wed Aug  3 15:16:13 2011
 Return-Path: oleg at redhat.com
 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
 	gelk.kernelslacker.org
 X-Spam-Level: 
 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
 	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.51]
+Received: from mail.corp.redhat.com [10.5.5.52]
 	by gelk with IMAP (fetchmail-6.3.20)
-	for <davej at localhost> (single-drop); Sun, 07 Aug 2011 15:19:09 -0400 (EDT)
-Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
- zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
- mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:01 -0400 (EDT)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:16:13 -0400 (EDT)
+Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
+ zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:15:37 -0400 (EDT)
 Received: from localhost (localhost.localdomain [127.0.0.1])
-	by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id A1FB8D89A7;
-	Sun,  7 Aug 2011 15:18:01 -0400 (EDT)
-Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
-	by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
-	with ESMTP id JtiDMxvrW-Di; Sun,  7 Aug 2011 15:18:01 -0400 (EDT)
-Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
-	by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 7F0E6D8988;
-	Sun,  7 Aug 2011 15:18:01 -0400 (EDT)
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 419B39D8CF;
+	Wed,  3 Aug 2011 15:12:11 -0400 (EDT)
+Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+	by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+	with ESMTP id AmaThyCcp1K4; Wed,  3 Aug 2011 15:12:11 -0400 (EDT)
+Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 2A0B29CE59;
+	Wed,  3 Aug 2011 15:12:11 -0400 (EDT)
 Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
-	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JHxlJ027726;
-	Sun, 7 Aug 2011 15:17:59 -0400
+	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JC3DW023262;
+	Wed, 3 Aug 2011 15:12:04 -0400
 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
-	oleg at redhat.com; Sun,  7 Aug 2011 21:15:23 +0200 (CEST)
-Date: Sun, 7 Aug 2011 21:15:21 +0200
+	oleg at redhat.com; Wed,  3 Aug 2011 21:09:31 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:09:29 +0200
 From: Oleg Nesterov <oleg at redhat.com>
-To: "Frank Ch. Eigler" <fche at redhat.com>, Kyle McMartin <kmcmartin at redhat.com>,
-        Dave Jones <davej at redhat.com>, Josh Stone <jistone at redhat.com>,
-        Matthew Garrett <mjg at redhat.com>, David Smith <dsmith at redhat.com>
-Cc: kernel at lists.fedoraproject.org
-Subject: [PATCH 02/22] utrace: remove jobctl bits
-Message-ID: <20110807191521.GA14373 at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 02/31] utrace: add utrace_init_task/utrace_free_task calls
+Message-ID: <20110803190929.GA30907 at redhat.com>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
-In-Reply-To: <20110807191434.GA13184 at redhat.com>
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
 User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
 Status: RO
-Content-Length: 1889
-Lines: 55
+Content-Length: 1295
+Lines: 47
 
-- change utrace_get_signal() to check GROUP_STOP_PENDING instead of
-  signal->group_stop_count. With the recent changes group_stop_count
-  doesn't necessarily mean this task should participate in group stop.
+Add the necessary copy_process()->utrace_init_task() and
+free_task()->utrace_free_task() calls.
 
-- remove the "participate in group stop" code from utrace_wakeup() and
-  utrace_stop(), this is no longer needed and wrong.
+Originally this was the part of "utrace core" patch, but since
+tracehooks are dying it doesn't make sense to reintroduce them.
+Instead, just call the utrace_ helpers directly. This is fine
+even without CONFIG_UTRACE, gcc is smart enough to optimize out
+the code in free_task().
 
 Signed-off-by: Oleg Nesterov <oleg at redhat.com>
 ---
- kernel/utrace.c |   16 ++--------------
- 1 files changed, 2 insertions(+), 14 deletions(-)
+ kernel/fork.c |    5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
 
-diff --git a/kernel/utrace.c b/kernel/utrace.c
-index f332d65..6e7fafb 100644
---- a/kernel/utrace.c
-+++ b/kernel/utrace.c
-@@ -648,11 +648,7 @@ static void utrace_wakeup(struct task_struct *target, struct utrace *utrace)
- {
- 	lockdep_assert_held(&utrace->lock);
- 	spin_lock_irq(&target->sighand->siglock);
--	if (target->signal->flags & SIGNAL_STOP_STOPPED ||
--	    target->signal->group_stop_count)
--		target->state = TASK_STOPPED;
--	else
--		wake_up_state(target, __TASK_TRACED);
-+	wake_up_state(target, __TASK_TRACED);
- 	spin_unlock_irq(&target->sighand->siglock);
- }
- 
-@@ -805,14 +801,6 @@ relock:
+diff --git a/kernel/fork.c b/kernel/fork.c
+index e7ceaca..a9891da 100644
+--- a/kernel/fork.c
++++ b/kernel/fork.c
+@@ -66,6 +66,7 @@
+ #include <linux/user-return-notifier.h>
+ #include <linux/oom.h>
+ #include <linux/khugepaged.h>
++#include <linux/utrace.h>
  
- 	__set_current_state(TASK_TRACED);
+ #include <asm/pgtable.h>
+ #include <asm/pgalloc.h>
+@@ -167,6 +168,8 @@ void free_task(struct task_struct *tsk)
+ 	free_thread_info(tsk->stack);
+ 	rt_mutex_debug_task_free(tsk);
+ 	ftrace_graph_exit_task(tsk);
++	if (task_utrace_struct(tsk))
++		utrace_free_task(tsk);
+ 	free_task_struct(tsk);
+ }
+ EXPORT_SYMBOL(free_task);
+@@ -1096,6 +1099,8 @@ static struct task_struct *copy_process(unsigned long clone_flags,
+ 	if (!p)
+ 		goto fork_out;
  
--	/*
--	 * If there is a group stop in progress,
--	 * we must participate in the bookkeeping.
--	 */
--	if (unlikely(task->signal->group_stop_count) &&
--			!--task->signal->group_stop_count)
--		task->signal->flags = SIGNAL_STOP_STOPPED;
--
- 	spin_unlock_irq(&task->sighand->siglock);
- 	spin_unlock(&utrace->lock);
++	utrace_init_task(p);
++
+ 	ftrace_graph_init_task(p);
  
-@@ -2036,7 +2024,7 @@ int utrace_get_signal(struct task_struct *task, struct pt_regs *regs,
- 		ka = NULL;
- 		memset(return_ka, 0, sizeof *return_ka);
- 	} else if (!(task->utrace_flags & UTRACE_EVENT_SIGNAL_ALL) ||
--		   unlikely(task->signal->group_stop_count)) {
-+		   unlikely(task->group_stop & GROUP_STOP_PENDING)) {
- 		/*
- 		 * If no engine is interested in intercepting signals or
- 		 * we must stop, let the caller just dequeue them normally
+ 	rt_mutex_init_task(p);
 -- 
 1.5.5.1
 
-From davej  Sun Aug  7 15:19:10 2011
+
+From davej  Wed Aug  3 15:16:18 2011
 Return-Path: oleg at redhat.com
 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
 	gelk.kernelslacker.org
 X-Spam-Level: 
 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
 	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.51]
+Received: from mail.corp.redhat.com [10.5.5.52]
 	by gelk with IMAP (fetchmail-6.3.20)
-	for <davej at localhost> (single-drop); Sun, 07 Aug 2011 15:19:10 -0400 (EDT)
-Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
- zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
- mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:04 -0400 (EDT)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:16:18 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
+ zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:07 -0400 (EDT)
 Received: from localhost (localhost.localdomain [127.0.0.1])
-	by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 473EDD89A7;
-	Sun,  7 Aug 2011 15:18:04 -0400 (EDT)
-Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
-	by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
-	with ESMTP id uA3eVmUnKFQu; Sun,  7 Aug 2011 15:18:04 -0400 (EDT)
-Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
-	by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 29079D8988;
-	Sun,  7 Aug 2011 15:18:04 -0400 (EDT)
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id F28379DE70;
+	Wed,  3 Aug 2011 15:12:13 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+	by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+	with ESMTP id p92IDp0LZ5jX; Wed,  3 Aug 2011 15:12:13 -0400 (EDT)
+Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id D4E339DE68;
+	Wed,  3 Aug 2011 15:12:13 -0400 (EDT)
 Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
-	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JI1LH027738;
-	Sun, 7 Aug 2011 15:18:02 -0400
+	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JC6IA023283;
+	Wed, 3 Aug 2011 15:12:07 -0400
 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
-	oleg at redhat.com; Sun,  7 Aug 2011 21:15:25 +0200 (CEST)
-Date: Sun, 7 Aug 2011 21:15:23 +0200
+	oleg at redhat.com; Wed,  3 Aug 2011 21:09:34 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:09:32 +0200
 From: Oleg Nesterov <oleg at redhat.com>
-To: "Frank Ch. Eigler" <fche at redhat.com>, Kyle McMartin <kmcmartin at redhat.com>,
-        Dave Jones <davej at redhat.com>, Josh Stone <jistone at redhat.com>,
-        Matthew Garrett <mjg at redhat.com>, David Smith <dsmith at redhat.com>
-Cc: kernel at lists.fedoraproject.org
-Subject: [PATCH 03/22] ptrace: take ->siglock around s/TRACED/RUNNING/
-Message-ID: <20110807191523.GA14376 at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 03/31] tracehooks: add utrace hooks
+Message-ID: <20110803190932.GA30915 at redhat.com>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
-In-Reply-To: <20110807191434.GA13184 at redhat.com>
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
 User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
 Status: RO
-Content-Length: 1623
-Lines: 55
+Content-Length: 2310
+Lines: 75
 
-change ptrace_resume() and ptrace_stop() to take ->siglock around changing
-task->state from TRACED to RUNNING.
+Add the necessary utrace hooks in the tracehooks which were not
+removed yet.
 
-With this patch __TASK_TRACED/STOPPED bits are fully protected by ->siglock,
+Signed-off-by: Oleg Nesterov <oleg at redhat.com>
+---
+ include/linux/tracehook.h |   22 +++++++++++++++++++++-
+ 1 files changed, 21 insertions(+), 1 deletions(-)
+
+diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
+index a71a292..8cc28bc 100644
+--- a/include/linux/tracehook.h
++++ b/include/linux/tracehook.h
+@@ -49,6 +49,7 @@
+ #include <linux/sched.h>
+ #include <linux/ptrace.h>
+ #include <linux/security.h>
++#include <linux/utrace.h>
+ struct linux_binprm;
+ 
+ /*
+@@ -96,6 +97,9 @@ static inline void ptrace_report_syscall(struct pt_regs *regs)
+ static inline __must_check int tracehook_report_syscall_entry(
+ 	struct pt_regs *regs)
+ {
++	if ((task_utrace_flags(current) & UTRACE_EVENT(SYSCALL_ENTRY)) &&
++	    utrace_report_syscall_entry(regs))
++		return 1;
+ 	ptrace_report_syscall(regs);
+ 	return 0;
+ }
+@@ -119,6 +123,9 @@ static inline __must_check int tracehook_report_syscall_entry(
+  */
+ static inline void tracehook_report_syscall_exit(struct pt_regs *regs, int step)
+ {
++	if (task_utrace_flags(current) & UTRACE_EVENT(SYSCALL_EXIT))
++		utrace_report_syscall_exit(regs);
++
+ 	if (step) {
+ 		siginfo_t info;
+ 		user_single_step_siginfo(current, regs, &info);
+@@ -148,6 +155,8 @@ static inline void tracehook_signal_handler(int sig, siginfo_t *info,
+ 					    const struct k_sigaction *ka,
+ 					    struct pt_regs *regs, int stepping)
+ {
++	if (task_utrace_flags(current))
++		utrace_signal_handler(current, stepping);
+ 	if (stepping)
+ 		ptrace_notify(SIGTRAP);
+ }
+@@ -179,10 +188,21 @@ static inline void set_notify_resume(struct task_struct *task)
+  * asynchronously, this will be called again before we return to
+  * user mode.
+  *
+- * Called without locks.
++ * Called without locks.  However, on some machines this may be
++ * called with interrupts disabled.
+  */
+ static inline void tracehook_notify_resume(struct pt_regs *regs)
+ {
++	struct task_struct *task = current;
++	/*
++	 * Prevent the following store/load from getting ahead of the
++	 * caller which clears TIF_NOTIFY_RESUME. This pairs with the
++	 * implicit mb() before setting TIF_NOTIFY_RESUME in
++	 * set_notify_resume().
++	 */
++	smp_mb();
++	if (task_utrace_flags(task))
++		utrace_resume(task, regs);
+ }
+ #endif	/* TIF_NOTIFY_RESUME */
+ 
+-- 
+1.5.5.1
+
+
+From davej  Wed Aug  3 15:16:14 2011
+Return-Path: oleg at redhat.com
+X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
+	gelk.kernelslacker.org
+X-Spam-Level: 
+X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
+	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
+Received: from mail.corp.redhat.com [10.5.5.52]
+	by gelk with IMAP (fetchmail-6.3.20)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:16:14 -0400 (EDT)
+Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
+ zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:15:37 -0400 (EDT)
+Received: from localhost (localhost.localdomain [127.0.0.1])
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 92FCA9D8FA;
+	Wed,  3 Aug 2011 15:12:16 -0400 (EDT)
+Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+	by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+	with ESMTP id lQaZCHUpw8DT; Wed,  3 Aug 2011 15:12:16 -0400 (EDT)
+Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 7479B9D8C9;
+	Wed,  3 Aug 2011 15:12:16 -0400 (EDT)
+Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
+	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JC91G023308;
+	Wed, 3 Aug 2011 15:12:09 -0400
+Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
+	oleg at redhat.com; Wed,  3 Aug 2011 21:09:37 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:09:35 +0200
+From: Oleg Nesterov <oleg at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 04/31] tracehooks: reintroduce
+	tracehook_consider_fatal_signal()
+Message-ID: <20110803190935.GA30918 at redhat.com>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
+User-Agent: Mutt/1.5.18 (2008-05-17)
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
+Status: RO
+Content-Length: 3257
+Lines: 90
+
+Add the killed tracehook_consider_fatal_signal() back. It has multiple
+callers and it is not easy add the necessary checks inline.
+
+Signed-off-by: Oleg Nesterov <oleg at redhat.com>
+---
+ arch/s390/kernel/traps.c  |    4 ++--
+ include/linux/tracehook.h |   22 ++++++++++++++++++++++
+ kernel/signal.c           |    4 ++--
+ 3 files changed, 26 insertions(+), 4 deletions(-)
+
+diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
+index ffabcd9..1018ab6 100644
+--- a/arch/s390/kernel/traps.c
++++ b/arch/s390/kernel/traps.c
+@@ -329,7 +329,7 @@ void __kprobes do_per_trap(struct pt_regs *regs)
+ 
+ 	if (notify_die(DIE_SSTEP, "sstep", regs, 0, 0, SIGTRAP) == NOTIFY_STOP)
+ 		return;
+-	if (!current->ptrace)
++	if (!tracehook_consider_fatal_signal(current, SIGTRAP))
+ 		return;
+ 	info.si_signo = SIGTRAP;
+ 	info.si_errno = 0;
+@@ -428,7 +428,7 @@ static void __kprobes illegal_op(struct pt_regs *regs, long pgm_int_code,
+ 		if (get_user(*((__u16 *) opcode), (__u16 __user *) location))
+ 			return;
+ 		if (*((__u16 *) opcode) == S390_BREAKPOINT_U16) {
+-			if (current->ptrace) {
++			if (tracehook_consider_fatal_signal(current, SIGTRAP)) {
+ 				info.si_signo = SIGTRAP;
+ 				info.si_errno = 0;
+ 				info.si_code = TRAP_BRKPT;
+diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
+index 8cc28bc..ec2af67 100644
+--- a/include/linux/tracehook.h
++++ b/include/linux/tracehook.h
+@@ -161,6 +161,28 @@ static inline void tracehook_signal_handler(int sig, siginfo_t *info,
+ 		ptrace_notify(SIGTRAP);
+ }
+ 
++/**
++ * tracehook_consider_fatal_signal - suppress special handling of fatal signal
++ * @task:		task receiving the signal
++ * @sig:		signal number being sent
++ *
++ * Return nonzero to prevent special handling of this termination signal.
++ * Normally handler for signal is %SIG_DFL.  It can be %SIG_IGN if @sig is
++ * ignored, in which case force_sig() is about to reset it to %SIG_DFL.
++ * When this returns zero, this signal might cause a quick termination
++ * that does not give the debugger a chance to intercept the signal.
++ *
++ * Called with or without @task->sighand->siglock held.
++ */
++static inline int tracehook_consider_fatal_signal(struct task_struct *task,
++						  int sig)
++{
++	if (unlikely(task_utrace_flags(task) & (UTRACE_EVENT(SIGNAL_TERM) |
++						UTRACE_EVENT(SIGNAL_CORE))))
++		return 1;
++	return task->ptrace != 0;
++}
++
+ #ifdef TIF_NOTIFY_RESUME
+ /**
+  * set_notify_resume - cause tracehook_notify_resume() to be called
+diff --git a/kernel/signal.c b/kernel/signal.c
+index 291c970..d7ef0da 100644
+--- a/kernel/signal.c
++++ b/kernel/signal.c
+@@ -494,7 +494,7 @@ int unhandled_signal(struct task_struct *tsk, int sig)
+ 	if (handler != SIG_IGN && handler != SIG_DFL)
+ 		return 0;
+ 	/* if ptraced, let the tracer determine */
+-	return !tsk->ptrace;
++	return !tracehook_consider_fatal_signal(tsk, sig);
+ }
+ 
+ /*
+@@ -982,7 +982,7 @@ static void complete_signal(int sig, struct task_struct *p, int group)
+ 	if (sig_fatal(p, sig) &&
+ 	    !(signal->flags & (SIGNAL_UNKILLABLE | SIGNAL_GROUP_EXIT)) &&
+ 	    !sigismember(&t->real_blocked, sig) &&
+-	    (sig == SIGKILL || !t->ptrace)) {
++	    (sig == SIGKILL || !tracehook_consider_fatal_signal(t, sig))) {
+ 		/*
+ 		 * This signal will be fatal to the whole group.
+ 		 */
+-- 
+1.5.5.1
+
+
+From davej  Wed Aug  3 15:16:20 2011
+Return-Path: oleg at redhat.com
+X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
+	gelk.kernelslacker.org
+X-Spam-Level: 
+X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
+	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
+Received: from mail.corp.redhat.com [10.5.5.52]
+	by gelk with IMAP (fetchmail-6.3.20)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:16:20 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
+ zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:08 -0400 (EDT)
+Received: from localhost (localhost.localdomain [127.0.0.1])
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 374FE9DE74;
+	Wed,  3 Aug 2011 15:12:19 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+	by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+	with ESMTP id Sun0Twp72xGV; Wed,  3 Aug 2011 15:12:19 -0400 (EDT)
+Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 223E39DD25;
+	Wed,  3 Aug 2011 15:12:19 -0400 (EDT)
+Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
+	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCBgK008326;
+	Wed, 3 Aug 2011 15:12:12 -0400
+Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
+	oleg at redhat.com; Wed,  3 Aug 2011 21:09:39 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:09:37 +0200
+From: Oleg Nesterov <oleg at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 05/31] add utrace hooks into sig_ignored() and
+	recalc_sigpending()
+Message-ID: <20110803190937.GA30926 at redhat.com>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
+User-Agent: Mutt/1.5.18 (2008-05-17)
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
+Status: RO
+Content-Length: 1508
+Lines: 51
+
+Add the necessary and somewhat "special" hooks into sig_ignored() and
+recalc_sigpending(). Basically this restores _force_sigpending() and
+_consider_ignored_signal() tracehook logic.
+
+Signed-off-by: Oleg Nesterov <oleg at redhat.com>
+---
+ include/linux/utrace.h |    2 ++
+ kernel/signal.c        |    7 ++++++-
+ 2 files changed, 8 insertions(+), 1 deletions(-)
+
+diff --git a/include/linux/utrace.h b/include/linux/utrace.h
+index f251efe..1b8da1c 100644
+--- a/include/linux/utrace.h
++++ b/include/linux/utrace.h
+@@ -107,6 +107,8 @@ bool utrace_report_syscall_entry(struct pt_regs *);
+ void utrace_report_syscall_exit(struct pt_regs *);
+ void utrace_signal_handler(struct task_struct *, int);
+ 
++#define UTRACE_FLAG(task, ev)	(task_utrace_flags(task) & UTRACE_EVENT(ev))
++
+ #ifndef CONFIG_UTRACE
+ 
+ /*
+diff --git a/kernel/signal.c b/kernel/signal.c
+index d7ef0da..0f9af0b 100644
+--- a/kernel/signal.c
++++ b/kernel/signal.c
+@@ -87,7 +87,7 @@ static int sig_ignored(struct task_struct *t, int sig, int from_ancestor_ns)
+ 	/*
+ 	 * Tracers may want to know about even ignored signals.
+ 	 */
+-	return !t->ptrace;
++	return !t->ptrace && !UTRACE_FLAG(t, SIGNAL_IGN);
+ }
+ 
+ /*
+@@ -150,6 +150,11 @@ void recalc_sigpending_and_wake(struct task_struct *t)
+ 
+ void recalc_sigpending(void)
+ {
++	if (task_utrace_flags(current) && utrace_interrupt_pending()) {
++		set_thread_flag(TIF_SIGPENDING);
++		return;
++	}
++
+ 	if (!recalc_sigpending_tsk(current) && !freezing(current))
+ 		clear_thread_flag(TIF_SIGPENDING);
+ 
+-- 
+1.5.5.1
+
+
+From davej  Wed Aug  3 15:16:21 2011
+Return-Path: oleg at redhat.com
+X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
+	gelk.kernelslacker.org
+X-Spam-Level: 
+X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
+	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
+Received: from mail.corp.redhat.com [10.5.5.52]
+	by gelk with IMAP (fetchmail-6.3.20)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:16:21 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
+ zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:09 -0400 (EDT)
+Received: from localhost (localhost.localdomain [127.0.0.1])
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 054279DE7D;
+	Wed,  3 Aug 2011 15:12:22 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+	by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+	with ESMTP id 1BosZIzYSIW0; Wed,  3 Aug 2011 15:12:21 -0400 (EDT)
+Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id E41DC9DE7B;
+	Wed,  3 Aug 2011 15:12:21 -0400 (EDT)
+Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
+	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p73JCEgD022264;
+	Wed, 3 Aug 2011 15:12:15 -0400
+Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
+	oleg at redhat.com; Wed,  3 Aug 2011 21:09:42 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:09:40 +0200
+From: Oleg Nesterov <oleg at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 06/31] restore the EXEC/EXIT/CLONE utrace hooks
+Message-ID: <20110803190940.GA30929 at redhat.com>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
+User-Agent: Mutt/1.5.18 (2008-05-17)
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
+Status: RO
+Content-Length: 2383
+Lines: 83
+
+Restore the "trivial" EXEC/EXIT/CLONE utrace hooks. Add the
+simple helper, UTRACE_HOOK(), to minimize the changes.
+
+Signed-off-by: Oleg Nesterov <oleg at redhat.com>
+---
+ fs/exec.c              |    5 ++++-
+ include/linux/utrace.h |    6 ++++++
+ kernel/exit.c          |    1 +
+ kernel/fork.c          |    4 ++++
+ 4 files changed, 15 insertions(+), 1 deletions(-)
+
+diff --git a/fs/exec.c b/fs/exec.c
+index da80612..a0814cd 100644
+--- a/fs/exec.c
++++ b/fs/exec.c
+@@ -1401,9 +1401,12 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
+ 			 */
+ 			bprm->recursion_depth = depth;
+ 			if (retval >= 0) {
+-				if (depth == 0)
++				if (depth == 0) {
++					UTRACE_HOOK(current, EXEC,
++						report_exec(fmt, bprm, regs));
+ 					ptrace_event(PTRACE_EVENT_EXEC,
+ 							old_pid);
++				}
+ 				put_binfmt(fmt);
+ 				allow_write_access(bprm->file);
+ 				if (bprm->file)
+diff --git a/include/linux/utrace.h b/include/linux/utrace.h
+index 1b8da1c..9ac0b1b 100644
+--- a/include/linux/utrace.h
++++ b/include/linux/utrace.h
+@@ -109,6 +109,12 @@ void utrace_signal_handler(struct task_struct *, int);
+ 
+ #define UTRACE_FLAG(task, ev)	(task_utrace_flags(task) & UTRACE_EVENT(ev))
+ 
++#define UTRACE_HOOK(task, ev, callback)			\
++	do {						\
++		if (UTRACE_FLAG(task, ev))		\
++			utrace_ ## callback;		\
++	} while (0)
++
+ #ifndef CONFIG_UTRACE
+ 
+ /*
+diff --git a/kernel/exit.c b/kernel/exit.c
+index 2913b35..c1b0ab6 100644
+--- a/kernel/exit.c
++++ b/kernel/exit.c
+@@ -913,6 +913,7 @@ NORET_TYPE void do_exit(long code)
+ 	 */
+ 	set_fs(USER_DS);
+ 
++	UTRACE_HOOK(current, EXIT, report_exit(&code));
+ 	ptrace_event(PTRACE_EVENT_EXIT, code);
+ 
+ 	validate_creds_for_do_exit(tsk);
+diff --git a/kernel/fork.c b/kernel/fork.c
+index a9891da..37f4a07 100644
+--- a/kernel/fork.c
++++ b/kernel/fork.c
+@@ -1539,6 +1539,8 @@ long do_fork(unsigned long clone_flags,
+ 
+ 		audit_finish_fork(p);
+ 
++		UTRACE_HOOK(current, CLONE, report_clone(clone_flags, p));
++
+ 		/*
+ 		 * We set PF_STARTING at creation in case tracing wants to
+ 		 * use this to distinguish a fully live task from one that
+@@ -1550,6 +1552,8 @@ long do_fork(unsigned long clone_flags,
+ 		wake_up_new_task(p);
+ 
+ 		/* forking complete and child started to run, tell ptracer */
++		if (clone_flags & CLONE_VFORK)
++			UTRACE_HOOK(current, CLONE, finish_vfork(current));
+ 		if (unlikely(trace))
+ 			ptrace_event(trace, nr);
+ 
+-- 
+1.5.5.1
+
+
+From davej  Wed Aug  3 15:16:23 2011
+Return-Path: oleg at redhat.com
+X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
+	gelk.kernelslacker.org
+X-Spam-Level: 
+X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
+	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
+Received: from mail.corp.redhat.com [10.5.5.52]
+	by gelk with IMAP (fetchmail-6.3.20)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:16:23 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
+ zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:13 -0400 (EDT)
+Received: from localhost (localhost.localdomain [127.0.0.1])
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id B36EC9DE82;
+	Wed,  3 Aug 2011 15:12:24 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+	by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+	with ESMTP id 7Qqv+lXfqHw6; Wed,  3 Aug 2011 15:12:24 -0400 (EDT)
+Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 9F8AF9DD25;
+	Wed,  3 Aug 2011 15:12:24 -0400 (EDT)
+Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
+	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCH0U023349;
+	Wed, 3 Aug 2011 15:12:17 -0400
+Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
+	oleg at redhat.com; Wed,  3 Aug 2011 21:09:45 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:09:43 +0200
+From: Oleg Nesterov <oleg at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 07/31] utrace: utrace_report_death() can use
+	task_utrace_struct()
+Message-ID: <20110803190943.GA30936 at redhat.com>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
+User-Agent: Mutt/1.5.18 (2008-05-17)
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
+Status: RO
+Content-Length: 1692
+Lines: 44
+
+utrace_report_death() assumes that the caller (exit_notify) should
+pass task->utrace as an argument. This is no longer needed, it can
+safely do task_utrace_struct(). This way we avoid the nasty changes
+in exit_notify().
+
+Signed-off-by: Oleg Nesterov <oleg at redhat.com>
+---
+ include/linux/utrace.h |    2 +-
+ kernel/utrace.c        |    5 +++--
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/include/linux/utrace.h b/include/linux/utrace.h
+index 9ac0b1b..9a2e2f4 100644
+--- a/include/linux/utrace.h
++++ b/include/linux/utrace.h
+@@ -99,7 +99,7 @@ int utrace_get_signal(struct task_struct *, struct pt_regs *,
+ void utrace_report_clone(unsigned long, struct task_struct *);
+ void utrace_finish_vfork(struct task_struct *);
+ void utrace_report_exit(long *exit_code);
+-void utrace_report_death(struct task_struct *, struct utrace *, bool, int);
++void utrace_report_death(struct task_struct *, bool, int);
+ void utrace_report_jctl(int notify, int type);
+ void utrace_report_exec(struct linux_binfmt *, struct linux_binprm *,
+ 			struct pt_regs *regs);
+diff --git a/kernel/utrace.c b/kernel/utrace.c
+index ef856c9..1e750ad 100644
+--- a/kernel/utrace.c
++++ b/kernel/utrace.c
+@@ -1759,9 +1759,10 @@ void utrace_report_exit(long *exit_code)
+  * For this reason, utrace_release_task checks for the event bits that get
+  * us here, and delays its cleanup for us to do.
+  */
+-void utrace_report_death(struct task_struct *task, struct utrace *utrace,
+-			 bool group_dead, int signal)
++void utrace_report_death(struct task_struct *task, bool group_dead, int signal)
+ {
++	struct utrace *utrace = task_utrace_struct(task);
++
+ 	INIT_REPORT(report);
+ 
+ 	BUG_ON(!task->exit_state);
+-- 
+1.5.5.1
+
+
+From davej  Wed Aug  3 15:16:15 2011
+Return-Path: oleg at redhat.com
+X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
+	gelk.kernelslacker.org
+X-Spam-Level: 
+X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
+	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
+Received: from mail.corp.redhat.com [10.5.5.52]
+	by gelk with IMAP (fetchmail-6.3.20)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:16:15 -0400 (EDT)
+Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
+ zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:15:39 -0400 (EDT)
+Received: from localhost (localhost.localdomain [127.0.0.1])
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 76DA49D9C7;
+	Wed,  3 Aug 2011 15:12:27 -0400 (EDT)
+Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+	by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+	with ESMTP id 25xHJjCTouA4; Wed,  3 Aug 2011 15:12:27 -0400 (EDT)
+Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 490E79D9AB;
+	Wed,  3 Aug 2011 15:12:27 -0400 (EDT)
+Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
+	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCKXo023360;
+	Wed, 3 Aug 2011 15:12:20 -0400
+Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
+	oleg at redhat.com; Wed,  3 Aug 2011 21:09:47 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:09:45 +0200
+From: Oleg Nesterov <oleg at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 08/31] restore the DEATH/REAP utrace hooks
+Message-ID: <20110803190945.GA30939 at redhat.com>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
+User-Agent: Mutt/1.5.18 (2008-05-17)
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
+Status: RO
+Content-Length: 2346
+Lines: 70
+
+Restore the necessary hooks in release_task() and exit_notify(),
+add the corresponding helpers into utrace.h.
+
+Note: the @signal argument passed to ->report_death() does not
+match the previous behaviour. I think this shouldn't affect the
+current users, and I bet nobody can really understand what this
+magic argument should actually mean anyway.
+
+Signed-off-by: Oleg Nesterov <oleg at redhat.com>
+---
+ include/linux/utrace.h |   22 ++++++++++++++++++++++
+ kernel/exit.c          |    4 ++++
+ 2 files changed, 26 insertions(+), 0 deletions(-)
+
+diff --git a/include/linux/utrace.h b/include/linux/utrace.h
+index 9a2e2f4..cf13839 100644
+--- a/include/linux/utrace.h
++++ b/include/linux/utrace.h
+@@ -697,4 +697,26 @@ static inline __must_check int utrace_barrier_pid(struct pid *pid,
+ 
+ #endif	/* CONFIG_UTRACE */
+ 
++static inline void utrace_release_task(struct task_struct *task)
++{
++	/* see utrace_add_engine() about this barrier */
++	smp_mb();
++	if (task_utrace_flags(task))
++		utrace_maybe_reap(task, task_utrace_struct(task), true);
++}
++
++static inline void utrace_exit_notify(struct task_struct *task,
++					  int signal, int group_dead)
++{
++	/*
++	 * If utrace_set_events() was just called to enable
++	 * UTRACE_EVENT(DEATH), then we are obliged to call
++	 * utrace_report_death() and not miss it.  utrace_set_events()
++	 * checks @task->exit_state under tasklist_lock to synchronize
++	 * with exit_notify(), the caller.
++	 */
++	if (task_utrace_flags(task) & _UTRACE_DEATH_EVENTS)
++		utrace_report_death(task, group_dead, signal);
++}
++
+ #endif	/* linux/utrace.h */
+diff --git a/kernel/exit.c b/kernel/exit.c
+index c1b0ab6..ba5ba22 100644
+--- a/kernel/exit.c
++++ b/kernel/exit.c
+@@ -168,6 +168,8 @@ void release_task(struct task_struct * p)
+ 	struct task_struct *leader;
+ 	int zap_leader;
+ repeat:
++	utrace_release_task(p);
++
+ 	/* don't need to get the RCU readlock here - the process is dead and
+ 	 * can't be modifying its own credentials. But shut RCU-lockdep up */
+ 	rcu_read_lock();
+@@ -860,6 +862,8 @@ static void exit_notify(struct task_struct *tsk, int group_dead)
+ 		wake_up_process(tsk->signal->group_exit_task);
+ 	write_unlock_irq(&tasklist_lock);
+ 
++	utrace_exit_notify(tsk, autoreap ? -1 : SIGCHLD, group_dead);
++
+ 	/* If the process is dead, release it - nobody will wait for it */
+ 	if (autoreap)
+ 		release_task(tsk);
+-- 
+1.5.5.1
+
+
+From davej  Wed Aug  3 15:22:02 2011
+Return-Path: oleg at redhat.com
+X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
+	gelk.kernelslacker.org
+X-Spam-Level: 
+X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
+	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
+Received: from mail.corp.redhat.com [10.5.5.52]
+	by gelk with IMAP (fetchmail-6.3.20)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:22:02 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
+ zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:17:16 -0400 (EDT)
+Received: from localhost (localhost.localdomain [127.0.0.1])
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 26DB69DE8C;
+	Wed,  3 Aug 2011 15:12:30 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+	by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+	with ESMTP id DbxGfmFvtTiR; Wed,  3 Aug 2011 15:12:30 -0400 (EDT)
+Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 0A30A9DE91;
+	Wed,  3 Aug 2011 15:12:30 -0400 (EDT)
+Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
+	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCMDQ008389;
+	Wed, 3 Aug 2011 15:12:23 -0400
+Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
+	oleg at redhat.com; Wed,  3 Aug 2011 21:09:50 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:09:48 +0200
+From: Oleg Nesterov <oleg at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 09/31] utrace: remove jobctl bits
+Message-ID: <20110803190948.GA30942 at redhat.com>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
+User-Agent: Mutt/1.5.18 (2008-05-17)
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
+Status: RO
+Content-Length: 1888
+Lines: 56
+
+- change utrace_get_signal() to check JOBCTL_STOP_PENDING instead of
+  signal->group_stop_count. With the recent changes group_stop_count
+  doesn't necessarily mean this task should participate in group stop.
+
+- remove the "participate in group stop" code from utrace_wakeup() and
+  utrace_stop(), this is no longer needed and wrong.
+
+Signed-off-by: Oleg Nesterov <oleg at redhat.com>
+---
+ kernel/utrace.c |   16 ++--------------
+ 1 files changed, 2 insertions(+), 14 deletions(-)
+
+diff --git a/kernel/utrace.c b/kernel/utrace.c
+index 1e750ad..5d3974e 100644
+--- a/kernel/utrace.c
++++ b/kernel/utrace.c
+@@ -648,11 +648,7 @@ static void utrace_wakeup(struct task_struct *target, struct utrace *utrace)
+ {
+ 	lockdep_assert_held(&utrace->lock);
+ 	spin_lock_irq(&target->sighand->siglock);
+-	if (target->signal->flags & SIGNAL_STOP_STOPPED ||
+-	    target->signal->group_stop_count)
+-		target->state = TASK_STOPPED;
+-	else
+-		wake_up_state(target, __TASK_TRACED);
++	wake_up_state(target, __TASK_TRACED);
+ 	spin_unlock_irq(&target->sighand->siglock);
+ }
+ 
+@@ -805,14 +801,6 @@ relock:
+ 
+ 	__set_current_state(TASK_TRACED);
+ 
+-	/*
+-	 * If there is a group stop in progress,
+-	 * we must participate in the bookkeeping.
+-	 */
+-	if (unlikely(task->signal->group_stop_count) &&
+-			!--task->signal->group_stop_count)
+-		task->signal->flags = SIGNAL_STOP_STOPPED;
+-
+ 	spin_unlock_irq(&task->sighand->siglock);
+ 	spin_unlock(&utrace->lock);
+ 
+@@ -2037,7 +2025,7 @@ int utrace_get_signal(struct task_struct *task, struct pt_regs *regs,
+ 		ka = NULL;
+ 		memset(return_ka, 0, sizeof *return_ka);
+ 	} else if (!(task->utrace_flags & UTRACE_EVENT_SIGNAL_ALL) ||
+-		   unlikely(task->signal->group_stop_count)) {
++		   unlikely(task->jobctl & JOBCTL_STOP_PENDING)) {
+ 		/*
+ 		 * If no engine is interested in intercepting signals or
+ 		 * we must stop, let the caller just dequeue them normally
+-- 
+1.5.5.1
+
+
+From davej  Wed Aug  3 15:16:17 2011
+Return-Path: oleg at redhat.com
+X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
+	gelk.kernelslacker.org
+X-Spam-Level: 
+X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
+	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
+Received: from mail.corp.redhat.com [10.5.5.52]
+	by gelk with IMAP (fetchmail-6.3.20)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:16:17 -0400 (EDT)
+Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
+ zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:15:52 -0400 (EDT)
+Received: from localhost (localhost.localdomain [127.0.0.1])
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id AB6E39DA46;
+	Wed,  3 Aug 2011 15:12:32 -0400 (EDT)
+Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+	by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+	with ESMTP id LkzmRGslEelr; Wed,  3 Aug 2011 15:12:32 -0400 (EDT)
+Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 959659DA60;
+	Wed,  3 Aug 2011 15:12:32 -0400 (EDT)
+Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
+	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCPx7023400;
+	Wed, 3 Aug 2011 15:12:25 -0400
+Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
+	oleg at redhat.com; Wed,  3 Aug 2011 21:09:53 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:09:51 +0200
+From: Oleg Nesterov <oleg at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 10/31] ptrace: take ->siglock around s/TRACED/RUNNING/
+Message-ID: <20110803190951.GA30949 at redhat.com>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
+User-Agent: Mutt/1.5.18 (2008-05-17)
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
+Status: RO
+Content-Length: 1624
+Lines: 56
+
+change ptrace_resume() and ptrace_stop() to take ->siglock around changing
+task->state from TRACED to RUNNING.
+
+With this patch __TASK_TRACED/STOPPED bits are fully protected by ->siglock,
 nobody can set or clear these bits without ->siglock held.
 
 Signed-off-by: Oleg Nesterov <oleg at redhat.com>
@@ -4316,10 +4851,10 @@ Signed-off-by: Oleg Nesterov <oleg at redhat.com>
  2 files changed, 10 insertions(+), 1 deletions(-)
 
 diff --git a/kernel/ptrace.c b/kernel/ptrace.c
-index 2df1157..9988b13 100644
+index 9de3ecf..56b8fc1 100644
 --- a/kernel/ptrace.c
 +++ b/kernel/ptrace.c
-@@ -534,6 +534,8 @@ static int ptrace_setsiginfo(struct task_struct *child, const siginfo_t *info)
+@@ -589,6 +589,8 @@ static int ptrace_setsiginfo(struct task_struct *child, const siginfo_t *info)
  static int ptrace_resume(struct task_struct *child, long request,
  			 unsigned long data)
  {
@@ -4328,7 +4863,7 @@ index 2df1157..9988b13 100644
  	if (!valid_signal(data))
  		return -EIO;
  
-@@ -562,7 +564,11 @@ static int ptrace_resume(struct task_struct *child, long request,
+@@ -617,7 +619,11 @@ static int ptrace_resume(struct task_struct *child, long request,
  	}
  
  	child->exit_code = data;
@@ -4342,10 +4877,10 @@ index 2df1157..9988b13 100644
  	return 0;
  }
 diff --git a/kernel/signal.c b/kernel/signal.c
-index ff76786..2138cee 100644
+index 0f9af0b..71f5cca 100644
 --- a/kernel/signal.c
 +++ b/kernel/signal.c
-@@ -1799,7 +1799,10 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
+@@ -1878,7 +1878,10 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
  		if (gstop_done)
  			do_notify_parent_cldstop(current, false, why);
  
@@ -4359,50 +4894,51 @@ index ff76786..2138cee 100644
 -- 
 1.5.5.1
 
-From davej  Sun Aug  7 15:19:11 2011
+
+From davej  Wed Aug  3 15:16:37 2011
 Return-Path: oleg at redhat.com
 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
 	gelk.kernelslacker.org
 X-Spam-Level: 
 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
 	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.51]
+Received: from mail.corp.redhat.com [10.5.5.52]
 	by gelk with IMAP (fetchmail-6.3.20)
-	for <davej at localhost> (single-drop); Sun, 07 Aug 2011 15:19:11 -0400 (EDT)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:16:37 -0400 (EDT)
 Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
  zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
- mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:06 -0400 (EDT)
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:29 -0400 (EDT)
 Received: from localhost (localhost.localdomain [127.0.0.1])
-	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id D76B6A5D58;
-	Sun,  7 Aug 2011 15:18:06 -0400 (EDT)
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 5034E9DEA4;
+	Wed,  3 Aug 2011 15:12:35 -0400 (EDT)
 Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
 	by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
-	with ESMTP id xyKeY-zzvTgR; Sun,  7 Aug 2011 15:18:06 -0400 (EDT)
-Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
-	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id BB0E49C7FA;
-	Sun,  7 Aug 2011 15:18:06 -0400 (EDT)
+	with ESMTP id 8BhFlmqmXy8l; Wed,  3 Aug 2011 15:12:35 -0400 (EDT)
+Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 31AEE9DEAB;
+	Wed,  3 Aug 2011 15:12:35 -0400 (EDT)
 Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
-	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JI4PF028668;
-	Sun, 7 Aug 2011 15:18:05 -0400
+	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCRCZ008434;
+	Wed, 3 Aug 2011 15:12:28 -0400
 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
-	oleg at redhat.com; Sun,  7 Aug 2011 21:15:28 +0200 (CEST)
-Date: Sun, 7 Aug 2011 21:15:26 +0200
+	oleg at redhat.com; Wed,  3 Aug 2011 21:09:55 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:09:53 +0200
 From: Oleg Nesterov <oleg at redhat.com>
-To: "Frank Ch. Eigler" <fche at redhat.com>, Kyle McMartin <kmcmartin at redhat.com>,
-        Dave Jones <davej at redhat.com>, Josh Stone <jistone at redhat.com>,
-        Matthew Garrett <mjg at redhat.com>, David Smith <dsmith at redhat.com>
-Cc: kernel at lists.fedoraproject.org
-Subject: [PATCH 04/22] introduce wake_up_quiescent()
-Message-ID: <20110807191526.GA14383 at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 11/31] introduce wake_up_quiescent()
+Message-ID: <20110803190953.GA30952 at redhat.com>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
-In-Reply-To: <20110807191434.GA13184 at redhat.com>
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
 User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
 Status: RO
-Content-Length: 3103
-Lines: 92
+Content-Length: 3186
+Lines: 93
 
 No functional changes. Add the new helper, wake_up_quiescent(task, state),
 which simply returns wake_up_state(task, state). Change all callers which
@@ -4432,10 +4968,10 @@ index a822300..2be3712 100644
  extern int do_send_sig_info(int sig, struct siginfo *info,
  				struct task_struct *p, bool group);
 diff --git a/kernel/ptrace.c b/kernel/ptrace.c
-index 9988b13..26ae214 100644
+index 56b8fc1..4194664 100644
 --- a/kernel/ptrace.c
 +++ b/kernel/ptrace.c
-@@ -566,7 +566,7 @@ static int ptrace_resume(struct task_struct *child, long request,
+@@ -621,7 +621,7 @@ static int ptrace_resume(struct task_struct *child, long request,
  	child->exit_code = data;
  
  	if (lock_task_sighand(child, &flags)) {
@@ -4445,10 +4981,10 @@ index 9988b13..26ae214 100644
  	}
  
 diff --git a/kernel/signal.c b/kernel/signal.c
-index 2138cee..4fcf1c7 100644
+index 71f5cca..3e8e0b1 100644
 --- a/kernel/signal.c
 +++ b/kernel/signal.c
-@@ -652,6 +652,14 @@ void signal_wake_up(struct task_struct *t, int resume)
+@@ -702,6 +702,14 @@ void signal_wake_up(struct task_struct *t, int resume)
  }
  
  /*
@@ -4463,16 +4999,16 @@ index 2138cee..4fcf1c7 100644
   * Remove signals in mask from the pending set and queue.
   * Returns 1 if any signals were found.
   *
-@@ -811,7 +819,7 @@ static int prepare_signal(int sig, struct task_struct *p, int from_ancestor_ns)
- 		do {
- 			task_clear_group_stop_pending(t);
+@@ -888,7 +896,7 @@ static int prepare_signal(int sig, struct task_struct *p, int from_ancestor_ns)
+ 			task_clear_jobctl_pending(t, JOBCTL_STOP_PENDING);
  			rm_from_queue(SIG_KERNEL_STOP_MASK, &t->pending);
--			wake_up_state(t, __TASK_STOPPED);
-+			wake_up_quiescent(t, __TASK_STOPPED);
+ 			if (likely(!(t->ptrace & PT_SEIZED)))
+-				wake_up_state(t, __TASK_STOPPED);
++				wake_up_quiescent(t, __TASK_STOPPED);
+ 			else
+ 				ptrace_trap_notify(t);
  		} while_each_thread(p, t);
- 
- 		/*
-@@ -1800,7 +1808,7 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
+@@ -1879,7 +1887,7 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
  			do_notify_parent_cldstop(current, false, why);
  
  		spin_lock_irq(&current->sighand->siglock);
@@ -4482,7 +5018,7 @@ index 2138cee..4fcf1c7 100644
  
  		if (clear_code)
 diff --git a/kernel/utrace.c b/kernel/utrace.c
-index 6e7fafb..d7c547c 100644
+index 5d3974e..cebc390 100644
 --- a/kernel/utrace.c
 +++ b/kernel/utrace.c
 @@ -648,7 +648,7 @@ static void utrace_wakeup(struct task_struct *target, struct utrace *utrace)
@@ -4497,53 +5033,54 @@ index 6e7fafb..d7c547c 100644
 -- 
 1.5.5.1
 
-From davej  Sun Aug  7 15:19:13 2011
+
+From davej  Wed Aug  3 15:22:01 2011
 Return-Path: oleg at redhat.com
 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
 	gelk.kernelslacker.org
 X-Spam-Level: 
 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
 	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.51]
+Received: from mail.corp.redhat.com [10.5.5.52]
 	by gelk with IMAP (fetchmail-6.3.20)
-	for <davej at localhost> (single-drop); Sun, 07 Aug 2011 15:19:13 -0400 (EDT)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:22:01 -0400 (EDT)
 Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
  zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
- mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:09 -0400 (EDT)
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:17:15 -0400 (EDT)
 Received: from localhost (localhost.localdomain [127.0.0.1])
-	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id C8DCF1322A2;
-	Sun,  7 Aug 2011 15:18:09 -0400 (EDT)
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id F2DE19DC07;
+	Wed,  3 Aug 2011 15:12:37 -0400 (EDT)
 Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
 	by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
-	with ESMTP id ZQXZL5xrzV21; Sun,  7 Aug 2011 15:18:09 -0400 (EDT)
-Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
-	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id B3D6D128FDA;
-	Sun,  7 Aug 2011 15:18:09 -0400 (EDT)
+	with ESMTP id IYfqfx8GhNWc; Wed,  3 Aug 2011 15:12:37 -0400 (EDT)
+Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id D645E9DAF7;
+	Wed,  3 Aug 2011 15:12:37 -0400 (EDT)
 Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
-	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p77JI7P5029847;
-	Sun, 7 Aug 2011 15:18:07 -0400
+	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCUNh008446;
+	Wed, 3 Aug 2011 15:12:31 -0400
 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
-	oleg at redhat.com; Sun,  7 Aug 2011 21:15:31 +0200 (CEST)
-Date: Sun, 7 Aug 2011 21:15:28 +0200
+	oleg at redhat.com; Wed,  3 Aug 2011 21:09:58 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:09:56 +0200
 From: Oleg Nesterov <oleg at redhat.com>
-To: "Frank Ch. Eigler" <fche at redhat.com>, Kyle McMartin <kmcmartin at redhat.com>,
-        Dave Jones <davej at redhat.com>, Josh Stone <jistone at redhat.com>,
-        Matthew Garrett <mjg at redhat.com>, David Smith <dsmith at redhat.com>
-Cc: kernel at lists.fedoraproject.org
-Subject: [PATCH 05/22] introduce ptrace_signal_wake_up()
-Message-ID: <20110807191528.GA14386 at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 12/31] introduce ptrace_signal_wake_up()
+Message-ID: <20110803190956.GA30959 at redhat.com>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
-In-Reply-To: <20110807191434.GA13184 at redhat.com>
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
 User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
 Status: RO
-Content-Length: 1974
-Lines: 67
+Content-Length: 3667
+Lines: 113
 
-Add the new helper, ptrace_signal_wake_up(), change ptrace.c to use
-it instead of signal_wake_up().
+Add the new helper, ptrace_signal_wake_up(), change ptrace.c/signal.c
+to use it instead of signal_wake_up() to wake up a STOPPED/TRACED task.
 
 The new helper does almost the same, except:
 
@@ -4563,18 +5100,32 @@ wake_up_quiescent().
 
 Signed-off-by: Oleg Nesterov <oleg at redhat.com>
 ---
- kernel/ptrace.c |   16 ++++++++++++++--
- 1 files changed, 14 insertions(+), 2 deletions(-)
+ include/linux/ptrace.h |    1 +
+ kernel/ptrace.c        |   20 ++++++++++++++++----
+ kernel/signal.c        |    2 +-
+ 3 files changed, 18 insertions(+), 5 deletions(-)
 
+diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
+index 800f113..6d9282a 100644
+--- a/include/linux/ptrace.h
++++ b/include/linux/ptrace.h
+@@ -113,6 +113,7 @@
+ #include <linux/compiler.h>		/* For unlikely.  */
+ #include <linux/sched.h>		/* For struct task_struct.  */
+ 
++extern void ptrace_signal_wake_up(struct task_struct *p, int quiescent);
+ 
+ extern long arch_ptrace(struct task_struct *child, long request,
+ 			unsigned long addr, unsigned long data);
 diff --git a/kernel/ptrace.c b/kernel/ptrace.c
-index 26ae214..0b2aba5 100644
+index 4194664..1a50090 100644
 --- a/kernel/ptrace.c
 +++ b/kernel/ptrace.c
-@@ -24,6 +24,18 @@
- #include <linux/regset.h>
+@@ -25,6 +25,18 @@
  #include <linux/hw_breakpoint.h>
+ #include <linux/cn_proc.h>
  
-+static void ptrace_signal_wake_up(struct task_struct *p, int quiescent)
++void ptrace_signal_wake_up(struct task_struct *p, int quiescent)
 +{
 +	unsigned int state;
 +
@@ -4587,74 +5138,106 @@ index 26ae214..0b2aba5 100644
 +		kick_process(p);
 +}
  
- /*
-  * ptrace a task: make the debugger its new parent and
-@@ -92,7 +104,7 @@ void __ptrace_unlink(struct task_struct *child)
+ static int ptrace_trapping_sleep_fn(void *flags)
+ {
+@@ -106,7 +118,7 @@ void __ptrace_unlink(struct task_struct *child)
  	 * TASK_KILLABLE sleeps.
  	 */
- 	if (child->group_stop & GROUP_STOP_PENDING || task_is_traced(child))
+ 	if (child->jobctl & JOBCTL_STOP_PENDING || task_is_traced(child))
 -		signal_wake_up(child, task_is_traced(child));
 +		ptrace_signal_wake_up(child, task_is_traced(child));
  
  	spin_unlock(&child->sighand->siglock);
  }
-@@ -245,7 +257,7 @@ static int ptrace_attach(struct task_struct *task)
+@@ -296,7 +308,7 @@ static int ptrace_attach(struct task_struct *task, long request,
  	 */
- 	if (task_is_stopped(task)) {
- 		task->group_stop |= GROUP_STOP_PENDING | GROUP_STOP_TRAPPING;
+ 	if (task_is_stopped(task) &&
+ 	    task_set_jobctl_pending(task, JOBCTL_TRAP_STOP | JOBCTL_TRAPPING))
 -		signal_wake_up(task, 1);
 +		ptrace_signal_wake_up(task, 1);
- 		wait_trap = true;
- 	}
  
+ 	spin_unlock(&task->sighand->siglock);
+ 
+@@ -731,7 +743,7 @@ int ptrace_request(struct task_struct *child, long request,
+ 		 * tracee into STOP.
+ 		 */
+ 		if (likely(task_set_jobctl_pending(child, JOBCTL_TRAP_STOP)))
+-			signal_wake_up(child, child->jobctl & JOBCTL_LISTENING);
++			ptrace_signal_wake_up(child, child->jobctl & JOBCTL_LISTENING);
+ 
+ 		unlock_task_sighand(child, &flags);
+ 		ret = 0;
+@@ -760,7 +772,7 @@ int ptrace_request(struct task_struct *child, long request,
+ 		 * of this trap and now.  Trigger re-trap immediately.
+ 		 */
+ 		if (child->jobctl & JOBCTL_TRAP_NOTIFY)
+-			signal_wake_up(child, true);
++			ptrace_signal_wake_up(child, true);
+ 
+ 		unlock_task_sighand(child, &flags);
+ 		ret = 0;
+diff --git a/kernel/signal.c b/kernel/signal.c
+index 3e8e0b1..0dc6abb 100644
+--- a/kernel/signal.c
++++ b/kernel/signal.c
+@@ -854,7 +854,7 @@ static void ptrace_trap_notify(struct task_struct *t)
+ 	assert_spin_locked(&t->sighand->siglock);
+ 
+ 	task_set_jobctl_pending(t, JOBCTL_TRAP_NOTIFY);
+-	signal_wake_up(t, t->jobctl & JOBCTL_LISTENING);
++	ptrace_signal_wake_up(t, t->jobctl & JOBCTL_LISTENING);
+ }
+ 
+ /*
 -- 
 1.5.5.1
 
-From davej  Sun Aug  7 15:19:14 2011
+
+From davej  Wed Aug  3 15:15:58 2011
 Return-Path: oleg at redhat.com
 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
 	gelk.kernelslacker.org
 X-Spam-Level: 
 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
 	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.51]
+Received: from mail.corp.redhat.com [10.5.5.52]
 	by gelk with IMAP (fetchmail-6.3.20)
-	for <davej at localhost> (single-drop); Sun, 07 Aug 2011 15:19:14 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
- zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
- mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:12 -0400 (EDT)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:15:58 -0400 (EDT)
+Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
+ zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:13:17 -0400 (EDT)
 Received: from localhost (localhost.localdomain [127.0.0.1])
-	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 72BBDA5D58;
-	Sun,  7 Aug 2011 15:18:12 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
-	by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
-	with ESMTP id k8I1SMuU0ydh; Sun,  7 Aug 2011 15:18:12 -0400 (EDT)
+	by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 8FF88DA558;
+	Wed,  3 Aug 2011 15:12:40 -0400 (EDT)
+Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+	by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+	with ESMTP id 1cOfIyuaRoO3; Wed,  3 Aug 2011 15:12:40 -0400 (EDT)
 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
-	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 5DFAB9C7FA;
-	Sun,  7 Aug 2011 15:18:12 -0400 (EDT)
+	by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 7B6E8DA4A9;
+	Wed,  3 Aug 2011 15:12:40 -0400 (EDT)
 Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
-	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JIAjF028676;
-	Sun, 7 Aug 2011 15:18:10 -0400
+	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCXpn023459;
+	Wed, 3 Aug 2011 15:12:33 -0400
 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
-	oleg at redhat.com; Sun,  7 Aug 2011 21:15:34 +0200 (CEST)
-Date: Sun, 7 Aug 2011 21:15:31 +0200
+	oleg at redhat.com; Wed,  3 Aug 2011 21:10:01 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:09:59 +0200
 From: Oleg Nesterov <oleg at redhat.com>
-To: "Frank Ch. Eigler" <fche at redhat.com>, Kyle McMartin <kmcmartin at redhat.com>,
-        Dave Jones <davej at redhat.com>, Josh Stone <jistone at redhat.com>,
-        Matthew Garrett <mjg at redhat.com>, David Smith <dsmith at redhat.com>
-Cc: kernel at lists.fedoraproject.org
-Subject: [PATCH 06/22] wait_task_inactive: treat task->state and
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 13/31] wait_task_inactive: treat task->state and
 	match_state as bitmasks
-Message-ID: <20110807191531.GA14393 at redhat.com>
+Message-ID: <20110803190959.GA30962 at redhat.com>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
-In-Reply-To: <20110807191434.GA13184 at redhat.com>
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
 User-Agent: Mutt/1.5.18 (2008-05-17)
 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
 Status: RO
-Content-Length: 1557
-Lines: 38
+Content-Length: 1558
+Lines: 39
 
 Change wait_task_inactive() to check "state & match_state" instead of
 "state == match_state". This should not make any difference, but this
@@ -4680,10 +5263,10 @@ Signed-off-by: Oleg Nesterov <oleg at redhat.com>
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/kernel/sched.c b/kernel/sched.c
-index 3f2e502..ade7997 100644
+index ccacdbd..66ef2fb 100644
 --- a/kernel/sched.c
 +++ b/kernel/sched.c
-@@ -2277,7 +2277,7 @@ unsigned long wait_task_inactive(struct task_struct *p, long match_state)
+@@ -2289,7 +2289,7 @@ unsigned long wait_task_inactive(struct task_struct *p, long match_state)
  		 * is actually now running somewhere else!
  		 */
  		while (task_running(rq, p)) {
@@ -4695,50 +5278,51 @@ index 3f2e502..ade7997 100644
 -- 
 1.5.5.1
 
-From davej  Sun Aug  7 15:19:15 2011
+
+From davej  Wed Aug  3 15:16:24 2011
 Return-Path: oleg at redhat.com
 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
 	gelk.kernelslacker.org
 X-Spam-Level: 
 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
 	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.51]
+Received: from mail.corp.redhat.com [10.5.5.52]
 	by gelk with IMAP (fetchmail-6.3.20)
-	for <davej at localhost> (single-drop); Sun, 07 Aug 2011 15:19:15 -0400 (EDT)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:16:24 -0400 (EDT)
 Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
  zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
- mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:15 -0400 (EDT)
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:21 -0400 (EDT)
 Received: from localhost (localhost.localdomain [127.0.0.1])
-	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 1FD1B1322A2;
-	Sun,  7 Aug 2011 15:18:15 -0400 (EDT)
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 34C189DC30;
+	Wed,  3 Aug 2011 15:12:43 -0400 (EDT)
 Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
 	by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
-	with ESMTP id gfct30463vGS; Sun,  7 Aug 2011 15:18:15 -0400 (EDT)
-Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
-	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 01C04128FDA;
-	Sun,  7 Aug 2011 15:18:15 -0400 (EDT)
+	with ESMTP id RHggq6bqo+Q9; Wed,  3 Aug 2011 15:12:43 -0400 (EDT)
+Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 210D59DC14;
+	Wed,  3 Aug 2011 15:12:43 -0400 (EDT)
 Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
-	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JICKL027777;
-	Sun, 7 Aug 2011 15:18:13 -0400
+	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p73JCZsD022395;
+	Wed, 3 Aug 2011 15:12:36 -0400
 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
-	oleg at redhat.com; Sun,  7 Aug 2011 21:15:36 +0200 (CEST)
-Date: Sun, 7 Aug 2011 21:15:34 +0200
+	oleg at redhat.com; Wed,  3 Aug 2011 21:10:03 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:10:01 +0200
 From: Oleg Nesterov <oleg at redhat.com>
-To: "Frank Ch. Eigler" <fche at redhat.com>, Kyle McMartin <kmcmartin at redhat.com>,
-        Dave Jones <davej at redhat.com>, Josh Stone <jistone at redhat.com>,
-        Matthew Garrett <mjg at redhat.com>, David Smith <dsmith at redhat.com>
-Cc: kernel at lists.fedoraproject.org
-Subject: [PATCH 07/22] introduce TASK_UTRACED state
-Message-ID: <20110807191534.GA14396 at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 14/31] introduce TASK_UTRACED state
+Message-ID: <20110803191001.GA30969 at redhat.com>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
-In-Reply-To: <20110807191434.GA13184 at redhat.com>
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
 User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
 Status: RO
-Content-Length: 2912
-Lines: 83
+Content-Length: 2913
+Lines: 84
 
 Introduce TASK_UTRACED state, will be used by utrace instead of TASK_TRACED.
 
@@ -4752,7 +5336,7 @@ Signed-off-by: Oleg Nesterov <oleg at redhat.com>
  2 files changed, 17 insertions(+), 14 deletions(-)
 
 diff --git a/fs/proc/array.c b/fs/proc/array.c
-index 496fef3..bfaa998 100644
+index f0c0ea2..e0daec4 100644
 --- a/fs/proc/array.c
 +++ b/fs/proc/array.c
 @@ -138,11 +138,12 @@ static const char * const task_state_array[] = {
@@ -4774,7 +5358,7 @@ index 496fef3..bfaa998 100644
  
  static inline const char *get_task_state(struct task_struct *tsk)
 diff --git a/include/linux/sched.h b/include/linux/sched.h
-index b87de83..7a0008c 100644
+index c6d79af..f3f0a77 100644
 --- a/include/linux/sched.h
 +++ b/include/linux/sched.h
 @@ -184,16 +184,17 @@ print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
@@ -4824,50 +5408,51 @@ index b87de83..7a0008c 100644
 -- 
 1.5.5.1
 
-From davej  Sun Aug  7 15:19:17 2011
+
+From davej  Wed Aug  3 15:16:02 2011
 Return-Path: oleg at redhat.com
 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
 	gelk.kernelslacker.org
 X-Spam-Level: 
 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
 	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.51]
+Received: from mail.corp.redhat.com [10.5.5.52]
 	by gelk with IMAP (fetchmail-6.3.20)
-	for <davej at localhost> (single-drop); Sun, 07 Aug 2011 15:19:17 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
- zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
- mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:17 -0400 (EDT)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:16:02 -0400 (EDT)
+Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
+ zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:13:18 -0400 (EDT)
 Received: from localhost (localhost.localdomain [127.0.0.1])
-	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id B634FA5D5A;
-	Sun,  7 Aug 2011 15:18:17 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
-	by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
-	with ESMTP id 3vEyYZtZ8hD5; Sun,  7 Aug 2011 15:18:17 -0400 (EDT)
-Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
-	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 9921A9C7FA;
-	Sun,  7 Aug 2011 15:18:17 -0400 (EDT)
+	by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id D7FFADA44E;
+	Wed,  3 Aug 2011 15:12:45 -0400 (EDT)
+Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+	by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+	with ESMTP id LFGdvSMswLJT; Wed,  3 Aug 2011 15:12:45 -0400 (EDT)
+Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
+	by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id BA46CDA441;
+	Wed,  3 Aug 2011 15:12:45 -0400 (EDT)
 Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
-	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JIFH8028686;
-	Sun, 7 Aug 2011 15:18:16 -0400
+	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCcpZ029424;
+	Wed, 3 Aug 2011 15:12:39 -0400
 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
-	oleg at redhat.com; Sun,  7 Aug 2011 21:15:39 +0200 (CEST)
-Date: Sun, 7 Aug 2011 21:15:37 +0200
+	oleg at redhat.com; Wed,  3 Aug 2011 21:10:06 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:10:04 +0200
 From: Oleg Nesterov <oleg at redhat.com>
-To: "Frank Ch. Eigler" <fche at redhat.com>, Kyle McMartin <kmcmartin at redhat.com>,
-        Dave Jones <davej at redhat.com>, Josh Stone <jistone at redhat.com>,
-        Matthew Garrett <mjg at redhat.com>, David Smith <dsmith at redhat.com>
-Cc: kernel at lists.fedoraproject.org
-Subject: [PATCH 08/22] utrace: use TASK_UTRACED instead of TASK_TRACED
-Message-ID: <20110807191537.GA14403 at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 15/31] utrace: use TASK_UTRACED instead of TASK_TRACED
+Message-ID: <20110803191004.GA30972 at redhat.com>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
-In-Reply-To: <20110807191434.GA13184 at redhat.com>
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
 User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
 Status: RO
-Content-Length: 4315
-Lines: 129
+Content-Length: 4316
+Lines: 130
 
 Change utrace.c to use TASK_UTRACED instead of TASK_TRACED.
 
@@ -4887,7 +5472,7 @@ Signed-off-by: Oleg Nesterov <oleg at redhat.com>
  1 files changed, 14 insertions(+), 12 deletions(-)
 
 diff --git a/kernel/utrace.c b/kernel/utrace.c
-index d7c547c..be98607 100644
+index cebc390..2097103 100644
 --- a/kernel/utrace.c
 +++ b/kernel/utrace.c
 @@ -462,6 +462,8 @@ static void put_detached_list(struct list_head *list)
@@ -4999,59 +5584,57 @@ index d7c547c..be98607 100644
 -- 
 1.5.5.1
 
-From davej  Sun Aug  7 15:19:19 2011
+
+From davej  Wed Aug  3 15:21:40 2011
 Return-Path: oleg at redhat.com
 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
 	gelk.kernelslacker.org
 X-Spam-Level: 
 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
 	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.51]
+Received: from mail.corp.redhat.com [10.5.5.52]
 	by gelk with IMAP (fetchmail-6.3.20)
-	for <davej at localhost> (single-drop); Sun, 07 Aug 2011 15:19:19 -0400 (EDT)
-Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
- zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
- mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:24 -0400 (EDT)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:21:40 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
+ zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:42 -0400 (EDT)
 Received: from localhost (localhost.localdomain [127.0.0.1])
-	by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 53AC0D89A9;
-	Sun,  7 Aug 2011 15:18:20 -0400 (EDT)
-Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
-	by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
-	with ESMTP id CGhyA84rXAKN; Sun,  7 Aug 2011 15:18:20 -0400 (EDT)
-Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
-	by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 36B2CD8988;
-	Sun,  7 Aug 2011 15:18:20 -0400 (EDT)
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 7035E9DECC;
+	Wed,  3 Aug 2011 15:12:48 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+	by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+	with ESMTP id rmRalMQFlNua; Wed,  3 Aug 2011 15:12:48 -0400 (EDT)
+Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 5CC809DEC9;
+	Wed,  3 Aug 2011 15:12:48 -0400 (EDT)
 Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
-	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JIIFB028696;
-	Sun, 7 Aug 2011 15:18:18 -0400
+	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p73JCfwv010344;
+	Wed, 3 Aug 2011 15:12:41 -0400
 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
-	oleg at redhat.com; Sun,  7 Aug 2011 21:15:41 +0200 (CEST)
-Date: Sun, 7 Aug 2011 21:15:39 +0200
+	oleg at redhat.com; Wed,  3 Aug 2011 21:10:09 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:10:07 +0200
 From: Oleg Nesterov <oleg at redhat.com>
-To: "Frank Ch. Eigler" <fche at redhat.com>, Kyle McMartin <kmcmartin at redhat.com>,
-        Dave Jones <davej at redhat.com>, Josh Stone <jistone at redhat.com>,
-        Matthew Garrett <mjg at redhat.com>, David Smith <dsmith at redhat.com>
-Cc: kernel at lists.fedoraproject.org
-Subject: [PATCH 09/22] tracehooks: kill tracehook_finish_jctl(), add
-	tracehook_finish_stop()
-Message-ID: <20110807191539.GA14406 at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 16/31] reintroduce tracehook_finish_jctl() as
+	utrace_end_stop()
+Message-ID: <20110803191007.GA30979 at redhat.com>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
-In-Reply-To: <20110807191434.GA13184 at redhat.com>
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
 User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
 Status: RO
-Content-Length: 2781
-Lines: 85
+Content-Length: 2401
+Lines: 77
 
-tracehook_finish_jctl() is needed to avoid the races with SIGKILL
-which wakes up UTRACED task, and thus it should be called every time
-after the STOPPED/TRACED/UTRACED returns from schedule(), remember
-that TASK_UTRACED can be added while the task is STOPPED/UTRACED.
-
-- rename it to tracehook_finish_stop(),jctl no longer matches the
-  reality.
+utrace_finish_stop() is needed to avoid the races with SIGKILL which
+wakes up UTRACED task, and thus it should be called every time after
+the STOPPED/TRACED/UTRACED returns from schedule(), remember that
+TASK_UTRACED can be added while the task is STOPPED/UTRACED.
 
 - change do_signal_state() to call this helper right after schedule(),
   otherwise this logic is broken by the upstream changes
@@ -5061,62 +5644,56 @@ that TASK_UTRACED can be added while the task is STOPPED/UTRACED.
 
 Signed-off-by: Oleg Nesterov <oleg at redhat.com>
 ---
- include/linux/tracehook.h |    6 +++---
- kernel/signal.c           |    5 +++--
- kernel/utrace.c           |    2 +-
- 3 files changed, 7 insertions(+), 6 deletions(-)
+ include/linux/utrace.h |   11 +++++++++++
+ kernel/signal.c        |    5 +++++
+ kernel/utrace.c        |    2 +-
+ 3 files changed, 17 insertions(+), 1 deletions(-)
 
-diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
-index 7d7bdde..3c7b6b3 100644
---- a/include/linux/tracehook.h
-+++ b/include/linux/tracehook.h
-@@ -528,11 +528,11 @@ static inline int tracehook_get_signal(struct task_struct *task,
+diff --git a/include/linux/utrace.h b/include/linux/utrace.h
+index cf13839..0279c74 100644
+--- a/include/linux/utrace.h
++++ b/include/linux/utrace.h
+@@ -719,4 +719,15 @@ static inline void utrace_exit_notify(struct task_struct *task,
+ 		utrace_report_death(task, group_dead, signal);
  }
  
- /**
-- * tracehook_finish_jctl - report about return from job control stop
-+ * tracehook_finish_stop - report about return from STOPPED/TRACED
-  *
-- * This is called by do_signal_stop() after wakeup.
++/**
++ * utrace_end_stop - report about return from STOPPED/TRACED
++ *
 + * This is called by do_signal_stop() and ptrace_stop after wakeup.
-  */
--static inline void tracehook_finish_jctl(void)
-+static inline void tracehook_finish_stop(void)
- {
- 	if (task_utrace_flags(current))
- 		utrace_finish_stop();
++ */
++static inline void utrace_end_stop(void)
++{
++	if (task_utrace_flags(current))
++		utrace_finish_stop();
++}
++
+ #endif	/* linux/utrace.h */
 diff --git a/kernel/signal.c b/kernel/signal.c
-index 4fcf1c7..a7979ad 100644
+index 0dc6abb..a625309 100644
 --- a/kernel/signal.c
 +++ b/kernel/signal.c
-@@ -1816,6 +1816,7 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
+@@ -1895,6 +1895,8 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
  		read_unlock(&tasklist_lock);
  	}
  
-+	tracehook_finish_stop();
++	utrace_end_stop();
++
  	/*
  	 * While in TASK_TRACED, we were considered "frozen enough".
  	 * Now that we woke up, it's crucial if we're supposed to be
-@@ -1952,6 +1953,8 @@ retry:
+@@ -2059,6 +2061,9 @@ static bool do_signal_stop(int signr)
+ 
  		/* Now we don't run again until woken by SIGCONT or SIGKILL */
  		schedule();
- 
-+		tracehook_finish_stop();
 +
- 		spin_lock_irq(&current->sighand->siglock);
++		utrace_end_stop();
++
+ 		return true;
  	} else {
- 		ptrace_stop(current->group_stop & GROUP_STOP_SIGMASK,
-@@ -1974,8 +1977,6 @@ retry:
- 
- 	spin_unlock_irq(&current->sighand->siglock);
- 
--	tracehook_finish_jctl();
--
- 	return 1;
- }
- 
+ 		/*
 diff --git a/kernel/utrace.c b/kernel/utrace.c
-index be98607..daa96b9 100644
+index 2097103..d41b982 100644
 --- a/kernel/utrace.c
 +++ b/kernel/utrace.c
 @@ -741,7 +741,7 @@ static bool utrace_reset(struct task_struct *task, struct utrace *utrace)
@@ -5131,50 +5708,51 @@ index be98607..daa96b9 100644
 -- 
 1.5.5.1
 
-From davej  Sun Aug  7 15:19:18 2011
+
+From davej  Wed Aug  3 15:21:41 2011
 Return-Path: oleg at redhat.com
 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
 	gelk.kernelslacker.org
 X-Spam-Level: 
 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
 	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.51]
+Received: from mail.corp.redhat.com [10.5.5.52]
 	by gelk with IMAP (fetchmail-6.3.20)
-	for <davej at localhost> (single-drop); Sun, 07 Aug 2011 15:19:18 -0400 (EDT)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:21:41 -0400 (EDT)
 Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
  zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
- mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:22 -0400 (EDT)
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:42 -0400 (EDT)
 Received: from localhost (localhost.localdomain [127.0.0.1])
-	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id DD6839C7FA;
-	Sun,  7 Aug 2011 15:18:22 -0400 (EDT)
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 153719DD18;
+	Wed,  3 Aug 2011 15:12:51 -0400 (EDT)
 Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
 	by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
-	with ESMTP id hZs6VyadcD7K; Sun,  7 Aug 2011 15:18:22 -0400 (EDT)
-Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
-	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id C7B129C7DE;
-	Sun,  7 Aug 2011 15:18:22 -0400 (EDT)
+	with ESMTP id ffM0oM8RRtgL; Wed,  3 Aug 2011 15:12:51 -0400 (EDT)
+Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 0253E9DEC9;
+	Wed,  3 Aug 2011 15:12:51 -0400 (EDT)
 Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
-	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p77JIKMe020605;
-	Sun, 7 Aug 2011 15:18:21 -0400
+	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCh9Z023559;
+	Wed, 3 Aug 2011 15:12:44 -0400
 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
-	oleg at redhat.com; Sun,  7 Aug 2011 21:15:44 +0200 (CEST)
-Date: Sun, 7 Aug 2011 21:15:42 +0200
+	oleg at redhat.com; Wed,  3 Aug 2011 21:10:11 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:10:09 +0200
 From: Oleg Nesterov <oleg at redhat.com>
-To: "Frank Ch. Eigler" <fche at redhat.com>, Kyle McMartin <kmcmartin at redhat.com>,
-        Dave Jones <davej at redhat.com>, Josh Stone <jistone at redhat.com>,
-        Matthew Garrett <mjg at redhat.com>, David Smith <dsmith at redhat.com>
-Cc: kernel at lists.fedoraproject.org
-Subject: [PATCH 10/22] teach wake_up_quiescent() to do "selective" wake_up
-Message-ID: <20110807191542.GA14409 at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 17/31] teach wake_up_quiescent() to do "selective" wake_up
+Message-ID: <20110803191009.GA30982 at redhat.com>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
-In-Reply-To: <20110807191434.GA13184 at redhat.com>
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
 User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
 Status: RO
-Content-Length: 1334
-Lines: 45
+Content-Length: 1335
+Lines: 46
 
 Both utrace and ptrace can want the same thread to be quiescent, in this
 case its state is TASK_TRACED | TASK_UTRACED. And this also means that
@@ -5189,10 +5767,10 @@ Signed-off-by: Oleg Nesterov <oleg at redhat.com>
  1 files changed, 15 insertions(+), 0 deletions(-)
 
 diff --git a/kernel/signal.c b/kernel/signal.c
-index a7979ad..57552e6 100644
+index a625309..0d1675a 100644
 --- a/kernel/signal.c
 +++ b/kernel/signal.c
-@@ -651,11 +651,26 @@ void signal_wake_up(struct task_struct *t, int resume)
+@@ -701,11 +701,26 @@ void signal_wake_up(struct task_struct *t, int resume)
  		kick_process(t);
  }
  
@@ -5222,51 +5800,52 @@ index a7979ad..57552e6 100644
 -- 
 1.5.5.1
 
-From davej  Sun Aug  7 15:19:20 2011
+
+From davej  Wed Aug  3 15:21:43 2011
 Return-Path: oleg at redhat.com
 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
 	gelk.kernelslacker.org
 X-Spam-Level: 
 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
 	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.51]
-	by gelk with IMAP (fetchmail-6.3.20)
-	for <davej at localhost> (single-drop); Sun, 07 Aug 2011 15:19:20 -0400 (EDT)
-Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
- zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
- mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:25 -0400 (EDT)
+Received: from mail.corp.redhat.com [10.5.5.52]
+	by gelk with IMAP (fetchmail-6.3.20)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:21:43 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
+ zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:43 -0400 (EDT)
 Received: from localhost (localhost.localdomain [127.0.0.1])
-	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 7C2991322AA;
-	Sun,  7 Aug 2011 15:18:25 -0400 (EDT)
-Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
-	by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
-	with ESMTP id rHOxOwY4bOdr; Sun,  7 Aug 2011 15:18:25 -0400 (EDT)
-Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
-	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 67ABD128FDA;
-	Sun,  7 Aug 2011 15:18:25 -0400 (EDT)
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id B0E899DECF;
+	Wed,  3 Aug 2011 15:12:53 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+	by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+	with ESMTP id s0bDFhAmsQWN; Wed,  3 Aug 2011 15:12:53 -0400 (EDT)
+Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 9DC6E9DEC9;
+	Wed,  3 Aug 2011 15:12:53 -0400 (EDT)
 Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
-	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p77JINVP029911;
-	Sun, 7 Aug 2011 15:18:23 -0400
+	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCkUr029453;
+	Wed, 3 Aug 2011 15:12:46 -0400
 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
-	oleg at redhat.com; Sun,  7 Aug 2011 21:15:47 +0200 (CEST)
-Date: Sun, 7 Aug 2011 21:15:45 +0200
+	oleg at redhat.com; Wed,  3 Aug 2011 21:10:14 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:10:12 +0200
 From: Oleg Nesterov <oleg at redhat.com>
-To: "Frank Ch. Eigler" <fche at redhat.com>, Kyle McMartin <kmcmartin at redhat.com>,
-        Dave Jones <davej at redhat.com>, Josh Stone <jistone at redhat.com>,
-        Matthew Garrett <mjg at redhat.com>, David Smith <dsmith at redhat.com>
-Cc: kernel at lists.fedoraproject.org
-Subject: [PATCH 11/22] ptrace_stop: do not assume the task is running after
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 18/31] ptrace_stop: do not assume the task is running after
 	wake_up_quiescent()
-Message-ID: <20110807191545.GA14416 at redhat.com>
+Message-ID: <20110803191012.GA30985 at redhat.com>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
-In-Reply-To: <20110807191434.GA13184 at redhat.com>
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
 User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
 Status: RO
-Content-Length: 961
-Lines: 30
+Content-Length: 956
+Lines: 31
 
 If ptrace_stop() sets TASK_TRACED and then detects we should not stop,
 it can race with utrace_do_stop() which can see TASK_TRACED and add
@@ -5278,10 +5857,10 @@ Signed-off-by: Oleg Nesterov <oleg at redhat.com>
  1 files changed, 8 insertions(+), 0 deletions(-)
 
 diff --git a/kernel/signal.c b/kernel/signal.c
-index 57552e6..89e691d 100644
+index 0d1675a..249760f 100644
 --- a/kernel/signal.c
 +++ b/kernel/signal.c
-@@ -1829,6 +1829,14 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
+@@ -1908,6 +1908,14 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
  		if (clear_code)
  			current->exit_code = 0;
  		read_unlock(&tasklist_lock);
@@ -5295,173 +5874,297 @@ index 57552e6..89e691d 100644
 +		schedule();
  	}
  
- 	tracehook_finish_stop();
+ 	utrace_end_stop();
 -- 
 1.5.5.1
 
-From davej  Sun Aug  7 15:19:21 2011
+
+From davej  Wed Aug  3 15:16:26 2011
 Return-Path: oleg at redhat.com
 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
 	gelk.kernelslacker.org
 X-Spam-Level: 
 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
 	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.51]
+Received: from mail.corp.redhat.com [10.5.5.52]
 	by gelk with IMAP (fetchmail-6.3.20)
-	for <davej at localhost> (single-drop); Sun, 07 Aug 2011 15:19:21 -0400 (EDT)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:16:26 -0400 (EDT)
 Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
  zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
- mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:28 -0400 (EDT)
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:22 -0400 (EDT)
 Received: from localhost (localhost.localdomain [127.0.0.1])
-	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 1B4B91322AE;
-	Sun,  7 Aug 2011 15:18:28 -0400 (EDT)
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 69B489DC62;
+	Wed,  3 Aug 2011 15:12:56 -0400 (EDT)
 Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
 	by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
-	with ESMTP id q5tv0cJeZqLD; Sun,  7 Aug 2011 15:18:28 -0400 (EDT)
-Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
-	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 071461322A9;
-	Sun,  7 Aug 2011 15:18:28 -0400 (EDT)
+	with ESMTP id 4BNNeoYSdCTc; Wed,  3 Aug 2011 15:12:56 -0400 (EDT)
+Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 4A9899DC14;
+	Wed,  3 Aug 2011 15:12:56 -0400 (EDT)
 Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
-	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p77JIPFB020635;
-	Sun, 7 Aug 2011 15:18:26 -0400
+	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCnRf023575;
+	Wed, 3 Aug 2011 15:12:49 -0400
 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
-	oleg at redhat.com; Sun,  7 Aug 2011 21:15:49 +0200 (CEST)
-Date: Sun, 7 Aug 2011 21:15:47 +0200
+	oleg at redhat.com; Wed,  3 Aug 2011 21:10:16 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:10:14 +0200
 From: Oleg Nesterov <oleg at redhat.com>
-To: "Frank Ch. Eigler" <fche at redhat.com>, Kyle McMartin <kmcmartin at redhat.com>,
-        Dave Jones <davej at redhat.com>, Josh Stone <jistone at redhat.com>,
-        Matthew Garrett <mjg at redhat.com>, David Smith <dsmith at redhat.com>
-Cc: kernel at lists.fedoraproject.org
-Subject: [PATCH 12/22] get_signal_to_deliver: restructure utrace/ptrace
-	signal reporting
-Message-ID: <20110807191547.GA14419 at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 19/31] get_signal_to_deliver: restore/restructure
+	utrace/ptrace signal reporting
+Message-ID: <20110803191014.GA30992 at redhat.com>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
-In-Reply-To: <20110807191434.GA13184 at redhat.com>
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
 User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
 Status: RO
-Content-Length: 2011
-Lines: 72
+Content-Length: 3556
+Lines: 115
 
-get_signal_to_deliver() assumes that either tracehook_get_signal() does
-nothing (without CONFIG_UTRACE), or it also reports the signal to ptrace
-engine implemented on top of utrace. Now that ptrace works independently
-this doesn't work.
+- Reintroduce tracehook_get_signal() as utrace_hook_signal().
 
-Change the code to call ptrace_signal() after tracehook_get_signal().
+- Change get_signal_to_deliver() to call utrace_hook_signal() first,
+  before dequeue_signal()
 
-Move ->ptrace check from ptrace_signal() to get_signal_to_deliver(),
-we do not want to change *return_ka if it was initialized by utrace
-and the task is not traced.
+- Always call ptrace_signal() if signal != SIGKILL, no matter whether
+  this signal comes from utrace or not.
+
+  Since this can change signr again, update "struct k_sigaction *ka"
+  in this case.
 
 IOW, roughly, ptrace acts as if it is the last attached engine, it
 takes the final decision about the signal.
 
 Signed-off-by: Oleg Nesterov <oleg at redhat.com>
 ---
- kernel/signal.c |   24 +++++++++++-------------
- 1 files changed, 11 insertions(+), 13 deletions(-)
+ include/linux/utrace.h |   31 +++++++++++++++++++++++++++++++
+ kernel/signal.c        |   30 ++++++++++++++++++++----------
+ 2 files changed, 51 insertions(+), 10 deletions(-)
 
+diff --git a/include/linux/utrace.h b/include/linux/utrace.h
+index 0279c74..63103e2 100644
+--- a/include/linux/utrace.h
++++ b/include/linux/utrace.h
+@@ -730,4 +730,35 @@ static inline void utrace_end_stop(void)
+ 		utrace_finish_stop();
+ }
+ 
++/**
++ * utrace_hook_signal - deliver synthetic signal to traced task
++ * @task:		@current
++ * @regs:		task_pt_regs(@current)
++ * @info:		details of synthetic signal
++ * @return_ka:		sigaction for synthetic signal
++ *
++ * Return zero to check for a real pending signal normally.
++ * Return -1 after releasing the siglock to repeat the check.
++ * Return a signal number to induce an artificial signal delivery,
++ * setting *@info and *@return_ka to specify its details and behavior.
++ *
++ * The @return_ka->sa_handler value controls the disposition of the
++ * signal, no matter the signal number.  For %SIG_DFL, the return value
++ * is a representative signal to indicate the behavior (e.g. %SIGTERM
++ * for death, %SIGQUIT for core dump, %SIGSTOP for job control stop,
++ * %SIGTSTP for stop unless in an orphaned pgrp), but the signal number
++ * reported will be @info->si_signo instead.
++ *
++ * Called with @task->sighand->siglock held, before dequeuing pending signals.
++ */
++static inline int utrace_hook_signal(struct task_struct *task,
++				       struct pt_regs *regs,
++				       siginfo_t *info,
++				       struct k_sigaction *return_ka)
++{
++	if (unlikely(task_utrace_flags(task)))
++		return utrace_get_signal(task, regs, info, return_ka);
++	return 0;
++}
++
+ #endif	/* linux/utrace.h */
 diff --git a/kernel/signal.c b/kernel/signal.c
-index 89e691d..d0e0c67 100644
+index 249760f..3c783d3 100644
 --- a/kernel/signal.c
 +++ b/kernel/signal.c
-@@ -2006,9 +2006,6 @@ retry:
- static int ptrace_signal(int signr, siginfo_t *info,
- 			 struct pt_regs *regs, void *cookie)
- {
--	if (!task_ptrace(current))
--		return signr;
--
- 	ptrace_signal_deliver(regs, cookie);
+@@ -2234,17 +2234,27 @@ relock:
+ 	for (;;) {
+ 		struct k_sigaction *ka;
  
- 	/* Let the debugger run.  */
-@@ -2110,6 +2107,7 @@ relock:
- 		signr = tracehook_get_signal(current, regs, info, return_ka);
- 		if (unlikely(signr < 0))
+-		if (unlikely(current->jobctl & JOBCTL_STOP_PENDING) &&
+-		    do_signal_stop(0))
++		signr = utrace_hook_signal(current, regs, info, return_ka);
++		if (unlikely(signr < 0))
  			goto relock;
-+
- 		if (unlikely(signr != 0))
- 			ka = return_ka;
- 		else {
-@@ -2117,18 +2115,18 @@ relock:
- 				     GROUP_STOP_PENDING) && do_signal_stop(0))
- 				goto relock;
  
--			signr = dequeue_signal(current, &current->blocked,
--					       info);
+-		if (unlikely(current->jobctl & JOBCTL_TRAP_MASK)) {
+-			do_jobctl_trap();
+-			spin_unlock_irq(&sighand->siglock);
+-			goto relock;
+-		}
++		if (unlikely(signr != 0))
++			ka = return_ka;
++		else {
++			if (unlikely(current->jobctl & JOBCTL_STOP_PENDING) &&
++			    do_signal_stop(0))
++				goto relock;
+ 
+-		signr = dequeue_signal(current, &current->blocked, info);
++			if (unlikely(current->jobctl & JOBCTL_TRAP_MASK)) {
++				do_jobctl_trap();
++				spin_unlock_irq(&sighand->siglock);
++				goto relock;
++			}
++
 +			signr = dequeue_signal(current, &current->blocked, info);
++
++			ka = &sighand->action[signr-1];
++		}
+ 
+ 		if (!signr)
+ 			break; /* will return 0 */
+@@ -2254,9 +2264,9 @@ relock:
+ 					      regs, cookie);
+ 			if (!signr)
+ 				continue;
+-		}
  
--			if (!signr)
--				break; /* will return 0 */
+-		ka = &sighand->action[signr-1];
 +			ka = &sighand->action[signr-1];
 +		}
  
--			if (signr != SIGKILL) {
--				signr = ptrace_signal(signr, info,
--						      regs, cookie);
--				if (!signr)
--					continue;
--			}
-+		if (!signr)
-+			break; /* will return 0 */
-+
-+		if (signr != SIGKILL && current->ptrace) {
-+			signr = ptrace_signal(signr, info, regs, cookie);
-+			if (!signr)
-+				continue;
- 
- 			ka = &sighand->action[signr-1];
- 		}
+ 		/* Trace actually delivered signals. */
+ 		trace_signal_deliver(signr, info, ka);
 -- 
 1.5.5.1
 
-From davej  Sun Aug  7 15:19:22 2011
+
+From davej  Wed Aug  3 15:16:27 2011
 Return-Path: oleg at redhat.com
 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
 	gelk.kernelslacker.org
 X-Spam-Level: 
 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
 	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.51]
+Received: from mail.corp.redhat.com [10.5.5.52]
 	by gelk with IMAP (fetchmail-6.3.20)
-	for <davej at localhost> (single-drop); Sun, 07 Aug 2011 15:19:22 -0400 (EDT)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:16:27 -0400 (EDT)
 Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
  zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
- mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:30 -0400 (EDT)
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:22 -0400 (EDT)
 Received: from localhost (localhost.localdomain [127.0.0.1])
-	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id BFD8F1322A2;
-	Sun,  7 Aug 2011 15:18:30 -0400 (EDT)
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 119589DC72;
+	Wed,  3 Aug 2011 15:12:59 -0400 (EDT)
 Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
 	by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
-	with ESMTP id JczS8HsLYY6X; Sun,  7 Aug 2011 15:18:30 -0400 (EDT)
-Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
-	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id A8F91128FDA;
-	Sun,  7 Aug 2011 15:18:30 -0400 (EDT)
+	with ESMTP id Vxp8fnt8hEcf; Wed,  3 Aug 2011 15:12:59 -0400 (EDT)
+Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id F22049DCAE;
+	Wed,  3 Aug 2011 15:12:58 -0400 (EDT)
 Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
-	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p77JIS1m029940;
-	Sun, 7 Aug 2011 15:18:29 -0400
+	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p73JCpO4010401;
+	Wed, 3 Aug 2011 15:12:52 -0400
 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
-	oleg at redhat.com; Sun,  7 Aug 2011 21:15:52 +0200 (CEST)
-Date: Sun, 7 Aug 2011 21:15:50 +0200
+	oleg at redhat.com; Wed,  3 Aug 2011 21:10:19 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:10:17 +0200
 From: Oleg Nesterov <oleg at redhat.com>
-To: "Frank Ch. Eigler" <fche at redhat.com>, Kyle McMartin <kmcmartin at redhat.com>,
-        Dave Jones <davej at redhat.com>, Josh Stone <jistone at redhat.com>,
-        Matthew Garrett <mjg at redhat.com>, David Smith <dsmith at redhat.com>
-Cc: kernel at lists.fedoraproject.org
-Subject: [PATCH 13/22] introduce ptrace_set_syscall_trace()
-Message-ID: <20110807191550.GA14426 at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 20/31] utrace_get_signal:
+	s/JOBCTL_STOP_PENDING/JOBCTL_PENDING_MASK/
+Message-ID: <20110803191017.GA30995 at redhat.com>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
-In-Reply-To: <20110807191434.GA13184 at redhat.com>
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
 User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
 Status: RO
-Content-Length: 1580
-Lines: 51
+Content-Length: 1204
+Lines: 33
+
+utrace_get_signal() checks JOBCTL_STOP_PENDING to detect the
+case when we should not try to dequeue the signal but should
+try to participate in the group-stop.
+
+With the recent changes this is not enough, everything which
+contrbutes to recalc_sigpending_tsk() should be respected.
+
+Check JOBCTL_PENDING_MASK instead. This matches the
+JOBCTL_STOP_PENDING | JOBCTL_TRAP_MASK code in the caller,
+get_signal_to_deliver(). Note that this code won't run if
+utrace_get_signal() returns signr > 0.
+
+Signed-off-by: Oleg Nesterov <oleg at redhat.com>
+---
+ kernel/utrace.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/kernel/utrace.c b/kernel/utrace.c
+index d41b982..0bb0a06 100644
+--- a/kernel/utrace.c
++++ b/kernel/utrace.c
+@@ -2027,7 +2027,7 @@ int utrace_get_signal(struct task_struct *task, struct pt_regs *regs,
+ 		ka = NULL;
+ 		memset(return_ka, 0, sizeof *return_ka);
+ 	} else if (!(task->utrace_flags & UTRACE_EVENT_SIGNAL_ALL) ||
+-		   unlikely(task->jobctl & JOBCTL_STOP_PENDING)) {
++		   unlikely(task->jobctl & JOBCTL_PENDING_MASK)) {
+ 		/*
+ 		 * If no engine is interested in intercepting signals or
+ 		 * we must stop, let the caller just dequeue them normally
+-- 
+1.5.5.1
+
+
+From davej  Wed Aug  3 15:16:03 2011
+Return-Path: oleg at redhat.com
+X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
+	gelk.kernelslacker.org
+X-Spam-Level: 
+X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
+	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
+Received: from mail.corp.redhat.com [10.5.5.52]
+	by gelk with IMAP (fetchmail-6.3.20)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:16:03 -0400 (EDT)
+Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
+ zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:13:19 -0400 (EDT)
+Received: from localhost (localhost.localdomain [127.0.0.1])
+	by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id A9253DA3CB;
+	Wed,  3 Aug 2011 15:13:01 -0400 (EDT)
+Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+	by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+	with ESMTP id HLlRhTJ2MbYS; Wed,  3 Aug 2011 15:13:01 -0400 (EDT)
+Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
+	by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 9582C4C43B;
+	Wed,  3 Aug 2011 15:13:01 -0400 (EDT)
+Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
+	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCsFX008586;
+	Wed, 3 Aug 2011 15:12:54 -0400
+Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
+	oleg at redhat.com; Wed,  3 Aug 2011 21:10:22 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:10:20 +0200
+From: Oleg Nesterov <oleg at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 21/31] introduce ptrace_set_syscall_trace()
+Message-ID: <20110803191020.GA31002 at redhat.com>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
+User-Agent: Mutt/1.5.18 (2008-05-17)
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
+Status: RO
+Content-Length: 1549
+Lines: 52
 
 No functional changes. Add the new helper, ptrace_set_syscall_trace(),
 which should be used to set/clear TIF_SYSCALL_TRACE in ptrace code.
@@ -5473,10 +6176,10 @@ Signed-off-by: Oleg Nesterov <oleg at redhat.com>
  1 files changed, 10 insertions(+), 5 deletions(-)
 
 diff --git a/kernel/ptrace.c b/kernel/ptrace.c
-index 0b2aba5..b6fd922 100644
+index 1a50090..dc2ad34 100644
 --- a/kernel/ptrace.c
 +++ b/kernel/ptrace.c
-@@ -37,6 +37,14 @@ static void ptrace_signal_wake_up(struct task_struct *p, int quiescent)
+@@ -38,6 +38,14 @@ void ptrace_signal_wake_up(struct task_struct *p, int quiescent)
  		kick_process(p);
  }
  
@@ -5488,10 +6191,10 @@ index 0b2aba5..b6fd922 100644
 +		clear_tsk_thread_flag(p, TIF_SYSCALL_TRACE);
 +}
 +
- /*
-  * ptrace a task: make the debugger its new parent and
-  * move it to the ptrace list.
-@@ -364,7 +372,7 @@ static int ptrace_detach(struct task_struct *child, unsigned int data)
+ static int ptrace_trapping_sleep_fn(void *flags)
+ {
+ 	schedule();
+@@ -418,7 +426,7 @@ static int ptrace_detach(struct task_struct *child, unsigned int data)
  
  	/* Architecture-specific hardware disable .. */
  	ptrace_disable(child);
@@ -5500,7 +6203,7 @@ index 0b2aba5..b6fd922 100644
  
  	write_lock_irq(&tasklist_lock);
  	/*
-@@ -551,10 +559,7 @@ static int ptrace_resume(struct task_struct *child, long request,
+@@ -606,10 +614,7 @@ static int ptrace_resume(struct task_struct *child, long request,
  	if (!valid_signal(data))
  		return -EIO;
  
@@ -5515,50 +6218,51 @@ index 0b2aba5..b6fd922 100644
 -- 
 1.5.5.1
 
-From davej  Sun Aug  7 15:19:23 2011
+
+From davej  Wed Aug  3 15:21:45 2011
 Return-Path: oleg at redhat.com
 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
 	gelk.kernelslacker.org
 X-Spam-Level: 
 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
 	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.51]
+Received: from mail.corp.redhat.com [10.5.5.52]
 	by gelk with IMAP (fetchmail-6.3.20)
-	for <davej at localhost> (single-drop); Sun, 07 Aug 2011 15:19:23 -0400 (EDT)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:21:45 -0400 (EDT)
 Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
  zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
- mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:33 -0400 (EDT)
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:43 -0400 (EDT)
 Received: from localhost (localhost.localdomain [127.0.0.1])
-	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 585699C7DE;
-	Sun,  7 Aug 2011 15:18:33 -0400 (EDT)
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 5C4889DEE6;
+	Wed,  3 Aug 2011 15:13:04 -0400 (EDT)
 Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
 	by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
-	with ESMTP id Zp+5oAzhYq2W; Sun,  7 Aug 2011 15:18:33 -0400 (EDT)
-Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
-	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 44532909E4;
-	Sun,  7 Aug 2011 15:18:33 -0400 (EDT)
+	with ESMTP id eXIPU4nVv+7Z; Wed,  3 Aug 2011 15:13:04 -0400 (EDT)
+Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 3F82C9DED6;
+	Wed,  3 Aug 2011 15:13:04 -0400 (EDT)
 Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
-	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p77JIV6n020657;
-	Sun, 7 Aug 2011 15:18:31 -0400
+	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCueo029507;
+	Wed, 3 Aug 2011 15:12:57 -0400
 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
-	oleg at redhat.com; Sun,  7 Aug 2011 21:15:54 +0200 (CEST)
-Date: Sun, 7 Aug 2011 21:15:52 +0200
+	oleg at redhat.com; Wed,  3 Aug 2011 21:10:24 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:10:22 +0200
 From: Oleg Nesterov <oleg at redhat.com>
-To: "Frank Ch. Eigler" <fche at redhat.com>, Kyle McMartin <kmcmartin at redhat.com>,
-        Dave Jones <davej at redhat.com>, Josh Stone <jistone at redhat.com>,
-        Matthew Garrett <mjg at redhat.com>, David Smith <dsmith at redhat.com>
-Cc: kernel at lists.fedoraproject.org
-Subject: [PATCH 14/22] introduce PT_SYSCALL_TRACE flag
-Message-ID: <20110807191552.GA14429 at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 22/31] introduce PT_SYSCALL_TRACE flag
+Message-ID: <20110803191022.GA31005 at redhat.com>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
-In-Reply-To: <20110807191434.GA13184 at redhat.com>
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
 User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
 Status: RO
-Content-Length: 2235
-Lines: 72
+Content-Length: 2268
+Lines: 73
 
 Currently tracehooks assume that if the ptraced task has
 TIF_SYSCALL_TRACE set, the tracee should report the syscall.
@@ -5577,33 +6281,33 @@ Signed-off-by: Oleg Nesterov <oleg at redhat.com>
  3 files changed, 9 insertions(+), 3 deletions(-)
 
 diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
-index 9178d5c..98d995d 100644
+index 6d9282a..c10f610 100644
 --- a/include/linux/ptrace.h
 +++ b/include/linux/ptrace.h
-@@ -90,6 +90,8 @@
+@@ -104,6 +104,8 @@
  
  #define PT_TRACE_MASK	0x000003f4
  
-+#define PT_SYSCALL_TRACE	0x00010000
++#define PT_SYSCALL_TRACE	0x00020000
 +
  /* single stepping state bits (used on ARM and PA-RISC) */
  #define PT_SINGLESTEP_BIT	31
  #define PT_SINGLESTEP		(1<<PT_SINGLESTEP_BIT)
-@@ -187,6 +189,7 @@ static inline void ptrace_init_task(struct task_struct *child, bool ptrace)
- 	child->ptrace = 0;
- 	if (unlikely(ptrace) && (current->ptrace & PT_PTRACED)) {
+@@ -227,6 +229,7 @@ static inline void ptrace_init_task(struct task_struct *child, bool ptrace)
+ 
+ 	if (unlikely(ptrace) && current->ptrace) {
  		child->ptrace = current->ptrace;
 +		child->ptrace &= ~PT_SYSCALL_TRACE;
  		__ptrace_link(child, current->parent);
- 	}
  
+ 		if (child->ptrace & PT_SEIZED)
 diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
-index 3c7b6b3..6ce7a37 100644
+index ec2af67..eb9fe30 100644
 --- a/include/linux/tracehook.h
 +++ b/include/linux/tracehook.h
-@@ -76,7 +76,7 @@ static inline void ptrace_report_syscall(struct pt_regs *regs)
+@@ -59,7 +59,7 @@ static inline void ptrace_report_syscall(struct pt_regs *regs)
  {
- 	int ptrace = task_ptrace(current);
+ 	int ptrace = current->ptrace;
  
 -	if (!(ptrace & PT_PTRACED))
 +	if (!(ptrace & PT_SYSCALL_TRACE))
@@ -5611,10 +6315,10 @@ index 3c7b6b3..6ce7a37 100644
  
  	ptrace_notify(SIGTRAP | ((ptrace & PT_TRACESYSGOOD) ? 0x80 : 0));
 diff --git a/kernel/ptrace.c b/kernel/ptrace.c
-index b6fd922..0825a01 100644
+index dc2ad34..7deb292 100644
 --- a/kernel/ptrace.c
 +++ b/kernel/ptrace.c
-@@ -39,10 +39,13 @@ static void ptrace_signal_wake_up(struct task_struct *p, int quiescent)
+@@ -40,10 +40,13 @@ void ptrace_signal_wake_up(struct task_struct *p, int quiescent)
  
  static void ptrace_set_syscall_trace(struct task_struct *p, bool on)
  {
@@ -5629,55 +6333,56 @@ index b6fd922..0825a01 100644
 +	}
  }
  
- /*
+ static int ptrace_trapping_sleep_fn(void *flags)
 -- 
 1.5.5.1
 
-From davej  Sun Aug  7 15:19:24 2011
+
+From davej  Wed Aug  3 15:16:05 2011
 Return-Path: oleg at redhat.com
 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
 	gelk.kernelslacker.org
 X-Spam-Level: 
 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
 	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.51]
+Received: from mail.corp.redhat.com [10.5.5.52]
 	by gelk with IMAP (fetchmail-6.3.20)
-	for <davej at localhost> (single-drop); Sun, 07 Aug 2011 15:19:24 -0400 (EDT)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:16:05 -0400 (EDT)
 Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
  zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
- mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:35 -0400 (EDT)
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:13:20 -0400 (EDT)
 Received: from localhost (localhost.localdomain [127.0.0.1])
-	by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id F0377D89A9;
-	Sun,  7 Aug 2011 15:18:35 -0400 (EDT)
+	by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id E516ADA488;
+	Wed,  3 Aug 2011 15:13:06 -0400 (EDT)
 Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
 	by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
-	with ESMTP id cBLqfABIHZ6h; Sun,  7 Aug 2011 15:18:35 -0400 (EDT)
-Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
-	by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id DC799D8988;
-	Sun,  7 Aug 2011 15:18:35 -0400 (EDT)
+	with ESMTP id rP7Um8DZjclX; Wed,  3 Aug 2011 15:13:06 -0400 (EDT)
+Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
+	by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id D155EDA3F8;
+	Wed,  3 Aug 2011 15:13:06 -0400 (EDT)
 Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
-	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JIXU3007727;
-	Sun, 7 Aug 2011 15:18:34 -0400
+	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCxfF029532;
+	Wed, 3 Aug 2011 15:13:00 -0400
 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
-	oleg at redhat.com; Sun,  7 Aug 2011 21:15:57 +0200 (CEST)
-Date: Sun, 7 Aug 2011 21:15:55 +0200
+	oleg at redhat.com; Wed,  3 Aug 2011 21:10:27 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:10:25 +0200
 From: Oleg Nesterov <oleg at redhat.com>
-To: "Frank Ch. Eigler" <fche at redhat.com>, Kyle McMartin <kmcmartin at redhat.com>,
-        Dave Jones <davej at redhat.com>, Josh Stone <jistone at redhat.com>,
-        Matthew Garrett <mjg at redhat.com>, David Smith <dsmith at redhat.com>
-Cc: kernel at lists.fedoraproject.org
-Subject: [PATCH 15/22] utrace: don't clear TIF_SYSCALL_TRACE if it is
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 23/31] utrace: don't clear TIF_SYSCALL_TRACE if it is
 	needed by ptrace
-Message-ID: <20110807191555.GA14436 at redhat.com>
+Message-ID: <20110803191025.GA31012 at redhat.com>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
-In-Reply-To: <20110807191434.GA13184 at redhat.com>
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
 User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
 Status: RO
-Content-Length: 796
-Lines: 23
+Content-Length: 797
+Lines: 24
 
 TIF_SYSCALL_TRACE should be cleared only if both ptrace and utrace do
 not want it, change utrace_reset() to check PT_SYSCALL_TRACE before
@@ -5689,7 +6394,7 @@ Signed-off-by: Oleg Nesterov <oleg at redhat.com>
  1 files changed, 1 insertions(+), 0 deletions(-)
 
 diff --git a/kernel/utrace.c b/kernel/utrace.c
-index daa96b9..a824ac3 100644
+index 0bb0a06..bebf6de 100644
 --- a/kernel/utrace.c
 +++ b/kernel/utrace.c
 @@ -697,6 +697,7 @@ static bool utrace_reset(struct task_struct *task, struct utrace *utrace)
@@ -5703,50 +6408,51 @@ index daa96b9..a824ac3 100644
 -- 
 1.5.5.1
 
-From davej  Sun Aug  7 15:19:25 2011
+
+From davej  Wed Aug  3 15:16:08 2011
 Return-Path: oleg at redhat.com
 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
 	gelk.kernelslacker.org
 X-Spam-Level: 
 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
 	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.51]
+Received: from mail.corp.redhat.com [10.5.5.52]
 	by gelk with IMAP (fetchmail-6.3.20)
-	for <davej at localhost> (single-drop); Sun, 07 Aug 2011 15:19:25 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
- zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
- mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:38 -0400 (EDT)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:16:08 -0400 (EDT)
+Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
+ zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:15:29 -0400 (EDT)
 Received: from localhost (localhost.localdomain [127.0.0.1])
-	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id A6B3C9C7DE;
-	Sun,  7 Aug 2011 15:18:38 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
-	by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
-	with ESMTP id ln+MaW5alQl7; Sun,  7 Aug 2011 15:18:38 -0400 (EDT)
-Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
-	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 8A6D2909E4;
-	Sun,  7 Aug 2011 15:18:38 -0400 (EDT)
+	by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 80872DA4B2;
+	Wed,  3 Aug 2011 15:13:09 -0400 (EDT)
+Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+	by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+	with ESMTP id AbpC0Wk1ZhtT; Wed,  3 Aug 2011 15:13:09 -0400 (EDT)
+Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
+	by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 6D97DDA3F8;
+	Wed,  3 Aug 2011 15:13:09 -0400 (EDT)
 Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
-	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JIaYf007737;
-	Sun, 7 Aug 2011 15:18:36 -0400
+	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p73JD2RU022591;
+	Wed, 3 Aug 2011 15:13:02 -0400
 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
-	oleg at redhat.com; Sun,  7 Aug 2011 21:16:00 +0200 (CEST)
-Date: Sun, 7 Aug 2011 21:15:58 +0200
+	oleg at redhat.com; Wed,  3 Aug 2011 21:10:30 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:10:28 +0200
 From: Oleg Nesterov <oleg at redhat.com>
-To: "Frank Ch. Eigler" <fche at redhat.com>, Kyle McMartin <kmcmartin at redhat.com>,
-        Dave Jones <davej at redhat.com>, Josh Stone <jistone at redhat.com>,
-        Matthew Garrett <mjg at redhat.com>, David Smith <dsmith at redhat.com>
-Cc: kernel at lists.fedoraproject.org
-Subject: [PATCH 16/22] introduce task_utrace_lock/task_utrace_unlock
-Message-ID: <20110807191558.GA14440 at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 24/31] introduce task_utrace_lock/task_utrace_unlock
+Message-ID: <20110803191028.GA31015 at redhat.com>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
-In-Reply-To: <20110807191434.GA13184 at redhat.com>
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
 User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
 Status: RO
-Content-Length: 2189
-Lines: 80
+Content-Length: 2190
+Lines: 81
 
 - Add task_utrace_lock(task). It simply takes task->utrace->lock if
   this task was ever utraced. Otherwise it takes task_lock(), this
@@ -5763,10 +6469,10 @@ Signed-off-by: Oleg Nesterov <oleg at redhat.com>
  2 files changed, 35 insertions(+), 0 deletions(-)
 
 diff --git a/include/linux/utrace.h b/include/linux/utrace.h
-index f251efe..5176f5f 100644
+index 63103e2..f37373b 100644
 --- a/include/linux/utrace.h
 +++ b/include/linux/utrace.h
-@@ -109,6 +109,12 @@ void utrace_signal_handler(struct task_struct *, int);
+@@ -117,6 +117,12 @@ void utrace_signal_handler(struct task_struct *, int);
  
  #ifndef CONFIG_UTRACE
  
@@ -5779,7 +6485,7 @@ index f251efe..5176f5f 100644
  /*
   * <linux/tracehook.h> uses these accessors to avoid #ifdef CONFIG_UTRACE.
   */
-@@ -131,6 +137,9 @@ static inline void task_utrace_proc_status(struct seq_file *m,
+@@ -139,6 +145,9 @@ static inline void task_utrace_proc_status(struct seq_file *m,
  
  #else  /* CONFIG_UTRACE */
  
@@ -5790,7 +6496,7 @@ index f251efe..5176f5f 100644
  {
  	return task->utrace_flags;
 diff --git a/kernel/utrace.c b/kernel/utrace.c
-index a824ac3..508c13c 100644
+index bebf6de..960dd9e 100644
 --- a/kernel/utrace.c
 +++ b/kernel/utrace.c
 @@ -79,6 +79,32 @@ static int __init utrace_init(void)
@@ -5829,51 +6535,52 @@ index a824ac3..508c13c 100644
 -- 
 1.5.5.1
 
-From davej  Sun Aug  7 15:19:27 2011
+
+From davej  Wed Aug  3 15:21:46 2011
 Return-Path: oleg at redhat.com
 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
 	gelk.kernelslacker.org
 X-Spam-Level: 
 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
 	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.51]
+Received: from mail.corp.redhat.com [10.5.5.52]
 	by gelk with IMAP (fetchmail-6.3.20)
-	for <davej at localhost> (single-drop); Sun, 07 Aug 2011 15:19:27 -0400 (EDT)
-Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
- zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
- mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:41 -0400 (EDT)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:21:46 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
+ zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:43 -0400 (EDT)
 Received: from localhost (localhost.localdomain [127.0.0.1])
-	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 41B111322A2;
-	Sun,  7 Aug 2011 15:18:41 -0400 (EDT)
-Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
-	by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
-	with ESMTP id ypKNrfgt9t+i; Sun,  7 Aug 2011 15:18:41 -0400 (EDT)
-Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
-	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 2D805128FDA;
-	Sun,  7 Aug 2011 15:18:41 -0400 (EDT)
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 24B3E9DEF6;
+	Wed,  3 Aug 2011 15:13:12 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+	by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+	with ESMTP id 2jg9j3-p4bHL; Wed,  3 Aug 2011 15:13:12 -0400 (EDT)
+Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 119759DEF9;
+	Wed,  3 Aug 2011 15:13:12 -0400 (EDT)
 Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
-	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JIdnm028810;
-	Sun, 7 Aug 2011 15:18:39 -0400
+	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p73JD485022603;
+	Wed, 3 Aug 2011 15:13:05 -0400
 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
-	oleg at redhat.com; Sun,  7 Aug 2011 21:16:02 +0200 (CEST)
-Date: Sun, 7 Aug 2011 21:16:00 +0200
+	oleg at redhat.com; Wed,  3 Aug 2011 21:10:32 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:10:30 +0200
 From: Oleg Nesterov <oleg at redhat.com>
-To: "Frank Ch. Eigler" <fche at redhat.com>, Kyle McMartin <kmcmartin at redhat.com>,
-        Dave Jones <davej at redhat.com>, Josh Stone <jistone at redhat.com>,
-        Matthew Garrett <mjg at redhat.com>, David Smith <dsmith at redhat.com>
-Cc: kernel at lists.fedoraproject.org
-Subject: [PATCH 17/22] teach ptrace_set_syscall_trace() to play well with
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 25/31] teach ptrace_set_syscall_trace() to play well with
 	utrace
-Message-ID: <20110807191600.GA14443 at redhat.com>
+Message-ID: <20110803191030.GA31018 at redhat.com>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
-In-Reply-To: <20110807191434.GA13184 at redhat.com>
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
 User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
 Status: RO
-Content-Length: 1512
-Lines: 48
+Content-Length: 1545
+Lines: 49
 
 1. ptrace_set_syscall_trace(true)->set_tsk_thread_flag(TIF_SYSCALL_TRACE)
    can race with utrace_control()->utrace_reset() path which can miss
@@ -5892,18 +6599,18 @@ Signed-off-by: Oleg Nesterov <oleg at redhat.com>
  1 files changed, 5 insertions(+), 1 deletions(-)
 
 diff --git a/kernel/ptrace.c b/kernel/ptrace.c
-index 0825a01..209ea2d 100644
+index 7deb292..69850e9 100644
 --- a/kernel/ptrace.c
 +++ b/kernel/ptrace.c
-@@ -23,6 +23,7 @@
- #include <linux/uaccess.h>
+@@ -24,6 +24,7 @@
  #include <linux/regset.h>
  #include <linux/hw_breakpoint.h>
+ #include <linux/cn_proc.h>
 +#include <linux/utrace.h>
  
- static void ptrace_signal_wake_up(struct task_struct *p, int quiescent)
+ void ptrace_signal_wake_up(struct task_struct *p, int quiescent)
  {
-@@ -39,13 +40,16 @@ static void ptrace_signal_wake_up(struct task_struct *p, int quiescent)
+@@ -40,13 +41,16 @@ void ptrace_signal_wake_up(struct task_struct *p, int quiescent)
  
  static void ptrace_set_syscall_trace(struct task_struct *p, bool on)
  {
@@ -5920,54 +6627,55 @@ index 0825a01..209ea2d 100644
 +	task_utrace_unlock(p);
  }
  
- /*
+ static int ptrace_trapping_sleep_fn(void *flags)
 -- 
 1.5.5.1
 
-From davej  Sun Aug  7 15:19:27 2011
+
+From davej  Wed Aug  3 15:16:29 2011
 Return-Path: oleg at redhat.com
 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
 	gelk.kernelslacker.org
 X-Spam-Level: 
 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
 	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.51]
+Received: from mail.corp.redhat.com [10.5.5.52]
 	by gelk with IMAP (fetchmail-6.3.20)
-	for <davej at localhost> (single-drop); Sun, 07 Aug 2011 15:19:27 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
- zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
- mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:43 -0400 (EDT)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:16:28 -0400 (EDT)
+Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
+ zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:24 -0400 (EDT)
 Received: from localhost (localhost.localdomain [127.0.0.1])
-	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id E37B59C7DE;
-	Sun,  7 Aug 2011 15:18:43 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
-	by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
-	with ESMTP id NRVgSzxr7avy; Sun,  7 Aug 2011 15:18:43 -0400 (EDT)
-Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
-	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id C6D6E909E4;
-	Sun,  7 Aug 2011 15:18:43 -0400 (EDT)
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 062709DE55;
+	Wed,  3 Aug 2011 15:13:15 -0400 (EDT)
+Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+	by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+	with ESMTP id lhwVoEywGaPJ; Wed,  3 Aug 2011 15:13:14 -0400 (EDT)
+Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id E4C139DE11;
+	Wed,  3 Aug 2011 15:13:14 -0400 (EDT)
 Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
-	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JIfAM007754;
-	Sun, 7 Aug 2011 15:18:42 -0400
+	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p73JD7Go010523;
+	Wed, 3 Aug 2011 15:13:08 -0400
 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
-	oleg at redhat.com; Sun,  7 Aug 2011 21:16:05 +0200 (CEST)
-Date: Sun, 7 Aug 2011 21:16:03 +0200
+	oleg at redhat.com; Wed,  3 Aug 2011 21:10:35 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:10:33 +0200
 From: Oleg Nesterov <oleg at redhat.com>
-To: "Frank Ch. Eigler" <fche at redhat.com>, Kyle McMartin <kmcmartin at redhat.com>,
-        Dave Jones <davej at redhat.com>, Josh Stone <jistone at redhat.com>,
-        Matthew Garrett <mjg at redhat.com>, David Smith <dsmith at redhat.com>
-Cc: kernel at lists.fedoraproject.org
-Subject: [PATCH 18/22] introduce PT_SINGLE_STEP and PT_SINGLE_BLOCK
-Message-ID: <20110807191603.GA14450 at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 26/31] introduce PT_SINGLE_STEP and PT_SINGLE_BLOCK
+Message-ID: <20110803191033.GA31025 at redhat.com>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
-In-Reply-To: <20110807191434.GA13184 at redhat.com>
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
 User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
 Status: RO
-Content-Length: 3724
-Lines: 107
+Content-Length: 3723
+Lines: 108
 
 Add the new internal ptrace flags, PT_SINGLE_STEP and PT_SINGLE_BLOCK.
 
@@ -5987,10 +6695,10 @@ Signed-off-by: Oleg Nesterov <oleg at redhat.com>
  4 files changed, 13 insertions(+), 3 deletions(-)
 
 diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
-index 807c2a2..7ab475f 100644
+index 8252879..d1557dc 100644
 --- a/arch/x86/kernel/ptrace.c
 +++ b/arch/x86/kernel/ptrace.c
-@@ -807,6 +807,7 @@ static int ioperm_get(struct task_struct *target,
+@@ -808,6 +808,7 @@ static int ioperm_get(struct task_struct *target,
   */
  void ptrace_disable(struct task_struct *child)
  {
@@ -5999,33 +6707,33 @@ index 807c2a2..7ab475f 100644
  #ifdef TIF_SYSCALL_EMU
  	clear_tsk_thread_flag(child, TIF_SYSCALL_EMU);
 diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
-index 98d995d..65b1e4f 100644
+index c10f610..2743315 100644
 --- a/include/linux/ptrace.h
 +++ b/include/linux/ptrace.h
-@@ -91,6 +91,8 @@
+@@ -105,6 +105,8 @@
  #define PT_TRACE_MASK	0x000003f4
  
- #define PT_SYSCALL_TRACE	0x00010000
-+#define PT_SINGLE_STEP		0x00020000
-+#define PT_SINGLE_BLOCK		0x00040000
+ #define PT_SYSCALL_TRACE	0x00020000
++#define PT_SINGLE_STEP		0x00040000
++#define PT_SINGLE_BLOCK		0x00080000
  
  /* single stepping state bits (used on ARM and PA-RISC) */
  #define PT_SINGLESTEP_BIT	31
-@@ -189,7 +191,8 @@ static inline void ptrace_init_task(struct task_struct *child, bool ptrace)
- 	child->ptrace = 0;
- 	if (unlikely(ptrace) && (current->ptrace & PT_PTRACED)) {
+@@ -229,7 +231,8 @@ static inline void ptrace_init_task(struct task_struct *child, bool ptrace)
+ 
+ 	if (unlikely(ptrace) && current->ptrace) {
  		child->ptrace = current->ptrace;
 -		child->ptrace &= ~PT_SYSCALL_TRACE;
 +		child->ptrace &=
 +			~(PT_SYSCALL_TRACE | PT_SINGLE_STEP | PT_SINGLE_BLOCK);
  		__ptrace_link(child, current->parent);
- 	}
  
+ 		if (child->ptrace & PT_SEIZED)
 diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
-index 6ce7a37..06edb52 100644
+index eb9fe30..21c8ca2 100644
 --- a/include/linux/tracehook.h
 +++ b/include/linux/tracehook.h
-@@ -121,6 +121,9 @@ static inline __must_check int tracehook_report_syscall_entry(
+@@ -104,6 +104,9 @@ static inline __must_check int tracehook_report_syscall_entry(
  	return 0;
  }
  
@@ -6035,7 +6743,7 @@ index 6ce7a37..06edb52 100644
  /**
   * tracehook_report_syscall_exit - task has just finished a system call
   * @regs:		user register state of current task
-@@ -143,7 +146,7 @@ static inline void tracehook_report_syscall_exit(struct pt_regs *regs, int step)
+@@ -126,7 +129,7 @@ static inline void tracehook_report_syscall_exit(struct pt_regs *regs, int step)
  	if (task_utrace_flags(current) & UTRACE_EVENT(SYSCALL_EXIT))
  		utrace_report_syscall_exit(regs);
  
@@ -6044,7 +6752,7 @@ index 6ce7a37..06edb52 100644
  		siginfo_t info;
  		user_single_step_siginfo(current, regs, &info);
  		force_sig_info(SIGTRAP, &info, current);
-@@ -436,7 +439,7 @@ static inline void tracehook_signal_handler(int sig, siginfo_t *info,
+@@ -157,7 +160,7 @@ static inline void tracehook_signal_handler(int sig, siginfo_t *info,
  {
  	if (task_utrace_flags(current))
  		utrace_signal_handler(current, stepping);
@@ -6054,10 +6762,10 @@ index 6ce7a37..06edb52 100644
  }
  
 diff --git a/kernel/ptrace.c b/kernel/ptrace.c
-index 209ea2d..44908d0 100644
+index 69850e9..d250a71 100644
 --- a/kernel/ptrace.c
 +++ b/kernel/ptrace.c
-@@ -575,13 +575,16 @@ static int ptrace_resume(struct task_struct *child, long request,
+@@ -630,13 +630,16 @@ static int ptrace_resume(struct task_struct *child, long request,
  		clear_tsk_thread_flag(child, TIF_SYSCALL_EMU);
  #endif
  
@@ -6077,51 +6785,52 @@ index 209ea2d..44908d0 100644
 -- 
 1.5.5.1
 
-From davej  Sun Aug  7 15:19:29 2011
+
+From davej  Wed Aug  3 15:16:30 2011
 Return-Path: oleg at redhat.com
 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
 	gelk.kernelslacker.org
 X-Spam-Level: 
 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
 	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.51]
+Received: from mail.corp.redhat.com [10.5.5.52]
 	by gelk with IMAP (fetchmail-6.3.20)
-	for <davej at localhost> (single-drop); Sun, 07 Aug 2011 15:19:29 -0400 (EDT)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:16:30 -0400 (EDT)
 Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
  zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
- mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:46 -0400 (EDT)
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:25 -0400 (EDT)
 Received: from localhost (localhost.localdomain [127.0.0.1])
-	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 810E31322A2;
-	Sun,  7 Aug 2011 15:18:46 -0400 (EDT)
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id B3BF49DE11;
+	Wed,  3 Aug 2011 15:13:17 -0400 (EDT)
 Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
 	by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
-	with ESMTP id ptiIThWTq2a6; Sun,  7 Aug 2011 15:18:46 -0400 (EDT)
-Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
-	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 6B665128FDA;
-	Sun,  7 Aug 2011 15:18:46 -0400 (EDT)
+	with ESMTP id zC72ecV9Jz07; Wed,  3 Aug 2011 15:13:17 -0400 (EDT)
+Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 98ACE9DE59;
+	Wed,  3 Aug 2011 15:13:17 -0400 (EDT)
 Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
-	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JIiI8007757;
-	Sun, 7 Aug 2011 15:18:44 -0400
+	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JDATh023726;
+	Wed, 3 Aug 2011 15:13:10 -0400
 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
-	oleg at redhat.com; Sun,  7 Aug 2011 21:16:08 +0200 (CEST)
-Date: Sun, 7 Aug 2011 21:16:06 +0200
+	oleg at redhat.com; Wed,  3 Aug 2011 21:10:38 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:10:36 +0200
 From: Oleg Nesterov <oleg at redhat.com>
-To: "Frank Ch. Eigler" <fche at redhat.com>, Kyle McMartin <kmcmartin at redhat.com>,
-        Dave Jones <davej at redhat.com>, Josh Stone <jistone at redhat.com>,
-        Matthew Garrett <mjg at redhat.com>, David Smith <dsmith at redhat.com>
-Cc: kernel at lists.fedoraproject.org
-Subject: [PATCH 19/22] utrace: finish_resume_report: don't do
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 27/31] utrace: finish_resume_report: don't do
 	user_xxx_step() if ptrace_wants_step()
-Message-ID: <20110807191606.GA14453 at redhat.com>
+Message-ID: <20110803191036.GA31028 at redhat.com>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
-In-Reply-To: <20110807191434.GA13184 at redhat.com>
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
 User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
 Status: RO
-Content-Length: 2740
-Lines: 83
+Content-Length: 2741
+Lines: 84
 
 finish_resume_report() should not enable/disable the stepping if
 ptrace_wants_step() == T. If ptrace wants block_step while utrace
@@ -6138,10 +6847,10 @@ Signed-off-by: Oleg Nesterov <oleg at redhat.com>
  2 files changed, 10 insertions(+), 7 deletions(-)
 
 diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
-index 06edb52..5612d2d 100644
+index 21c8ca2..b6812d4 100644
 --- a/include/linux/tracehook.h
 +++ b/include/linux/tracehook.h
-@@ -121,8 +121,8 @@ static inline __must_check int tracehook_report_syscall_entry(
+@@ -104,8 +104,8 @@ static inline __must_check int tracehook_report_syscall_entry(
  	return 0;
  }
  
@@ -6152,7 +6861,7 @@ index 06edb52..5612d2d 100644
  
  /**
   * tracehook_report_syscall_exit - task has just finished a system call
-@@ -146,7 +146,7 @@ static inline void tracehook_report_syscall_exit(struct pt_regs *regs, int step)
+@@ -129,7 +129,7 @@ static inline void tracehook_report_syscall_exit(struct pt_regs *regs, int step)
  	if (task_utrace_flags(current) & UTRACE_EVENT(SYSCALL_EXIT))
  		utrace_report_syscall_exit(regs);
  
@@ -6161,7 +6870,7 @@ index 06edb52..5612d2d 100644
  		siginfo_t info;
  		user_single_step_siginfo(current, regs, &info);
  		force_sig_info(SIGTRAP, &info, current);
-@@ -439,7 +439,7 @@ static inline void tracehook_signal_handler(int sig, siginfo_t *info,
+@@ -160,7 +160,7 @@ static inline void tracehook_signal_handler(int sig, siginfo_t *info,
  {
  	if (task_utrace_flags(current))
  		utrace_signal_handler(current, stepping);
@@ -6171,10 +6880,10 @@ index 06edb52..5612d2d 100644
  }
  
 diff --git a/kernel/utrace.c b/kernel/utrace.c
-index 508c13c..fbabb81 100644
+index 960dd9e..05e8532 100644
 --- a/kernel/utrace.c
 +++ b/kernel/utrace.c
-@@ -1828,7 +1828,8 @@ static void finish_resume_report(struct task_struct *task,
+@@ -1829,7 +1829,8 @@ static void finish_resume_report(struct task_struct *task,
  
  	case UTRACE_BLOCKSTEP:
  		if (likely(arch_has_block_step())) {
@@ -6184,7 +6893,7 @@ index 508c13c..fbabb81 100644
  			break;
  		}
  
-@@ -1841,7 +1842,8 @@ static void finish_resume_report(struct task_struct *task,
+@@ -1842,7 +1843,8 @@ static void finish_resume_report(struct task_struct *task,
  
  	case UTRACE_SINGLESTEP:
  		if (likely(arch_has_single_step())) {
@@ -6194,7 +6903,7 @@ index 508c13c..fbabb81 100644
  		} else {
  			/*
  			 * This means some callback is to blame for failing
-@@ -1856,7 +1858,8 @@ static void finish_resume_report(struct task_struct *task,
+@@ -1857,7 +1859,8 @@ static void finish_resume_report(struct task_struct *task,
  	case UTRACE_REPORT:
  	case UTRACE_RESUME:
  	default:
@@ -6207,50 +6916,51 @@ index 508c13c..fbabb81 100644
 -- 
 1.5.5.1
 
-From davej  Sun Aug  7 15:19:30 2011
+
+From davej  Wed Aug  3 15:16:32 2011
 Return-Path: oleg at redhat.com
 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
 	gelk.kernelslacker.org
 X-Spam-Level: 
 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
 	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.51]
+Received: from mail.corp.redhat.com [10.5.5.52]
 	by gelk with IMAP (fetchmail-6.3.20)
-	for <davej at localhost> (single-drop); Sun, 07 Aug 2011 15:19:30 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
- zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
- mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:49 -0400 (EDT)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:16:32 -0400 (EDT)
+Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
+ zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:25 -0400 (EDT)
 Received: from localhost (localhost.localdomain [127.0.0.1])
-	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 1C4A79C7DE;
-	Sun,  7 Aug 2011 15:18:49 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
-	by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
-	with ESMTP id GxHOzMqYQY8N; Sun,  7 Aug 2011 15:18:49 -0400 (EDT)
-Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
-	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 066D2909E4;
-	Sun,  7 Aug 2011 15:18:49 -0400 (EDT)
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 614CD9DE73;
+	Wed,  3 Aug 2011 15:13:20 -0400 (EDT)
+Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+	by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+	with ESMTP id jcWOXzUaaIYu; Wed,  3 Aug 2011 15:13:20 -0400 (EDT)
+Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 438889DE59;
+	Wed,  3 Aug 2011 15:13:20 -0400 (EDT)
 Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
-	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p77JIkkD030034;
-	Sun, 7 Aug 2011 15:18:47 -0400
+	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JDDZ7029595;
+	Wed, 3 Aug 2011 15:13:13 -0400
 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
-	oleg at redhat.com; Sun,  7 Aug 2011 21:16:10 +0200 (CEST)
-Date: Sun, 7 Aug 2011 21:16:08 +0200
+	oleg at redhat.com; Wed,  3 Aug 2011 21:10:40 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:10:38 +0200
 From: Oleg Nesterov <oleg at redhat.com>
-To: "Frank Ch. Eigler" <fche at redhat.com>, Kyle McMartin <kmcmartin at redhat.com>,
-        Dave Jones <davej at redhat.com>, Josh Stone <jistone at redhat.com>,
-        Matthew Garrett <mjg at redhat.com>, David Smith <dsmith at redhat.com>
-Cc: kernel at lists.fedoraproject.org
-Subject: [PATCH 20/22] ptrace: shift user_*_step() from ptrace_resume() to
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 28/31] ptrace: shift user_*_step() from ptrace_resume() to
 	ptrace_stop()
-Message-ID: <20110807191608.GA14460 at redhat.com>
+Message-ID: <20110803191038.GA31035 at redhat.com>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
-In-Reply-To: <20110807191434.GA13184 at redhat.com>
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
 User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
 Status: RO
-Content-Length: 2384
+Content-Length: 2374
 Lines: 70
 
 1. ptrace_resume() plays with the stopped task which can be also
@@ -6276,14 +6986,14 @@ Lines: 70
 Signed-off-by: Oleg Nesterov <oleg at redhat.com>
 ---
  kernel/ptrace.c |    4 ----
- kernel/signal.c |   12 ++++++++++++
- 2 files changed, 12 insertions(+), 4 deletions(-)
+ kernel/signal.c |   11 +++++++++++
+ 2 files changed, 11 insertions(+), 4 deletions(-)
 
 diff --git a/kernel/ptrace.c b/kernel/ptrace.c
-index 44908d0..d37b30d 100644
+index d250a71..d1ef124 100644
 --- a/kernel/ptrace.c
 +++ b/kernel/ptrace.c
-@@ -580,14 +580,10 @@ static int ptrace_resume(struct task_struct *child, long request,
+@@ -635,14 +635,10 @@ static int ptrace_resume(struct task_struct *child, long request,
  		if (unlikely(!arch_has_block_step()))
  			return -EIO;
  		child->ptrace |= PT_SINGLE_BLOCK;
@@ -6299,14 +7009,13 @@ index 44908d0..d37b30d 100644
  
  	child->exit_code = data;
 diff --git a/kernel/signal.c b/kernel/signal.c
-index d0e0c67..bc40bd7 100644
+index 3c783d3..43a3e77 100644
 --- a/kernel/signal.c
 +++ b/kernel/signal.c
-@@ -1840,6 +1840,18 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
- 	}
+@@ -1920,6 +1920,17 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
+ 
+ 	utrace_end_stop();
  
- 	tracehook_finish_stop();
-+
 +	if (current->ptrace & PT_SINGLE_BLOCK)
 +		user_enable_block_step(current);
 +	else if (current->ptrace & PT_SINGLE_STEP)
@@ -6324,50 +7033,51 @@ index d0e0c67..bc40bd7 100644
 -- 
 1.5.5.1
 
-From davej  Sun Aug  7 15:19:31 2011
+
+From davej  Wed Aug  3 15:16:34 2011
 Return-Path: oleg at redhat.com
 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
 	gelk.kernelslacker.org
 X-Spam-Level: 
 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
 	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.51]
+Received: from mail.corp.redhat.com [10.5.5.52]
 	by gelk with IMAP (fetchmail-6.3.20)
-	for <davej at localhost> (single-drop); Sun, 07 Aug 2011 15:19:31 -0400 (EDT)
-Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
- zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
- mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:51 -0400 (EDT)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:16:34 -0400 (EDT)
+Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
+ zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:25 -0400 (EDT)
 Received: from localhost (localhost.localdomain [127.0.0.1])
-	by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id AD8D0D89A9;
-	Sun,  7 Aug 2011 15:18:51 -0400 (EDT)
-Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
-	by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
-	with ESMTP id LHAT6DyOymTI; Sun,  7 Aug 2011 15:18:51 -0400 (EDT)
-Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
-	by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 99798D8988;
-	Sun,  7 Aug 2011 15:18:51 -0400 (EDT)
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 1A6019DE59;
+	Wed,  3 Aug 2011 15:13:23 -0400 (EDT)
+Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+	by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+	with ESMTP id db2hhAqFwsPu; Wed,  3 Aug 2011 15:13:23 -0400 (EDT)
+Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 034739DE83;
+	Wed,  3 Aug 2011 15:13:23 -0400 (EDT)
 Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
-	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p77JIn3U030041;
-	Sun, 7 Aug 2011 15:18:50 -0400
+	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JDFNp008715;
+	Wed, 3 Aug 2011 15:13:16 -0400
 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
-	oleg at redhat.com; Sun,  7 Aug 2011 21:16:13 +0200 (CEST)
-Date: Sun, 7 Aug 2011 21:16:11 +0200
+	oleg at redhat.com; Wed,  3 Aug 2011 21:10:43 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:10:41 +0200
 From: Oleg Nesterov <oleg at redhat.com>
-To: "Frank Ch. Eigler" <fche at redhat.com>, Kyle McMartin <kmcmartin at redhat.com>,
-        Dave Jones <davej at redhat.com>, Josh Stone <jistone at redhat.com>,
-        Matthew Garrett <mjg at redhat.com>, David Smith <dsmith at redhat.com>
-Cc: kernel at lists.fedoraproject.org
-Subject: [PATCH 21/22] ptrace_disable: no need to disable stepping
-Message-ID: <20110807191611.GA14463 at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 29/31] ptrace_disable: no need to disable stepping
+Message-ID: <20110803191041.GA31039 at redhat.com>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
-In-Reply-To: <20110807191434.GA13184 at redhat.com>
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
 User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
 Status: RO
-Content-Length: 944
-Lines: 28
+Content-Length: 945
+Lines: 29
 
 ptrace_disable() is called when the tracee is quiescent and we
 are going to untrace. This means we are going to clear ->ptrace
@@ -6383,10 +7093,10 @@ Signed-off-by: Oleg Nesterov <oleg at redhat.com>
  1 files changed, 0 insertions(+), 2 deletions(-)
 
 diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
-index 7ab475f..f1cdc7d 100644
+index d1557dc..96d315a 100644
 --- a/arch/x86/kernel/ptrace.c
 +++ b/arch/x86/kernel/ptrace.c
-@@ -807,8 +807,6 @@ static int ioperm_get(struct task_struct *target,
+@@ -808,8 +808,6 @@ static int ioperm_get(struct task_struct *target,
   */
  void ptrace_disable(struct task_struct *child)
  {
@@ -6398,50 +7108,51 @@ index 7ab475f..f1cdc7d 100644
 -- 
 1.5.5.1
 
-From davej  Sun Aug  7 15:19:32 2011
+
+From davej  Wed Aug  3 15:21:48 2011
 Return-Path: oleg at redhat.com
 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
 	gelk.kernelslacker.org
 X-Spam-Level: 
 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
 	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.51]
+Received: from mail.corp.redhat.com [10.5.5.52]
 	by gelk with IMAP (fetchmail-6.3.20)
-	for <davej at localhost> (single-drop); Sun, 07 Aug 2011 15:19:32 -0400 (EDT)
-Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
- zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
- mail04.corp.redhat.com with LMTP; Sun, 7 Aug 2011 15:18:54 -0400 (EDT)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:21:48 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
+ zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:52 -0400 (EDT)
 Received: from localhost (localhost.localdomain [127.0.0.1])
-	by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 57405D89A9;
-	Sun,  7 Aug 2011 15:18:54 -0400 (EDT)
-Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
-	by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
-	with ESMTP id XgEdPuPz9LNX; Sun,  7 Aug 2011 15:18:54 -0400 (EDT)
-Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
-	by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 42E6BD8988;
-	Sun,  7 Aug 2011 15:18:54 -0400 (EDT)
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 95706917AF;
+	Wed,  3 Aug 2011 15:13:25 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+	by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+	with ESMTP id ctq4DF3wXncJ; Wed,  3 Aug 2011 15:13:25 -0400 (EDT)
+Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 7FD14914AF;
+	Wed,  3 Aug 2011 15:13:25 -0400 (EDT)
 Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
-	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p77JIqEO027919;
-	Sun, 7 Aug 2011 15:18:52 -0400
+	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p73JDIRO010579;
+	Wed, 3 Aug 2011 15:13:18 -0400
 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
-	oleg at redhat.com; Sun,  7 Aug 2011 21:16:15 +0200 (CEST)
-Date: Sun, 7 Aug 2011 21:16:13 +0200
+	oleg at redhat.com; Wed,  3 Aug 2011 21:10:46 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:10:44 +0200
 From: Oleg Nesterov <oleg at redhat.com>
-To: "Frank Ch. Eigler" <fche at redhat.com>, Kyle McMartin <kmcmartin at redhat.com>,
-        Dave Jones <davej at redhat.com>, Josh Stone <jistone at redhat.com>,
-        Matthew Garrett <mjg at redhat.com>, David Smith <dsmith at redhat.com>
-Cc: kernel at lists.fedoraproject.org
-Subject: [PATCH 22/22] ptrace_report_syscall: check TIF_SYSCALL_EMU
-Message-ID: <20110807191613.GA14470 at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 30/31] ptrace_report_syscall: check TIF_SYSCALL_EMU
+Message-ID: <20110803191044.GA31046 at redhat.com>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
-In-Reply-To: <20110807191434.GA13184 at redhat.com>
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
 User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
 Status: RO
-Content-Length: 862
-Lines: 27
+Content-Length: 858
+Lines: 28
 
 4d16a64 "introduce PT_SYSCALL_TRACE flag" breaks PTRACE_SYSEMU
 which doesn't set PT_SYSCALL_TRACE.
@@ -6456,12 +7167,12 @@ Signed-off-by: Oleg Nesterov <oleg at redhat.com>
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
-index 5612d2d..ac833de 100644
+index b6812d4..90ca578 100644
 --- a/include/linux/tracehook.h
 +++ b/include/linux/tracehook.h
-@@ -76,7 +76,7 @@ static inline void ptrace_report_syscall(struct pt_regs *regs)
+@@ -59,7 +59,7 @@ static inline void ptrace_report_syscall(struct pt_regs *regs)
  {
- 	int ptrace = task_ptrace(current);
+ 	int ptrace = current->ptrace;
  
 -	if (!(ptrace & PT_SYSCALL_TRACE))
 +	if (!(ptrace & PT_SYSCALL_TRACE) && !test_thread_flag(TIF_SYSCALL_EMU))
@@ -6471,51 +7182,125 @@ index 5612d2d..ac833de 100644
 -- 
 1.5.5.1
 
-From davej  Tue Aug  9 13:34:35 2011
+
+From davej  Wed Aug  3 15:21:49 2011
 Return-Path: oleg at redhat.com
 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
 	gelk.kernelslacker.org
 X-Spam-Level: 
 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
 	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.51]
+Received: from mail.corp.redhat.com [10.5.5.52]
 	by gelk with IMAP (fetchmail-6.3.20)
-	for <davej at localhost> (single-drop); Tue, 09 Aug 2011 13:34:35 -0400 (EDT)
+	for <davej at localhost> (single-drop); Wed, 03 Aug 2011 15:21:49 -0400 (EDT)
 Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
  zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
- mail04.corp.redhat.com with LMTP; Tue, 9 Aug 2011 13:33:16 -0400 (EDT)
+ mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:52 -0400 (EDT)
 Received: from localhost (localhost.localdomain [127.0.0.1])
-	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 16B6E9EBAD;
-	Tue,  9 Aug 2011 13:33:16 -0400 (EDT)
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 400F49191F;
+	Wed,  3 Aug 2011 15:13:28 -0400 (EDT)
 Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
 	by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
-	with ESMTP id T2mXXk1FjIIy; Tue,  9 Aug 2011 13:33:16 -0400 (EDT)
+	with ESMTP id UeLOLM29JRc7; Wed,  3 Aug 2011 15:13:28 -0400 (EDT)
 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
-	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 025259EBA5;
-	Tue,  9 Aug 2011 13:33:16 -0400 (EDT)
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 2D05C903F6;
+	Wed,  3 Aug 2011 15:13:28 -0400 (EDT)
 Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
-	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p79HXDVF004054;
-	Tue, 9 Aug 2011 13:33:13 -0400
+	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JDKCA023784;
+	Wed, 3 Aug 2011 15:13:21 -0400
 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
-	oleg at redhat.com; Tue,  9 Aug 2011 19:30:35 +0200 (CEST)
-Date: Tue, 9 Aug 2011 19:30:33 +0200
+	oleg at redhat.com; Wed,  3 Aug 2011 21:10:48 +0200 (CEST)
+Date: Wed, 3 Aug 2011 21:10:46 +0200
 From: Oleg Nesterov <oleg at redhat.com>
-To: "Frank Ch. Eigler" <fche at redhat.com>, Kyle McMartin <kmcmartin at redhat.com>,
-        Dave Jones <davej at redhat.com>, Josh Stone <jistone at redhat.com>,
-        Matthew Garrett <mjg at redhat.com>, David Smith <dsmith at redhat.com>
-Cc: kernel at lists.fedoraproject.org, Tony Breeds <tony at bakeyournoodle.com>
-Subject: [PATCH utrace-3.0 23/22] ptrace_report_syscall: check if
-	TIF_SYSCALL_EMU is defined
-Message-ID: <20110809173033.GA26443 at redhat.com>
-References: <20110701002053.GA25767 at redhat.com> <20110807191434.GA13184 at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH 31/31] utrace_resume: check irqs_disabled() to shut up
+	lockdep
+Message-ID: <20110803191046.GA31049 at redhat.com>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
-In-Reply-To: <20110807191434.GA13184 at redhat.com>
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
 User-Agent: Mutt/1.5.18 (2008-05-17)
 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
 Status: RO
-Content-Length: 844
+Content-Length: 823
+Lines: 26
+
+utrace_resume() enables irqs unconditionally. With the recent changes
+in lockdep.c this triggers the warning. Check irqs_disabled() before
+local_irq_enable().
+
+Signed-off-by: Oleg Nesterov <oleg at redhat.com>
+---
+ kernel/utrace.c |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/kernel/utrace.c b/kernel/utrace.c
+index 05e8532..c817a46 100644
+--- a/kernel/utrace.c
++++ b/kernel/utrace.c
+@@ -1881,7 +1881,8 @@ void utrace_resume(struct task_struct *task, struct pt_regs *regs)
+ 	 * code path leads to calling into get_signal_to_deliver(), which
+ 	 * implicitly reenables them by virtue of spin_unlock_irq.
+ 	 */
+-	local_irq_enable();
++	if (irqs_disabled())	/* make trace_hardirqs_on() happy */
++		local_irq_enable();
+ 
+ 	/*
+ 	 * If this flag is still set it's because there was a signal
+-- 
+1.5.5.1
+
+
+From davej  Tue Aug  9 13:39:54 2011
+Return-Path: oleg at redhat.com
+X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
+	gelk.kernelslacker.org
+X-Spam-Level: 
+X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
+	UNPARSEABLE_RELAY autolearn=ham version=3.3.2
+Received: from mail.corp.redhat.com [10.5.5.51]
+	by gelk with IMAP (fetchmail-6.3.20)
+	for <davej at localhost> (single-drop); Tue, 09 Aug 2011 13:39:54 -0400 (EDT)
+Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
+ zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
+ mail04.corp.redhat.com with LMTP; Tue, 9 Aug 2011 13:39:44 -0400 (EDT)
+Received: from localhost (localhost.localdomain [127.0.0.1])
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 5FCAC12983C;
+	Tue,  9 Aug 2011 13:39:44 -0400 (EDT)
+Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+	by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+	with ESMTP id nDWbqog6fbHK; Tue,  9 Aug 2011 13:39:44 -0400 (EDT)
+Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
+	by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 4BEF712983B;
+	Tue,  9 Aug 2011 13:39:44 -0400 (EDT)
+Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
+	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p79HdahY022801;
+	Tue, 9 Aug 2011 13:39:37 -0400
+Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
+	oleg at redhat.com; Tue,  9 Aug 2011 19:36:58 +0200 (CEST)
+Date: Tue, 9 Aug 2011 19:36:56 +0200
+From: Oleg Nesterov <oleg at redhat.com>
+To: Dave Jones <davej at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>,
+        Josh Boyer <jwboyer at redhat.com>, Josh Stone <jistone at redhat.com>,
+        Kyle McMartin <kmcmartin at redhat.com>
+Cc: kernel at lists.fedoraproject.org, utrace-devel at redhat.com
+Subject: [PATCH utrace-3.1 32/31] ptrace_report_syscall: check if
+	TIF_SYSCALL_EMU is defined
+Message-ID: <20110809173656.GC26443 at redhat.com>
+References: <20110802174514.GA23073 at redhat.com> <20110803190806.GA30619 at redhat.com>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+In-Reply-To: <20110803190806.GA30619 at redhat.com>
+User-Agent: Mutt/1.5.18 (2008-05-17)
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
+Status: RO
+Content-Length: 839
 Lines: 31
 
 From: Tony Breeds <tony at bakeyournoodle.com>
@@ -6528,12 +7313,12 @@ Signed-off-by: Oleg Nesterov <oleg at redhat.com>
  1 files changed, 6 insertions(+), 2 deletions(-)
 
 diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
-index ac833de..d5baf86 100644
+index 90ca578..a1bac95 100644
 --- a/include/linux/tracehook.h
 +++ b/include/linux/tracehook.h
-@@ -76,8 +76,12 @@ static inline void ptrace_report_syscall(struct pt_regs *regs)
+@@ -59,8 +59,12 @@ static inline void ptrace_report_syscall(struct pt_regs *regs)
  {
- 	int ptrace = task_ptrace(current);
+ 	int ptrace = current->ptrace;
  
 -	if (!(ptrace & PT_SYSCALL_TRACE) && !test_thread_flag(TIF_SYSCALL_EMU))
 -		return;


More information about the scm-commits mailing list