forked from rpms/kernel
		
	First pass at 2.6.36-rc1
This commit is contained in:
		
							parent
							
								
									c7a89c25e0
								
							
						
					
					
						commit
						da80d72ece
					
				
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -3,4 +3,4 @@ patch-*.bz2 | |||||||
| clog | clog | ||||||
| *.rpm | *.rpm | ||||||
| kernel-2.6.*/ | kernel-2.6.*/ | ||||||
| patch-2.6.35-git1.bz2 | patch-2.6.36-rc1.bz2 | ||||||
|  | |||||||
| @ -120,3 +120,5 @@ CONFIG_AUTO_ZRELADDR=y | |||||||
| 
 | 
 | ||||||
| # CONFIG_ARM_CHARLCD is not set | # CONFIG_ARM_CHARLCD is not set | ||||||
| # CONFIG_DEPRECATED_PARAM_STRUCT is not set | # CONFIG_DEPRECATED_PARAM_STRUCT is not set | ||||||
|  | 
 | ||||||
|  | # CONFIG_ARM_SP805_WATCHDOG is not set | ||||||
|  | |||||||
| @ -496,6 +496,7 @@ CONFIG_SCSI_SAS_HOST_SMP=y | |||||||
| CONFIG_RAID_ATTRS=m | CONFIG_RAID_ATTRS=m | ||||||
| 
 | 
 | ||||||
| CONFIG_ISCSI_TCP=m | CONFIG_ISCSI_TCP=m | ||||||
|  | CONFIG_ISCSI_BOOT_SYSFS=m | ||||||
| 
 | 
 | ||||||
| # | # | ||||||
| # SCSI low-level drivers | # SCSI low-level drivers | ||||||
| @ -719,6 +720,7 @@ CONFIG_FIREWIRE_OHCI=m | |||||||
| CONFIG_FIREWIRE_SBP2=m | CONFIG_FIREWIRE_SBP2=m | ||||||
| CONFIG_FIREWIRE_NET=m | CONFIG_FIREWIRE_NET=m | ||||||
| CONFIG_FIREWIRE_OHCI_DEBUG=y | CONFIG_FIREWIRE_OHCI_DEBUG=y | ||||||
|  | CONFIG_FIREWIRE_NOSY=m | ||||||
| # CONFIG_FIREWIRE_OHCI_REMOTE_DMA is not set | # CONFIG_FIREWIRE_OHCI_REMOTE_DMA is not set | ||||||
| 
 | 
 | ||||||
| # | # | ||||||
| @ -845,6 +847,7 @@ CONFIG_DECNET_ROUTER=y | |||||||
| # CONFIG_DECNET_NF_GRABULATOR is not set | # CONFIG_DECNET_NF_GRABULATOR is not set | ||||||
| CONFIG_BRIDGE=m | CONFIG_BRIDGE=m | ||||||
| CONFIG_BRIDGE_IGMP_SNOOPING=y | CONFIG_BRIDGE_IGMP_SNOOPING=y | ||||||
|  | # CONFIG_NETWORK_PHY_TIMESTAMPING is not set | ||||||
| CONFIG_NETFILTER=y | CONFIG_NETFILTER=y | ||||||
| CONFIG_NETFILTER_ADVANCED=y | CONFIG_NETFILTER_ADVANCED=y | ||||||
| CONFIG_NF_CONNTRACK=y | CONFIG_NF_CONNTRACK=y | ||||||
| @ -903,6 +906,10 @@ CONFIG_NETFILTER_XT_MATCH_U32=m | |||||||
| CONFIG_NETFILTER_XT_MATCH_CLUSTER=m | CONFIG_NETFILTER_XT_MATCH_CLUSTER=m | ||||||
| CONFIG_NETFILTER_XT_MATCH_HL=m | CONFIG_NETFILTER_XT_MATCH_HL=m | ||||||
| CONFIG_NETFILTER_XT_MATCH_OSF=m | CONFIG_NETFILTER_XT_MATCH_OSF=m | ||||||
|  | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m | ||||||
|  | CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m | ||||||
|  | CONFIG_NETFILTER_XT_MATCH_CPU=m | ||||||
|  | CONFIG_NETFILTER_XT_MATCH_IPVS=m | ||||||
| 
 | 
 | ||||||
| # CONFIG_NETFILTER_DEBUG is not set | # CONFIG_NETFILTER_DEBUG is not set | ||||||
| CONFIG_BRIDGE_NETFILTER=y | CONFIG_BRIDGE_NETFILTER=y | ||||||
| @ -1318,6 +1325,7 @@ CONFIG_CHELSIO_T1=m | |||||||
| CONFIG_CHELSIO_T1_1G=y | CONFIG_CHELSIO_T1_1G=y | ||||||
| CONFIG_CHELSIO_T3=m | CONFIG_CHELSIO_T3=m | ||||||
| CONFIG_CHELSIO_T4=m | CONFIG_CHELSIO_T4=m | ||||||
|  | CONFIG_CHELSIO_T4VF=m | ||||||
| CONFIG_IP1000=m | CONFIG_IP1000=m | ||||||
| CONFIG_IXGB=m | CONFIG_IXGB=m | ||||||
| CONFIG_IXGBEVF=m | CONFIG_IXGBEVF=m | ||||||
| @ -1513,6 +1521,8 @@ CONFIG_WL1251=m | |||||||
| CONFIG_WL1251_SPI=m | CONFIG_WL1251_SPI=m | ||||||
| CONFIG_WL1251_SDIO=m | CONFIG_WL1251_SDIO=m | ||||||
| CONFIG_WL1271=m | CONFIG_WL1271=m | ||||||
|  | CONFIG_WL1271_SDIO=m | ||||||
|  | CONFIG_WL1271_SPI=m | ||||||
| 
 | 
 | ||||||
| # | # | ||||||
| # Token Ring devices | # Token Ring devices | ||||||
| @ -1565,6 +1575,7 @@ CONFIG_CAN_SJA1000_ISA=m | |||||||
| CONFIG_CAN_SJA1000_PLATFORM=m | CONFIG_CAN_SJA1000_PLATFORM=m | ||||||
| CONFIG_CAN_EMS_PCI=m | CONFIG_CAN_EMS_PCI=m | ||||||
| CONFIG_CAN_EMS_USB=m | CONFIG_CAN_EMS_USB=m | ||||||
|  | CONFIG_CAN_ESD_USB2=m | ||||||
| CONFIG_CAN_KVASER_PCI=m | CONFIG_CAN_KVASER_PCI=m | ||||||
| CONFIG_CAN_PLX_PCI=m | CONFIG_CAN_PLX_PCI=m | ||||||
| CONFIG_NETROM=m | CONFIG_NETROM=m | ||||||
| @ -1644,6 +1655,7 @@ CONFIG_BT_HCIBTUSB=m | |||||||
| CONFIG_BT_HCIUART=m | CONFIG_BT_HCIUART=m | ||||||
| CONFIG_BT_HCIUART_H4=y | CONFIG_BT_HCIUART_H4=y | ||||||
| CONFIG_BT_HCIUART_BCSP=y | CONFIG_BT_HCIUART_BCSP=y | ||||||
|  | CONFIG_BT_HCIUART_ATH3K=y | ||||||
| CONFIG_BT_HCIDTL1=m | CONFIG_BT_HCIDTL1=m | ||||||
| CONFIG_BT_HCIBT3C=m | CONFIG_BT_HCIBT3C=m | ||||||
| CONFIG_BT_HCIBLUECARD=m | CONFIG_BT_HCIBLUECARD=m | ||||||
| @ -1812,6 +1824,7 @@ CONFIG_INPUT_YEALINK=m | |||||||
| CONFIG_INPUT_CM109=m | CONFIG_INPUT_CM109=m | ||||||
| CONFIG_INPUT_POLLDEV=m | CONFIG_INPUT_POLLDEV=m | ||||||
| CONFIG_INPUT_SPARSEKMAP=m | CONFIG_INPUT_SPARSEKMAP=m | ||||||
|  | # CONFIG_INPUT_ADXL34X is not set | ||||||
| 
 | 
 | ||||||
| # | # | ||||||
| # Input I/O drivers | # Input I/O drivers | ||||||
| @ -1846,6 +1859,7 @@ CONFIG_KEYBOARD_ATKBD=y | |||||||
| # FIXME: Do we really need these keyboards enabled ? | # FIXME: Do we really need these keyboards enabled ? | ||||||
| CONFIG_KEYBOARD_ADP5588=m | CONFIG_KEYBOARD_ADP5588=m | ||||||
| CONFIG_KEYBOARD_MAX7359=m | CONFIG_KEYBOARD_MAX7359=m | ||||||
|  | # CONFIG_KEYBOARD_MCS is not set | ||||||
| CONFIG_KEYBOARD_OPENCORES=m | CONFIG_KEYBOARD_OPENCORES=m | ||||||
| CONFIG_KEYBOARD_QT2160=m | CONFIG_KEYBOARD_QT2160=m | ||||||
| # CONFIG_KEYBOARD_TCA6416 is not set | # CONFIG_KEYBOARD_TCA6416 is not set | ||||||
| @ -1909,6 +1923,8 @@ CONFIG_TOUCHSCREEN_USB_E2I=y | |||||||
| CONFIG_TOUCHSCREEN_USB_COMPOSITE=m | CONFIG_TOUCHSCREEN_USB_COMPOSITE=m | ||||||
| CONFIG_TOUCHSCREEN_DYNAPRO=m | CONFIG_TOUCHSCREEN_DYNAPRO=m | ||||||
| # CONFIG_TOUCHSCREEN_WM97XX is not set | # CONFIG_TOUCHSCREEN_WM97XX is not set | ||||||
|  | # CONFIG_TOUCHSCREEN_AD7879 is not set | ||||||
|  | # CONFIG_TOUCHSCREEN_QT602240 is not set | ||||||
| CONFIG_TOUCHSCREEN_EETI=m | CONFIG_TOUCHSCREEN_EETI=m | ||||||
| CONFIG_TOUCHSCREEN_W90X900=m | CONFIG_TOUCHSCREEN_W90X900=m | ||||||
| CONFIG_TOUCHSCREEN_MCS5000=m | CONFIG_TOUCHSCREEN_MCS5000=m | ||||||
| @ -1985,6 +2001,7 @@ CONFIG_CYCLADES=m | |||||||
| # CONFIG_STALLION is not set | # CONFIG_STALLION is not set | ||||||
| # CONFIG_ISTALLION is not set | # CONFIG_ISTALLION is not set | ||||||
| CONFIG_SERIAL_JSM=m | CONFIG_SERIAL_JSM=m | ||||||
|  | # CONFIG_SERIAL_MFD_HSU is not set | ||||||
| 
 | 
 | ||||||
| # CONFIG_SERIAL_ALTERA_JTAGUART is not set | # CONFIG_SERIAL_ALTERA_JTAGUART is not set | ||||||
| # CONFIG_SERIAL_ALTERA_UART is not set | # CONFIG_SERIAL_ALTERA_UART is not set | ||||||
| @ -2008,6 +2025,8 @@ CONFIG_PPDEV=m | |||||||
| CONFIG_I2C=m | CONFIG_I2C=m | ||||||
| CONFIG_I2C_COMPAT=y | CONFIG_I2C_COMPAT=y | ||||||
| CONFIG_I2C_CHARDEV=m | CONFIG_I2C_CHARDEV=m | ||||||
|  | # CONFIG_I2C_MUX is not set | ||||||
|  | # CONFIG_I2C_MUX_PCA954x is not set | ||||||
| 
 | 
 | ||||||
| # | # | ||||||
| # I2C Algorithms | # I2C Algorithms | ||||||
| @ -2153,6 +2172,13 @@ CONFIG_SENSORS_ADT7411=m | |||||||
| CONFIG_SENSORS_ASC7621=m | CONFIG_SENSORS_ASC7621=m | ||||||
| CONFIG_SENSORS_EMC1403=m | CONFIG_SENSORS_EMC1403=m | ||||||
| CONFIG_SENSORS_TMP102=m | CONFIG_SENSORS_TMP102=m | ||||||
|  | # CONFIG_SENSORS_BH1780 is not set | ||||||
|  | # CONFIG_SENSORS_JC42 is not set | ||||||
|  | # CONFIG_SENSORS_SMM665 is not set | ||||||
|  | # CONFIG_SENSORS_EMC2103 is not set | ||||||
|  | 
 | ||||||
|  | # CONFIG_HMC6352 is not set | ||||||
|  | # CONFIG_BMP085 is not set | ||||||
| 
 | 
 | ||||||
| CONFIG_W1=m | CONFIG_W1=m | ||||||
| CONFIG_W1_CON=y | CONFIG_W1_CON=y | ||||||
| @ -2308,6 +2334,7 @@ CONFIG_DRM_NOUVEAU=m | |||||||
| CONFIG_DRM_NOUVEAU_BACKLIGHT=y | CONFIG_DRM_NOUVEAU_BACKLIGHT=y | ||||||
| CONFIG_DRM_NOUVEAU_DEBUG=y | CONFIG_DRM_NOUVEAU_DEBUG=y | ||||||
| CONFIG_DRM_I2C_CH7006=m | CONFIG_DRM_I2C_CH7006=m | ||||||
|  | CONFIG_DRM_I2C_SIL164=m | ||||||
| CONFIG_DRM_VMWGFX=m | CONFIG_DRM_VMWGFX=m | ||||||
| 
 | 
 | ||||||
| # | # | ||||||
| @ -2974,6 +3001,8 @@ CONFIG_HID_TOPSEED=m | |||||||
| CONFIG_HID_THRUSTMASTER=m | CONFIG_HID_THRUSTMASTER=m | ||||||
| CONFIG_HID_ZEROPLUS=m | CONFIG_HID_ZEROPLUS=m | ||||||
| CONFIG_HID_ZYDACRON=m | CONFIG_HID_ZYDACRON=m | ||||||
|  | CONFIG_HID_ACRUX_FF=m | ||||||
|  | CONFIG_HID_ELECOM=m | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| # | # | ||||||
| @ -3038,6 +3067,7 @@ CONFIG_USB_KONICAWC=m | |||||||
| CONFIG_USB_S2255=m | CONFIG_USB_S2255=m | ||||||
| CONFIG_USB_SE401=m | CONFIG_USB_SE401=m | ||||||
| # CONFIG_VIDEO_SH_MOBILE_CEU is not set | # CONFIG_VIDEO_SH_MOBILE_CEU is not set | ||||||
|  | # CONFIG_VIDEO_SH_MOBILE_CSI2 is not set | ||||||
| # CONFIG_USB_STV680 is not set | # CONFIG_USB_STV680 is not set | ||||||
| # CONFIG_USB_SN9C102 is not set | # CONFIG_USB_SN9C102 is not set | ||||||
| CONFIG_USB_ZR364XX=m | CONFIG_USB_ZR364XX=m | ||||||
| @ -3165,6 +3195,7 @@ CONFIG_USB_SERIAL_XIRCOM=m | |||||||
| CONFIG_USB_SERIAL_QCAUX=m | CONFIG_USB_SERIAL_QCAUX=m | ||||||
| CONFIG_USB_SERIAL_VIVOPAY_SERIAL=m | CONFIG_USB_SERIAL_VIVOPAY_SERIAL=m | ||||||
| CONFIG_USB_SERIAL_DEBUG=m | CONFIG_USB_SERIAL_DEBUG=m | ||||||
|  | CONFIG_USB_SERIAL_SSU100=m | ||||||
| 
 | 
 | ||||||
| CONFIG_USB_EZUSB=y | CONFIG_USB_EZUSB=y | ||||||
| CONFIG_USB_EMI62=m | CONFIG_USB_EMI62=m | ||||||
| @ -3248,6 +3279,8 @@ CONFIG_INPUT_PCF50633_PMU=m | |||||||
| CONFIG_INPUT_GPIO_ROTARY_ENCODER=m | CONFIG_INPUT_GPIO_ROTARY_ENCODER=m | ||||||
| CONFIG_CHARGER_PCF50633=m | CONFIG_CHARGER_PCF50633=m | ||||||
| CONFIG_RTC_DRV_PCF50633=m | CONFIG_RTC_DRV_PCF50633=m | ||||||
|  | CONFIG_RTC_DRV_DS3232=m | ||||||
|  | CONFIG_RTC_DRV_ISL12022=m | ||||||
| 
 | 
 | ||||||
| CONFIG_MFD_SUPPORT=y | CONFIG_MFD_SUPPORT=y | ||||||
| CONFIG_MFD_SM501=m | CONFIG_MFD_SM501=m | ||||||
| @ -3391,7 +3424,8 @@ CONFIG_JFFS2_FS_POSIX_ACL=y | |||||||
| CONFIG_JFFS2_FS_SECURITY=y | CONFIG_JFFS2_FS_SECURITY=y | ||||||
| CONFIG_CRAMFS=m | CONFIG_CRAMFS=m | ||||||
| CONFIG_SQUASHFS=m | CONFIG_SQUASHFS=m | ||||||
| CONFIG_SQUASHFS_XATTRS=y | CONFIG_SQUASHFS_XATTR=y | ||||||
|  | CONFIG_SQUASHFS_LZO=y | ||||||
| # CONFIG_SQUASHFS_EMBEDDED is not set | # CONFIG_SQUASHFS_EMBEDDED is not set | ||||||
| CONFIG_VXFS_FS=m | CONFIG_VXFS_FS=m | ||||||
| # CONFIG_HPFS_FS is not set | # CONFIG_HPFS_FS is not set | ||||||
| @ -3420,6 +3454,7 @@ CONFIG_NFSD_V3=y | |||||||
| CONFIG_NFSD_V3_ACL=y | CONFIG_NFSD_V3_ACL=y | ||||||
| CONFIG_NFSD_V4=y | CONFIG_NFSD_V4=y | ||||||
| CONFIG_NFS_FSCACHE=y | CONFIG_NFS_FSCACHE=y | ||||||
|  | # CONFIG_NFS_USE_LEGACY_DNS is not set | ||||||
| CONFIG_LOCKD=m | CONFIG_LOCKD=m | ||||||
| CONFIG_LOCKD_V4=y | CONFIG_LOCKD_V4=y | ||||||
| CONFIG_EXPORTFS=m | CONFIG_EXPORTFS=m | ||||||
| @ -3591,6 +3626,7 @@ CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 | |||||||
| CONFIG_SECURITY_SELINUX_AVC_STATS=y | CONFIG_SECURITY_SELINUX_AVC_STATS=y | ||||||
| # CONFIG_SECURITY_SMACK is not set | # CONFIG_SECURITY_SMACK is not set | ||||||
| # CONFIG_SECURITY_TOMOYO is not set | # CONFIG_SECURITY_TOMOYO is not set | ||||||
|  | # CONFIG_SECURITY_APPARMOR is not set | ||||||
| CONFIG_AUDIT=y | CONFIG_AUDIT=y | ||||||
| CONFIG_AUDITSYSCALL=y | CONFIG_AUDITSYSCALL=y | ||||||
| 
 | 
 | ||||||
| @ -3599,6 +3635,7 @@ CONFIG_AUDITSYSCALL=y | |||||||
| # | # | ||||||
| CONFIG_CRYPTO=y | CONFIG_CRYPTO=y | ||||||
| CONFIG_CRYPTO_FIPS=y | CONFIG_CRYPTO_FIPS=y | ||||||
|  | CONFIG_CRYPTO_MANAGER_TESTS=y | ||||||
| CONFIG_CRYPTO_HW=y | CONFIG_CRYPTO_HW=y | ||||||
| CONFIG_CRYPTO_BLKCIPHER=y | CONFIG_CRYPTO_BLKCIPHER=y | ||||||
| CONFIG_CRYPTO_MANAGER=m | CONFIG_CRYPTO_MANAGER=m | ||||||
| @ -4167,6 +4204,11 @@ CONFIG_USB_ATMEL=m | |||||||
| # CONFIG_RAMZSWAP is not set | # CONFIG_RAMZSWAP is not set | ||||||
| # CONFIG_BATMAN_ADV is not set | # CONFIG_BATMAN_ADV is not set | ||||||
| # CONFIG_FB_SM7XX is not set | # CONFIG_FB_SM7XX is not set | ||||||
|  | # CONFIG_SPECTRA is not set | ||||||
|  | # CONFIG_ZRAM is not set | ||||||
|  | # CONFIG_EASYCAP is not set | ||||||
|  | # CONFIG_SOLO6X10 is not set | ||||||
|  | # CONFIG_ACPI_QUICKSTART is not set | ||||||
| 
 | 
 | ||||||
| # | # | ||||||
| # Android | # Android | ||||||
| @ -4214,6 +4256,8 @@ CONFIG_KSM=y | |||||||
| CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 | ||||||
| 
 | 
 | ||||||
| CONFIG_FSNOTIFY=y | CONFIG_FSNOTIFY=y | ||||||
|  | CONFIG_FANOTIFY=y | ||||||
|  | CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y | ||||||
| 
 | 
 | ||||||
| CONFIG_IEEE802154=m | CONFIG_IEEE802154=m | ||||||
| CONFIG_IEEE802154_DRIVERS=m | CONFIG_IEEE802154_DRIVERS=m | ||||||
| @ -4253,6 +4297,8 @@ CONFIG_DEBUG_RODATA_TEST=y | |||||||
| CONFIG_DEBUG_NX_TEST=m | CONFIG_DEBUG_NX_TEST=m | ||||||
| CONFIG_DEBUG_BOOT_PARAMS=y | CONFIG_DEBUG_BOOT_PARAMS=y | ||||||
| CONFIG_DETECT_SOFTLOCKUP=y | CONFIG_DETECT_SOFTLOCKUP=y | ||||||
|  | CONFIG_LOCKUP_DETECTOR=y | ||||||
|  | # CONFIG_DEBUG_INFO_REDUCED is not set | ||||||
| # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set | # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set | ||||||
| CONFIG_DETECT_HUNG_TASK=y | CONFIG_DETECT_HUNG_TASK=y | ||||||
| # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set | # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set | ||||||
| @ -4291,3 +4337,13 @@ CONFIG_PROFILE_KSYM_TRACER=y | |||||||
| CONFIG_KPROBE_EVENT=y | CONFIG_KPROBE_EVENT=y | ||||||
| 
 | 
 | ||||||
| # CONFIG_RAMOOPS is not set | # CONFIG_RAMOOPS is not set | ||||||
|  | 
 | ||||||
|  | CONFIG_IR_CORE=m | ||||||
|  | CONFIG_IR_ENE=m | ||||||
|  | CONFIG_IR_STREAMZAP=m | ||||||
|  | 
 | ||||||
|  | # CONFIG_TOUCHSCREEN_CY8CTMG110 is not set | ||||||
|  | # CONFIG_GPIO_SX150X is not set | ||||||
|  | # CONFIG_MFD_STMPE is not set | ||||||
|  | # CONFIG_MFD_MAX8998 is not set | ||||||
|  | # CONFIG_MFD_TPS6586X is not set | ||||||
|  | |||||||
| @ -1,5 +1,6 @@ | |||||||
| # CONFIG_HIGHMEM4G is not set | # CONFIG_HIGHMEM4G is not set | ||||||
| CONFIG_HIGHMEM64G=y | CONFIG_HIGHMEM64G=y | ||||||
|  | # CONFIG_OLPC_OPENFIRMWARE is not set | ||||||
| 
 | 
 | ||||||
| CONFIG_XEN_DEV_EVTCHN=m | CONFIG_XEN_DEV_EVTCHN=m | ||||||
| CONFIG_XEN_SYS_HYPERVISOR=y | CONFIG_XEN_SYS_HYPERVISOR=y | ||||||
|  | |||||||
| @ -138,6 +138,7 @@ CONFIG_ACPI_THERMAL=y | |||||||
| CONFIG_ACPI_VIDEO=m | CONFIG_ACPI_VIDEO=m | ||||||
| # CONFIG_ACPI_PROC_EVENT is not set | # CONFIG_ACPI_PROC_EVENT is not set | ||||||
| CONFIG_ACPI_HED=m | CONFIG_ACPI_HED=m | ||||||
|  | CONFIG_ACPI_EC_DEBUGFS=m | ||||||
| 
 | 
 | ||||||
| CONFIG_PM=y | CONFIG_PM=y | ||||||
| CONFIG_HOTPLUG_PCI=y | CONFIG_HOTPLUG_PCI=y | ||||||
|  | |||||||
| @ -332,3 +332,5 @@ CONFIG_SERIAL_GRLIB_GAISLER_APBUART=m | |||||||
| # CONFIG_MFD_TC35892 is not set | # CONFIG_MFD_TC35892 is not set | ||||||
| 
 | 
 | ||||||
| # CONFIG_GPIO_SCH is not set | # CONFIG_GPIO_SCH is not set | ||||||
|  | 
 | ||||||
|  | # CONFIG_PPC_MPC512x is not set | ||||||
|  | |||||||
| @ -149,6 +149,7 @@ CONFIG_FSL_EMB_PERFMON=y | |||||||
| CONFIG_MPC8272_ADS=y | CONFIG_MPC8272_ADS=y | ||||||
| CONFIG_PQ2FADS=y | CONFIG_PQ2FADS=y | ||||||
| CONFIG_EP8248E=y | CONFIG_EP8248E=y | ||||||
|  | CONFIG_MPC830x_RDB=y | ||||||
| CONFIG_MPC831x_RDB=y | CONFIG_MPC831x_RDB=y | ||||||
| CONFIG_MPC832x_MDS=y | CONFIG_MPC832x_MDS=y | ||||||
| CONFIG_MPC832x_RDB=y | CONFIG_MPC832x_RDB=y | ||||||
|  | |||||||
| @ -226,3 +226,5 @@ CONFIG_SMSGIUCV_EVENT=m | |||||||
| # CONFIG_PREEMPT_TRACER is not set | # CONFIG_PREEMPT_TRACER is not set | ||||||
| 
 | 
 | ||||||
| CONFIG_VMCP=y | CONFIG_VMCP=y | ||||||
|  | 
 | ||||||
|  | CONFIG_ZFCP_DIF=y | ||||||
|  | |||||||
| @ -393,6 +393,7 @@ CONFIG_SENSORS_I5K_AMB=m | |||||||
| CONFIG_HP_WATCHDOG=m | CONFIG_HP_WATCHDOG=m | ||||||
| 
 | 
 | ||||||
| CONFIG_OLPC=y | CONFIG_OLPC=y | ||||||
|  | CONFIG_OLPC_OPENFIRMWARE=y | ||||||
| CONFIG_BATTERY_OLPC=y | CONFIG_BATTERY_OLPC=y | ||||||
| CONFIG_MOUSE_PS2_OLPC=y | CONFIG_MOUSE_PS2_OLPC=y | ||||||
| 
 | 
 | ||||||
| @ -479,6 +480,20 @@ CONFIG_TOSHIBA_BT_RFKILL=m | |||||||
| CONFIG_VGA_SWITCHEROO=y | CONFIG_VGA_SWITCHEROO=y | ||||||
| CONFIG_LPC_SCH=m | CONFIG_LPC_SCH=m | ||||||
| 
 | 
 | ||||||
| CONFIG_INTEL_IDLE=m |  | ||||||
| 
 |  | ||||||
| CONFIG_PCI_CNB20LE_QUIRK=y | 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_XEN_PLATFORM_PCI=m | ||||||
|  | # CONFIG_ACPI_QUICKSTART is not set | ||||||
|  | CONFIG_IDEAPAD_ACPI=m | ||||||
|  | CONFIG_INTEL_IPS=m | ||||||
|  | 
 | ||||||
|  | |||||||
| @ -403,7 +403,21 @@ CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL=m | |||||||
| CONFIG_VGA_SWITCHEROO=y | CONFIG_VGA_SWITCHEROO=y | ||||||
| CONFIG_LPC_SCH=m | CONFIG_LPC_SCH=m | ||||||
| 
 | 
 | ||||||
| CONFIG_INTEL_IDLE=m |  | ||||||
| CONFIG_I7300_IDLE=m | CONFIG_I7300_IDLE=m | ||||||
| 
 | 
 | ||||||
| CONFIG_PCI_CNB20LE_QUIRK=y | 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_XEN_PLATFORM_PCI=m | ||||||
|  | # CONFIG_ACPI_QUICKSTART is not set | ||||||
|  | CONFIG_IDEAPAD_ACPI=m | ||||||
|  | CONFIG_INTEL_IPS=m | ||||||
|  | |||||||
							
								
								
									
										554
									
								
								git-utrace.patch
									
									
									
									
									
								
							
							
						
						
									
										554
									
								
								git-utrace.patch
									
									
									
									
									
								
							| @ -1,348 +1,5 @@ | |||||||
| From c2f1645ae87d5b7fc5e5973c3a93a4ae1684a76b Mon Sep 17 00:00:00 2001 |  | ||||||
| From: Kyle McMartin <kyle@dreadnought.i.jkkm.org> |  | ||||||
| Date: Tue, 22 Jun 2010 11:31:13 +0100 |  | ||||||
| Subject: Merge remote branch 'utrace/utrace-ptrace' into rawhide |  | ||||||
| 
 |  | ||||||
| % git log --oneline --no-merges 7e27d6e..a91f6b7 |  | ||||||
| f979955 utrace-ptrace: fix compiling ptrace_regset under CONFIG_UTRACE |  | ||||||
| b5f196b utrace-ptrace: copy PTRACE_GETREGSET code to utrace-ptrace |  | ||||||
| d83135e utrace: fix utrace_maybe_reap() vs find_matching_engine() race |  | ||||||
| 9a2c607 utrace: move CONFIG_UTRACE after AUDITSYSCALL in init/Kconfig |  | ||||||
| 62f4621 utrace: s/rmb/mb/ in tracehook_notify_resume() |  | ||||||
| 65f5e9d utrace: fix utrace_maybe_reap logic |  | ||||||
| ed1f9c2 utrace: fix syntax nit for !CONFIG_UTRACE |  | ||||||
| 71e3f39 ptrace: add utrace comment |  | ||||||
| e7afc73 utrace: use WARN with text |  | ||||||
| a8ced33 utrace: cosmetic restructure |  | ||||||
| 4330b80 utrace: remove some inline keywords |  | ||||||
| d4be40a utrace: remove report_clone special priority for utrace_attach_task on child |  | ||||||
| 8c56566 ptrace: updates for utrace API changes |  | ||||||
| 1900135 utrace: streamline callback API |  | ||||||
| 97662d3 utrace: more cosmetic trivia |  | ||||||
| fd414cd utrace: more cosmetic cleanup |  | ||||||
| f30f068 utrace: cosmetic trivia |  | ||||||
| cfebda7 utrace: fix the comments about rmb() in task_utrace_struct() |  | ||||||
| 875858a utrace: improve the comment in tracehook_notify_resume() |  | ||||||
| 76b49a5 utrace: fix the ->cloning check in utrace_attach_delay() |  | ||||||
| e0755bb utrace: kill mb() in tracehook_report_death() |  | ||||||
| 9fdc988 fix __must_check warnings |  | ||||||
| 3e02499 kill suppress_sigtrap() |  | ||||||
| f872e69 utrace: don't set ->ops = utrace_detached_ops lockless |  | ||||||
| 938482e utrace: fix doc typo |  | ||||||
| 7fae049 utrace: avoid BUG_ON when engine leaves bogus si_signo |  | ||||||
| 71b7a85 utrace: trivial, move CONFIG_UTRACE into "General setup" |  | ||||||
| 9c8dbe0 utrace: reset report action for UTRACE_SYSCALL_RESUMED iteration |  | ||||||
| 4c7514e join PTRACE_EVENT_SYSCALL_XXX states |  | ||||||
| a8f782e export __ptrace_detach() and do_notify_parent_cldstop() |  | ||||||
| c3473e1 ptrace_signal: check PT_PTRACED before reporting a signal |  | ||||||
| b396f5e tracehooks: check PT_PTRACED before reporting the single-step |  | ||||||
| 45667dd tracehooks: kill some PT_PTRACED checks |  | ||||||
| e8a2f23 ptrace: cleanup ptrace_init_task()->ptrace_link() path |  | ||||||
| 611dab8 kill CONFIG_UTRACE_PTRACE |  | ||||||
| 8d3833e rm kernel/ptrace-common.h |  | ||||||
| 494deb7 export __ptrace_detach(), add "ifndef CONFIG_UTRACE" into ptrace.c |  | ||||||
| 05cb325 (upstream) reorder the code in kernel/ptrace.c |  | ||||||
| eb10f13 restore the old kernel/ptrace.c |  | ||||||
| ddcc525 utrace_resume: Avoid finish_resume_report() for UTRACE_RESUME |  | ||||||
| 47852f9 mv kernel/ptrace.c kernel/ptrace-utrace.c |  | ||||||
| de5a46e utrace: fix UTRACE_SYSCALL_RESUMED nits |  | ||||||
| 3bd4be9 stepping, accommodate to utrace-cleanup changes |  | ||||||
| 679be9e Revert "utrace: synthesize SIGTRAP for single-stepping at syscall-exit" |  | ||||||
| 23ab966 utrace: barrier nits |  | ||||||
| d3800b8 utrace: tracehook_init_task |  | ||||||
| 64daf14 utrace: task_utrace_struct() barrier |  | ||||||
| f19442c utrace: synthesize SIGTRAP for single-stepping at syscall-exit |  | ||||||
| 2583b32 utrace: nit for utrace-ptrace |  | ||||||
| a88b467 ptrace: x86: change syscall_trace_leave() to rely on tracehook when stepping |  | ||||||
| e01acf4 ptrace: x86: implement user_single_step_siginfo() |  | ||||||
| 462a57b ptrace: change tracehook_report_syscall_exit() to handle stepping |  | ||||||
| 172590d ptrace: powerpc: implement user_single_step_siginfo() |  | ||||||
| d63b43d ptrace: introduce user_single_step_siginfo() helper |  | ||||||
| c575558 utrace: barriers for initializing struct utrace |  | ||||||
| 89df3c7 utrace: utrace_attach_task() forgets to return when ->utrace == NULL |  | ||||||
| 4d17e95 utrace: finish_report() must never set ->resume = UTRACE_STOP |  | ||||||
| 212f67e utrace: utrace_get_signal() must check ->pending_attach |  | ||||||
| eff6ca8 change ptrace_report_signal() to use user_single_step_siginfo() |  | ||||||
| cba1272 don't send the unnecessary SIGTRAP after SYSCALL_EXIT |  | ||||||
| 8aa71a6 revert "turn PTRACE_EVENT_SIGTRAP into PTRACE_EVENT_SIGNAL" |  | ||||||
| 90c8237 utrace-ptrace: minimally handle UTRACE_SYSCALL_RESUMED |  | ||||||
| a7e9198 utrace: clean up resume-action handling |  | ||||||
| 962eb2f utrace: update after merge |  | ||||||
| e2ced71 re-introduce utrace_finish_stop() to fix the race with SIGKILL |  | ||||||
| 603e19c turn PTRACE_EVENT_SIGTRAP into PTRACE_EVENT_SIGNAL |  | ||||||
| ff87f65 introduce suppress_sigtrap() to prevent unwanted send_sigtrap() |  | ||||||
| 6505e3c move ptrace_resume()->send_sigtrap() logic into ptrace_report_signal() |  | ||||||
| 5261baa prepare ptrace_report_signal() to synthesize SIGTRAP |  | ||||||
| ef9534b ptrace_request: turn ptrace_resume() into default case |  | ||||||
| f50c776 s/context/ctx/ |  | ||||||
| 228b2e3 ptrace_notify_stop: kill the temporary WARN_ON() |  | ||||||
| 93e866a ptrace_request(PTRACE_KILL) should not(?) return -ESRCH |  | ||||||
| 26fefca utrace: sticky resume action |  | ||||||
| 28b2774b utrace: remove ->stopped field |  | ||||||
| 9e0f357 utrace_set_events: nit clean up |  | ||||||
| 6d0bad3 nits |  | ||||||
| 48bab07 (utrace) utrace_get_signal: don't dequeue_signal() if ->group_stop_count |  | ||||||
| d4ef551 (upstream) signals: check ->group_stop_count after tracehook_get_signal() |  | ||||||
| 6292daa ptrace_detach_task: don't use valid_signal() |  | ||||||
| c5a6a82 cosmetic, renames |  | ||||||
| e422a3f cosmetic, relocate some code in ptrace.c |  | ||||||
| b96e4db (upstream) introduce kernel/ptrace.h |  | ||||||
| 7665564 (upstream) tracehook_signal_handler: check PT_PTRACED |  | ||||||
| 7d708ca tracehooks: revert utrace-ptrace changes |  | ||||||
| 4104e29 (upstream) ptrace_init_task: cleanup the usage of ptrace_link() |  | ||||||
| d04ccb7 revert all utrace-ptrace changes in ptrace.h |  | ||||||
| 80786ce revert utrace-ptrace changes in kernel/signal.c |  | ||||||
| 0b02f9e introduce PT_UTRACED to replace PT_PTRACED inside ptrace.c |  | ||||||
| 030ce35 tracehooks: remove some PT_PTRACED checks |  | ||||||
| 4b7b15a revert the clone() related changes in tracehook.h |  | ||||||
| 769030e hack ptrace_check_attach() to make it almost correct |  | ||||||
| 7aa5c3a cosmetic, fold do_ptrace_resume() into ptrace_resume() |  | ||||||
| d27ebc1 cosmetic, introduce ptrace_resume_action() |  | ||||||
| 35fbca4 turn context->sysemu into PTRACE_O_SYSEMU |  | ||||||
| 38a8c1f PTRACE_SYSEMU_SINGLESTEP support |  | ||||||
| 4367836 PTRACE_SYSEMU support |  | ||||||
| 16819db ptrace_report_clone: minor cleanups + comments |  | ||||||
| ac1afd8 ptrace_resume: rewrite request processing |  | ||||||
| 6b0d4f6 do_ptrace_resume: always use ptrace_wake_up() |  | ||||||
| fa92ce3 do_ptrace_resume: consolidate multiple switch stmts |  | ||||||
| 135d780 uglify the code again to report VFORK_DONE after VFORK |  | ||||||
| 4e3f362 fix PTRACE_SYSCALL after PTRACE_EVENT_VFORK_DONE stop |  | ||||||
| 3f95189 ptrace_report_clone: uglify even more to handle TRACEVFORKDONE without TRACEVFORK |  | ||||||
| 66ca8b6 ptrace_report_clone: uglify CLONE_PTRACE/CLONE_UNTRACED behaviour to match upstream |  | ||||||
| fc82b2c pretend PTRACE_O_TRACEVFORKDONE doesn't exist |  | ||||||
| 28aa15a utrace_set_events: never return -EINPROGRESS unless clearing some event bits |  | ||||||
| a7f4350 utrace_stop: do ptrace_notify_stop() unconditionally |  | ||||||
| cb78492 ptrace_report_exit: fix WARN_ON() condition |  | ||||||
| bb941c3 do_ptrace_notify_stop: document the usage of tracee->exit_code |  | ||||||
| 383ba85 ptrace_wake_up: don't clear tracee->exit_code + update comments |  | ||||||
| 3d5c221 ptrace_wake_up: add "bool force_wakeup" argument for implicit detach |  | ||||||
| be6862e ptrace_wake_up: clear context->stop_code |  | ||||||
| bfb40c8 detach: use ptrace_wake_up() instead of utrace_control() |  | ||||||
| 7de148a shift context re-initialization from detach to reuse |  | ||||||
| 464def3 cleanup/optimize reuse/attch in ptrace_attach_task() |  | ||||||
| 50f56b9 ptrace_attach_task: rely on utrace_barrier(), don't check ->ops |  | ||||||
| 03376fd use set_stop_code() in ptrace_report_signal(UTRACE_SIGNAL_HANDLER) |  | ||||||
| 85f8b3a detach should reset the context of self-detaching engine |  | ||||||
| a27233a attach: try to re-use the self-detaching engine |  | ||||||
| 8667615 ptrace_notify_stop: fix engine leak |  | ||||||
| 3d5d053 ptrace_detach_task: don't use engine ptr before IS_ERR(engine) |  | ||||||
| 01875c7 fold detach_signal() into ptrace_detach_task() |  | ||||||
| 464c2b7 don't detach the engine with the parting signal |  | ||||||
| 97b345c implement the basic detach-with-signal logic |  | ||||||
| a158247 rework access to context->siginfo |  | ||||||
| 20ea83b introduce set_stop_code() helper |  | ||||||
| eb222ed cosmetic, misc renames |  | ||||||
| f83b2ca move "event << 8" into syscall_code() |  | ||||||
| 4c99287 kill context->ev_name |  | ||||||
| df7c8f2 encode internal stop events in ->ev_code too |  | ||||||
| 3f48297 introduce get_stop_code(context) helper |  | ||||||
| 313bad1 introduce syscall_code(context) helper |  | ||||||
| 47b5e2c don't clear context->ev_code for debugging |  | ||||||
| 4e09fe3 convert ptrace_setsiginfo() to use ptrace_rw_siginfo() |  | ||||||
| 53187be convert ptrace_getsiginfo() to use ptrace_rw_siginfo() |  | ||||||
| e7ac055 introduce ptrace_rw_siginfo() helper |  | ||||||
| c625793 move "resume signal" logic into the tracee's context |  | ||||||
| 0768d89 UTRACE_SIGNAL_HANDLER should never see ->siginfo != NULL |  | ||||||
| e90cb71 don't use task_struct->ptrace_message |  | ||||||
| 842684f do_ptrace_notify_stop: fix the race with SIGKILL |  | ||||||
| d0ed18d do_ptrace_notify_stop: backport the "sync wakeup" logic |  | ||||||
| 08f4a21 fix the stepping over syscall |  | ||||||
| a55d174 implement the stacked SYSCALL_EXIT event |  | ||||||
| ba73824 ptrace_resume: don't ignore "data" argument |  | ||||||
| fbd4368 kill context->ev_array[] |  | ||||||
| 3c6f822 Revert "ptrace_resume_signal() should use context->siginfo under ->siglock" |  | ||||||
| ee31432 Revert "UTRACE_SIGNAL_HANDLER should never see ->siginfo != NULL" |  | ||||||
| a4e5af1 Revert "introduce context_siginfo() helper" |  | ||||||
| 9bc939a revert merge w/s change |  | ||||||
| 6752625 introduce context_siginfo() helper |  | ||||||
| d43a453 UTRACE_SIGNAL_HANDLER should never see ->siginfo != NULL |  | ||||||
| e4e48df ptrace_resume_signal() should use context->siginfo under ->siglock |  | ||||||
| 4492770 implement UTRACE_SIGNAL_HANDLER stepping |  | ||||||
| 5f926a5 implement PTRACE_SINGLESTEP/PTRACE_SINGLEBLOCK |  | ||||||
| 8b70ae1 ptrace_request: use ptrace_lookup_engine() |  | ||||||
| abd580d change ptrace_resume() to have the single "return" |  | ||||||
| 85878ae introduce ptrace_lookup_engine() |  | ||||||
| 74904f1 mv task_struct->last_siginfo ptrace_context->siginfo |  | ||||||
| 2b17f4a pretens ptrace_detach(sig) works |  | ||||||
| 075db41 ptrace_report_quiesce() can't trust fatal_signal_pending() |  | ||||||
| d583c87 remove the now unneeded code |  | ||||||
| 69a6c83 break ptrace_report_signal() |  | ||||||
| d6a31ee do_ptrace_notify_stop: kill "->ev_message != 0" check |  | ||||||
| e194687 convert ptrace_report_exit() |  | ||||||
| 8bf8304 PTRACE_EVENT_VFORK_DONE: set ev_options = PTRACE_O_TRACEVFORKDONE |  | ||||||
| b8f5e2a make sure PTRACE_SYSCALL reports SYSCALL_EXIT |  | ||||||
| 258b27d make sure PTRACE_CONT "disables" SYSCALL_EXIT report |  | ||||||
| d26b659 introduce ptrace_event->ev_options |  | ||||||
| 03a0fe3 convert ptrace_report_exec() |  | ||||||
| bea6139 convert ptrace_report_syscall_entry() |  | ||||||
| 17dd96d cleanup/simplify stop/resume mess |  | ||||||
| 97fc962 utrace: comments |  | ||||||
| c661ddb utrace: move struct utrace back where it belongs |  | ||||||
| 95dcdee implement stacked stop events |  | ||||||
| 8608da6 ptrace_report_syscall_exit: do not WARN() if killed |  | ||||||
| 95a6b6b ptrace_report_clone: rework the stop/resume logic |  | ||||||
| 25dd723 remove the current PTRACE_EVENT_VFORK_DONE logic |  | ||||||
| 7d8900a ptrace_wake_up: fix the "compatibility bug" logic |  | ||||||
| 9a50d27 ptrace_report_syscall_exit: return UTRACE_STOP, not UTRACE_RESUME |  | ||||||
| c07370d simplify utrace_add_engine() vs utrace_reap() protection |  | ||||||
| 0f4d918 utrace_add_engine: cleanup |  | ||||||
| a24e891 fix utrace_reset() vs release_task() theoretical race |  | ||||||
| dfc0917 change attach/release to avoid unnecessary utrace_reap() |  | ||||||
| cbed668 utrace_attach_task: do no check ->exit_state |  | ||||||
| 9d114a6 utrace_wakeup: do not check target->state |  | ||||||
| 9368f18 utrace_wakeup: lock ->siglock directly |  | ||||||
| e9b58e9 convert ptrace_report_syscall_exit() to use ptrace_context |  | ||||||
| 1d47e4d introduce context->resume_stopped() |  | ||||||
| c34d813 introduce context->stopped_code |  | ||||||
| b7edb5e introduce ptrace_notify_stop() |  | ||||||
| 93b2e7e utrace_release_task: cosmetic |  | ||||||
| ac6e19c utrace_reap: loop lockless, do not clear ->ops and ->flags early |  | ||||||
| 7852d10 utrace: slow_path -> pending_attach |  | ||||||
| c827b15 utrace_add_engine() should set ->utrace_flags |= REAP |  | ||||||
| 2e12892 utrace_reap: fix missing callback |  | ||||||
| 04852f3 utrace: do not force report on attach |  | ||||||
| 37b68f7 kill ptrace_setoptions() and ptrace_update_utrace() |  | ||||||
| f1b39f3 use context->options instead of "->ptrace & PT_" |  | ||||||
| d05bf8e ptrace_set_options: use PTRACE_O_ instead of PT_ |  | ||||||
| 167b56a "disable" tracehook_prepare_clone() |  | ||||||
| 5e526f3 introduce ptrace_set_options() |  | ||||||
| 4a50ac1 introduce ptrace_context->options |  | ||||||
| 0457aa8 introduce the empty struct ptrace_context |  | ||||||
| a2bca6f utrace_reset: do not use "unsafe mode" |  | ||||||
| eac91f4 utrace_control: don't mark_engine_detached() before engine_wants_stop() |  | ||||||
| c2916fb utrace_control: fix utrace_reset(safe) usage when ->exit_state != 0 |  | ||||||
| c36a311 utrace_reset fix |  | ||||||
| 8d2fc04 utrace: remove unused inline |  | ||||||
| 64a8ca3 utrace_reset cleanup |  | ||||||
| d1a14ce utrace: change UTRACE_STOP bookkeeping |  | ||||||
| 96fe3cc Revert "utrace_stop: fix UTRACE_DETACH race" |  | ||||||
| ceaae71 utrace: check QUIESCE before reporting UTRACE_SIGNAL_REPORT/HANDLER |  | ||||||
| fc30d20 utrace_do_stop: move "if (exit_state)" logic to the caller |  | ||||||
| 9b655f7 utrace_do_stop: don't set ->stopped when ->exit_state |  | ||||||
| 9ed6a39 utrace_set_events: never return -EINPROGRESS on a zombie |  | ||||||
| 592d977 utrace_do_stop: cleanup the usage of ->siglock |  | ||||||
| 7f51e58 utrace: fix utrace->signal_handler "leakage" |  | ||||||
| be5e266 utrace: utrace_finish_vfork: check ->vfork_stop lockless |  | ||||||
| c3580f1 utrace-ptrace: fix conditions in ptrace_do_detach |  | ||||||
| 00932db utrace_stop: fix UTRACE_DETACH race |  | ||||||
| b032859 utrace: move utrace_stop down |  | ||||||
| a62ed15 utrace: consolidate utrace_reset callers |  | ||||||
| c8315d3 ptrace_do_detach: Fiddle code to avoid warnings. |  | ||||||
| e3635f1 utrace-ptrace: use WARN_ON(), suppress __must_check warning |  | ||||||
| 8ba59d7 ptrace_attach_task: kill ->ptrace != 0 check |  | ||||||
| a18378e exit_ptrace: use ptrace_do_detach() |  | ||||||
| 371c69c ptrace_detach: do ptrace_unlink() first |  | ||||||
| 096f3ed ptrace_detach: kill the unconditional wakeup |  | ||||||
| d999521 ptrace_report_clone: rework auto-attaching |  | ||||||
| 8cefebf move ->ptrace == 0 checks to ptrace_attach_task() |  | ||||||
| 471d6f4 utrace_engine_ops: add release hook |  | ||||||
| 78ca7e7 utrace_control: return -EINVAL for missing UTRACE_EVENT(QUIESCE) |  | ||||||
| fcb8fa0 change ptrace_traceme() to use the new helpers, kill prepare/finish attach |  | ||||||
| e82feff rework prepare_ptrace_attach/finish_ptrace_attach |  | ||||||
| 3bea38f do not use engine->data |  | ||||||
| 57cedd0 ptrace_detach_task: always do UTRACE_DETACH |  | ||||||
| 2093f3a shift ptrace_utrace_exit() from tracehook_report_exit() to exit_ptrace() |  | ||||||
| 33fb930 ptrace_resume()->send_sig() can crash |  | ||||||
| a7b05fd ptrace_check_attach: check child->parent |  | ||||||
| 5ed4eff remove (almost all) !CONFIG_UTRACE_PTRACE code |  | ||||||
| fb9379c change utrace_stop() to return void |  | ||||||
| 5bbbb41 kill utrace_report->killed |  | ||||||
| 0b57f74 finish_utrace_stop: use __fatal_signal_pending(), dont take ->siglock |  | ||||||
| 113a07e utrace: rework finish_report flag logic |  | ||||||
| 8ad60bb utrace_stop: preserve report/interrupt requests across stop/resume |  | ||||||
| af3eb44 get_utrace_lock: do not check EXIT_DEAD |  | ||||||
| d87e8c4 finish_utrace_stop: check ->stopped lockless |  | ||||||
| 3e0a686 utrace_report_jctl/utrace_get_signal: do not play with ->stopped |  | ||||||
| 7d97118 utrace_do_stop: s/STOPPED/TRACED/ to protect against SIGCONT |  | ||||||
| ad2497a use tracehook_finish_jctl() to clear ->stopped |  | ||||||
| f99db9f utrace_report_jctl: do not play with the group-stop state |  | ||||||
| fd89498 introduce tracehook_finish_jctl() helper |  | ||||||
| ff6be89 do_signal_stop: do not call tracehook_notify_jctl() in TASK_STOPPED state |  | ||||||
| 66e0705 utrace_stop: don't forget about SIGNAL_STOP_STOPPED |  | ||||||
| 2edad7d utrace_wakeup: take ->group_stop_count into account |  | ||||||
| d4bcb57 utrace_reap: clear engine->flags when finishing detach |  | ||||||
| cf890ad utrace: fix utrace->reporting left set for no callback |  | ||||||
| cbe5188 More than one user has hit the -EEXIST problem when using utrace_attach_task and UTRACE_ATTACH_EXCLUSIVE without UTRACE_ATTACH_MATCH_DATA|_OPS. Document that a bit more. |  | ||||||
| 52db080 UTRACE_SYSCALL_RESUMED repeat callback |  | ||||||
| 5e67e22 utrace docbook: s/first/last/ braino |  | ||||||
| 4bd78f8 utrace: reverse engine callback order for report_syscall_entry |  | ||||||
| 1757088 utrace: WARN instead of BUG on misuse of UTRACE_*STEP without arch_has_*_step() check |  | ||||||
| 5d4e97b utrace: restore tracehook_report_death comment misplaced in merges |  | ||||||
| cb49dcd utrace_report_syscall_entry: remove unnecessary recalc_sigpending() check |  | ||||||
| c0909b5 utrace_resume: fix potential TIF_SIGPENDING race |  | ||||||
| f0a1c64 utrace: use \t separator in /proc/pid/status |  | ||||||
| 13a5838 utrace: init_task syntax nit |  | ||||||
| 715d2a1 utrace: cosmetic |  | ||||||
| 42de707 utrace_report_jctl: do splice_attaching |  | ||||||
| 622013d utrace_resume: remove racy BUG_ON |  | ||||||
| 282d685 whitespace fix |  | ||||||
| bec92f8 signals: tracehook_notify_jctl change |  | ||||||
| a7181aa utrace: simplify death report condition |  | ||||||
| 4d8a6fd utrace: barrier between TIF_NOTIFY_RESUME check and utrace_flags/utrace->report checks |  | ||||||
| ae3096f utrace-ptrace: remove unsafe_exec and tracer_task hooks |  | ||||||
| 325fecc utrace: get rid of tracer_task and unsafe_exec hooks |  | ||||||
| 0084fc2 utrace: ensure UTRACE_REPORT callback return leads to callback after utrace_stop |  | ||||||
| 5bdc6f1 utrace: cosmetic: DEAD_FLAGS_MASK macro |  | ||||||
| 5c5bdbe utrace: cosmetic: _UTRACE_DEATH_EVENTS macro |  | ||||||
| f067223 utrace: make sure utrace_flags is nonzero before set_notify_resume at attach |  | ||||||
| e2d293e utrace: drop racy unlocked check in utrace_do_stop |  | ||||||
| 68f3899 utrace: fix ->report_jctl @notify argument |  | ||||||
| c743327 utrace: avoid unnecessary list_for_each_safe |  | ||||||
| acd516b utrace_stop: trivial, kill the unnecessary assignment |  | ||||||
| 81ed517 utrace_add_engine: add missing 'else' after 'if (utrace->reap)' |  | ||||||
| 215a076 utrace: tracehook.h comment |  | ||||||
| a584c66 utrace: fix utrace_attach_delay() creator test |  | ||||||
| 827ec3b utrace: comment ->reporting implementation |  | ||||||
| 07732b4 utrace-ptrace: handle -ERESTARTNOINTR from utrace_attach_task |  | ||||||
| 2233b06 utrace: finish utrace_reap conversion after indirect->direct struct utrace |  | ||||||
| dd30e86 utrace: fix utrace_attach_delay() to loop, remove struct utrace.cloning field |  | ||||||
| be4f357 get_utrace_lock: kill the bogus engine->kref.refcount check |  | ||||||
| c367207 utrace: clear struct in utrace_init_task |  | ||||||
| 94f168c utrace: define UTRACE_API_VERSION |  | ||||||
| 742f120 utrace: place struct utrace directly in task_struct |  | ||||||
| cb25a58 utrace: comment fixes |  | ||||||
| 2b834a5 utrace-ptrace: struct utrace_attached_engine -> struct utrace_engine |  | ||||||
| 6b8306a utrace: struct utrace_attached_engine -> struct utrace_engine |  | ||||||
| 9fe3bac utrace-ptrace: Kconfig doc update |  | ||||||
| 5bb0052 utrace: cosmetic changes |  | ||||||
| 556a7e7 utrace-ptrace: fix resuming with blocked signal |  | ||||||
| 3a9f4c8 utrace: order utrace_control() after callback return value processing |  | ||||||
| 269150d Cosmetic reorganization to further simplify utrace pointer vs embedded-struct. |  | ||||||
| ea30176 Use task_utrace_struct() helper in utrace_interrupt_pending(). |  | ||||||
| ed2098a Use task_utrace_struct() helper |  | ||||||
| 97d5cde cosmetic code reorganization |  | ||||||
| 4e8a7ca Remove UTRACE_DEBUG hacks |  | ||||||
| 25fb674 utrace: exclude PTRACE_TRACEME |  | ||||||
| f286be7 utrace-ptrace: remove utrace_engine_put stub |  | ||||||
| e0c36bd Disable mutual exclusion if CONFIG_UTRACE_PTRACE |  | ||||||
| c93d704 utrace/ptrace mutual exclusion |  | ||||||
| 594f22c cond_resched() before race-restart in utrace_attach_task |  | ||||||
| 0da72f3 Clean up utrace_attach_task code. |  | ||||||
| fd3d457 utrace: ptrace cooperation |  | ||||||
| f357a74 utrace core |  | ||||||
| ---
 |  | ||||||
|  Documentation/DocBook/Makefile    |    2 +- |  | ||||||
|  Documentation/DocBook/utrace.tmpl |  590 +++++++++ |  | ||||||
|  fs/proc/array.c                   |    3 + |  | ||||||
|  include/linux/ptrace.h            |    3 +- |  | ||||||
|  include/linux/sched.h             |    6 + |  | ||||||
|  include/linux/tracehook.h         |   97 ++- |  | ||||||
|  include/linux/utrace.h            |  692 +++++++++++ |  | ||||||
|  init/Kconfig                      |    9 + |  | ||||||
|  kernel/Makefile                   |    2 + |  | ||||||
|  kernel/fork.c                     |    3 + |  | ||||||
|  kernel/ptrace-utrace.c            | 1127 +++++++++++++++++ |  | ||||||
|  kernel/ptrace.c                   |  620 +++++----- |  | ||||||
|  kernel/signal.c                   |    4 +- |  | ||||||
|  kernel/utrace.c                   | 2452 +++++++++++++++++++++++++++++++++++++ |  | ||||||
|  14 files changed, 5291 insertions(+), 319 deletions(-) |  | ||||||
|  create mode 100644 Documentation/DocBook/utrace.tmpl |  | ||||||
|  create mode 100644 include/linux/utrace.h |  | ||||||
|  create mode 100644 kernel/ptrace-utrace.c |  | ||||||
|  create mode 100644 kernel/utrace.c |  | ||||||
| 
 |  | ||||||
| diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
 | diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
 | ||||||
| index c7e5dc7..e63f889 100644
 | index 34929f2..884c36b 100644
 | ||||||
| --- a/Documentation/DocBook/Makefile
 | --- a/Documentation/DocBook/Makefile
 | ||||||
| +++ b/Documentation/DocBook/Makefile
 | +++ b/Documentation/DocBook/Makefile
 | ||||||
| @@ -14,7 +14,7 @@ DOCBOOKS := z8530book.xml mcabook.xml device-drivers.xml \
 | @@ -14,7 +14,7 @@ DOCBOOKS := z8530book.xml mcabook.xml device-drivers.xml \
 | ||||||
| @ -356,10 +13,10 @@ index c7e5dc7..e63f889 100644 | |||||||
|  # The build process is as follows (targets): |  # The build process is as follows (targets): | ||||||
| diff --git a/Documentation/DocBook/utrace.tmpl b/Documentation/DocBook/utrace.tmpl
 | diff --git a/Documentation/DocBook/utrace.tmpl b/Documentation/DocBook/utrace.tmpl
 | ||||||
| new file mode 100644 | new file mode 100644 | ||||||
| index 0000000..e149f49
 | index 0000000..0c40add
 | ||||||
| --- /dev/null
 | --- /dev/null
 | ||||||
| +++ b/Documentation/DocBook/utrace.tmpl
 | +++ b/Documentation/DocBook/utrace.tmpl
 | ||||||
| @@ -0,0 +1,590 @@
 | @@ -0,0 +1,589 @@
 | ||||||
| +<?xml version="1.0" encoding="UTF-8"?>
 | +<?xml version="1.0" encoding="UTF-8"?>
 | ||||||
| +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
 | +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
 | ||||||
| +"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
 | +"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
 | ||||||
| @ -719,13 +376,12 @@ index 0000000..e149f49 | |||||||
| +    after a successful call, no event callbacks not requested in the new
 | +    after a successful call, no event callbacks not requested in the new
 | ||||||
| +    flags will be made.  It fails with <constant>-EALREADY</constant> if
 | +    flags will be made.  It fails with <constant>-EALREADY</constant> if
 | ||||||
| +    you try to clear <constant>UTRACE_EVENT(DEATH)</constant> when the
 | +    you try to clear <constant>UTRACE_EVENT(DEATH)</constant> when the
 | ||||||
| +    <function>report_death</function> callback may already have begun, if
 | +    <function>report_death</function> callback may already have begun, or if
 | ||||||
| +    you try to clear <constant>UTRACE_EVENT(REAP)</constant> when the
 |  | ||||||
| +    <function>report_reap</function> callback may already have begun, or if
 |  | ||||||
| +    you try to newly set <constant>UTRACE_EVENT(DEATH)</constant> or
 | +    you try to newly set <constant>UTRACE_EVENT(DEATH)</constant> or
 | ||||||
| +    <constant>UTRACE_EVENT(QUIESCE)</constant> when the target is already
 | +    <constant>UTRACE_EVENT(QUIESCE)</constant> when the target is already
 | ||||||
| +    dead or dying.  Like <function>utrace_control</function>, it returns
 | +    dead or dying.  Like <function>utrace_control</function>, it returns
 | ||||||
| +    <constant>-ESRCH</constant> when the thread has already been detached
 | +    <constant>-ESRCH</constant> when the <function>report_reap</function>
 | ||||||
|  | +    callback may already have begun, or the thread has already been detached
 | ||||||
| +    (including forcible detach on reaping).  This lets the tracing engine
 | +    (including forcible detach on reaping).  This lets the tracing engine
 | ||||||
| +    know for sure which event callbacks it will or won't see after
 | +    know for sure which event callbacks it will or won't see after
 | ||||||
| +    <function>utrace_set_events</function> has returned.  By checking for
 | +    <function>utrace_set_events</function> has returned.  By checking for
 | ||||||
| @ -951,7 +607,7 @@ index 0000000..e149f49 | |||||||
| +
 | +
 | ||||||
| +</book>
 | +</book>
 | ||||||
| diff --git a/fs/proc/array.c b/fs/proc/array.c
 | diff --git a/fs/proc/array.c b/fs/proc/array.c
 | ||||||
| index 9b58d38..c7c7881 100644
 | index fff6572..a67bd83 100644
 | ||||||
| --- a/fs/proc/array.c
 | --- a/fs/proc/array.c
 | ||||||
| +++ b/fs/proc/array.c
 | +++ b/fs/proc/array.c
 | ||||||
| @@ -81,6 +81,7 @@
 | @@ -81,6 +81,7 @@
 | ||||||
| @ -991,10 +647,10 @@ index 4272521..235c1b0 100644 | |||||||
|  extern void ptrace_disable(struct task_struct *); |  extern void ptrace_disable(struct task_struct *); | ||||||
|  extern int ptrace_check_attach(struct task_struct *task, int kill); |  extern int ptrace_check_attach(struct task_struct *task, int kill); | ||||||
| diff --git a/include/linux/sched.h b/include/linux/sched.h
 | diff --git a/include/linux/sched.h b/include/linux/sched.h
 | ||||||
| index f118809..d3fef7a 100644
 | index ce160d6..66a1ec8 100644
 | ||||||
| --- a/include/linux/sched.h
 | --- a/include/linux/sched.h
 | ||||||
| +++ b/include/linux/sched.h
 | +++ b/include/linux/sched.h
 | ||||||
| @@ -1348,6 +1348,11 @@ struct task_struct {
 | @@ -1339,6 +1339,11 @@ struct task_struct {
 | ||||||
|  #endif |  #endif | ||||||
|  	seccomp_t seccomp; |  	seccomp_t seccomp; | ||||||
|   |   | ||||||
| @ -1006,7 +662,7 @@ index f118809..d3fef7a 100644 | |||||||
|  /* Thread group tracking */ |  /* Thread group tracking */ | ||||||
|     	u32 parent_exec_id; |     	u32 parent_exec_id; | ||||||
|     	u32 self_exec_id; |     	u32 self_exec_id; | ||||||
| @@ -2033,6 +2038,7 @@ extern int kill_pgrp(struct pid *pid, int sig, int priv);
 | @@ -2030,6 +2035,7 @@ extern int kill_pgrp(struct pid *pid, int sig, int priv);
 | ||||||
|  extern int kill_pid(struct pid *pid, int sig, int priv); |  extern int kill_pid(struct pid *pid, int sig, int priv); | ||||||
|  extern int kill_proc_info(int, struct siginfo *, pid_t); |  extern int kill_proc_info(int, struct siginfo *, pid_t); | ||||||
|  extern int do_notify_parent(struct task_struct *, int); |  extern int do_notify_parent(struct task_struct *, int); | ||||||
| @ -1975,12 +1631,12 @@ index 0000000..f251efe | |||||||
| +
 | +
 | ||||||
| +#endif	/* linux/utrace.h */
 | +#endif	/* linux/utrace.h */
 | ||||||
| diff --git a/init/Kconfig b/init/Kconfig
 | diff --git a/init/Kconfig b/init/Kconfig
 | ||||||
| index 5cff9a9..c0b7f81 100644
 | index 2de5b1c..a283086 100644
 | ||||||
| --- a/init/Kconfig
 | --- a/init/Kconfig
 | ||||||
| +++ b/init/Kconfig
 | +++ b/init/Kconfig
 | ||||||
| @@ -328,6 +328,15 @@ config AUDIT_TREE
 | @@ -332,6 +332,15 @@ config AUDIT_TREE
 | ||||||
|  	depends on AUDITSYSCALL |  	depends on AUDITSYSCALL | ||||||
|  	select INOTIFY |  	select FSNOTIFY | ||||||
|   |   | ||||||
| +config UTRACE
 | +config UTRACE
 | ||||||
| +	bool "Infrastructure for tracing and debugging user processes"
 | +	bool "Infrastructure for tracing and debugging user processes"
 | ||||||
| @ -1995,7 +1651,7 @@ index 5cff9a9..c0b7f81 100644 | |||||||
|   |   | ||||||
|  choice |  choice | ||||||
| diff --git a/kernel/Makefile b/kernel/Makefile
 | diff --git a/kernel/Makefile b/kernel/Makefile
 | ||||||
| index 057472f..dfdc01c 100644
 | index 0b72d1a..b09c9a5 100644
 | ||||||
| --- a/kernel/Makefile
 | --- a/kernel/Makefile
 | ||||||
| +++ b/kernel/Makefile
 | +++ b/kernel/Makefile
 | ||||||
| @@ -70,6 +70,8 @@ obj-$(CONFIG_IKCONFIG) += configs.o
 | @@ -70,6 +70,8 @@ obj-$(CONFIG_IKCONFIG) += configs.o
 | ||||||
| @ -2004,11 +1660,11 @@ index 057472f..dfdc01c 100644 | |||||||
|  obj-$(CONFIG_KPROBES_SANITY_TEST) += test_kprobes.o |  obj-$(CONFIG_KPROBES_SANITY_TEST) += test_kprobes.o | ||||||
| +obj-$(CONFIG_UTRACE) += utrace.o
 | +obj-$(CONFIG_UTRACE) += utrace.o
 | ||||||
| +obj-$(CONFIG_UTRACE) += ptrace-utrace.o
 | +obj-$(CONFIG_UTRACE) += ptrace-utrace.o
 | ||||||
|  obj-$(CONFIG_AUDIT) += audit.o auditfilter.o audit_watch.o |  obj-$(CONFIG_AUDIT) += audit.o auditfilter.o | ||||||
|  obj-$(CONFIG_AUDITSYSCALL) += auditsc.o |  obj-$(CONFIG_AUDITSYSCALL) += auditsc.o | ||||||
|  obj-$(CONFIG_GCOV_KERNEL) += gcov/ |  obj-$(CONFIG_AUDIT_WATCH) += audit_watch.o | ||||||
| diff --git a/kernel/fork.c b/kernel/fork.c
 | diff --git a/kernel/fork.c b/kernel/fork.c
 | ||||||
| index b6cce14..ac4a6ec 100644
 | index 98b4508..3ceff6f 100644
 | ||||||
| --- a/kernel/fork.c
 | --- a/kernel/fork.c
 | ||||||
| +++ b/kernel/fork.c
 | +++ b/kernel/fork.c
 | ||||||
| @@ -161,6 +161,7 @@ void free_task(struct task_struct *tsk)
 | @@ -161,6 +161,7 @@ void free_task(struct task_struct *tsk)
 | ||||||
| @ -2019,7 +1675,7 @@ index b6cce14..ac4a6ec 100644 | |||||||
|  	free_task_struct(tsk); |  	free_task_struct(tsk); | ||||||
|  } |  } | ||||||
|  EXPORT_SYMBOL(free_task); |  EXPORT_SYMBOL(free_task); | ||||||
| @@ -1007,6 +1008,8 @@ static struct task_struct *copy_process(unsigned long clone_flags,
 | @@ -1008,6 +1009,8 @@ static struct task_struct *copy_process(unsigned long clone_flags,
 | ||||||
|  	if (!p) |  	if (!p) | ||||||
|  		goto fork_out; |  		goto fork_out; | ||||||
|   |   | ||||||
| @ -2030,10 +1686,10 @@ index b6cce14..ac4a6ec 100644 | |||||||
|  	rt_mutex_init_task(p); |  	rt_mutex_init_task(p); | ||||||
| diff --git a/kernel/ptrace-utrace.c b/kernel/ptrace-utrace.c
 | diff --git a/kernel/ptrace-utrace.c b/kernel/ptrace-utrace.c
 | ||||||
| new file mode 100644 | new file mode 100644 | ||||||
| index 0000000..86234ee
 | index 0000000..1a8ba5e
 | ||||||
| --- /dev/null
 | --- /dev/null
 | ||||||
| +++ b/kernel/ptrace-utrace.c
 | +++ b/kernel/ptrace-utrace.c
 | ||||||
| @@ -0,0 +1,1127 @@
 | @@ -0,0 +1,1125 @@
 | ||||||
| +/*
 | +/*
 | ||||||
| + * linux/kernel/ptrace.c
 | + * linux/kernel/ptrace.c
 | ||||||
| + *
 | + *
 | ||||||
| @ -2086,8 +1742,6 @@ index 0000000..86234ee | |||||||
| +	child->ptrace = 0;
 | +	child->ptrace = 0;
 | ||||||
| +	child->parent = child->real_parent;
 | +	child->parent = child->real_parent;
 | ||||||
| +	list_del_init(&child->ptrace_entry);
 | +	list_del_init(&child->ptrace_entry);
 | ||||||
| +
 |  | ||||||
| +	arch_ptrace_untrace(child);
 |  | ||||||
| +}
 | +}
 | ||||||
| +
 | +
 | ||||||
| +struct ptrace_context {
 | +struct ptrace_context {
 | ||||||
| @ -3162,7 +2816,7 @@ index 0000000..86234ee | |||||||
| +}
 | +}
 | ||||||
| +#endif	/* CONFIG_COMPAT */
 | +#endif	/* CONFIG_COMPAT */
 | ||||||
| diff --git a/kernel/ptrace.c b/kernel/ptrace.c
 | diff --git a/kernel/ptrace.c b/kernel/ptrace.c
 | ||||||
| index 74a3d69..c77f9bf 100644
 | index f34d798..daed9e8 100644
 | ||||||
| --- a/kernel/ptrace.c
 | --- a/kernel/ptrace.c
 | ||||||
| +++ b/kernel/ptrace.c
 | +++ b/kernel/ptrace.c
 | ||||||
| @@ -23,7 +23,317 @@
 | @@ -23,7 +23,317 @@
 | ||||||
| @ -3417,7 +3071,7 @@ index 74a3d69..c77f9bf 100644 | |||||||
| + out:
 | + out:
 | ||||||
| +	return ret;
 | +	return ret;
 | ||||||
| +}
 | +}
 | ||||||
| +
 |   | ||||||
| +int generic_ptrace_peekdata(struct task_struct *tsk, long addr, long data)
 | +int generic_ptrace_peekdata(struct task_struct *tsk, long addr, long data)
 | ||||||
| +{
 | +{
 | ||||||
| +	unsigned long tmp;
 | +	unsigned long tmp;
 | ||||||
| @ -3478,7 +3132,7 @@ index 74a3d69..c77f9bf 100644 | |||||||
| +	return ret;
 | +	return ret;
 | ||||||
| +}
 | +}
 | ||||||
| +#endif	/* CONFIG_COMPAT */
 | +#endif	/* CONFIG_COMPAT */
 | ||||||
|   | +
 | ||||||
| +#ifndef CONFIG_UTRACE
 | +#ifndef CONFIG_UTRACE
 | ||||||
|  /* |  /* | ||||||
|   * ptrace a task: make the debugger its new parent and |   * ptrace a task: make the debugger its new parent and | ||||||
| @ -3537,10 +3191,47 @@ index 74a3d69..c77f9bf 100644 | |||||||
|  int ptrace_attach(struct task_struct *task) |  int ptrace_attach(struct task_struct *task) | ||||||
|  { |  { | ||||||
|  	int retval; |  	int retval; | ||||||
| @@ -242,57 +505,6 @@ int ptrace_traceme(void)
 | @@ -205,92 +468,41 @@ int ptrace_attach(struct task_struct *task)
 | ||||||
|  	return ret; |  	send_sig_info(SIGSTOP, SEND_SIG_FORCED, task); | ||||||
|  } |  | ||||||
|   |   | ||||||
|  |  	retval = 0; | ||||||
|  | -unlock_tasklist:
 | ||||||
|  | -	write_unlock_irq(&tasklist_lock);
 | ||||||
|  | -unlock_creds:
 | ||||||
|  | -	mutex_unlock(&task->cred_guard_mutex);
 | ||||||
|  | -out:
 | ||||||
|  | -	return retval;
 | ||||||
|  | -}
 | ||||||
|  | -
 | ||||||
|  | -/**
 | ||||||
|  | - * ptrace_traceme  --  helper for PTRACE_TRACEME
 | ||||||
|  | - *
 | ||||||
|  | - * Performs checks and sets PT_PTRACED.
 | ||||||
|  | - * Should be used by all ptrace implementations for PTRACE_TRACEME.
 | ||||||
|  | - */
 | ||||||
|  | -int ptrace_traceme(void)
 | ||||||
|  | -{
 | ||||||
|  | -	int ret = -EPERM;
 | ||||||
|  | -
 | ||||||
|  | -	write_lock_irq(&tasklist_lock);
 | ||||||
|  | -	/* Are we already being traced? */
 | ||||||
|  | -	if (!current->ptrace) {
 | ||||||
|  | -		ret = security_ptrace_traceme(current->parent);
 | ||||||
|  | -		/*
 | ||||||
|  | -		 * Check PF_EXITING to ensure ->real_parent has not passed
 | ||||||
|  | -		 * exit_ptrace(). Otherwise we don't report the error but
 | ||||||
|  | -		 * pretend ->real_parent untraces us right after return.
 | ||||||
|  | -		 */
 | ||||||
|  | -		if (!ret && !(current->real_parent->flags & PF_EXITING)) {
 | ||||||
|  | -			current->ptrace = PT_PTRACED;
 | ||||||
|  | -			__ptrace_link(current, current->real_parent);
 | ||||||
|  | -		}
 | ||||||
|  | -	}
 | ||||||
|  | -	write_unlock_irq(&tasklist_lock);
 | ||||||
|  | -
 | ||||||
|  | -	return ret;
 | ||||||
|  | -}
 | ||||||
|  | -
 | ||||||
| -/*
 | -/*
 | ||||||
| - * Called with irqs disabled, returns true if childs should reap themselves.
 | - * Called with irqs disabled, returns true if childs should reap themselves.
 | ||||||
| - */
 | - */
 | ||||||
| @ -3563,16 +3254,30 @@ index 74a3d69..c77f9bf 100644 | |||||||
| - * If it's a zombie, our attachedness prevented normal parent notification
 | - * If it's a zombie, our attachedness prevented normal parent notification
 | ||||||
| - * or self-reaping.  Do notification now if it would have happened earlier.
 | - * or self-reaping.  Do notification now if it would have happened earlier.
 | ||||||
| - * If it should reap itself, return true.
 | - * If it should reap itself, return true.
 | ||||||
| - *
 | +unlock_tasklist:
 | ||||||
|  | +	write_unlock_irq(&tasklist_lock);
 | ||||||
|  | +unlock_creds:
 | ||||||
|  | +	mutex_unlock(&task->cred_guard_mutex);
 | ||||||
|  | +out:
 | ||||||
|  | +	return retval;
 | ||||||
|  | +}
 | ||||||
|  | +
 | ||||||
|  | +/**
 | ||||||
|  | + * ptrace_traceme  --  helper for PTRACE_TRACEME
 | ||||||
|  |   * | ||||||
| - * If it's our own child, there is no notification to do. But if our normal
 | - * If it's our own child, there is no notification to do. But if our normal
 | ||||||
| - * children self-reap, then this child was prevented by ptrace and we must
 | - * children self-reap, then this child was prevented by ptrace and we must
 | ||||||
| - * reap it now, in that case we must also wake up sub-threads sleeping in
 | - * reap it now, in that case we must also wake up sub-threads sleeping in
 | ||||||
| - * do_wait().
 | - * do_wait().
 | ||||||
| - */
 | + * Performs checks and sets PT_PTRACED.
 | ||||||
|  | + * Should be used by all ptrace implementations for PTRACE_TRACEME.
 | ||||||
|  |   */ | ||||||
| -static bool __ptrace_detach(struct task_struct *tracer, struct task_struct *p)
 | -static bool __ptrace_detach(struct task_struct *tracer, struct task_struct *p)
 | ||||||
| -{
 | +int ptrace_traceme(void)
 | ||||||
|  |  { | ||||||
| -	__ptrace_unlink(p);
 | -	__ptrace_unlink(p);
 | ||||||
| -
 | +	int ret = -EPERM;
 | ||||||
|  |   | ||||||
| -	if (p->exit_state == EXIT_ZOMBIE) {
 | -	if (p->exit_state == EXIT_ZOMBIE) {
 | ||||||
| -		if (!task_detached(p) && thread_group_empty(p)) {
 | -		if (!task_detached(p) && thread_group_empty(p)) {
 | ||||||
| -			if (!same_thread_group(p->real_parent, tracer))
 | -			if (!same_thread_group(p->real_parent, tracer))
 | ||||||
| @ -3586,18 +3291,30 @@ index 74a3d69..c77f9bf 100644 | |||||||
| -			/* Mark it as in the process of being reaped. */
 | -			/* Mark it as in the process of being reaped. */
 | ||||||
| -			p->exit_state = EXIT_DEAD;
 | -			p->exit_state = EXIT_DEAD;
 | ||||||
| -			return true;
 | -			return true;
 | ||||||
| -		}
 | +	write_lock_irq(&tasklist_lock);
 | ||||||
| -	}
 | +	/* Are we already being traced? */
 | ||||||
| -
 | +	if (!current->ptrace) {
 | ||||||
| -	return false;
 | +		ret = security_ptrace_traceme(current->parent);
 | ||||||
| -}
 | +		/*
 | ||||||
| -
 | +		 * Check PF_EXITING to ensure ->real_parent has not passed
 | ||||||
|  int ptrace_detach(struct task_struct *child, unsigned int data) | +		 * exit_ptrace(). Otherwise we don't report the error but
 | ||||||
|  { | +		 * pretend ->real_parent untraces us right after return.
 | ||||||
|  	bool dead = false; | +		 */
 | ||||||
| @@ -346,56 +558,6 @@ void exit_ptrace(struct task_struct *tracer)
 | +		if (!ret && !(current->real_parent->flags & PF_EXITING)) {
 | ||||||
|  | +			current->ptrace = PT_PTRACED;
 | ||||||
|  | +			__ptrace_link(current, current->real_parent);
 | ||||||
|  		} |  		} | ||||||
|  	} |  	} | ||||||
|  | +	write_unlock_irq(&tasklist_lock);
 | ||||||
|  |   | ||||||
|  | -	return false;
 | ||||||
|  | +	return ret;
 | ||||||
|  |  } | ||||||
|  |   | ||||||
|  |  int ptrace_detach(struct task_struct *child, unsigned int data) | ||||||
|  | @@ -352,56 +564,6 @@ void exit_ptrace(struct task_struct *tracer)
 | ||||||
|  |  	write_lock_irq(&tasklist_lock); | ||||||
|  |  } | ||||||
|   |   | ||||||
| -int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len)
 | -int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len)
 | ||||||
| -{
 | -{
 | ||||||
| @ -3652,7 +3369,7 @@ index 74a3d69..c77f9bf 100644 | |||||||
|  static int ptrace_setoptions(struct task_struct *child, long data) |  static int ptrace_setoptions(struct task_struct *child, long data) | ||||||
|  { |  { | ||||||
|  	child->ptrace &= ~PT_TRACE_MASK; |  	child->ptrace &= ~PT_TRACE_MASK; | ||||||
| @@ -456,7 +618,6 @@ static int ptrace_setsiginfo(struct task_struct *child, const siginfo_t *info)
 | @@ -462,7 +624,6 @@ static int ptrace_setsiginfo(struct task_struct *child, const siginfo_t *info)
 | ||||||
|  	return error; |  	return error; | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @ -3660,7 +3377,7 @@ index 74a3d69..c77f9bf 100644 | |||||||
|  #ifdef PTRACE_SINGLESTEP |  #ifdef PTRACE_SINGLESTEP | ||||||
|  #define is_singlestep(request)		((request) == PTRACE_SINGLESTEP) |  #define is_singlestep(request)		((request) == PTRACE_SINGLESTEP) | ||||||
|  #else |  #else | ||||||
| @@ -510,47 +671,6 @@ static int ptrace_resume(struct task_struct *child, long request, long data)
 | @@ -516,47 +677,6 @@ static int ptrace_resume(struct task_struct *child, long request, long data)
 | ||||||
|  	return 0; |  	return 0; | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @ -3708,7 +3425,7 @@ index 74a3d69..c77f9bf 100644 | |||||||
|  int ptrace_request(struct task_struct *child, long request, |  int ptrace_request(struct task_struct *child, long request, | ||||||
|  		   long addr, long data) |  		   long addr, long data) | ||||||
|  { |  { | ||||||
| @@ -666,88 +786,7 @@ int ptrace_request(struct task_struct *child, long request,
 | @@ -672,88 +792,7 @@ int ptrace_request(struct task_struct *child, long request,
 | ||||||
|  	return ret; |  	return ret; | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @ -3797,7 +3514,7 @@ index 74a3d69..c77f9bf 100644 | |||||||
|  int compat_ptrace_request(struct task_struct *child, compat_long_t request, |  int compat_ptrace_request(struct task_struct *child, compat_long_t request, | ||||||
|  			  compat_ulong_t addr, compat_ulong_t data) |  			  compat_ulong_t addr, compat_ulong_t data) | ||||||
|  { |  { | ||||||
| @@ -825,42 +864,5 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request,
 | @@ -831,42 +870,5 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request,
 | ||||||
|   |   | ||||||
|  	return ret; |  	return ret; | ||||||
|  } |  } | ||||||
| @ -3842,10 +3559,10 @@ index 74a3d69..c77f9bf 100644 | |||||||
|  #endif	/* CONFIG_COMPAT */ |  #endif	/* CONFIG_COMPAT */ | ||||||
| +#endif	/* CONFIG_UTRACE */
 | +#endif	/* CONFIG_UTRACE */
 | ||||||
| diff --git a/kernel/signal.c b/kernel/signal.c
 | diff --git a/kernel/signal.c b/kernel/signal.c
 | ||||||
| index 906ae5a..8087f13 100644
 | index bded651..6d13d9f 100644
 | ||||||
| --- a/kernel/signal.c
 | --- a/kernel/signal.c
 | ||||||
| +++ b/kernel/signal.c
 | +++ b/kernel/signal.c
 | ||||||
| @@ -1518,7 +1518,7 @@ int do_notify_parent(struct task_struct *tsk, int sig)
 | @@ -1521,7 +1521,7 @@ int do_notify_parent(struct task_struct *tsk, int sig)
 | ||||||
|  	return ret; |  	return ret; | ||||||
|  } |  } | ||||||
|   |   | ||||||
| @ -3854,7 +3571,7 @@ index 906ae5a..8087f13 100644 | |||||||
|  { |  { | ||||||
|  	struct siginfo info; |  	struct siginfo info; | ||||||
|  	unsigned long flags; |  	unsigned long flags; | ||||||
| @@ -1788,7 +1788,7 @@ static int do_signal_stop(int signr)
 | @@ -1791,7 +1791,7 @@ static int do_signal_stop(int signr)
 | ||||||
|  static int ptrace_signal(int signr, siginfo_t *info, |  static int ptrace_signal(int signr, siginfo_t *info, | ||||||
|  			 struct pt_regs *regs, void *cookie) |  			 struct pt_regs *regs, void *cookie) | ||||||
|  { |  { | ||||||
| @ -3865,10 +3582,10 @@ index 906ae5a..8087f13 100644 | |||||||
|  	ptrace_signal_deliver(regs, cookie); |  	ptrace_signal_deliver(regs, cookie); | ||||||
| diff --git a/kernel/utrace.c b/kernel/utrace.c
 | diff --git a/kernel/utrace.c b/kernel/utrace.c
 | ||||||
| new file mode 100644 | new file mode 100644 | ||||||
| index 0000000..f5a9e2c
 | index 0000000..4d61096
 | ||||||
| --- /dev/null
 | --- /dev/null
 | ||||||
| +++ b/kernel/utrace.c
 | +++ b/kernel/utrace.c
 | ||||||
| @@ -0,0 +1,2452 @@
 | @@ -0,0 +1,2450 @@
 | ||||||
| +/*
 | +/*
 | ||||||
| + * utrace infrastructure interface for debugging user processes
 | + * utrace infrastructure interface for debugging user processes
 | ||||||
| + *
 | + *
 | ||||||
| @ -4099,6 +3816,7 @@ index 0000000..f5a9e2c | |||||||
| +	 */
 | +	 */
 | ||||||
| +	list_add_tail(&engine->entry, &utrace->attaching);
 | +	list_add_tail(&engine->entry, &utrace->attaching);
 | ||||||
| +	utrace->pending_attach = 1;
 | +	utrace->pending_attach = 1;
 | ||||||
|  | +	utrace_engine_get(engine);
 | ||||||
| +	ret = 0;
 | +	ret = 0;
 | ||||||
| +unlock:
 | +unlock:
 | ||||||
| +	spin_unlock(&utrace->lock);
 | +	spin_unlock(&utrace->lock);
 | ||||||
| @ -4172,10 +3890,10 @@ index 0000000..f5a9e2c | |||||||
| +		return ERR_PTR(-ENOMEM);
 | +		return ERR_PTR(-ENOMEM);
 | ||||||
| +
 | +
 | ||||||
| +	/*
 | +	/*
 | ||||||
| +	 * Initialize the new engine structure.  It starts out with two
 | +	 * Initialize the new engine structure.  It starts out with one ref
 | ||||||
| +	 * refs: one ref to return, and one ref for being attached.
 | +	 * to return.  utrace_add_engine() adds another for being attached.
 | ||||||
| +	 */
 | +	 */
 | ||||||
| +	kref_set(&engine->kref, 2);
 | +	kref_init(&engine->kref);
 | ||||||
| +	engine->flags = 0;
 | +	engine->flags = 0;
 | ||||||
| +	engine->ops = ops;
 | +	engine->ops = ops;
 | ||||||
| +	engine->data = data;
 | +	engine->data = data;
 | ||||||
| @ -4188,6 +3906,7 @@ index 0000000..f5a9e2c | |||||||
| +		engine = ERR_PTR(ret);
 | +		engine = ERR_PTR(ret);
 | ||||||
| +	}
 | +	}
 | ||||||
| +
 | +
 | ||||||
|  | +
 | ||||||
| +	return engine;
 | +	return engine;
 | ||||||
| +}
 | +}
 | ||||||
| +EXPORT_SYMBOL_GPL(utrace_attach_task);
 | +EXPORT_SYMBOL_GPL(utrace_attach_task);
 | ||||||
| @ -4292,7 +4011,7 @@ index 0000000..f5a9e2c | |||||||
| +
 | +
 | ||||||
| +	utrace = task_utrace_struct(target);
 | +	utrace = task_utrace_struct(target);
 | ||||||
| +	spin_lock(&utrace->lock);
 | +	spin_lock(&utrace->lock);
 | ||||||
| +	if (unlikely(!engine->ops) ||
 | +	if (unlikely(utrace->reap) || unlikely(!engine->ops) ||
 | ||||||
| +	    unlikely(engine->ops == &utrace_detached_ops)) {
 | +	    unlikely(engine->ops == &utrace_detached_ops)) {
 | ||||||
| +		/*
 | +		/*
 | ||||||
| +		 * By the time we got the utrace lock,
 | +		 * By the time we got the utrace lock,
 | ||||||
| @ -4358,13 +4077,12 @@ index 0000000..f5a9e2c | |||||||
| + *
 | + *
 | ||||||
| + * This fails with -%EALREADY and does nothing if you try to clear
 | + * This fails with -%EALREADY and does nothing if you try to clear
 | ||||||
| + * %UTRACE_EVENT(%DEATH) when the @report_death callback may already have
 | + * %UTRACE_EVENT(%DEATH) when the @report_death callback may already have
 | ||||||
| + * begun, if you try to clear %UTRACE_EVENT(%REAP) when the @report_reap
 | + * begun, or if you try to newly set %UTRACE_EVENT(%DEATH) or
 | ||||||
| + * callback may already have begun, or if you try to newly set
 | + * %UTRACE_EVENT(%QUIESCE) when @target is already dead or dying.
 | ||||||
| + * %UTRACE_EVENT(%DEATH) or %UTRACE_EVENT(%QUIESCE) when @target is
 |  | ||||||
| + * already dead or dying.
 |  | ||||||
| + *
 | + *
 | ||||||
| + * This can fail with -%ESRCH when @target has already been detached,
 | + * This fails with -%ESRCH if you try to clear %UTRACE_EVENT(%REAP) when
 | ||||||
| + * including forcible detach on reaping.
 | + * the @report_reap callback may already have begun, or when @target has
 | ||||||
|  | + * already been detached, including forcible detach on reaping.
 | ||||||
| + *
 | + *
 | ||||||
| + * If @target was stopped before the call, then after a successful call,
 | + * If @target was stopped before the call, then after a successful call,
 | ||||||
| + * no event callbacks not requested in @events will be made; if
 | + * no event callbacks not requested in @events will be made; if
 | ||||||
| @ -4395,7 +4113,7 @@ index 0000000..f5a9e2c | |||||||
| +{
 | +{
 | ||||||
| +	struct utrace *utrace;
 | +	struct utrace *utrace;
 | ||||||
| +	unsigned long old_flags, old_utrace_flags;
 | +	unsigned long old_flags, old_utrace_flags;
 | ||||||
| +	int ret;
 | +	int ret = -EALREADY;
 | ||||||
| +
 | +
 | ||||||
| +	/*
 | +	/*
 | ||||||
| +	 * We just ignore the internal bit, so callers can use
 | +	 * We just ignore the internal bit, so callers can use
 | ||||||
| @ -4410,14 +4128,12 @@ index 0000000..f5a9e2c | |||||||
| +	old_utrace_flags = target->utrace_flags;
 | +	old_utrace_flags = target->utrace_flags;
 | ||||||
| +	old_flags = engine->flags & ~ENGINE_STOP;
 | +	old_flags = engine->flags & ~ENGINE_STOP;
 | ||||||
| +
 | +
 | ||||||
| +	if (target->exit_state &&
 | +	/*
 | ||||||
| +	    (((events & ~old_flags) & _UTRACE_DEATH_EVENTS) ||
 | +	 * If utrace_report_death() is already progress now,
 | ||||||
| +	     (utrace->death &&
 | +	 * it's too late to clear the death event bits.
 | ||||||
| +	      ((old_flags & ~events) & _UTRACE_DEATH_EVENTS)) ||
 | +	 */
 | ||||||
| +	     (utrace->reap && ((old_flags & ~events) & UTRACE_EVENT(REAP))))) {
 | +	if (((old_flags & ~events) & _UTRACE_DEATH_EVENTS) && utrace->death)
 | ||||||
| +		spin_unlock(&utrace->lock);
 | +		goto unlock;
 | ||||||
| +		return -EALREADY;
 |  | ||||||
| +	}
 |  | ||||||
| +
 | +
 | ||||||
| +	/*
 | +	/*
 | ||||||
| +	 * When setting these flags, it's essential that we really
 | +	 * When setting these flags, it's essential that we really
 | ||||||
| @ -4429,12 +4145,11 @@ index 0000000..f5a9e2c | |||||||
| +	 * knows positively that utrace_report_death() will be called or
 | +	 * knows positively that utrace_report_death() will be called or
 | ||||||
| +	 * that it won't.
 | +	 * that it won't.
 | ||||||
| +	 */
 | +	 */
 | ||||||
| +	if ((events & ~old_utrace_flags) & _UTRACE_DEATH_EVENTS) {
 | +	if ((events & ~old_flags) & _UTRACE_DEATH_EVENTS) {
 | ||||||
| +		read_lock(&tasklist_lock);
 | +		read_lock(&tasklist_lock);
 | ||||||
| +		if (unlikely(target->exit_state)) {
 | +		if (unlikely(target->exit_state)) {
 | ||||||
| +			read_unlock(&tasklist_lock);
 | +			read_unlock(&tasklist_lock);
 | ||||||
| +			spin_unlock(&utrace->lock);
 | +			goto unlock;
 | ||||||
| +			return -EALREADY;
 |  | ||||||
| +		}
 | +		}
 | ||||||
| +		target->utrace_flags |= events;
 | +		target->utrace_flags |= events;
 | ||||||
| +		read_unlock(&tasklist_lock);
 | +		read_unlock(&tasklist_lock);
 | ||||||
| @ -4462,7 +4177,7 @@ index 0000000..f5a9e2c | |||||||
| +		if (utrace->reporting == engine)
 | +		if (utrace->reporting == engine)
 | ||||||
| +			ret = -EINPROGRESS;
 | +			ret = -EINPROGRESS;
 | ||||||
| +	}
 | +	}
 | ||||||
| +
 | +unlock:
 | ||||||
| +	spin_unlock(&utrace->lock);
 | +	spin_unlock(&utrace->lock);
 | ||||||
| +
 | +
 | ||||||
| +	return ret;
 | +	return ret;
 | ||||||
| @ -6321,6 +6036,3 @@ index 0000000..f5a9e2c | |||||||
| +{
 | +{
 | ||||||
| +	seq_printf(m, "Utrace:\t%lx\n", p->utrace_flags);
 | +	seq_printf(m, "Utrace:\t%lx\n", p->utrace_flags);
 | ||||||
| +}
 | +}
 | ||||||
| -- 
 |  | ||||||
| 1.7.0.1 |  | ||||||
| 
 |  | ||||||
|  | |||||||
							
								
								
									
										67
									
								
								kernel.spec
									
									
									
									
									
								
							
							
						
						
									
										67
									
								
								kernel.spec
									
									
									
									
									
								
							| @ -79,9 +79,9 @@ Summary: The Linux kernel | |||||||
| # The next upstream release sublevel (base_sublevel+1) | # The next upstream release sublevel (base_sublevel+1) | ||||||
| %define upstream_sublevel %(echo $((%{base_sublevel} + 1))) | %define upstream_sublevel %(echo $((%{base_sublevel} + 1))) | ||||||
| # The rc snapshot level | # The rc snapshot level | ||||||
| %define rcrev 0 | %define rcrev 1 | ||||||
| # The git snapshot level | # The git snapshot level | ||||||
| %define gitrev 1 | %define gitrev 0 | ||||||
| # Set rpm version accordingly | # Set rpm version accordingly | ||||||
| %define rpmversion 2.6.%{upstream_sublevel} | %define rpmversion 2.6.%{upstream_sublevel} | ||||||
| %endif | %endif | ||||||
| @ -149,7 +149,6 @@ Summary: The Linux kernel | |||||||
| %define debugbuildsenabled 0 | %define debugbuildsenabled 0 | ||||||
| 
 | 
 | ||||||
| # Want to build a vanilla kernel build without any non-upstream patches? | # Want to build a vanilla kernel build without any non-upstream patches? | ||||||
| # (well, almost none, we need nonintconfig for build purposes). Default to 0 (off). |  | ||||||
| %define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0} | %define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0} | ||||||
| 
 | 
 | ||||||
| # pkg_release is what we'll fill in for the rpm Release: field | # pkg_release is what we'll fill in for the rpm Release: field | ||||||
| @ -372,12 +371,12 @@ Summary: The Linux kernel | |||||||
| %define vdso_arches ppc ppc64 | %define vdso_arches ppc ppc64 | ||||||
| %endif | %endif | ||||||
| 
 | 
 | ||||||
|  | # Should make listnewconfig fail if there's config options | ||||||
|  | # printed out? | ||||||
| %if %{nopatches}%{using_upstream_branch} | %if %{nopatches}%{using_upstream_branch} | ||||||
| # Ignore unknown options in our config-* files. | %define listnewconfig_fail 0 | ||||||
| # Some options go with patches we're not applying. |  | ||||||
| %define oldconfig_target loose_nonint_oldconfig |  | ||||||
| %else | %else | ||||||
| %define oldconfig_target nonint_oldconfig | %define listnewconfig_fail 1 | ||||||
| %endif | %endif | ||||||
| 
 | 
 | ||||||
| # To temporarily exclude an architecture from being built, add it to | # To temporarily exclude an architecture from being built, add it to | ||||||
| @ -579,9 +578,6 @@ Patch00: patch-2.6.%{base_sublevel}-git%{gitrev}.bz2 | |||||||
| 
 | 
 | ||||||
| Patch02: git-linus.diff | Patch02: git-linus.diff | ||||||
| 
 | 
 | ||||||
| # we always need nonintconfig, even for -vanilla kernels |  | ||||||
| Patch03: linux-2.6-build-nonintconfig.patch |  | ||||||
| 
 |  | ||||||
| # we also need compile fixes for -vanilla | # we also need compile fixes for -vanilla | ||||||
| Patch04: linux-2.6-compile-fixes.patch | Patch04: linux-2.6-compile-fixes.patch | ||||||
| 
 | 
 | ||||||
| @ -598,8 +594,6 @@ Patch09: linux-2.6-upstream-reverts.patch | |||||||
| Patch20: linux-2.6-hotfixes.patch | Patch20: linux-2.6-hotfixes.patch | ||||||
| 
 | 
 | ||||||
| Patch30: git-utrace.patch | Patch30: git-utrace.patch | ||||||
| Patch31: utrace-ptrace-fix-build.patch |  | ||||||
| Patch32: utrace-remove-use-of-kref_set.patch |  | ||||||
| 
 | 
 | ||||||
| Patch150: linux-2.6.29-sparc-IOC_TYPECHECK.patch | Patch150: linux-2.6.29-sparc-IOC_TYPECHECK.patch | ||||||
| 
 | 
 | ||||||
| @ -614,8 +608,6 @@ Patch204: linux-2.6-debug-always-inline-kzalloc.patch | |||||||
| 
 | 
 | ||||||
| Patch380: linux-2.6-defaults-pci_no_msi.patch | Patch380: linux-2.6-defaults-pci_no_msi.patch | ||||||
| Patch383: linux-2.6-defaults-aspm.patch | Patch383: linux-2.6-defaults-aspm.patch | ||||||
| Patch384: pci-acpi-disable-aspm-if-no-osc.patch |  | ||||||
| Patch385: pci-aspm-dont-enable-too-early.patch |  | ||||||
| 
 | 
 | ||||||
| Patch390: linux-2.6-defaults-acpi-video.patch | Patch390: linux-2.6-defaults-acpi-video.patch | ||||||
| Patch391: linux-2.6-acpi-video-dos.patch | Patch391: linux-2.6-acpi-video-dos.patch | ||||||
| @ -671,16 +663,12 @@ Patch2901: linux-2.6-v4l-dvb-experimental.patch | |||||||
| Patch2902: linux-2.6-v4l-dvb-uvcvideo-update.patch | Patch2902: linux-2.6-v4l-dvb-uvcvideo-update.patch | ||||||
| 
 | 
 | ||||||
| Patch2910: linux-2.6-v4l-dvb-add-lgdt3304-support.patch | Patch2910: linux-2.6-v4l-dvb-add-lgdt3304-support.patch | ||||||
| Patch2911: linux-2.6-v4l-dvb-add-kworld-a340-support.patch |  | ||||||
| Patch2912: linux-2.6-v4l-dvb-ir-core-update.patch | Patch2912: linux-2.6-v4l-dvb-ir-core-update.patch | ||||||
| Patch2913: linux-2.6-v4l-dvb-ir-core-memleak-fixes.patch |  | ||||||
| 
 | 
 | ||||||
| Patch2915: lirc-staging-2.6.36.patch |  | ||||||
| #Patch2916: lirc-staging-2.6.36-fixes.patch | #Patch2916: lirc-staging-2.6.36-fixes.patch | ||||||
| Patch2917: hdpvr-ir-enable.patch | Patch2917: hdpvr-ir-enable.patch | ||||||
| 
 | 
 | ||||||
| # fs fixes | # fs fixes | ||||||
| Patch3000: linux-2.6-ext4-fix-freeze-deadlock.patch |  | ||||||
| 
 | 
 | ||||||
| # NFSv4 | # NFSv4 | ||||||
| 
 | 
 | ||||||
| @ -696,8 +684,6 @@ Patch12018: neuter_intel_microcode_load.patch | |||||||
| 
 | 
 | ||||||
| Patch12030: ssb_check_for_sprom.patch | Patch12030: ssb_check_for_sprom.patch | ||||||
| 
 | 
 | ||||||
| Patch12040: only-use-alpha2-regulatory-information-from-country-IE.patch |  | ||||||
| 
 |  | ||||||
| %endif | %endif | ||||||
| 
 | 
 | ||||||
| BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root | BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root | ||||||
| @ -1099,11 +1085,6 @@ make -f %{SOURCE20} VERSION=%{version} configs | |||||||
| 
 | 
 | ||||||
| ApplyOptionalPatch git-linus.diff | ApplyOptionalPatch git-linus.diff | ||||||
| 
 | 
 | ||||||
| # This patch adds a "make nonint_oldconfig" which is non-interactive and |  | ||||||
| # also gives a list of missing options at the end. Useful for automated |  | ||||||
| # builds (as used in the buildsystem). |  | ||||||
| ApplyPatch linux-2.6-build-nonintconfig.patch |  | ||||||
| 
 |  | ||||||
| ApplyPatch linux-2.6-makefile-after_link.patch | ApplyPatch linux-2.6-makefile-after_link.patch | ||||||
| 
 | 
 | ||||||
| # | # | ||||||
| @ -1120,8 +1101,6 @@ ApplyPatch linux-2.6-hotfixes.patch | |||||||
| 
 | 
 | ||||||
| # Roland's utrace ptrace replacement. | # Roland's utrace ptrace replacement. | ||||||
| ApplyPatch git-utrace.patch | ApplyPatch git-utrace.patch | ||||||
| ApplyPatch utrace-ptrace-fix-build.patch |  | ||||||
| ApplyPatch utrace-remove-use-of-kref_set.patch |  | ||||||
| 
 | 
 | ||||||
| # Architecture patches | # Architecture patches | ||||||
| # x86(-64) | # x86(-64) | ||||||
| @ -1150,7 +1129,6 @@ ApplyPatch linux-2.6-32bit-mmap-exec-randomization.patch | |||||||
| # | # | ||||||
| 
 | 
 | ||||||
| # ext4 | # ext4 | ||||||
| ApplyPatch linux-2.6-ext4-fix-freeze-deadlock.patch |  | ||||||
| 
 | 
 | ||||||
| # xfs | # xfs | ||||||
| 
 | 
 | ||||||
| @ -1175,7 +1153,7 @@ ApplyPatch linux-2.6-acpi-debug-infinite-loop.patch | |||||||
| ApplyPatch linux-2.6-debug-sizeof-structs.patch | ApplyPatch linux-2.6-debug-sizeof-structs.patch | ||||||
| ApplyPatch linux-2.6-debug-nmi-timeout.patch | ApplyPatch linux-2.6-debug-nmi-timeout.patch | ||||||
| ApplyPatch linux-2.6-debug-taint-vm.patch | ApplyPatch linux-2.6-debug-taint-vm.patch | ||||||
| ApplyPatch linux-2.6-debug-vm-would-have-oomkilled.patch | ###FIX###ApplyPatch linux-2.6-debug-vm-would-have-oomkilled.patch | ||||||
| ApplyPatch linux-2.6-debug-always-inline-kzalloc.patch | ApplyPatch linux-2.6-debug-always-inline-kzalloc.patch | ||||||
| 
 | 
 | ||||||
| # | # | ||||||
| @ -1185,10 +1163,6 @@ ApplyPatch linux-2.6-debug-always-inline-kzalloc.patch | |||||||
| ApplyPatch linux-2.6-defaults-pci_no_msi.patch | ApplyPatch linux-2.6-defaults-pci_no_msi.patch | ||||||
| # enable ASPM by default on hardware we expect to work | # enable ASPM by default on hardware we expect to work | ||||||
| ApplyPatch linux-2.6-defaults-aspm.patch | ApplyPatch linux-2.6-defaults-aspm.patch | ||||||
| # disable aspm if acpi doesn't provide an _OSC method |  | ||||||
| ApplyPatch pci-acpi-disable-aspm-if-no-osc.patch |  | ||||||
| # allow drivers to disable aspm at load time |  | ||||||
| ApplyPatch pci-aspm-dont-enable-too-early.patch |  | ||||||
| 
 | 
 | ||||||
| # | # | ||||||
| # SCSI Bits. | # SCSI Bits. | ||||||
| @ -1242,7 +1216,7 @@ ApplyPatch fix_xen_guest_on_old_EC2.patch | |||||||
| #ApplyPatch revert-drm-kms-toggle-poll-around-switcheroo.patch | #ApplyPatch revert-drm-kms-toggle-poll-around-switcheroo.patch | ||||||
| 
 | 
 | ||||||
| # Nouveau DRM + drm fixes | # Nouveau DRM + drm fixes | ||||||
| ApplyPatch drm-nouveau-updates.patch | #ApplyPatch drm-nouveau-updates.patch | ||||||
| ApplyPatch drm-intel-big-hammer.patch | ApplyPatch drm-intel-big-hammer.patch | ||||||
| ApplyOptionalPatch drm-intel-next.patch | ApplyOptionalPatch drm-intel-next.patch | ||||||
| ApplyPatch drm-intel-make-lvds-work.patch | ApplyPatch drm-intel-make-lvds-work.patch | ||||||
| @ -1260,15 +1234,12 @@ ApplyPatch linux-2.6-silence-acpi-blacklist.patch | |||||||
| ApplyOptionalPatch linux-2.6-v4l-dvb-fixes.patch | ApplyOptionalPatch linux-2.6-v4l-dvb-fixes.patch | ||||||
| ApplyOptionalPatch linux-2.6-v4l-dvb-update.patch | ApplyOptionalPatch linux-2.6-v4l-dvb-update.patch | ||||||
| ApplyOptionalPatch linux-2.6-v4l-dvb-experimental.patch | ApplyOptionalPatch linux-2.6-v4l-dvb-experimental.patch | ||||||
| ApplyPatch linux-2.6-v4l-dvb-uvcvideo-update.patch | #ApplyPatch linux-2.6-v4l-dvb-uvcvideo-update.patch | ||||||
|  | #ApplyPatch linux-2.6-v4l-dvb-ir-core-update.patch | ||||||
| 
 | 
 | ||||||
| ApplyPatch linux-2.6-v4l-dvb-ir-core-update.patch | ###FIX###ApplyPatch linux-2.6-v4l-dvb-add-lgdt3304-support.patch | ||||||
| ApplyPatch linux-2.6-v4l-dvb-ir-core-memleak-fixes.patch |  | ||||||
| ApplyPatch linux-2.6-v4l-dvb-add-lgdt3304-support.patch |  | ||||||
| ApplyPatch linux-2.6-v4l-dvb-add-kworld-a340-support.patch |  | ||||||
| 
 | 
 | ||||||
| # http://www.lirc.org/ | # http://www.lirc.org/ | ||||||
| ApplyPatch lirc-staging-2.6.36.patch |  | ||||||
| #ApplyOptionalPatch lirc-staging-2.6.36-fixes.patch | #ApplyOptionalPatch lirc-staging-2.6.36-fixes.patch | ||||||
| # enable IR receiver on Hauppauge HD PVR (v4l-dvb merge pending) | # enable IR receiver on Hauppauge HD PVR (v4l-dvb merge pending) | ||||||
| ApplyPatch hdpvr-ir-enable.patch | ApplyPatch hdpvr-ir-enable.patch | ||||||
| @ -1281,8 +1252,6 @@ ApplyPatch neuter_intel_microcode_load.patch | |||||||
| # rhbz#533746 | # rhbz#533746 | ||||||
| #ApplyPatch ssb_check_for_sprom.patch | #ApplyPatch ssb_check_for_sprom.patch | ||||||
| 
 | 
 | ||||||
| ApplyPatch only-use-alpha2-regulatory-information-from-country-IE.patch |  | ||||||
| 
 |  | ||||||
| # END OF PATCH APPLICATIONS | # END OF PATCH APPLICATIONS | ||||||
| 
 | 
 | ||||||
| %endif | %endif | ||||||
| @ -1314,7 +1283,14 @@ for i in *.config | |||||||
| do | do | ||||||
|   mv $i .config |   mv $i .config | ||||||
|   Arch=`head -1 .config | cut -b 3-` |   Arch=`head -1 .config | cut -b 3-` | ||||||
|   make ARCH=$Arch %{oldconfig_target} > /dev/null |   make ARCH=$Arch listnewconfig | egrep '^CONFIG_' >.newoptions || true | ||||||
|  | %if %{listnewconfig_fail} | ||||||
|  |   if [ -s .newoptions ]; then | ||||||
|  |     cat .newoptions | ||||||
|  |     exit 0 | ||||||
|  |   fi | ||||||
|  | %endif | ||||||
|  |   rm -f .newoptions | ||||||
|   echo "# $Arch" > configs/$i |   echo "# $Arch" > configs/$i | ||||||
|   cat .config >> configs/$i |   cat .config >> configs/$i | ||||||
| done | done | ||||||
| @ -1391,7 +1367,7 @@ BuildKernel() { | |||||||
|     Arch=`head -1 .config | cut -b 3-` |     Arch=`head -1 .config | cut -b 3-` | ||||||
|     echo USING ARCH=$Arch |     echo USING ARCH=$Arch | ||||||
| 
 | 
 | ||||||
|     make -s ARCH=$Arch %{oldconfig_target} > /dev/null |     make -s ARCH=$Arch oldnoconfig >/dev/null | ||||||
|     make -s ARCH=$Arch V=1 %{?_smp_mflags} $MakeTarget %{?sparse_mflags} |     make -s ARCH=$Arch V=1 %{?_smp_mflags} $MakeTarget %{?sparse_mflags} | ||||||
|     make -s ARCH=$Arch V=1 %{?_smp_mflags} modules %{?sparse_mflags} || exit 1 |     make -s ARCH=$Arch V=1 %{?_smp_mflags} modules %{?sparse_mflags} || exit 1 | ||||||
| 
 | 
 | ||||||
| @ -1882,6 +1858,9 @@ fi | |||||||
| #                 ||     || | #                 ||     || | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Tue Aug 17 2010 Kyle McMartin <kyle@redhat.com> | ||||||
|  | - Linux 2.6.36-rc1 | ||||||
|  | 
 | ||||||
| * Tue Aug 17 2010 Kyle McMartin <kyle@redhat.com> | * Tue Aug 17 2010 Kyle McMartin <kyle@redhat.com> | ||||||
| - Prevent scripts/setlocalversion from mucking with our version | - Prevent scripts/setlocalversion from mucking with our version | ||||||
|   numbers. |   numbers. | ||||||
|  | |||||||
| @ -1,128 +0,0 @@ | |||||||
| diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
 |  | ||||||
| index 6d69c7c..ff84d12 100644
 |  | ||||||
| --- a/scripts/kconfig/Makefile
 |  | ||||||
| +++ b/scripts/kconfig/Makefile
 |  | ||||||
| @@ -58,6 +58,11 @@ localyesconfig: $(obj)/streamline_config.pl $(obj)/conf
 |  | ||||||
|  	fi |  | ||||||
|  	$(Q)rm -f .tmp.config |  | ||||||
|   |  | ||||||
| +nonint_oldconfig: $(obj)/conf
 |  | ||||||
| +	$< -b $(Kconfig)
 |  | ||||||
| +loose_nonint_oldconfig: $(obj)/conf
 |  | ||||||
| +	$< -B $(Kconfig)
 |  | ||||||
| +
 |  | ||||||
|  # Create new linux.pot file |  | ||||||
|  # Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files |  | ||||||
|  # The symlink is used to repair a deficiency in arch/um |  | ||||||
| diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
 |  | ||||||
| index 9960d1c..ac8d455 100644
 |  | ||||||
| --- a/scripts/kconfig/conf.c
 |  | ||||||
| +++ b/scripts/kconfig/conf.c
 |  | ||||||
| @@ -23,6 +23,8 @@ enum {
 |  | ||||||
|  	ask_all, |  | ||||||
|  	ask_new, |  | ||||||
|  	ask_silent, |  | ||||||
| +	dont_ask,
 |  | ||||||
| +	dont_ask_dont_tell,
 |  | ||||||
|  	set_default, |  | ||||||
|  	set_yes, |  | ||||||
|  	set_mod, |  | ||||||
| @@ -360,7 +362,10 @@ static void conf(struct menu *menu)
 |  | ||||||
|   |  | ||||||
|  		switch (prop->type) { |  | ||||||
|  		case P_MENU: |  | ||||||
| -			if (input_mode == ask_silent && rootEntry != menu) {
 |  | ||||||
| +			if ((input_mode == ask_silent ||
 |  | ||||||
| +			     input_mode == dont_ask ||
 |  | ||||||
| +			     input_mode == dont_ask_dont_tell) &&
 |  | ||||||
| +			    rootEntry != menu) {
 |  | ||||||
|  				check_conf(menu); |  | ||||||
|  				return; |  | ||||||
|  			} |  | ||||||
| @@ -406,6 +411,8 @@ conf_childs:
 |  | ||||||
|  		indent -= 2; |  | ||||||
|  } |  | ||||||
|   |  | ||||||
| +static int return_value;
 |  | ||||||
| +
 |  | ||||||
|  static void check_conf(struct menu *menu) |  | ||||||
|  { |  | ||||||
|  	struct symbol *sym; |  | ||||||
| @@ -418,12 +425,21 @@ static void check_conf(struct menu *menu)
 |  | ||||||
|  	if (sym && !sym_has_value(sym)) { |  | ||||||
|  		if (sym_is_changable(sym) || |  | ||||||
|  		    (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) { |  | ||||||
| +			if (input_mode == dont_ask ||
 |  | ||||||
| +			    input_mode == dont_ask_dont_tell) {
 |  | ||||||
| +				if (input_mode == dont_ask &&
 |  | ||||||
| +				    sym->name && !sym_is_choice_value(sym)) {
 |  | ||||||
| +					fprintf(stderr,"CONFIG_%s\n",sym->name);
 |  | ||||||
| +					++return_value;
 |  | ||||||
| +				}
 |  | ||||||
| +			} else {
 |  | ||||||
|  			if (!conf_cnt++) |  | ||||||
|  				printf(_("*\n* Restart config...\n*\n")); |  | ||||||
|  			rootEntry = menu_get_parent_menu(menu); |  | ||||||
|  			conf(rootEntry); |  | ||||||
|  		} |  | ||||||
|  	} |  | ||||||
| +	}
 |  | ||||||
|   |  | ||||||
|  	for (child = menu->list; child; child = child->next) |  | ||||||
|  		check_conf(child); |  | ||||||
| @@ -439,7 +455,7 @@ int main(int ac, char **av)
 |  | ||||||
|  	bindtextdomain(PACKAGE, LOCALEDIR); |  | ||||||
|  	textdomain(PACKAGE); |  | ||||||
|   |  | ||||||
| -	while ((opt = getopt(ac, av, "osdD:nmyrh")) != -1) {
 |  | ||||||
| + 	while ((opt = getopt(ac, av, "osbBdD:nmyrh")) != -1) {
 |  | ||||||
|  		switch (opt) { |  | ||||||
|  		case 'o': |  | ||||||
|  			input_mode = ask_silent; |  | ||||||
| @@ -448,6 +464,12 @@ int main(int ac, char **av)
 |  | ||||||
|  			input_mode = ask_silent; |  | ||||||
|  			sync_kconfig = 1; |  | ||||||
|  			break; |  | ||||||
| +		case 'b':
 |  | ||||||
| +			input_mode = dont_ask;
 |  | ||||||
| +			break;
 |  | ||||||
| +		case 'B':
 |  | ||||||
| +			input_mode = dont_ask_dont_tell;
 |  | ||||||
| +			break;
 |  | ||||||
|  		case 'd': |  | ||||||
|  			input_mode = set_default; |  | ||||||
|  			break; |  | ||||||
| @@ -525,6 +547,8 @@ int main(int ac, char **av)
 |  | ||||||
|  	case ask_silent: |  | ||||||
|  	case ask_all: |  | ||||||
|  	case ask_new: |  | ||||||
| +	case dont_ask:
 |  | ||||||
| +	case dont_ask_dont_tell:
 |  | ||||||
|  		conf_read(NULL); |  | ||||||
|  		break; |  | ||||||
|  	case set_no: |  | ||||||
| @@ -586,12 +610,16 @@ int main(int ac, char **av)
 |  | ||||||
|  		conf(&rootmenu); |  | ||||||
|  		input_mode = ask_silent; |  | ||||||
|  		/* fall through */ |  | ||||||
| +	case dont_ask:
 |  | ||||||
| +	case dont_ask_dont_tell:
 |  | ||||||
|  	case ask_silent: |  | ||||||
|  		/* Update until a loop caused no more changes */ |  | ||||||
|  		do { |  | ||||||
|  			conf_cnt = 0; |  | ||||||
|  			check_conf(&rootmenu); |  | ||||||
| -		} while (conf_cnt);
 |  | ||||||
| +		} while (conf_cnt &&
 |  | ||||||
| +			 (input_mode != dont_ask &&
 |  | ||||||
| +			  input_mode != dont_ask_dont_tell));
 |  | ||||||
|  		break; |  | ||||||
|  	} |  | ||||||
|   |  | ||||||
| @@ -613,5 +641,5 @@ int main(int ac, char **av)
 |  | ||||||
|  			exit(1); |  | ||||||
|  		} |  | ||||||
|  	} |  | ||||||
| -	return 0;
 |  | ||||||
| +	return return_value;
 |  | ||||||
|  } |  | ||||||
| @ -1,46 +0,0 @@ | |||||||
| [PATCH] ext4: fix freeze deadlock under IO |  | ||||||
| 
 |  | ||||||
| Commit 6b0310fbf087ad6 caused a regression resulting in deadlocks |  | ||||||
| when freezing a filesystem which had active IO; the vfs_check_frozen |  | ||||||
| level (SB_FREEZE_WRITE) did not let the freeze-related IO syncing |  | ||||||
| through.  Duh. |  | ||||||
| 
 |  | ||||||
| Changing the test to FREEZE_TRANS should let the normal freeze |  | ||||||
| syncing get through the fs, but still block any transactions from |  | ||||||
| starting once the fs is completely frozen. |  | ||||||
| 
 |  | ||||||
| I tested this by running fsstress in the background while periodically |  | ||||||
| snapshotting the fs and running fsck on the result.  I ran into |  | ||||||
| occasional deadlocks, but different ones.  I think this is a |  | ||||||
| fine fix for the problem at hand, and the other deadlocky things |  | ||||||
| will need more investigation. |  | ||||||
| 
 |  | ||||||
| Reported-by: Phillip Susi <psusi@cfl.rr.com> |  | ||||||
| Signed-off-by: Eric Sandeen <sandeen@redhat.com> |  | ||||||
| ---
 |  | ||||||
| 
 |  | ||||||
| diff --git a/fs/ext4/super.c b/fs/ext4/super.c
 |  | ||||||
| index 4e8983a..a45ced9 100644
 |  | ||||||
| --- a/fs/ext4/super.c
 |  | ||||||
| +++ b/fs/ext4/super.c
 |  | ||||||
| @@ -241,7 +241,7 @@ handle_t *ext4_journal_start_sb(struct super_block *sb, int nblocks)
 |  | ||||||
|  	if (sb->s_flags & MS_RDONLY) |  | ||||||
|  		return ERR_PTR(-EROFS); |  | ||||||
|   |  | ||||||
| -	vfs_check_frozen(sb, SB_FREEZE_WRITE);
 |  | ||||||
| +	vfs_check_frozen(sb, SB_FREEZE_TRANS);
 |  | ||||||
|  	/* Special case here: if the journal has aborted behind our |  | ||||||
|  	 * backs (eg. EIO in the commit thread), then we still need to |  | ||||||
|  	 * take the FS itself readonly cleanly. */ |  | ||||||
| @@ -3491,7 +3491,7 @@ int ext4_force_commit(struct super_block *sb)
 |  | ||||||
|   |  | ||||||
|  	journal = EXT4_SB(sb)->s_journal; |  | ||||||
|  	if (journal) { |  | ||||||
| -		vfs_check_frozen(sb, SB_FREEZE_WRITE);
 |  | ||||||
| +		vfs_check_frozen(sb, SB_FREEZE_TRANS);
 |  | ||||||
|  		ret = ext4_journal_force_commit(journal); |  | ||||||
|  	} |  | ||||||
|   |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| @ -42,16 +42,18 @@ index 79da65d..f11c21b 100644 | |||||||
|        cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $< |        cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $< | ||||||
|   |   | ||||||
| diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile
 | diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile
 | ||||||
| index 6b4ffed..cbc3d05 100644
 | index 4a2afa1..12ad9f7 100644
 | ||||||
| --- a/arch/x86/vdso/Makefile
 | --- a/arch/x86/vdso/Makefile
 | ||||||
| +++ b/arch/x86/vdso/Makefile
 | +++ b/arch/x86/vdso/Makefile
 | ||||||
| @@ -120,7 +120,8 @@ $(obj)/vdso32-syms.lds: $(vdso32.so-y:%=$(obj)/vdso32-%-syms.lds) FORCE
 | @@ -120,8 +120,9 @@ $(obj)/vdso32-syms.lds: $(vdso32.so-y:%=$(obj)/vdso32-%-syms.lds) FORCE
 | ||||||
|  quiet_cmd_vdso = VDSO    $@ |  quiet_cmd_vdso = VDSO    $@ | ||||||
|        cmd_vdso = $(CC) -nostdlib -o $@ \ |        cmd_vdso = $(CC) -nostdlib -o $@ \ | ||||||
|  		       $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \ |  		       $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \ | ||||||
| -		       -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^)
 | -		       -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) && \
 | ||||||
|  | -		 sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@'
 | ||||||
| +		       -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) \
 | +		       -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) \
 | ||||||
| +		 $(if $(AFTER_LINK),; $(AFTER_LINK))
 | +		$(if $(AFTER_LINK),; $(AFTER_LINK)) && \
 | ||||||
|  | +		sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@'
 | ||||||
|   |   | ||||||
|  VDSO_LDFLAGS = -fPIC -shared $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) |  VDSO_LDFLAGS = -fPIC -shared $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) | ||||||
|  GCOV_PROFILE := n |  GCOV_PROFILE := n | ||||||
|  | |||||||
| @ -64,26 +64,3 @@ Signed-off-by: Dave Jones <davej@redhat.com> | |||||||
|  	} |  	} | ||||||
|  #endif |  #endif | ||||||
|   |   | ||||||
| Some devices (like the nuforce udac) spew this quite a lot. |  | ||||||
| This patch kinda sucks, but it'll shut things up for now. |  | ||||||
| 
 |  | ||||||
| Probably not an upstream candidate. I suspect the answer would be  |  | ||||||
| "don't turn SND_DEBUG then" |  | ||||||
| 
 |  | ||||||
| --- linux-2.6.34.noarch/sound/usb/clock.c~	2010-07-16 22:11:41.000000000 -0400
 |  | ||||||
| +++ linux-2.6.34.noarch/sound/usb/clock.c	2010-07-16 22:15:21.000000000 -0400
 |  | ||||||
| @@ -212,8 +212,13 @@ static int set_sample_rate_v1(struct snd
 |  | ||||||
|   |  | ||||||
|  	/* if endpoint doesn't have sampling rate control, bail out */ |  | ||||||
|  	if (!(fmt->attributes & UAC_EP_CS_ATTR_SAMPLE_RATE)) { |  | ||||||
| -		snd_printk(KERN_WARNING "%d:%d:%d: endpoint lacks sample rate attribute bit, cannot set.\n",
 |  | ||||||
| +		static int once;
 |  | ||||||
| +
 |  | ||||||
| +		if (!once) {
 |  | ||||||
| +			snd_printk(KERN_WARNING "%d:%d:%d: endpoint lacks sample rate attribute bit, cannot set.\n",
 |  | ||||||
|  				   dev->devnum, iface, fmt->altsetting); |  | ||||||
| +			once = 1;
 |  | ||||||
| +		}
 |  | ||||||
|  		return 0; |  | ||||||
|  	} |  | ||||||
|   |  | ||||||
|  | |||||||
| @ -1,165 +0,0 @@ | |||||||
| commit 611225f5e7f9d11c4b119fac224f1bd6903b0150 |  | ||||||
| Author: Jarod Wilson <jarod@redhat.com> |  | ||||||
| Date:   Sun Mar 7 17:55:43 2010 -0300 |  | ||||||
| 
 |  | ||||||
|     V4L/DVB: dvb: add support for kworld 340u and ub435-q to em28xx-dvb |  | ||||||
|      |  | ||||||
|     This adds support for the KWorld PlusTV 340U and KWorld UB345-Q ATSC |  | ||||||
|     sticks, which are really the same device. The sticks have an eMPIA |  | ||||||
|     em2870 usb bridge chipset, an LG Electronics LGDT3304 ATSC/QAM |  | ||||||
|     demodulator and an NXP TDA18271HD tuner -- early versions of the 340U |  | ||||||
|     have a a TDA18271HD/C1, later models and the UB435-Q have a C2. |  | ||||||
|      |  | ||||||
|     The stick has been tested succesfully with both VSB_8 and QAM_256 signals. |  | ||||||
|     Its using lgdt3304 support added to the lgdt3305 driver by a prior patch, |  | ||||||
|     rather than the current lgdt3304 driver, as its severely lacking in |  | ||||||
|     functionality by comparison (see said patch for details). |  | ||||||
|      |  | ||||||
|     Signed-off-by: Jarod Wilson <jarod@redhat.com> |  | ||||||
|     Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> |  | ||||||
|     Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> |  | ||||||
| 
 |  | ||||||
| diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx
 |  | ||||||
| index 3a623aa..5c56875 100644
 |  | ||||||
| --- a/Documentation/video4linux/CARDLIST.em28xx
 |  | ||||||
| +++ b/Documentation/video4linux/CARDLIST.em28xx
 |  | ||||||
| @@ -72,3 +72,4 @@
 |  | ||||||
|   73 -> Reddo DVB-C USB TV Box                   (em2870) |  | ||||||
|   74 -> Actionmaster/LinXcel/Digitus VC211A      (em2800) |  | ||||||
|   75 -> Dikom DK300                              (em2882) |  | ||||||
| + 76 -> KWorld PlusTV 340U or UB435-Q (ATSC)     (em2870)        [1b80:a340]
 |  | ||||||
| diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
 |  | ||||||
| index 3a4fd85..ffbe544 100644
 |  | ||||||
| --- a/drivers/media/video/em28xx/em28xx-cards.c
 |  | ||||||
| +++ b/drivers/media/video/em28xx/em28xx-cards.c
 |  | ||||||
| @@ -158,6 +158,22 @@ static struct em28xx_reg_seq evga_indtube_digital[] = {
 |  | ||||||
|  	{ -1,			-1,	-1,		-1}, |  | ||||||
|  }; |  | ||||||
|   |  | ||||||
| +/*
 |  | ||||||
| + * KWorld PlusTV 340U and UB435-Q (ATSC) GPIOs map:
 |  | ||||||
| + * EM_GPIO_0 - currently unknown
 |  | ||||||
| + * EM_GPIO_1 - LED disable/enable (1 = off, 0 = on)
 |  | ||||||
| + * EM_GPIO_2 - currently unknown
 |  | ||||||
| + * EM_GPIO_3 - currently unknown
 |  | ||||||
| + * EM_GPIO_4 - TDA18271HD/C1 tuner (1 = active, 0 = in reset)
 |  | ||||||
| + * EM_GPIO_5 - LGDT3304 ATSC/QAM demod (1 = active, 0 = in reset)
 |  | ||||||
| + * EM_GPIO_6 - currently unknown
 |  | ||||||
| + * EM_GPIO_7 - currently unknown
 |  | ||||||
| + */
 |  | ||||||
| +static struct em28xx_reg_seq kworld_a340_digital[] = {
 |  | ||||||
| +	{EM28XX_R08_GPIO,	0x6d,		~EM_GPIO_4,	10},
 |  | ||||||
| +	{ -1,			-1,		-1,		-1},
 |  | ||||||
| +};
 |  | ||||||
| +
 |  | ||||||
|  /* Pinnacle Hybrid Pro eb1a:2881 */ |  | ||||||
|  static struct em28xx_reg_seq pinnacle_hybrid_pro_analog[] = { |  | ||||||
|  	{EM28XX_R08_GPIO,	0xfd,   ~EM_GPIO_4,	10}, |  | ||||||
| @@ -1667,6 +1683,16 @@ struct em28xx_board em28xx_boards[] = {
 |  | ||||||
|  		.tuner_gpio    = reddo_dvb_c_usb_box, |  | ||||||
|  		.has_dvb       = 1, |  | ||||||
|  	}, |  | ||||||
| +	/* 1b80:a340 - Empia EM2870, NXP TDA18271HD and LG DT3304, sold
 |  | ||||||
| +	 * initially as the KWorld PlusTV 340U, then as the UB435-Q.
 |  | ||||||
| +	 * Early variants have a TDA18271HD/C1, later ones a TDA18271HD/C2 */
 |  | ||||||
| +	[EM2870_BOARD_KWORLD_A340] = {
 |  | ||||||
| +		.name       = "KWorld PlusTV 340U or UB435-Q (ATSC)",
 |  | ||||||
| +		.tuner_type = TUNER_ABSENT,	/* Digital-only TDA18271HD */
 |  | ||||||
| +		.has_dvb    = 1,
 |  | ||||||
| +		.dvb_gpio   = kworld_a340_digital,
 |  | ||||||
| +		.tuner_gpio = default_tuner_gpio,
 |  | ||||||
| +	},
 |  | ||||||
|  }; |  | ||||||
|  const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards); |  | ||||||
|   |  | ||||||
| @@ -1788,6 +1814,8 @@ struct usb_device_id em28xx_id_table[] = {
 |  | ||||||
|  			.driver_info = EM2820_BOARD_IODATA_GVMVP_SZ }, |  | ||||||
|  	{ USB_DEVICE(0xeb1a, 0x50a6), |  | ||||||
|  			.driver_info = EM2860_BOARD_GADMEI_UTV330 }, |  | ||||||
| +	{ USB_DEVICE(0x1b80, 0xa340),
 |  | ||||||
| +			.driver_info = EM2870_BOARD_KWORLD_A340 },
 |  | ||||||
|  	{ }, |  | ||||||
|  }; |  | ||||||
|  MODULE_DEVICE_TABLE(usb, em28xx_id_table); |  | ||||||
| diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c
 |  | ||||||
| index cf1d8c3..3ac8d30 100644
 |  | ||||||
| --- a/drivers/media/video/em28xx/em28xx-dvb.c
 |  | ||||||
| +++ b/drivers/media/video/em28xx/em28xx-dvb.c
 |  | ||||||
| @@ -30,11 +30,13 @@
 |  | ||||||
|  #include "tuner-simple.h" |  | ||||||
|   |  | ||||||
|  #include "lgdt330x.h" |  | ||||||
| +#include "lgdt3305.h"
 |  | ||||||
|  #include "zl10353.h" |  | ||||||
|  #include "s5h1409.h" |  | ||||||
|  #include "mt352.h" |  | ||||||
|  #include "mt352_priv.h" /* FIXME */ |  | ||||||
|  #include "tda1002x.h" |  | ||||||
| +#include "tda18271.h"
 |  | ||||||
|   |  | ||||||
|  MODULE_DESCRIPTION("driver for em28xx based DVB cards"); |  | ||||||
|  MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@infradead.org>"); |  | ||||||
| @@ -231,6 +233,18 @@ static struct lgdt330x_config em2880_lgdt3303_dev = {
 |  | ||||||
|  	.demod_chip = LGDT3303, |  | ||||||
|  }; |  | ||||||
|   |  | ||||||
| +static struct lgdt3305_config em2870_lgdt3304_dev = {
 |  | ||||||
| +	.i2c_addr           = 0x0e,
 |  | ||||||
| +	.demod_chip         = LGDT3304,
 |  | ||||||
| +	.spectral_inversion = 1,
 |  | ||||||
| +	.deny_i2c_rptr      = 1,
 |  | ||||||
| +	.mpeg_mode          = LGDT3305_MPEG_PARALLEL,
 |  | ||||||
| +	.tpclk_edge         = LGDT3305_TPCLK_FALLING_EDGE,
 |  | ||||||
| +	.tpvalid_polarity   = LGDT3305_TP_VALID_HIGH,
 |  | ||||||
| +	.vsb_if_khz         = 3250,
 |  | ||||||
| +	.qam_if_khz         = 4000,
 |  | ||||||
| +};
 |  | ||||||
| +
 |  | ||||||
|  static struct zl10353_config em28xx_zl10353_with_xc3028 = { |  | ||||||
|  	.demod_address = (0x1e >> 1), |  | ||||||
|  	.no_tuner = 1, |  | ||||||
| @@ -247,6 +261,17 @@ static struct s5h1409_config em28xx_s5h1409_with_xc3028 = {
 |  | ||||||
|  	.mpeg_timing   = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK |  | ||||||
|  }; |  | ||||||
|   |  | ||||||
| +static struct tda18271_std_map kworld_a340_std_map = {
 |  | ||||||
| +	.atsc_6   = { .if_freq = 3250, .agc_mode = 3, .std = 0,
 |  | ||||||
| +		      .if_lvl = 1, .rfagc_top = 0x37, },
 |  | ||||||
| +	.qam_6    = { .if_freq = 4000, .agc_mode = 3, .std = 1,
 |  | ||||||
| +		      .if_lvl = 1, .rfagc_top = 0x37, },
 |  | ||||||
| +};
 |  | ||||||
| +
 |  | ||||||
| +static struct tda18271_config kworld_a340_config = {
 |  | ||||||
| +	.std_map           = &kworld_a340_std_map,
 |  | ||||||
| +};
 |  | ||||||
| +
 |  | ||||||
|  static struct zl10353_config em28xx_zl10353_xc3028_no_i2c_gate = { |  | ||||||
|  	.demod_address = (0x1e >> 1), |  | ||||||
|  	.no_tuner = 1, |  | ||||||
| @@ -572,6 +597,14 @@ static int dvb_init(struct em28xx *dev)
 |  | ||||||
|  			} |  | ||||||
|  		} |  | ||||||
|  		break; |  | ||||||
| +	case EM2870_BOARD_KWORLD_A340:
 |  | ||||||
| +		dvb->frontend = dvb_attach(lgdt3305_attach,
 |  | ||||||
| +					   &em2870_lgdt3304_dev,
 |  | ||||||
| +					   &dev->i2c_adap);
 |  | ||||||
| +		if (dvb->frontend != NULL)
 |  | ||||||
| +			dvb_attach(tda18271_attach, dvb->frontend, 0x60,
 |  | ||||||
| +				   &dev->i2c_adap, &kworld_a340_config);
 |  | ||||||
| +		break;
 |  | ||||||
|  	default: |  | ||||||
|  		em28xx_errdev("/2: The frontend of your DVB/ATSC card" |  | ||||||
|  				" isn't supported yet\n"); |  | ||||||
| diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h
 |  | ||||||
| index 6216786..1c61a6b 100644
 |  | ||||||
| --- a/drivers/media/video/em28xx/em28xx.h
 |  | ||||||
| +++ b/drivers/media/video/em28xx/em28xx.h
 |  | ||||||
| @@ -114,6 +114,7 @@
 |  | ||||||
|  #define EM2870_BOARD_REDDO_DVB_C_USB_BOX          73 |  | ||||||
|  #define EM2800_BOARD_VC211A			  74 |  | ||||||
|  #define EM2882_BOARD_DIKOM_DK300		  75 |  | ||||||
| +#define EM2870_BOARD_KWORLD_A340		  76
 |  | ||||||
|   |  | ||||||
|  /* Limits minimum and default number of buffers */ |  | ||||||
|  #define EM28XX_MIN_BUF 4 |  | ||||||
| @ -1,142 +0,0 @@ | |||||||
|  drivers/media/IR/imon.c   |   20 +------------------- |  | ||||||
|  drivers/media/IR/mceusb.c |   15 +-------------- |  | ||||||
|  2 files changed, 2 insertions(+), 33 deletions(-) |  | ||||||
| 
 |  | ||||||
| diff --git a/drivers/media/IR/imon.c b/drivers/media/IR/imon.c
 |  | ||||||
| index 65c125e..c185422 100644
 |  | ||||||
| --- a/drivers/media/IR/imon.c
 |  | ||||||
| +++ b/drivers/media/IR/imon.c
 |  | ||||||
| @@ -87,7 +87,6 @@ static ssize_t lcd_write(struct file *file, const char *buf,
 |  | ||||||
|  struct imon_context { |  | ||||||
|  	struct device *dev; |  | ||||||
|  	struct ir_dev_props *props; |  | ||||||
| -	struct ir_input_dev *ir;
 |  | ||||||
|  	/* Newer devices have two interfaces */ |  | ||||||
|  	struct usb_device *usbdev_intf0; |  | ||||||
|  	struct usb_device *usbdev_intf1; |  | ||||||
| @@ -1656,7 +1655,6 @@ static struct input_dev *imon_init_idev(struct imon_context *ictx)
 |  | ||||||
|  { |  | ||||||
|  	struct input_dev *idev; |  | ||||||
|  	struct ir_dev_props *props; |  | ||||||
| -	struct ir_input_dev *ir;
 |  | ||||||
|  	int ret, i; |  | ||||||
|   |  | ||||||
|  	idev = input_allocate_device(); |  | ||||||
| @@ -1671,12 +1669,6 @@ static struct input_dev *imon_init_idev(struct imon_context *ictx)
 |  | ||||||
|  		goto props_alloc_failed; |  | ||||||
|  	} |  | ||||||
|   |  | ||||||
| -	ir = kzalloc(sizeof(struct ir_input_dev), GFP_KERNEL);
 |  | ||||||
| -	if (!ir) {
 |  | ||||||
| -		dev_err(ictx->dev, "remote ir input dev allocation failed\n");
 |  | ||||||
| -		goto ir_dev_alloc_failed;
 |  | ||||||
| -	}
 |  | ||||||
| -
 |  | ||||||
|  	snprintf(ictx->name_idev, sizeof(ictx->name_idev), |  | ||||||
|  		 "iMON Remote (%04x:%04x)", ictx->vendor, ictx->product); |  | ||||||
|  	idev->name = ictx->name_idev; |  | ||||||
| @@ -1706,14 +1698,9 @@ static struct input_dev *imon_init_idev(struct imon_context *ictx)
 |  | ||||||
|  	props->change_protocol = imon_ir_change_protocol; |  | ||||||
|  	ictx->props = props; |  | ||||||
|   |  | ||||||
| -	ictx->ir = ir;
 |  | ||||||
| -	memcpy(&ir->dev, ictx->dev, sizeof(struct device));
 |  | ||||||
| -
 |  | ||||||
|  	usb_to_input_id(ictx->usbdev_intf0, &idev->id); |  | ||||||
|  	idev->dev.parent = ictx->dev; |  | ||||||
|   |  | ||||||
| -	input_set_drvdata(idev, ir);
 |  | ||||||
| -
 |  | ||||||
|  	ret = ir_input_register(idev, RC_MAP_IMON_PAD, props, MOD_NAME); |  | ||||||
|  	if (ret < 0) { |  | ||||||
|  		dev_err(ictx->dev, "remote input dev register failed\n"); |  | ||||||
| @@ -1723,8 +1710,6 @@ static struct input_dev *imon_init_idev(struct imon_context *ictx)
 |  | ||||||
|  	return idev; |  | ||||||
|   |  | ||||||
|  idev_register_failed: |  | ||||||
| -	kfree(ir);
 |  | ||||||
| -ir_dev_alloc_failed:
 |  | ||||||
|  	kfree(props); |  | ||||||
|  props_alloc_failed: |  | ||||||
|  	input_free_device(idev); |  | ||||||
| @@ -1944,7 +1929,6 @@ static struct imon_context *imon_init_intf0(struct usb_interface *intf)
 |  | ||||||
|   |  | ||||||
|  urb_submit_failed: |  | ||||||
|  	ir_input_unregister(ictx->idev); |  | ||||||
| -	input_free_device(ictx->idev);
 |  | ||||||
|  idev_setup_failed: |  | ||||||
|  find_endpoint_failed: |  | ||||||
|  	mutex_unlock(&ictx->lock); |  | ||||||
| @@ -2014,10 +1998,8 @@ static struct imon_context *imon_init_intf1(struct usb_interface *intf,
 |  | ||||||
|  	return ictx; |  | ||||||
|   |  | ||||||
|  urb_submit_failed: |  | ||||||
| -	if (ictx->touch) {
 |  | ||||||
| +	if (ictx->touch)
 |  | ||||||
|  		input_unregister_device(ictx->touch); |  | ||||||
| -		input_free_device(ictx->touch);
 |  | ||||||
| -	}
 |  | ||||||
|  touch_setup_failed: |  | ||||||
|  find_endpoint_failed: |  | ||||||
|  	mutex_unlock(&ictx->lock); |  | ||||||
| diff --git a/drivers/media/IR/mceusb.c b/drivers/media/IR/mceusb.c
 |  | ||||||
| index 78bf7f7..65b0738 100644
 |  | ||||||
| --- a/drivers/media/IR/mceusb.c
 |  | ||||||
| +++ b/drivers/media/IR/mceusb.c
 |  | ||||||
| @@ -228,7 +228,6 @@ static struct usb_device_id std_tx_mask_list[] = {
 |  | ||||||
|  /* data structure for each usb transceiver */ |  | ||||||
|  struct mceusb_dev { |  | ||||||
|  	/* ir-core bits */ |  | ||||||
| -	struct ir_input_dev *irdev;
 |  | ||||||
|  	struct ir_dev_props *props; |  | ||||||
|  	struct ir_raw_event rawir; |  | ||||||
|   |  | ||||||
| @@ -739,7 +738,7 @@ static void mceusb_dev_recv(struct urb *urb, struct pt_regs *regs)
 |  | ||||||
|   |  | ||||||
|  	if (ir->send_flags == RECV_FLAG_IN_PROGRESS) { |  | ||||||
|  		ir->send_flags = SEND_FLAG_COMPLETE; |  | ||||||
| -		dev_dbg(&ir->irdev->dev, "setup answer received %d bytes\n",
 |  | ||||||
| +		dev_dbg(ir->dev, "setup answer received %d bytes\n",
 |  | ||||||
|  			buf_len); |  | ||||||
|  	} |  | ||||||
|   |  | ||||||
| @@ -861,7 +860,6 @@ static struct input_dev *mceusb_init_input_dev(struct mceusb_dev *ir)
 |  | ||||||
|  { |  | ||||||
|  	struct input_dev *idev; |  | ||||||
|  	struct ir_dev_props *props; |  | ||||||
| -	struct ir_input_dev *irdev;
 |  | ||||||
|  	struct device *dev = ir->dev; |  | ||||||
|  	int ret = -ENODEV; |  | ||||||
|   |  | ||||||
| @@ -878,12 +876,6 @@ static struct input_dev *mceusb_init_input_dev(struct mceusb_dev *ir)
 |  | ||||||
|  		goto props_alloc_failed; |  | ||||||
|  	} |  | ||||||
|   |  | ||||||
| -	irdev = kzalloc(sizeof(struct ir_input_dev), GFP_KERNEL);
 |  | ||||||
| -	if (!irdev) {
 |  | ||||||
| -		dev_err(dev, "remote ir input dev allocation failed\n");
 |  | ||||||
| -		goto ir_dev_alloc_failed;
 |  | ||||||
| -	}
 |  | ||||||
| -
 |  | ||||||
|  	snprintf(ir->name, sizeof(ir->name), "Media Center Ed. eHome " |  | ||||||
|  		 "Infrared Remote Transceiver (%04x:%04x)", |  | ||||||
|  		 le16_to_cpu(ir->usbdev->descriptor.idVendor), |  | ||||||
| @@ -902,9 +894,6 @@ static struct input_dev *mceusb_init_input_dev(struct mceusb_dev *ir)
 |  | ||||||
|  	props->tx_ir = mceusb_tx_ir; |  | ||||||
|   |  | ||||||
|  	ir->props = props; |  | ||||||
| -	ir->irdev = irdev;
 |  | ||||||
| -
 |  | ||||||
| -	input_set_drvdata(idev, irdev);
 |  | ||||||
|   |  | ||||||
|  	ret = ir_input_register(idev, RC_MAP_RC6_MCE, props, DRIVER_NAME); |  | ||||||
|  	if (ret < 0) { |  | ||||||
| @@ -915,8 +904,6 @@ static struct input_dev *mceusb_init_input_dev(struct mceusb_dev *ir)
 |  | ||||||
|  	return idev; |  | ||||||
|   |  | ||||||
|  irdev_failed: |  | ||||||
| -	kfree(irdev);
 |  | ||||||
| -ir_dev_alloc_failed:
 |  | ||||||
|  	kfree(props); |  | ||||||
|  props_alloc_failed: |  | ||||||
|  	input_free_device(idev); |  | ||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -1,788 +0,0 @@ | |||||||
| From linville@tuxdriver.com Thu Jul 15 15:40:22 2010 |  | ||||||
| From: "John W. Linville" <linville@tuxdriver.com> |  | ||||||
| Subject: [RFC] wireless: only use alpha2 regulatory information from country IE |  | ||||||
| Date: Thu, 15 Jul 2010 15:06:47 -0400 |  | ||||||
| 
 |  | ||||||
| The meaning and/or usage of the country IE is somewhat poorly defined. |  | ||||||
| In practice, this means that regulatory rulesets in a country IE are |  | ||||||
| often incomplete and might be untrustworthy.  This removes the code |  | ||||||
| associated with interpreting those rulesets while preserving respect |  | ||||||
| for country "alpha2" codes also contained in the country IE. |  | ||||||
| 
 |  | ||||||
| Signed-off-by: John W. Linville <linville@tuxdriver.com> |  | ||||||
| ---
 |  | ||||||
| This patch is compile-tested only!  Please feel free to suggest that |  | ||||||
| I have left something out or missed some nuance of our regulatory |  | ||||||
| enforcement code... |  | ||||||
| 
 |  | ||||||
|  include/net/regulatory.h |    1 - |  | ||||||
|  net/wireless/reg.c       |  625 +--------------------------------------------- |  | ||||||
|  2 files changed, 12 insertions(+), 614 deletions(-) |  | ||||||
| 
 |  | ||||||
| diff --git a/include/net/regulatory.h b/include/net/regulatory.h
 |  | ||||||
| index f873ee3..9e103a4 100644
 |  | ||||||
| --- a/include/net/regulatory.h
 |  | ||||||
| +++ b/include/net/regulatory.h
 |  | ||||||
| @@ -54,7 +54,6 @@ struct regulatory_request {
 |  | ||||||
|  	enum nl80211_reg_initiator initiator; |  | ||||||
|  	char alpha2[2]; |  | ||||||
|  	bool intersect; |  | ||||||
| -	u32 country_ie_checksum;
 |  | ||||||
|  	enum environment_cap country_ie_env; |  | ||||||
|  	struct list_head list; |  | ||||||
|  }; |  | ||||||
| diff --git a/net/wireless/reg.c b/net/wireless/reg.c
 |  | ||||||
| index 1ac2bdd..678d0bd 100644
 |  | ||||||
| --- a/net/wireless/reg.c
 |  | ||||||
| +++ b/net/wireless/reg.c
 |  | ||||||
| @@ -67,17 +67,9 @@ static struct platform_device *reg_pdev;
 |  | ||||||
|  const struct ieee80211_regdomain *cfg80211_regdomain; |  | ||||||
|   |  | ||||||
|  /* |  | ||||||
| - * We use this as a place for the rd structure built from the
 |  | ||||||
| - * last parsed country IE to rest until CRDA gets back to us with
 |  | ||||||
| - * what it thinks should apply for the same country
 |  | ||||||
| - */
 |  | ||||||
| -static const struct ieee80211_regdomain *country_ie_regdomain;
 |  | ||||||
| -
 |  | ||||||
| -/*
 |  | ||||||
|   * Protects static reg.c components: |  | ||||||
|   *     - cfg80211_world_regdom |  | ||||||
|   *     - cfg80211_regdom |  | ||||||
| - *     - country_ie_regdomain
 |  | ||||||
|   *     - last_request |  | ||||||
|   */ |  | ||||||
|  static DEFINE_MUTEX(reg_mutex); |  | ||||||
| @@ -275,25 +267,6 @@ static bool is_user_regdom_saved(void)
 |  | ||||||
|  	return true; |  | ||||||
|  } |  | ||||||
|   |  | ||||||
| -/**
 |  | ||||||
| - * country_ie_integrity_changes - tells us if the country IE has changed
 |  | ||||||
| - * @checksum: checksum of country IE of fields we are interested in
 |  | ||||||
| - *
 |  | ||||||
| - * If the country IE has not changed you can ignore it safely. This is
 |  | ||||||
| - * useful to determine if two devices are seeing two different country IEs
 |  | ||||||
| - * even on the same alpha2. Note that this will return false if no IE has
 |  | ||||||
| - * been set on the wireless core yet.
 |  | ||||||
| - */
 |  | ||||||
| -static bool country_ie_integrity_changes(u32 checksum)
 |  | ||||||
| -{
 |  | ||||||
| -	/* If no IE has been set then the checksum doesn't change */
 |  | ||||||
| -	if (unlikely(!last_request->country_ie_checksum))
 |  | ||||||
| -		return false;
 |  | ||||||
| -	if (unlikely(last_request->country_ie_checksum != checksum))
 |  | ||||||
| -		return true;
 |  | ||||||
| -	return false;
 |  | ||||||
| -}
 |  | ||||||
| -
 |  | ||||||
|  static int reg_copy_regd(const struct ieee80211_regdomain **dst_regd, |  | ||||||
|  			 const struct ieee80211_regdomain *src_regd) |  | ||||||
|  { |  | ||||||
| @@ -506,471 +479,6 @@ static bool freq_in_rule_band(const struct ieee80211_freq_range *freq_range,
 |  | ||||||
|  } |  | ||||||
|   |  | ||||||
|  /* |  | ||||||
| - * This is a work around for sanity checking ieee80211_channel_to_frequency()'s
 |  | ||||||
| - * work. ieee80211_channel_to_frequency() can for example currently provide a
 |  | ||||||
| - * 2 GHz channel when in fact a 5 GHz channel was desired. An example would be
 |  | ||||||
| - * an AP providing channel 8 on a country IE triplet when it sent this on the
 |  | ||||||
| - * 5 GHz band, that channel is designed to be channel 8 on 5 GHz, not a 2 GHz
 |  | ||||||
| - * channel.
 |  | ||||||
| - *
 |  | ||||||
| - * This can be removed once ieee80211_channel_to_frequency() takes in a band.
 |  | ||||||
| - */
 |  | ||||||
| -static bool chan_in_band(int chan, enum ieee80211_band band)
 |  | ||||||
| -{
 |  | ||||||
| -	int center_freq = ieee80211_channel_to_frequency(chan);
 |  | ||||||
| -
 |  | ||||||
| -	switch (band) {
 |  | ||||||
| -	case IEEE80211_BAND_2GHZ:
 |  | ||||||
| -		if (center_freq <= 2484)
 |  | ||||||
| -			return true;
 |  | ||||||
| -		return false;
 |  | ||||||
| -	case IEEE80211_BAND_5GHZ:
 |  | ||||||
| -		if (center_freq >= 5005)
 |  | ||||||
| -			return true;
 |  | ||||||
| -		return false;
 |  | ||||||
| -	default:
 |  | ||||||
| -		return false;
 |  | ||||||
| -	}
 |  | ||||||
| -}
 |  | ||||||
| -
 |  | ||||||
| -/*
 |  | ||||||
| - * Some APs may send a country IE triplet for each channel they
 |  | ||||||
| - * support and while this is completely overkill and silly we still
 |  | ||||||
| - * need to support it. We avoid making a single rule for each channel
 |  | ||||||
| - * though and to help us with this we use this helper to find the
 |  | ||||||
| - * actual subband end channel. These type of country IE triplet
 |  | ||||||
| - * scenerios are handled then, all yielding two regulaotry rules from
 |  | ||||||
| - * parsing a country IE:
 |  | ||||||
| - *
 |  | ||||||
| - * [1]
 |  | ||||||
| - * [2]
 |  | ||||||
| - * [36]
 |  | ||||||
| - * [40]
 |  | ||||||
| - *
 |  | ||||||
| - * [1]
 |  | ||||||
| - * [2-4]
 |  | ||||||
| - * [5-12]
 |  | ||||||
| - * [36]
 |  | ||||||
| - * [40-44]
 |  | ||||||
| - *
 |  | ||||||
| - * [1-4]
 |  | ||||||
| - * [5-7]
 |  | ||||||
| - * [36-44]
 |  | ||||||
| - * [48-64]
 |  | ||||||
| - *
 |  | ||||||
| - * [36-36]
 |  | ||||||
| - * [40-40]
 |  | ||||||
| - * [44-44]
 |  | ||||||
| - * [48-48]
 |  | ||||||
| - * [52-52]
 |  | ||||||
| - * [56-56]
 |  | ||||||
| - * [60-60]
 |  | ||||||
| - * [64-64]
 |  | ||||||
| - * [100-100]
 |  | ||||||
| - * [104-104]
 |  | ||||||
| - * [108-108]
 |  | ||||||
| - * [112-112]
 |  | ||||||
| - * [116-116]
 |  | ||||||
| - * [120-120]
 |  | ||||||
| - * [124-124]
 |  | ||||||
| - * [128-128]
 |  | ||||||
| - * [132-132]
 |  | ||||||
| - * [136-136]
 |  | ||||||
| - * [140-140]
 |  | ||||||
| - *
 |  | ||||||
| - * Returns 0 if the IE has been found to be invalid in the middle
 |  | ||||||
| - * somewhere.
 |  | ||||||
| - */
 |  | ||||||
| -static int max_subband_chan(enum ieee80211_band band,
 |  | ||||||
| -			    int orig_cur_chan,
 |  | ||||||
| -			    int orig_end_channel,
 |  | ||||||
| -			    s8 orig_max_power,
 |  | ||||||
| -			    u8 **country_ie,
 |  | ||||||
| -			    u8 *country_ie_len)
 |  | ||||||
| -{
 |  | ||||||
| -	u8 *triplets_start = *country_ie;
 |  | ||||||
| -	u8 len_at_triplet = *country_ie_len;
 |  | ||||||
| -	int end_subband_chan = orig_end_channel;
 |  | ||||||
| -
 |  | ||||||
| -	/*
 |  | ||||||
| -	 * We'll deal with padding for the caller unless
 |  | ||||||
| -	 * its not immediate and we don't process any channels
 |  | ||||||
| -	 */
 |  | ||||||
| -	if (*country_ie_len == 1) {
 |  | ||||||
| -		*country_ie += 1;
 |  | ||||||
| -		*country_ie_len -= 1;
 |  | ||||||
| -		return orig_end_channel;
 |  | ||||||
| -	}
 |  | ||||||
| -
 |  | ||||||
| -	/* Move to the next triplet and then start search */
 |  | ||||||
| -	*country_ie += 3;
 |  | ||||||
| -	*country_ie_len -= 3;
 |  | ||||||
| -
 |  | ||||||
| -	if (!chan_in_band(orig_cur_chan, band))
 |  | ||||||
| -		return 0;
 |  | ||||||
| -
 |  | ||||||
| -	while (*country_ie_len >= 3) {
 |  | ||||||
| -		int end_channel = 0;
 |  | ||||||
| -		struct ieee80211_country_ie_triplet *triplet =
 |  | ||||||
| -			(struct ieee80211_country_ie_triplet *) *country_ie;
 |  | ||||||
| -		int cur_channel = 0, next_expected_chan;
 |  | ||||||
| -
 |  | ||||||
| -		/* means last triplet is completely unrelated to this one */
 |  | ||||||
| -		if (triplet->ext.reg_extension_id >=
 |  | ||||||
| -				IEEE80211_COUNTRY_EXTENSION_ID) {
 |  | ||||||
| -			*country_ie -= 3;
 |  | ||||||
| -			*country_ie_len += 3;
 |  | ||||||
| -			break;
 |  | ||||||
| -		}
 |  | ||||||
| -
 |  | ||||||
| -		if (triplet->chans.first_channel == 0) {
 |  | ||||||
| -			*country_ie += 1;
 |  | ||||||
| -			*country_ie_len -= 1;
 |  | ||||||
| -			if (*country_ie_len != 0)
 |  | ||||||
| -				return 0;
 |  | ||||||
| -			break;
 |  | ||||||
| -		}
 |  | ||||||
| -
 |  | ||||||
| -		if (triplet->chans.num_channels == 0)
 |  | ||||||
| -			return 0;
 |  | ||||||
| -
 |  | ||||||
| -		/* Monitonically increasing channel order */
 |  | ||||||
| -		if (triplet->chans.first_channel <= end_subband_chan)
 |  | ||||||
| -			return 0;
 |  | ||||||
| -
 |  | ||||||
| -		if (!chan_in_band(triplet->chans.first_channel, band))
 |  | ||||||
| -			return 0;
 |  | ||||||
| -
 |  | ||||||
| -		/* 2 GHz */
 |  | ||||||
| -		if (triplet->chans.first_channel <= 14) {
 |  | ||||||
| -			end_channel = triplet->chans.first_channel +
 |  | ||||||
| -				triplet->chans.num_channels - 1;
 |  | ||||||
| -		}
 |  | ||||||
| -		else {
 |  | ||||||
| -			end_channel =  triplet->chans.first_channel +
 |  | ||||||
| -				(4 * (triplet->chans.num_channels - 1));
 |  | ||||||
| -		}
 |  | ||||||
| -
 |  | ||||||
| -		if (!chan_in_band(end_channel, band))
 |  | ||||||
| -			return 0;
 |  | ||||||
| -
 |  | ||||||
| -		if (orig_max_power != triplet->chans.max_power) {
 |  | ||||||
| -			*country_ie -= 3;
 |  | ||||||
| -			*country_ie_len += 3;
 |  | ||||||
| -			break;
 |  | ||||||
| -		}
 |  | ||||||
| -
 |  | ||||||
| -		cur_channel = triplet->chans.first_channel;
 |  | ||||||
| -
 |  | ||||||
| -		/* The key is finding the right next expected channel */
 |  | ||||||
| -		if (band == IEEE80211_BAND_2GHZ)
 |  | ||||||
| -			next_expected_chan = end_subband_chan + 1;
 |  | ||||||
| -		 else
 |  | ||||||
| -			next_expected_chan = end_subband_chan + 4;
 |  | ||||||
| -
 |  | ||||||
| -		if (cur_channel != next_expected_chan) {
 |  | ||||||
| -			*country_ie -= 3;
 |  | ||||||
| -			*country_ie_len += 3;
 |  | ||||||
| -			break;
 |  | ||||||
| -		}
 |  | ||||||
| -
 |  | ||||||
| -		end_subband_chan = end_channel;
 |  | ||||||
| -
 |  | ||||||
| -		/* Move to the next one */
 |  | ||||||
| -		*country_ie += 3;
 |  | ||||||
| -		*country_ie_len -= 3;
 |  | ||||||
| -
 |  | ||||||
| -		/*
 |  | ||||||
| -		 * Padding needs to be dealt with if we processed
 |  | ||||||
| -		 * some channels.
 |  | ||||||
| -		 */
 |  | ||||||
| -		if (*country_ie_len == 1) {
 |  | ||||||
| -			*country_ie += 1;
 |  | ||||||
| -			*country_ie_len -= 1;
 |  | ||||||
| -			break;
 |  | ||||||
| -		}
 |  | ||||||
| -
 |  | ||||||
| -		/* If seen, the IE is invalid */
 |  | ||||||
| -		if (*country_ie_len == 2)
 |  | ||||||
| -			return 0;
 |  | ||||||
| -	}
 |  | ||||||
| -
 |  | ||||||
| -	if (end_subband_chan == orig_end_channel) {
 |  | ||||||
| -		*country_ie = triplets_start;
 |  | ||||||
| -		*country_ie_len = len_at_triplet;
 |  | ||||||
| -		return orig_end_channel;
 |  | ||||||
| -	}
 |  | ||||||
| -
 |  | ||||||
| -	return end_subband_chan;
 |  | ||||||
| -}
 |  | ||||||
| -
 |  | ||||||
| -/*
 |  | ||||||
| - * Converts a country IE to a regulatory domain. A regulatory domain
 |  | ||||||
| - * structure has a lot of information which the IE doesn't yet have,
 |  | ||||||
| - * so for the other values we use upper max values as we will intersect
 |  | ||||||
| - * with our userspace regulatory agent to get lower bounds.
 |  | ||||||
| - */
 |  | ||||||
| -static struct ieee80211_regdomain *country_ie_2_rd(
 |  | ||||||
| -				enum ieee80211_band band,
 |  | ||||||
| -				u8 *country_ie,
 |  | ||||||
| -				u8 country_ie_len,
 |  | ||||||
| -				u32 *checksum)
 |  | ||||||
| -{
 |  | ||||||
| -	struct ieee80211_regdomain *rd = NULL;
 |  | ||||||
| -	unsigned int i = 0;
 |  | ||||||
| -	char alpha2[2];
 |  | ||||||
| -	u32 flags = 0;
 |  | ||||||
| -	u32 num_rules = 0, size_of_regd = 0;
 |  | ||||||
| -	u8 *triplets_start = NULL;
 |  | ||||||
| -	u8 len_at_triplet = 0;
 |  | ||||||
| -	/* the last channel we have registered in a subband (triplet) */
 |  | ||||||
| -	int last_sub_max_channel = 0;
 |  | ||||||
| -
 |  | ||||||
| -	*checksum = 0xDEADBEEF;
 |  | ||||||
| -
 |  | ||||||
| -	/* Country IE requirements */
 |  | ||||||
| -	BUG_ON(country_ie_len < IEEE80211_COUNTRY_IE_MIN_LEN ||
 |  | ||||||
| -		country_ie_len & 0x01);
 |  | ||||||
| -
 |  | ||||||
| -	alpha2[0] = country_ie[0];
 |  | ||||||
| -	alpha2[1] = country_ie[1];
 |  | ||||||
| -
 |  | ||||||
| -	/*
 |  | ||||||
| -	 * Third octet can be:
 |  | ||||||
| -	 *    'I' - Indoor
 |  | ||||||
| -	 *    'O' - Outdoor
 |  | ||||||
| -	 *
 |  | ||||||
| -	 *  anything else we assume is no restrictions
 |  | ||||||
| -	 */
 |  | ||||||
| -	if (country_ie[2] == 'I')
 |  | ||||||
| -		flags = NL80211_RRF_NO_OUTDOOR;
 |  | ||||||
| -	else if (country_ie[2] == 'O')
 |  | ||||||
| -		flags = NL80211_RRF_NO_INDOOR;
 |  | ||||||
| -
 |  | ||||||
| -	country_ie += 3;
 |  | ||||||
| -	country_ie_len -= 3;
 |  | ||||||
| -
 |  | ||||||
| -	triplets_start = country_ie;
 |  | ||||||
| -	len_at_triplet = country_ie_len;
 |  | ||||||
| -
 |  | ||||||
| -	*checksum ^= ((flags ^ alpha2[0] ^ alpha2[1]) << 8);
 |  | ||||||
| -
 |  | ||||||
| -	/*
 |  | ||||||
| -	 * We need to build a reg rule for each triplet, but first we must
 |  | ||||||
| -	 * calculate the number of reg rules we will need. We will need one
 |  | ||||||
| -	 * for each channel subband
 |  | ||||||
| -	 */
 |  | ||||||
| -	while (country_ie_len >= 3) {
 |  | ||||||
| -		int end_channel = 0;
 |  | ||||||
| -		struct ieee80211_country_ie_triplet *triplet =
 |  | ||||||
| -			(struct ieee80211_country_ie_triplet *) country_ie;
 |  | ||||||
| -		int cur_sub_max_channel = 0, cur_channel = 0;
 |  | ||||||
| -
 |  | ||||||
| -		if (triplet->ext.reg_extension_id >=
 |  | ||||||
| -				IEEE80211_COUNTRY_EXTENSION_ID) {
 |  | ||||||
| -			country_ie += 3;
 |  | ||||||
| -			country_ie_len -= 3;
 |  | ||||||
| -			continue;
 |  | ||||||
| -		}
 |  | ||||||
| -
 |  | ||||||
| -		/*
 |  | ||||||
| -		 * APs can add padding to make length divisible
 |  | ||||||
| -		 * by two, required by the spec.
 |  | ||||||
| -		 */
 |  | ||||||
| -		if (triplet->chans.first_channel == 0) {
 |  | ||||||
| -			country_ie++;
 |  | ||||||
| -			country_ie_len--;
 |  | ||||||
| -			/* This is expected to be at the very end only */
 |  | ||||||
| -			if (country_ie_len != 0)
 |  | ||||||
| -				return NULL;
 |  | ||||||
| -			break;
 |  | ||||||
| -		}
 |  | ||||||
| -
 |  | ||||||
| -		if (triplet->chans.num_channels == 0)
 |  | ||||||
| -			return NULL;
 |  | ||||||
| -
 |  | ||||||
| -		if (!chan_in_band(triplet->chans.first_channel, band))
 |  | ||||||
| -			return NULL;
 |  | ||||||
| -
 |  | ||||||
| -		/* 2 GHz */
 |  | ||||||
| -		if (band == IEEE80211_BAND_2GHZ)
 |  | ||||||
| -			end_channel = triplet->chans.first_channel +
 |  | ||||||
| -				triplet->chans.num_channels - 1;
 |  | ||||||
| -		else
 |  | ||||||
| -			/*
 |  | ||||||
| -			 * 5 GHz -- For example in country IEs if the first
 |  | ||||||
| -			 * channel given is 36 and the number of channels is 4
 |  | ||||||
| -			 * then the individual channel numbers defined for the
 |  | ||||||
| -			 * 5 GHz PHY by these parameters are: 36, 40, 44, and 48
 |  | ||||||
| -			 * and not 36, 37, 38, 39.
 |  | ||||||
| -			 *
 |  | ||||||
| -			 * See: http://tinyurl.com/11d-clarification
 |  | ||||||
| -			 */
 |  | ||||||
| -			end_channel =  triplet->chans.first_channel +
 |  | ||||||
| -				(4 * (triplet->chans.num_channels - 1));
 |  | ||||||
| -
 |  | ||||||
| -		cur_channel = triplet->chans.first_channel;
 |  | ||||||
| -
 |  | ||||||
| -		/*
 |  | ||||||
| -		 * Enhancement for APs that send a triplet for every channel
 |  | ||||||
| -		 * or for whatever reason sends triplets with multiple channels
 |  | ||||||
| -		 * separated when in fact they should be together.
 |  | ||||||
| -		 */
 |  | ||||||
| -		end_channel = max_subband_chan(band,
 |  | ||||||
| -					       cur_channel,
 |  | ||||||
| -					       end_channel,
 |  | ||||||
| -					       triplet->chans.max_power,
 |  | ||||||
| -					       &country_ie,
 |  | ||||||
| -					       &country_ie_len);
 |  | ||||||
| -		if (!end_channel)
 |  | ||||||
| -			return NULL;
 |  | ||||||
| -
 |  | ||||||
| -		if (!chan_in_band(end_channel, band))
 |  | ||||||
| -			return NULL;
 |  | ||||||
| -
 |  | ||||||
| -		cur_sub_max_channel = end_channel;
 |  | ||||||
| -
 |  | ||||||
| -		/* Basic sanity check */
 |  | ||||||
| -		if (cur_sub_max_channel < cur_channel)
 |  | ||||||
| -			return NULL;
 |  | ||||||
| -
 |  | ||||||
| -		/*
 |  | ||||||
| -		 * Do not allow overlapping channels. Also channels
 |  | ||||||
| -		 * passed in each subband must be monotonically
 |  | ||||||
| -		 * increasing
 |  | ||||||
| -		 */
 |  | ||||||
| -		if (last_sub_max_channel) {
 |  | ||||||
| -			if (cur_channel <= last_sub_max_channel)
 |  | ||||||
| -				return NULL;
 |  | ||||||
| -			if (cur_sub_max_channel <= last_sub_max_channel)
 |  | ||||||
| -				return NULL;
 |  | ||||||
| -		}
 |  | ||||||
| -
 |  | ||||||
| -		/*
 |  | ||||||
| -		 * When dot11RegulatoryClassesRequired is supported
 |  | ||||||
| -		 * we can throw ext triplets as part of this soup,
 |  | ||||||
| -		 * for now we don't care when those change as we
 |  | ||||||
| -		 * don't support them
 |  | ||||||
| -		 */
 |  | ||||||
| -		*checksum ^= ((cur_channel ^ cur_sub_max_channel) << 8) |
 |  | ||||||
| -		  ((cur_sub_max_channel ^ cur_sub_max_channel) << 16) |
 |  | ||||||
| -		  ((triplet->chans.max_power ^ cur_sub_max_channel) << 24);
 |  | ||||||
| -
 |  | ||||||
| -		last_sub_max_channel = cur_sub_max_channel;
 |  | ||||||
| -
 |  | ||||||
| -		num_rules++;
 |  | ||||||
| -
 |  | ||||||
| -		if (country_ie_len >= 3) {
 |  | ||||||
| -			country_ie += 3;
 |  | ||||||
| -			country_ie_len -= 3;
 |  | ||||||
| -		}
 |  | ||||||
| -
 |  | ||||||
| -		/*
 |  | ||||||
| -		 * Note: this is not a IEEE requirement but
 |  | ||||||
| -		 * simply a memory requirement
 |  | ||||||
| -		 */
 |  | ||||||
| -		if (num_rules > NL80211_MAX_SUPP_REG_RULES)
 |  | ||||||
| -			return NULL;
 |  | ||||||
| -	}
 |  | ||||||
| -
 |  | ||||||
| -	country_ie = triplets_start;
 |  | ||||||
| -	country_ie_len = len_at_triplet;
 |  | ||||||
| -
 |  | ||||||
| -	size_of_regd = sizeof(struct ieee80211_regdomain) +
 |  | ||||||
| -		(num_rules * sizeof(struct ieee80211_reg_rule));
 |  | ||||||
| -
 |  | ||||||
| -	rd = kzalloc(size_of_regd, GFP_KERNEL);
 |  | ||||||
| -	if (!rd)
 |  | ||||||
| -		return NULL;
 |  | ||||||
| -
 |  | ||||||
| -	rd->n_reg_rules = num_rules;
 |  | ||||||
| -	rd->alpha2[0] = alpha2[0];
 |  | ||||||
| -	rd->alpha2[1] = alpha2[1];
 |  | ||||||
| -
 |  | ||||||
| -	/* This time around we fill in the rd */
 |  | ||||||
| -	while (country_ie_len >= 3) {
 |  | ||||||
| -		int end_channel = 0;
 |  | ||||||
| -		struct ieee80211_country_ie_triplet *triplet =
 |  | ||||||
| -			(struct ieee80211_country_ie_triplet *) country_ie;
 |  | ||||||
| -		struct ieee80211_reg_rule *reg_rule = NULL;
 |  | ||||||
| -		struct ieee80211_freq_range *freq_range = NULL;
 |  | ||||||
| -		struct ieee80211_power_rule *power_rule = NULL;
 |  | ||||||
| -
 |  | ||||||
| -		/*
 |  | ||||||
| -		 * Must parse if dot11RegulatoryClassesRequired is true,
 |  | ||||||
| -		 * we don't support this yet
 |  | ||||||
| -		 */
 |  | ||||||
| -		if (triplet->ext.reg_extension_id >=
 |  | ||||||
| -				IEEE80211_COUNTRY_EXTENSION_ID) {
 |  | ||||||
| -			country_ie += 3;
 |  | ||||||
| -			country_ie_len -= 3;
 |  | ||||||
| -			continue;
 |  | ||||||
| -		}
 |  | ||||||
| -
 |  | ||||||
| -		if (triplet->chans.first_channel == 0) {
 |  | ||||||
| -			country_ie++;
 |  | ||||||
| -			country_ie_len--;
 |  | ||||||
| -			break;
 |  | ||||||
| -		}
 |  | ||||||
| -
 |  | ||||||
| -		reg_rule = &rd->reg_rules[i];
 |  | ||||||
| -		freq_range = ®_rule->freq_range;
 |  | ||||||
| -		power_rule = ®_rule->power_rule;
 |  | ||||||
| -
 |  | ||||||
| -		reg_rule->flags = flags;
 |  | ||||||
| -
 |  | ||||||
| -		/* 2 GHz */
 |  | ||||||
| -		if (band == IEEE80211_BAND_2GHZ)
 |  | ||||||
| -			end_channel = triplet->chans.first_channel +
 |  | ||||||
| -				triplet->chans.num_channels -1;
 |  | ||||||
| -		else
 |  | ||||||
| -			end_channel =  triplet->chans.first_channel +
 |  | ||||||
| -				(4 * (triplet->chans.num_channels - 1));
 |  | ||||||
| -
 |  | ||||||
| -		end_channel = max_subband_chan(band,
 |  | ||||||
| -					       triplet->chans.first_channel,
 |  | ||||||
| -					       end_channel,
 |  | ||||||
| -					       triplet->chans.max_power,
 |  | ||||||
| -					       &country_ie,
 |  | ||||||
| -					       &country_ie_len);
 |  | ||||||
| -
 |  | ||||||
| -		/*
 |  | ||||||
| -		 * The +10 is since the regulatory domain expects
 |  | ||||||
| -		 * the actual band edge, not the center of freq for
 |  | ||||||
| -		 * its start and end freqs, assuming 20 MHz bandwidth on
 |  | ||||||
| -		 * the channels passed
 |  | ||||||
| -		 */
 |  | ||||||
| -		freq_range->start_freq_khz =
 |  | ||||||
| -			MHZ_TO_KHZ(ieee80211_channel_to_frequency(
 |  | ||||||
| -				triplet->chans.first_channel) - 10);
 |  | ||||||
| -		freq_range->end_freq_khz =
 |  | ||||||
| -			MHZ_TO_KHZ(ieee80211_channel_to_frequency(
 |  | ||||||
| -				end_channel) + 10);
 |  | ||||||
| -
 |  | ||||||
| -		/*
 |  | ||||||
| -		 * These are large arbitrary values we use to intersect later.
 |  | ||||||
| -		 * Increment this if we ever support >= 40 MHz channels
 |  | ||||||
| -		 * in IEEE 802.11
 |  | ||||||
| -		 */
 |  | ||||||
| -		freq_range->max_bandwidth_khz = MHZ_TO_KHZ(40);
 |  | ||||||
| -		power_rule->max_antenna_gain = DBI_TO_MBI(100);
 |  | ||||||
| -		power_rule->max_eirp = DBM_TO_MBM(triplet->chans.max_power);
 |  | ||||||
| -
 |  | ||||||
| -		i++;
 |  | ||||||
| -
 |  | ||||||
| -		if (country_ie_len >= 3) {
 |  | ||||||
| -			country_ie += 3;
 |  | ||||||
| -			country_ie_len -= 3;
 |  | ||||||
| -		}
 |  | ||||||
| -
 |  | ||||||
| -		BUG_ON(i > NL80211_MAX_SUPP_REG_RULES);
 |  | ||||||
| -	}
 |  | ||||||
| -
 |  | ||||||
| -	return rd;
 |  | ||||||
| -}
 |  | ||||||
| -
 |  | ||||||
| -
 |  | ||||||
| -/*
 |  | ||||||
|   * Helper for regdom_intersect(), this does the real |  | ||||||
|   * mathematical intersection fun |  | ||||||
|   */ |  | ||||||
| @@ -1191,7 +699,6 @@ static int freq_reg_info_regd(struct wiphy *wiphy,
 |  | ||||||
|   |  | ||||||
|  	return -EINVAL; |  | ||||||
|  } |  | ||||||
| -EXPORT_SYMBOL(freq_reg_info);
 |  | ||||||
|   |  | ||||||
|  int freq_reg_info(struct wiphy *wiphy, |  | ||||||
|  		  u32 center_freq, |  | ||||||
| @@ -1205,6 +712,7 @@ int freq_reg_info(struct wiphy *wiphy,
 |  | ||||||
|  				  reg_rule, |  | ||||||
|  				  NULL); |  | ||||||
|  } |  | ||||||
| +EXPORT_SYMBOL(freq_reg_info);
 |  | ||||||
|   |  | ||||||
|  /* |  | ||||||
|   * Note that right now we assume the desired channel bandwidth |  | ||||||
| @@ -1243,41 +751,8 @@ static void handle_channel(struct wiphy *wiphy, enum ieee80211_band band,
 |  | ||||||
|  			  desired_bw_khz, |  | ||||||
|  			  ®_rule); |  | ||||||
|   |  | ||||||
| -	if (r) {
 |  | ||||||
| -		/*
 |  | ||||||
| -		 * This means no regulatory rule was found in the country IE
 |  | ||||||
| -		 * with a frequency range on the center_freq's band, since
 |  | ||||||
| -		 * IEEE-802.11 allows for a country IE to have a subset of the
 |  | ||||||
| -		 * regulatory information provided in a country we ignore
 |  | ||||||
| -		 * disabling the channel unless at least one reg rule was
 |  | ||||||
| -		 * found on the center_freq's band. For details see this
 |  | ||||||
| -		 * clarification:
 |  | ||||||
| -		 *
 |  | ||||||
| -		 * http://tinyurl.com/11d-clarification
 |  | ||||||
| -		 */
 |  | ||||||
| -		if (r == -ERANGE &&
 |  | ||||||
| -		    last_request->initiator ==
 |  | ||||||
| -		    NL80211_REGDOM_SET_BY_COUNTRY_IE) {
 |  | ||||||
| -			REG_DBG_PRINT("cfg80211: Leaving channel %d MHz "
 |  | ||||||
| -				"intact on %s - no rule found in band on "
 |  | ||||||
| -				"Country IE\n",
 |  | ||||||
| -			chan->center_freq, wiphy_name(wiphy));
 |  | ||||||
| -		} else {
 |  | ||||||
| -		/*
 |  | ||||||
| -		 * In this case we know the country IE has at least one reg rule
 |  | ||||||
| -		 * for the band so we respect its band definitions
 |  | ||||||
| -		 */
 |  | ||||||
| -			if (last_request->initiator ==
 |  | ||||||
| -			    NL80211_REGDOM_SET_BY_COUNTRY_IE)
 |  | ||||||
| -				REG_DBG_PRINT("cfg80211: Disabling "
 |  | ||||||
| -					"channel %d MHz on %s due to "
 |  | ||||||
| -					"Country IE\n",
 |  | ||||||
| -					chan->center_freq, wiphy_name(wiphy));
 |  | ||||||
| -			flags |= IEEE80211_CHAN_DISABLED;
 |  | ||||||
| -			chan->flags = flags;
 |  | ||||||
| -		}
 |  | ||||||
| +	if (r)
 |  | ||||||
|  		return; |  | ||||||
| -	}
 |  | ||||||
|   |  | ||||||
|  	power_rule = ®_rule->power_rule; |  | ||||||
|  	freq_range = ®_rule->freq_range; |  | ||||||
| @@ -2010,7 +1485,7 @@ EXPORT_SYMBOL(regulatory_hint);
 |  | ||||||
|   |  | ||||||
|  /* Caller must hold reg_mutex */ |  | ||||||
|  static bool reg_same_country_ie_hint(struct wiphy *wiphy, |  | ||||||
| -			u32 country_ie_checksum)
 |  | ||||||
| +			char *alpha2, enum environment_cap env)
 |  | ||||||
|  { |  | ||||||
|  	struct wiphy *request_wiphy; |  | ||||||
|   |  | ||||||
| @@ -2026,13 +1501,17 @@ static bool reg_same_country_ie_hint(struct wiphy *wiphy,
 |  | ||||||
|  		return false; |  | ||||||
|   |  | ||||||
|  	if (likely(request_wiphy != wiphy)) |  | ||||||
| -		return !country_ie_integrity_changes(country_ie_checksum);
 |  | ||||||
| +		return (last_request->alpha2[0] == alpha2[0] &&
 |  | ||||||
| +			last_request->alpha2[1] == alpha2[1] &&
 |  | ||||||
| +			last_request->country_ie_env == env);
 |  | ||||||
|  	/* |  | ||||||
|  	 * We should not have let these through at this point, they |  | ||||||
|  	 * should have been picked up earlier by the first alpha2 check |  | ||||||
|  	 * on the device |  | ||||||
|  	 */ |  | ||||||
| -	if (WARN_ON(!country_ie_integrity_changes(country_ie_checksum)))
 |  | ||||||
| +	if (WARN_ON((last_request->alpha2[0] == alpha2[0] &&
 |  | ||||||
| +			last_request->alpha2[1] == alpha2[1] &&
 |  | ||||||
| +			last_request->country_ie_env == env )))
 |  | ||||||
|  		return true; |  | ||||||
|  	return false; |  | ||||||
|  } |  | ||||||
| @@ -2048,7 +1527,6 @@ void regulatory_hint_11d(struct wiphy *wiphy,
 |  | ||||||
|  { |  | ||||||
|  	struct ieee80211_regdomain *rd = NULL; |  | ||||||
|  	char alpha2[2]; |  | ||||||
| -	u32 checksum = 0;
 |  | ||||||
|  	enum environment_cap env = ENVIRON_ANY; |  | ||||||
|  	struct regulatory_request *request; |  | ||||||
|   |  | ||||||
| @@ -2064,14 +1542,6 @@ void regulatory_hint_11d(struct wiphy *wiphy,
 |  | ||||||
|  	if (country_ie_len < IEEE80211_COUNTRY_IE_MIN_LEN) |  | ||||||
|  		goto out; |  | ||||||
|   |  | ||||||
| -	/*
 |  | ||||||
| -	 * Pending country IE processing, this can happen after we
 |  | ||||||
| -	 * call CRDA and wait for a response if a beacon was received before
 |  | ||||||
| -	 * we were able to process the last regulatory_hint_11d() call
 |  | ||||||
| -	 */
 |  | ||||||
| -	if (country_ie_regdomain)
 |  | ||||||
| -		goto out;
 |  | ||||||
| -
 |  | ||||||
|  	alpha2[0] = country_ie[0]; |  | ||||||
|  	alpha2[1] = country_ie[1]; |  | ||||||
|   |  | ||||||
| @@ -2090,12 +1560,6 @@ void regulatory_hint_11d(struct wiphy *wiphy,
 |  | ||||||
|  	    wiphy_idx_valid(last_request->wiphy_idx))) |  | ||||||
|  		goto out; |  | ||||||
|   |  | ||||||
| -	rd = country_ie_2_rd(band, country_ie, country_ie_len, &checksum);
 |  | ||||||
| -	if (!rd) {
 |  | ||||||
| -		REG_DBG_PRINT("cfg80211: Ignoring bogus country IE\n");
 |  | ||||||
| -		goto out;
 |  | ||||||
| -	}
 |  | ||||||
| -
 |  | ||||||
|  	/* |  | ||||||
|  	 * This will not happen right now but we leave it here for the |  | ||||||
|  	 * the future when we want to add suspend/resume support and having |  | ||||||
| @@ -2105,24 +1569,17 @@ void regulatory_hint_11d(struct wiphy *wiphy,
 |  | ||||||
|  	 * If we hit this before we add this support we want to be informed of |  | ||||||
|  	 * it as it would indicate a mistake in the current design |  | ||||||
|  	 */ |  | ||||||
| -	if (WARN_ON(reg_same_country_ie_hint(wiphy, checksum)))
 |  | ||||||
| +	if (WARN_ON(reg_same_country_ie_hint(wiphy, alpha2, env)))
 |  | ||||||
|  		goto free_rd_out; |  | ||||||
|   |  | ||||||
|  	request = kzalloc(sizeof(struct regulatory_request), GFP_KERNEL); |  | ||||||
|  	if (!request) |  | ||||||
|  		goto free_rd_out; |  | ||||||
|   |  | ||||||
| -	/*
 |  | ||||||
| -	 * We keep this around for when CRDA comes back with a response so
 |  | ||||||
| -	 * we can intersect with that
 |  | ||||||
| -	 */
 |  | ||||||
| -	country_ie_regdomain = rd;
 |  | ||||||
| -
 |  | ||||||
|  	request->wiphy_idx = get_wiphy_idx(wiphy); |  | ||||||
| -	request->alpha2[0] = rd->alpha2[0];
 |  | ||||||
| -	request->alpha2[1] = rd->alpha2[1];
 |  | ||||||
| +	request->alpha2[0] = alpha2[0];
 |  | ||||||
| +	request->alpha2[1] = alpha2[1];
 |  | ||||||
|  	request->initiator = NL80211_REGDOM_SET_BY_COUNTRY_IE; |  | ||||||
| -	request->country_ie_checksum = checksum;
 |  | ||||||
|  	request->country_ie_env = env; |  | ||||||
|   |  | ||||||
|  	mutex_unlock(®_mutex); |  | ||||||
| @@ -2383,33 +1840,6 @@ static void print_regdomain_info(const struct ieee80211_regdomain *rd)
 |  | ||||||
|  	print_rd_rules(rd); |  | ||||||
|  } |  | ||||||
|   |  | ||||||
| -#ifdef CONFIG_CFG80211_REG_DEBUG
 |  | ||||||
| -static void reg_country_ie_process_debug(
 |  | ||||||
| -	const struct ieee80211_regdomain *rd,
 |  | ||||||
| -	const struct ieee80211_regdomain *country_ie_regdomain,
 |  | ||||||
| -	const struct ieee80211_regdomain *intersected_rd)
 |  | ||||||
| -{
 |  | ||||||
| -	printk(KERN_DEBUG "cfg80211: Received country IE:\n");
 |  | ||||||
| -	print_regdomain_info(country_ie_regdomain);
 |  | ||||||
| -	printk(KERN_DEBUG "cfg80211: CRDA thinks this should applied:\n");
 |  | ||||||
| -	print_regdomain_info(rd);
 |  | ||||||
| -	if (intersected_rd) {
 |  | ||||||
| -		printk(KERN_DEBUG "cfg80211: We intersect both of these "
 |  | ||||||
| -			"and get:\n");
 |  | ||||||
| -		print_regdomain_info(intersected_rd);
 |  | ||||||
| -		return;
 |  | ||||||
| -	}
 |  | ||||||
| -	printk(KERN_DEBUG "cfg80211: Intersection between both failed\n");
 |  | ||||||
| -}
 |  | ||||||
| -#else
 |  | ||||||
| -static inline void reg_country_ie_process_debug(
 |  | ||||||
| -	const struct ieee80211_regdomain *rd,
 |  | ||||||
| -	const struct ieee80211_regdomain *country_ie_regdomain,
 |  | ||||||
| -	const struct ieee80211_regdomain *intersected_rd)
 |  | ||||||
| -{
 |  | ||||||
| -}
 |  | ||||||
| -#endif
 |  | ||||||
| -
 |  | ||||||
|  /* Takes ownership of rd only if it doesn't fail */ |  | ||||||
|  static int __set_regdom(const struct ieee80211_regdomain *rd) |  | ||||||
|  { |  | ||||||
| @@ -2521,34 +1951,6 @@ static int __set_regdom(const struct ieee80211_regdomain *rd)
 |  | ||||||
|  		return 0; |  | ||||||
|  	} |  | ||||||
|   |  | ||||||
| -	/*
 |  | ||||||
| -	 * Country IE requests are handled a bit differently, we intersect
 |  | ||||||
| -	 * the country IE rd with what CRDA believes that country should have
 |  | ||||||
| -	 */
 |  | ||||||
| -
 |  | ||||||
| -	/*
 |  | ||||||
| -	 * Userspace could have sent two replies with only
 |  | ||||||
| -	 * one kernel request. By the second reply we would have
 |  | ||||||
| -	 * already processed and consumed the country_ie_regdomain.
 |  | ||||||
| -	 */
 |  | ||||||
| -	if (!country_ie_regdomain)
 |  | ||||||
| -		return -EALREADY;
 |  | ||||||
| -	BUG_ON(rd == country_ie_regdomain);
 |  | ||||||
| -
 |  | ||||||
| -	/*
 |  | ||||||
| -	 * Intersect what CRDA returned and our what we
 |  | ||||||
| -	 * had built from the Country IE received
 |  | ||||||
| -	 */
 |  | ||||||
| -
 |  | ||||||
| -	intersected_rd = regdom_intersect(rd, country_ie_regdomain);
 |  | ||||||
| -
 |  | ||||||
| -	reg_country_ie_process_debug(rd,
 |  | ||||||
| -				     country_ie_regdomain,
 |  | ||||||
| -				     intersected_rd);
 |  | ||||||
| -
 |  | ||||||
| -	kfree(country_ie_regdomain);
 |  | ||||||
| -	country_ie_regdomain = NULL;
 |  | ||||||
| -
 |  | ||||||
|  	if (!intersected_rd) |  | ||||||
|  		return -EINVAL; |  | ||||||
|   |  | ||||||
| @@ -2688,9 +2090,6 @@ void /* __init_or_exit */ regulatory_exit(void)
 |  | ||||||
|   |  | ||||||
|  	reset_regdomains(); |  | ||||||
|   |  | ||||||
| -	kfree(country_ie_regdomain);
 |  | ||||||
| -	country_ie_regdomain = NULL;
 |  | ||||||
| -
 |  | ||||||
|  	kfree(last_request); |  | ||||||
|   |  | ||||||
|  	platform_device_unregister(reg_pdev); |  | ||||||
| -- 
 |  | ||||||
| 1.7.1.1 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| @ -1,53 +0,0 @@ | |||||||
| From: Matthew Garrett <mjg@redhat.com> |  | ||||||
| Subject: ACPI: Disable ASPM if the platform won't provide _OSC control for PCIe |  | ||||||
| 
 |  | ||||||
| ACPI: Disable ASPM if the platform won't provide _OSC control for PCIe |  | ||||||
| 
 |  | ||||||
| The PCI SIG documentation for the _OSC OS/firmware handshaking interface |  | ||||||
| states: |  | ||||||
| 
 |  | ||||||
| "If the _OSC control method is absent from the scope of a host bridge |  | ||||||
| device, then the operating system must not enable or attempt to use any |  | ||||||
| features defined in this section for the hierarchy originated by the host |  | ||||||
| bridge." |  | ||||||
| 
 |  | ||||||
| The obvious interpretation of this is that the OS should not attempt to use |  | ||||||
| PCIe hotplug, PME or AER - however, the specification also notes that an |  | ||||||
| _OSC method is *required* for PCIe hierarchies, and experimental validation |  | ||||||
| with An Alternative OS indicates that it doesn't use any PCIe functionality |  | ||||||
| if the _OSC method is missing. That arguably means we shouldn't be using |  | ||||||
| MSI or extended config space, but right now our problems seem to be limited |  | ||||||
| to vendors being surprised when ASPM gets enabled on machines when other |  | ||||||
| OSs refuse to do so. So, for now, let's just disable ASPM if the _OSC |  | ||||||
| method doesn't exist or refuses to hand over PCIe capability control. |  | ||||||
| 
 |  | ||||||
| Signed-off-by: Matthew Garrett <mjg@redhat.com> |  | ||||||
| ---
 |  | ||||||
| 
 |  | ||||||
| diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
 |  | ||||||
| index 4eac593..1f67057 100644
 |  | ||||||
| --- a/drivers/acpi/pci_root.c
 |  | ||||||
| +++ b/drivers/acpi/pci_root.c
 |  | ||||||
| @@ -33,6 +33,7 @@
 |  | ||||||
|  #include <linux/pm_runtime.h> |  | ||||||
|  #include <linux/pci.h> |  | ||||||
|  #include <linux/pci-acpi.h> |  | ||||||
| +#include <linux/pci-aspm.h>
 |  | ||||||
|  #include <linux/acpi.h> |  | ||||||
|  #include <linux/slab.h> |  | ||||||
|  #include <acpi/acpi_bus.h> |  | ||||||
| @@ -543,6 +544,14 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
 |  | ||||||
|  	if (flags != base_flags) |  | ||||||
|  		acpi_pci_osc_support(root, flags); |  | ||||||
|   |  | ||||||
| +	status = acpi_pci_osc_control_set(root->device->handle,
 |  | ||||||
| +					  0);
 |  | ||||||
| +
 |  | ||||||
| +	if (status == AE_NOT_EXIST) {
 |  | ||||||
| +		printk(KERN_INFO "Unable to assume PCIe control: Disabling ASPM\n");
 |  | ||||||
| +		pcie_no_aspm();
 |  | ||||||
| +	}
 |  | ||||||
| +
 |  | ||||||
|  	pci_acpi_add_bus_pm_notifier(device, root->bus); |  | ||||||
|  	if (device->wakeup.flags.run_wake) |  | ||||||
|  		device_set_run_wake(root->bus->bridge, true); |  | ||||||
| @ -1,50 +0,0 @@ | |||||||
| From: Matthew Garrett <mjg@redhat.com> |  | ||||||
| Date: Wed, 9 Jun 2010 20:05:07 +0000 (-0400) |  | ||||||
| Subject: PCI: Don't enable aspm before drivers have had a chance to veto it |  | ||||||
| X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fjbarnes%2Fpci-2.6.git;a=commitdiff_plain;h=8f0b08c29f1df91315e48adce04462eb23671099 |  | ||||||
| 
 |  | ||||||
| PCI: Don't enable aspm before drivers have had a chance to veto it |  | ||||||
| 
 |  | ||||||
| The aspm code will currently set the configured aspm policy before drivers |  | ||||||
| have had an opportunity to indicate that their hardware doesn't support it. |  | ||||||
| Unfortunately, putting some hardware in L0 or L1 can result in the hardware |  | ||||||
| no longer responding to any requests, even after aspm is disabled. It makes |  | ||||||
| more sense to leave aspm policy at the BIOS defaults at initial setup time, |  | ||||||
| reconfiguring it after pci_enable_device() is called. This allows the |  | ||||||
| driver to blacklist individual devices beforehand. |  | ||||||
| 
 |  | ||||||
| Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> |  | ||||||
| Signed-off-by: Matthew Garrett <mjg@redhat.com> |  | ||||||
| Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> |  | ||||||
| ---
 |  | ||||||
| 
 |  | ||||||
| diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
 |  | ||||||
| index be53d98..7122281 100644
 |  | ||||||
| --- a/drivers/pci/pcie/aspm.c
 |  | ||||||
| +++ b/drivers/pci/pcie/aspm.c
 |  | ||||||
| @@ -588,11 +588,23 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev)
 |  | ||||||
|  	 * update through pcie_aspm_cap_init(). |  | ||||||
|  	 */ |  | ||||||
|  	pcie_aspm_cap_init(link, blacklist); |  | ||||||
| -	pcie_config_aspm_path(link);
 |  | ||||||
|   |  | ||||||
|  	/* Setup initial Clock PM state */ |  | ||||||
|  	pcie_clkpm_cap_init(link, blacklist); |  | ||||||
| -	pcie_set_clkpm(link, policy_to_clkpm_state(link));
 |  | ||||||
| +
 |  | ||||||
| +	/*
 |  | ||||||
| +	 * At this stage drivers haven't had an opportunity to change the
 |  | ||||||
| +	 * link policy setting. Enabling ASPM on broken hardware can cripple
 |  | ||||||
| +	 * it even before the driver has had a chance to disable ASPM, so
 |  | ||||||
| +	 * default to a safe level right now. If we're enabling ASPM beyond
 |  | ||||||
| +	 * the BIOS's expectation, we'll do so once pci_enable_device() is
 |  | ||||||
| +	 * called.
 |  | ||||||
| +	 */
 |  | ||||||
| +	if (aspm_policy != POLICY_POWERSAVE) {
 |  | ||||||
| +		pcie_config_aspm_path(link);
 |  | ||||||
| +		pcie_set_clkpm(link, policy_to_clkpm_state(link));
 |  | ||||||
| +	}
 |  | ||||||
| +
 |  | ||||||
|  unlock: |  | ||||||
|  	mutex_unlock(&aspm_lock); |  | ||||||
|  out: |  | ||||||
| @ -1,7 +1,6 @@ | |||||||
| #!/bin/bash | #!/bin/bash | ||||||
| 
 | 
 | ||||||
| utrace_base=2.6-current | utrace_base=2.6-current | ||||||
| utrace_base=2.6.34 |  | ||||||
| 
 | 
 | ||||||
| url=http://people.redhat.com/roland/utrace/${1:-$utrace_base} | url=http://people.redhat.com/roland/utrace/${1:-$utrace_base} | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								sources
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								sources
									
									
									
									
									
								
							| @ -1,2 +1,2 @@ | |||||||
| 091abeb4684ce03d1d936851618687b6  linux-2.6.35.tar.bz2 | 091abeb4684ce03d1d936851618687b6  linux-2.6.35.tar.bz2 | ||||||
| 1e730019937132cd4d0bcf2c35384e86  patch-2.6.35-git1.bz2 | 4f51963b5e076fb87ab32bda229a524f  patch-2.6.36-rc1.bz2 | ||||||
|  | |||||||
| @ -1,29 +0,0 @@ | |||||||
| From 9b7ec0e07ce85c377b76626cef552d27d59cc405 Mon Sep 17 00:00:00 2001 |  | ||||||
| From: Kyle McMartin <kyle@dreadnought.i.jkkm.org> |  | ||||||
| Date: Tue, 22 Jun 2010 13:57:47 +0100 |  | ||||||
| Subject: utrace-ptrace: removed defunct arch_ptrace_untrace call |  | ||||||
| 
 |  | ||||||
| commit faa4602e removed the unused BTS code which had added |  | ||||||
| this hook. |  | ||||||
| 
 |  | ||||||
| Signed-off-by: Kyle McMartin <kyle@redhat.com> |  | ||||||
| ---
 |  | ||||||
|  kernel/ptrace-utrace.c |    2 -- |  | ||||||
|  1 files changed, 0 insertions(+), 2 deletions(-) |  | ||||||
| 
 |  | ||||||
| diff --git a/kernel/ptrace-utrace.c b/kernel/ptrace-utrace.c
 |  | ||||||
| index 86234ee..1a8ba5e 100644
 |  | ||||||
| --- a/kernel/ptrace-utrace.c
 |  | ||||||
| +++ b/kernel/ptrace-utrace.c
 |  | ||||||
| @@ -50,8 +50,6 @@ void __ptrace_unlink(struct task_struct *child)
 |  | ||||||
|  	child->ptrace = 0; |  | ||||||
|  	child->parent = child->real_parent; |  | ||||||
|  	list_del_init(&child->ptrace_entry); |  | ||||||
| -
 |  | ||||||
| -	arch_ptrace_untrace(child);
 |  | ||||||
|  } |  | ||||||
|   |  | ||||||
|  struct ptrace_context { |  | ||||||
| -- 
 |  | ||||||
| 1.7.0.1 |  | ||||||
| 
 |  | ||||||
| @ -1,32 +0,0 @@ | |||||||
| From ad778e66100e4b76bab6b939e3d0c781da82d980 Mon Sep 17 00:00:00 2001 |  | ||||||
| From: Kyle McMartin <kyle@dreadnought.i.jkkm.org> |  | ||||||
| Date: Tue, 22 Jun 2010 14:09:30 +0100 |  | ||||||
| Subject: utrace: remove use of kref_set |  | ||||||
| 
 |  | ||||||
| Unfortunatey db1afffa which removed kref_set did not anticipate |  | ||||||
| anyone would actually like to use a kref which starts with a refcnt |  | ||||||
| above 1. Replace kref_set in utrace with a kref_init + kref_get to |  | ||||||
| immediately bump the reference count. |  | ||||||
| 
 |  | ||||||
| Signed-off-by: Kyle McMartin <kyle@redhat.com> |  | ||||||
| ---
 |  | ||||||
|  kernel/utrace.c |    3 ++- |  | ||||||
|  1 files changed, 2 insertions(+), 1 deletions(-) |  | ||||||
| 
 |  | ||||||
| diff --git a/kernel/utrace.c b/kernel/utrace.c
 |  | ||||||
| index f5a9e2c..cc864d5 100644
 |  | ||||||
| --- a/kernel/utrace.c
 |  | ||||||
| +++ b/kernel/utrace.c
 |  | ||||||
| @@ -304,7 +304,8 @@ struct utrace_engine *utrace_attach_task(
 |  | ||||||
|  	 * Initialize the new engine structure.  It starts out with two |  | ||||||
|  	 * refs: one ref to return, and one ref for being attached. |  | ||||||
|  	 */ |  | ||||||
| -	kref_set(&engine->kref, 2);
 |  | ||||||
| +	kref_init(&engine->kref);
 |  | ||||||
| +	kref_get(&engine->kref);
 |  | ||||||
|  	engine->flags = 0; |  | ||||||
|  	engine->ops = ops; |  | ||||||
|  	engine->data = data; |  | ||||||
| -- 
 |  | ||||||
| 1.7.0.1 |  | ||||||
| 
 |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user