Linux v3.8-rc2-116-g5f243b9
This commit is contained in:
parent
5a4dd83779
commit
f82b10781d
@ -1,100 +0,0 @@
|
||||
From a9dbe40fc10cea2efe6e1ff9e03c62dd7579c5ba Mon Sep 17 00:00:00 2001
|
||||
From: David Woodhouse <dwmw2@infradead.org>
|
||||
Date: Wed, 21 Nov 2012 10:27:19 +0000
|
||||
Subject: [PATCH] 8139cp: set ring address after enabling C+ mode
|
||||
|
||||
This fixes (for me) a regression introduced by commit b01af457 ("8139cp:
|
||||
set ring address before enabling receiver"). That commit configured the
|
||||
descriptor ring addresses earlier in the initialisation sequence, in
|
||||
order to avoid the possibility of triggering stray DMA before the
|
||||
correct address had been set up.
|
||||
|
||||
Unfortunately, it seems that the hardware will scribble garbage into the
|
||||
TxRingAddr registers when we enable "plus mode" Tx in the CpCmd
|
||||
register. Observed on a Traverse Geos router board.
|
||||
|
||||
To deal with this, while not reintroducing the problem which led to the
|
||||
original commit, we augment cp_start_hw() to write to the CpCmd register
|
||||
*first*, then set the descriptor ring addresses, and then finally to
|
||||
enable Rx and Tx in the original 8139 Cmd register. The datasheet
|
||||
actually indicates that we should enable Tx/Rx in the Cmd register
|
||||
*before* configuring the descriptor addresses, but that would appear to
|
||||
re-introduce the problem that the offending commit b01af457 was trying
|
||||
to solve. And this variant appears to work fine on real hardware.
|
||||
|
||||
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
|
||||
Cc: stable@kernel.org [3.5+]
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/realtek/8139cp.c | 40 +++++++++++++++++++++++----------
|
||||
1 files changed, 28 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c
|
||||
index 1c81825..5166d94 100644
|
||||
--- a/drivers/net/ethernet/realtek/8139cp.c
|
||||
+++ b/drivers/net/ethernet/realtek/8139cp.c
|
||||
@@ -957,7 +957,35 @@ static void cp_reset_hw (struct cp_private *cp)
|
||||
|
||||
static inline void cp_start_hw (struct cp_private *cp)
|
||||
{
|
||||
+ dma_addr_t ring_dma;
|
||||
+
|
||||
cpw16(CpCmd, cp->cpcmd);
|
||||
+
|
||||
+ /*
|
||||
+ * These (at least TxRingAddr) need to be configured after the
|
||||
+ * corresponding bits in CpCmd are enabled. Datasheet v1.6 §6.33
|
||||
+ * (C+ Command Register) recommends that these and more be configured
|
||||
+ * *after* the [RT]xEnable bits in CpCmd are set. And on some hardware
|
||||
+ * it's been observed that the TxRingAddr is actually reset to garbage
|
||||
+ * when C+ mode Tx is enabled in CpCmd.
|
||||
+ */
|
||||
+ cpw32_f(HiTxRingAddr, 0);
|
||||
+ cpw32_f(HiTxRingAddr + 4, 0);
|
||||
+
|
||||
+ ring_dma = cp->ring_dma;
|
||||
+ cpw32_f(RxRingAddr, ring_dma & 0xffffffff);
|
||||
+ cpw32_f(RxRingAddr + 4, (ring_dma >> 16) >> 16);
|
||||
+
|
||||
+ ring_dma += sizeof(struct cp_desc) * CP_RX_RING_SIZE;
|
||||
+ cpw32_f(TxRingAddr, ring_dma & 0xffffffff);
|
||||
+ cpw32_f(TxRingAddr + 4, (ring_dma >> 16) >> 16);
|
||||
+
|
||||
+ /*
|
||||
+ * Strictly speaking, the datasheet says this should be enabled
|
||||
+ * *before* setting the descriptor addresses. But what, then, would
|
||||
+ * prevent it from doing DMA to random unconfigured addresses?
|
||||
+ * This variant appears to work fine.
|
||||
+ */
|
||||
cpw8(Cmd, RxOn | TxOn);
|
||||
}
|
||||
|
||||
@@ -969,7 +997,6 @@ static void cp_enable_irq(struct cp_private *cp)
|
||||
static void cp_init_hw (struct cp_private *cp)
|
||||
{
|
||||
struct net_device *dev = cp->dev;
|
||||
- dma_addr_t ring_dma;
|
||||
|
||||
cp_reset_hw(cp);
|
||||
|
||||
@@ -979,17 +1006,6 @@ static void cp_init_hw (struct cp_private *cp)
|
||||
cpw32_f (MAC0 + 0, le32_to_cpu (*(__le32 *) (dev->dev_addr + 0)));
|
||||
cpw32_f (MAC0 + 4, le32_to_cpu (*(__le32 *) (dev->dev_addr + 4)));
|
||||
|
||||
- cpw32_f(HiTxRingAddr, 0);
|
||||
- cpw32_f(HiTxRingAddr + 4, 0);
|
||||
-
|
||||
- ring_dma = cp->ring_dma;
|
||||
- cpw32_f(RxRingAddr, ring_dma & 0xffffffff);
|
||||
- cpw32_f(RxRingAddr + 4, (ring_dma >> 16) >> 16);
|
||||
-
|
||||
- ring_dma += sizeof(struct cp_desc) * CP_RX_RING_SIZE;
|
||||
- cpw32_f(TxRingAddr, ring_dma & 0xffffffff);
|
||||
- cpw32_f(TxRingAddr + 4, (ring_dma >> 16) >> 16);
|
||||
-
|
||||
cp_start_hw(cp);
|
||||
cpw8(TxThresh, 0x06); /* XXX convert magic num to a constant */
|
||||
|
||||
--
|
||||
1.7.6.5
|
||||
|
@ -1,43 +0,0 @@
|
||||
From a5f86c3423428c8e28b6501d0e9c3929ca91f07d Mon Sep 17 00:00:00 2001
|
||||
From: Jeff Cook <jeff@deserettechnology.com>
|
||||
Date: Fri, 9 Nov 2012 16:39:48 -0700
|
||||
Subject: [PATCH 2/2] Bluetooth: Add support for BCM20702A0 [0b05, 17b5]
|
||||
|
||||
Vendor-specific ID for BCM20702A0.
|
||||
Support for bluetooth over Asus Wi-Fi GO!, included with Asus P8Z77-V
|
||||
Deluxe.
|
||||
|
||||
T: Bus=07 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=12 MxCh= 0
|
||||
D: Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
|
||||
P: Vendor=0b05 ProdID=17b5 Rev=01.12
|
||||
S: Manufacturer=Broadcom Corp
|
||||
S: Product=BCM20702A0
|
||||
S: SerialNumber=94DBC98AC113
|
||||
C: #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=0mA
|
||||
I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
|
||||
I: If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
|
||||
I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
|
||||
I: If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Jeff Cook <jeff@deserettechnology.com>
|
||||
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
|
||||
---
|
||||
drivers/bluetooth/btusb.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
|
||||
index b167944..6dc44ff 100644
|
||||
--- a/drivers/bluetooth/btusb.c
|
||||
+++ b/drivers/bluetooth/btusb.c
|
||||
@@ -96,6 +96,7 @@ static struct usb_device_id btusb_table[] = {
|
||||
{ USB_DEVICE(0x0c10, 0x0000) },
|
||||
|
||||
/* Broadcom BCM20702A0 */
|
||||
+ { USB_DEVICE(0x0b05, 0x17b5) },
|
||||
{ USB_DEVICE(0x04ca, 0x2003) },
|
||||
{ USB_DEVICE(0x0489, 0xe042) },
|
||||
{ USB_DEVICE(0x413c, 0x8197) },
|
||||
--
|
||||
1.8.0
|
||||
|
@ -1,59 +0,0 @@
|
||||
From 071e3ef4a94a021b16a2912f3885c86f4ff36b49 Mon Sep 17 00:00:00 2001
|
||||
From: "David S. Miller" <davem@davemloft.net>
|
||||
Date: Sun, 25 Nov 2012 15:52:09 -0500
|
||||
Subject: [PATCH] Revert "8139cp: revert "set ring address before enabling
|
||||
receiver""
|
||||
|
||||
This reverts commit b26623dab7eeb1e9f5898c7a49458789dd492f20.
|
||||
|
||||
This reverts the revert, in net-next we'll try another scheme
|
||||
to fix this bug using patches from David Woodhouse.
|
||||
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/realtek/8139cp.c | 22 +++++++++++-----------
|
||||
1 files changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c
|
||||
index b01f83a..1c81825 100644
|
||||
--- a/drivers/net/ethernet/realtek/8139cp.c
|
||||
+++ b/drivers/net/ethernet/realtek/8139cp.c
|
||||
@@ -979,6 +979,17 @@ static void cp_init_hw (struct cp_private *cp)
|
||||
cpw32_f (MAC0 + 0, le32_to_cpu (*(__le32 *) (dev->dev_addr + 0)));
|
||||
cpw32_f (MAC0 + 4, le32_to_cpu (*(__le32 *) (dev->dev_addr + 4)));
|
||||
|
||||
+ cpw32_f(HiTxRingAddr, 0);
|
||||
+ cpw32_f(HiTxRingAddr + 4, 0);
|
||||
+
|
||||
+ ring_dma = cp->ring_dma;
|
||||
+ cpw32_f(RxRingAddr, ring_dma & 0xffffffff);
|
||||
+ cpw32_f(RxRingAddr + 4, (ring_dma >> 16) >> 16);
|
||||
+
|
||||
+ ring_dma += sizeof(struct cp_desc) * CP_RX_RING_SIZE;
|
||||
+ cpw32_f(TxRingAddr, ring_dma & 0xffffffff);
|
||||
+ cpw32_f(TxRingAddr + 4, (ring_dma >> 16) >> 16);
|
||||
+
|
||||
cp_start_hw(cp);
|
||||
cpw8(TxThresh, 0x06); /* XXX convert magic num to a constant */
|
||||
|
||||
@@ -992,17 +1003,6 @@ static void cp_init_hw (struct cp_private *cp)
|
||||
|
||||
cpw8(Config5, cpr8(Config5) & PMEStatus);
|
||||
|
||||
- cpw32_f(HiTxRingAddr, 0);
|
||||
- cpw32_f(HiTxRingAddr + 4, 0);
|
||||
-
|
||||
- ring_dma = cp->ring_dma;
|
||||
- cpw32_f(RxRingAddr, ring_dma & 0xffffffff);
|
||||
- cpw32_f(RxRingAddr + 4, (ring_dma >> 16) >> 16);
|
||||
-
|
||||
- ring_dma += sizeof(struct cp_desc) * CP_RX_RING_SIZE;
|
||||
- cpw32_f(TxRingAddr, ring_dma & 0xffffffff);
|
||||
- cpw32_f(TxRingAddr + 4, (ring_dma >> 16) >> 16);
|
||||
-
|
||||
cpw16(MultiIntr, 0);
|
||||
|
||||
cpw8_f(Cfg9346, Cfg9346_Lock);
|
||||
--
|
||||
1.7.6.5
|
||||
|
@ -63,6 +63,7 @@ CONFIG_SCHED_SMT=y
|
||||
CONFIG_RCU_FANOUT=32
|
||||
|
||||
CONFIG_CPU_IDLE=y
|
||||
# CONFIG_CPU_IDLE_MULTIPLE_DRIVERS is not set
|
||||
# CONFIG_CPU_IDLE_GOV_LADDER is not set
|
||||
CONFIG_CPU_IDLE_GOV_MENU=y
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
CONFIG_MMU=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_HOTPLUG_CPU=y
|
||||
# CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set
|
||||
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
|
||||
CONFIG_LOCALVERSION=""
|
||||
CONFIG_CROSS_COMPILE=""
|
||||
CONFIG_DEFAULT_HOSTNAME="(none)"
|
||||
@ -124,6 +126,7 @@ CONFIG_MMC_BLOCK_MINORS=8
|
||||
CONFIG_MMC_BLOCK_BOUNCE=y
|
||||
CONFIG_MMC_SDHCI=m
|
||||
CONFIG_MMC_SDHCI_PCI=m
|
||||
CONFIG_MMC_SDHCI_ACPI=m
|
||||
CONFIG_MMC_SDRICOH_CS=m
|
||||
CONFIG_MMC_TIFM_SD=m
|
||||
CONFIG_MMC_WBSD=m
|
||||
@ -132,6 +135,7 @@ CONFIG_MMC_SDHCI_PLTFM=m
|
||||
CONFIG_MMC_CB710=m
|
||||
CONFIG_MMC_RICOH_MMC=y
|
||||
CONFIG_MMC_USHC=m
|
||||
CONFIG_MMC_REALTEK_PCI=m
|
||||
CONFIG_MMC_VUB300=m
|
||||
|
||||
CONFIG_CB710_CORE=m
|
||||
@ -340,6 +344,7 @@ CONFIG_SCSI_SRP=m
|
||||
CONFIG_SCSI_SRP_ATTRS=m
|
||||
CONFIG_SCSI_TGT=m
|
||||
CONFIG_SCSI_ISCI=m
|
||||
CONFIG_SCSI_CHELSIO_FCOE=m
|
||||
|
||||
CONFIG_SCSI_DH=y
|
||||
CONFIG_SCSI_DH_RDAC=m
|
||||
@ -416,6 +421,9 @@ CONFIG_SCSI_MVSAS_TASKLET=y
|
||||
CONFIG_SCSI_MPT2SAS=m
|
||||
CONFIG_SCSI_MPT2SAS_MAX_SGE=128
|
||||
CONFIG_SCSI_MPT2SAS_LOGGING=y
|
||||
CONFIG_SCSI_MPT3SAS=m
|
||||
CONFIG_SCSI_MPT3SAS_MAX_SGE=128
|
||||
CONFIG_SCSI_MPT3SAS_LOGGING=y
|
||||
|
||||
CONFIG_SCSI_UFSHCD=m
|
||||
|
||||
@ -607,6 +615,7 @@ CONFIG_FIREWIRE_SBP2=m
|
||||
CONFIG_FIREWIRE_NET=m
|
||||
CONFIG_FIREWIRE_OHCI_DEBUG=y
|
||||
CONFIG_FIREWIRE_NOSY=m
|
||||
CONFIG_FIREWIRE_SERIAL=m
|
||||
# CONFIG_FIREWIRE_OHCI_REMOTE_DMA is not set
|
||||
|
||||
#
|
||||
@ -977,9 +986,11 @@ CONFIG_IP_SCTP=m
|
||||
CONFIG_NET_SCTPPROBE=m
|
||||
# CONFIG_SCTP_DBG_MSG is not set
|
||||
# CONFIG_SCTP_DBG_OBJCNT is not set
|
||||
# CONFIG_SCTP_HMAC_NONE is not set
|
||||
CONFIG_SCTP_HMAC_SHA1=y
|
||||
# CONFIG_SCTP_HMAC_MD5 is not set
|
||||
CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1=y
|
||||
# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5 is not set
|
||||
# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not set
|
||||
CONFIG_SCTP_COOKIE_HMAC_MD5=y
|
||||
CONFIG_SCTP_COOKIE_HMAC_SHA1=y
|
||||
CONFIG_ATM=m
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_VLAN_8021Q_GVRP=y
|
||||
@ -1077,6 +1088,7 @@ CONFIG_DCB=y
|
||||
CONFIG_DNS_RESOLVER=m
|
||||
CONFIG_BATMAN_ADV=m
|
||||
CONFIG_BATMAN_ADV_BLA=y
|
||||
CONFIG_BATMAN_ADV_DAT=y
|
||||
# CONFIG_BATMAN_ADV_DEBUG is not set
|
||||
CONFIG_OPENVSWITCH=m
|
||||
CONFIG_NETPRIO_CGROUP=m
|
||||
@ -1187,6 +1199,9 @@ CONFIG_ATL2=m
|
||||
CONFIG_ATL1=m
|
||||
CONFIG_ATL1C=m
|
||||
CONFIG_ATL1E=m
|
||||
CONFIG_NET_CADENCE=y
|
||||
CONFIG_ARM_AT91_ETHER=m
|
||||
CONFIG_MACB=m
|
||||
|
||||
CONFIG_NET_VENDOR_BROCADE=y
|
||||
CONFIG_BNA=m
|
||||
@ -1257,6 +1272,7 @@ CONFIG_IXGBE_PTP=y
|
||||
|
||||
# CONFIG_NET_VENDOR_I825XX is not set
|
||||
CONFIG_NET_VENDOR_MARVELL=y
|
||||
CONFIG_MVMDIO=m
|
||||
CONFIG_SKGE=m
|
||||
# CONFIG_SKGE_DEBUG is not set
|
||||
CONFIG_SKGE_GENESIS=y
|
||||
@ -1483,6 +1499,7 @@ CONFIG_WIMAX_I2400M_DEBUG_LEVEL=8
|
||||
|
||||
# CONFIG_ADM8211 is not set
|
||||
CONFIG_ATH_COMMON=m
|
||||
CONFIG_ATH_CARDS=m
|
||||
CONFIG_ATH5K=m
|
||||
CONFIG_ATH5K_DEBUG=y
|
||||
# CONFIG_ATH5K_TRACER is not set
|
||||
@ -1490,6 +1507,7 @@ CONFIG_ATH6KL=m
|
||||
CONFIG_ATH6KL_DEBUG=y
|
||||
CONFIG_ATH6KL_SDIO=m
|
||||
CONFIG_ATH6KL_USB=m
|
||||
CONFIG_AR5523=m
|
||||
CONFIG_ATH9K=m
|
||||
CONFIG_ATH9K_PCI=y
|
||||
CONFIG_ATH9K_AHB=y
|
||||
@ -1530,6 +1548,7 @@ CONFIG_BRCMFMAC=m
|
||||
CONFIG_BRCMFMAC_SDIO=y
|
||||
CONFIG_BRCMFMAC_SDIO_OOB=y
|
||||
CONFIG_BRCMFMAC_USB=y
|
||||
# CONFIG_BRCM_TRACING is not set
|
||||
# CONFIG_BRCMISCAN is not set
|
||||
# CONFIG_BRCMDBG is not set
|
||||
# CONFIG_HERMES is not set
|
||||
@ -1613,6 +1632,7 @@ CONFIG_RTL8192CE=m
|
||||
CONFIG_RTL8192SE=m
|
||||
CONFIG_RTL8192CU=m
|
||||
CONFIG_RTL8192DE=m
|
||||
CONFIG_RTL8723AE=m
|
||||
|
||||
CONFIG_MWIFIEX=m
|
||||
CONFIG_MWIFIEX_SDIO=m
|
||||
@ -1923,6 +1943,7 @@ CONFIG_SERIO_SERPORT=y
|
||||
CONFIG_SERIO_RAW=m
|
||||
CONFIG_SERIO_ALTERA_PS2=m
|
||||
# CONFIG_SERIO_PS2MULT is not set
|
||||
CONFIG_SERIO_ARC_PS2=m
|
||||
|
||||
# CONFIG_SERIO_CT82C710 is not set
|
||||
# CONFIG_SERIO_PARKBD is not set
|
||||
@ -2034,9 +2055,12 @@ CONFIG_TOUCHSCREEN_W90X900=m
|
||||
CONFIG_TOUCHSCREEN_ST1232=m
|
||||
CONFIG_TOUCHSCREEN_ATMEL_MXT=m
|
||||
# CONFIG_TOUCHSCREEN_MAX11801 is not set
|
||||
CONFIG_TOUCHSCREEN_AUO_PIXCIR=m
|
||||
CONFIG_TOUCHSCREEN_TI_AM335X_TSC=m
|
||||
|
||||
CONFIG_INPUT_MISC=y
|
||||
CONFIG_INPUT_PCSPKR=m
|
||||
CONFIG_INPUT_RETU_PWRBUTTON=m
|
||||
CONFIG_INPUT_UINPUT=m
|
||||
CONFIG_INPUT_WISTRON_BTNS=m
|
||||
CONFIG_INPUT_ATLAS_BTNS=m
|
||||
@ -2160,6 +2184,8 @@ CONFIG_I2C_ALGOPCA=m
|
||||
# CONFIG_I2C_NFORCE2_S4985 is not set
|
||||
# CONFIG_I2C_INTEL_MID is not set
|
||||
# CONFIG_I2C_EG20T is not set
|
||||
# CONFIG_I2C_CBUS_GPIO is not set
|
||||
CONFIG_I2C_VIPERBOARD=m
|
||||
|
||||
CONFIG_EEPROM_AT24=m
|
||||
CONFIG_EEPROM_LEGACY=m
|
||||
@ -2330,6 +2356,8 @@ CONFIG_SENSORS_MAX197=m
|
||||
# CONFIG_PCH_PHUB is not set
|
||||
# CONFIG_SERIAL_PCH_UART is not set
|
||||
# CONFIG_USB_SWITCH_FSA9480 is not set
|
||||
CONFIG_SERIAL_ARC=m
|
||||
CONFIG_SERIAL_ARC_NR_PORTS=1
|
||||
|
||||
CONFIG_W1=m
|
||||
CONFIG_W1_CON=y
|
||||
@ -2442,6 +2470,7 @@ CONFIG_RTC_DRV_RS5C372=m
|
||||
# CONFIG_RTC_DRV_SA1100 is not set
|
||||
# CONFIG_RTC_DRV_TEST is not set
|
||||
CONFIG_RTC_DRV_X1205=m
|
||||
CONFIG_RTC_DRV_PCF8523=m
|
||||
CONFIG_RTC_DRV_V3020=m
|
||||
CONFIG_RTC_DRV_DS2404=m
|
||||
CONFIG_RTC_DRV_STK17TA8=m
|
||||
@ -2662,6 +2691,7 @@ CONFIG_DVB_BT8XX=m
|
||||
CONFIG_DVB_BUDGET_CORE=m
|
||||
CONFIG_DVB_PLUTO2=m
|
||||
CONFIG_SMS_SIANO_MDTV=m
|
||||
CONFIG_SMS_SIANO_RC=y
|
||||
CONFIG_MEDIA_SUBDRV_AUTOSELECT=y
|
||||
CONFIG_SMS_USB_DRV=m
|
||||
CONFIG_SMS_SDIO_DRV=m
|
||||
@ -3035,6 +3065,7 @@ CONFIG_SND_USB_6FIRE=m
|
||||
CONFIG_SND_FIREWIRE=y
|
||||
CONFIG_SND_FIREWIRE_SPEAKERS=m
|
||||
CONFIG_SND_ISIGHT=m
|
||||
CONFIG_SND_SCS1X=m
|
||||
|
||||
#
|
||||
# Open Sound System
|
||||
@ -3122,6 +3153,7 @@ CONFIG_USB_HID=y
|
||||
CONFIG_HID_SUPPORT=y
|
||||
|
||||
CONFIG_HID=y
|
||||
CONFIG_I2C_HID=m
|
||||
CONFIG_HID_BATTERY_STRENGTH=y
|
||||
# debugging default is y upstream now
|
||||
CONFIG_HIDRAW=y
|
||||
@ -3152,6 +3184,7 @@ CONFIG_HID_PS3REMOTE=m
|
||||
CONFIG_HID_PRODIKEYS=m
|
||||
CONFIG_HID_DRAGONRISE=m
|
||||
CONFIG_HID_GYRATION=m
|
||||
CONFIG_HID_ICADE=m
|
||||
CONFIG_HID_TWINHAN=m
|
||||
CONFIG_HID_ORTEK=m
|
||||
CONFIG_HID_PANTHERLORD=m
|
||||
@ -3283,6 +3316,7 @@ CONFIG_USB_NET_RNDIS_HOST=m
|
||||
CONFIG_USB_NET_CDC_SUBSET=m
|
||||
CONFIG_USB_NET_CDC_EEM=m
|
||||
CONFIG_USB_NET_CDC_NCM=m
|
||||
CONFIG_USB_NET_CDC_MBIM=m
|
||||
CONFIG_USB_NET_ZAURUS=m
|
||||
CONFIG_USB_NET_CX82310_ETH=m
|
||||
CONFIG_USB_NET_INT51X1=m
|
||||
@ -3402,6 +3436,7 @@ CONFIG_USB_SEVSEG=m
|
||||
CONFIG_USB_ALI_M5632=y
|
||||
CONFIG_USB_APPLEDISPLAY=m
|
||||
# CONFIG_OMAP_USB2 is not set
|
||||
CONFIG_USB_RCAR_PHY=m
|
||||
CONFIG_USB_ATM=m
|
||||
CONFIG_USB_CXACRU=m
|
||||
# CONFIG_USB_C67X00_HCD is not set
|
||||
@ -3462,6 +3497,7 @@ CONFIG_SSB_PCMCIAHOST=y
|
||||
# CONFIG_SSB_SILENT is not set
|
||||
# CONFIG_SSB_DEBUG is not set
|
||||
CONFIG_SSB_DRIVER_PCICORE=y
|
||||
CONFIG_SSB_DRIVER_GPIO=y
|
||||
|
||||
# Multifunction USB devices
|
||||
# CONFIG_MFD_PCF50633 is not set
|
||||
@ -3478,6 +3514,10 @@ CONFIG_MFD_SUPPORT=y
|
||||
CONFIG_MFD_VX855=m
|
||||
CONFIG_MFD_SM501=m
|
||||
CONFIG_MFD_SM501_GPIO=y
|
||||
CONFIG_MFD_RTSX_PCI=m
|
||||
CONFIG_MFD_TI_AM335X_TSCADC=m
|
||||
CONFIG_MFD_VIPERBOARD=m
|
||||
CONFIG_MFD_RETU=m
|
||||
# CONFIG_MFD_TC6393XB is not set
|
||||
# CONFIG_MFD_WM8400 is not set
|
||||
# CONFIG_MFD_WM8350_I2C is not set
|
||||
@ -3639,6 +3679,7 @@ CONFIG_9P_FS_POSIX_ACL=y
|
||||
CONFIG_FUSE_FS=m
|
||||
# CONFIG_OMFS_FS is not set
|
||||
CONFIG_CUSE=m
|
||||
# CONFIG_F2FS_FS is not set
|
||||
|
||||
#
|
||||
# Network File Systems
|
||||
@ -3678,6 +3719,7 @@ CONFIG_CIFS_POSIX=y
|
||||
CONFIG_CIFS_FSCACHE=y
|
||||
CONFIG_CIFS_ACL=y
|
||||
CONFIG_CIFS_WEAK_PW_HASH=y
|
||||
# CONFIG_CIFS_DEBUG is not set
|
||||
# CONFIG_CIFS_DEBUG2 is not set
|
||||
CONFIG_CIFS_DFS_UPCALL=y
|
||||
CONFIG_CIFS_NFSD_EXPORT=y
|
||||
@ -4060,6 +4102,11 @@ CONFIG_KEXEC=y
|
||||
CONFIG_HWMON=y
|
||||
# CONFIG_HWMON_DEBUG_CHIP is not set
|
||||
CONFIG_THERMAL_HWMON=y
|
||||
# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set
|
||||
# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set
|
||||
CONFIG_FAIR_SHARE=y
|
||||
CONFIG_STEP_WISE=y
|
||||
# CONFIG_USER_SPACE is not set
|
||||
# CONFIG_CPU_THERMAL is not set
|
||||
|
||||
CONFIG_INOTIFY=y
|
||||
@ -4136,6 +4183,7 @@ CONFIG_SND_INDIGOIOX=m
|
||||
CONFIG_SND_INDIGODJX=m
|
||||
# CONFIG_SND_SOC is not set
|
||||
|
||||
CONFIG_BALLOON_COMPACTION=y
|
||||
CONFIG_COMPACTION=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_NEW_LEDS=y
|
||||
@ -4247,6 +4295,8 @@ CONFIG_APM_POWER=m
|
||||
# CONFIG_CHARGER_LP8727 is not set
|
||||
# CONFIG_CHARGER_GPIO is not set
|
||||
# CONFIG_CHARGER_PCF50633 is not set
|
||||
# CONFIG_CHARGER_BQ2415X is not set
|
||||
CONFIG_POWER_RESET=y
|
||||
|
||||
# CONFIG_PDA_POWER is not set
|
||||
|
||||
@ -4256,6 +4306,7 @@ CONFIG_UIO=m
|
||||
CONFIG_UIO_CIF=m
|
||||
# CONFIG_UIO_PDRV is not set
|
||||
# CONFIG_UIO_PDRV_GENIRQ is not set
|
||||
# CONFIG_UIO_DMEM_GENIRQ is not set
|
||||
CONFIG_UIO_AEC=m
|
||||
CONFIG_UIO_SERCOS3=m
|
||||
CONFIG_UIO_PCI_GENERIC=m
|
||||
@ -4290,6 +4341,8 @@ CONFIG_NOZOMI=m
|
||||
# CONFIG_TPS65010 is not set
|
||||
|
||||
CONFIG_INPUT_APANEL=m
|
||||
CONFIG_INPUT_GP2A=m
|
||||
# CONFIG_INPUT_GPIO_TILT_POLLED is not set
|
||||
|
||||
# CONFIG_INTEL_MENLOW is not set
|
||||
CONFIG_ENCLOSURE_SERVICES=m
|
||||
@ -4303,6 +4356,7 @@ CONFIG_MSPRO_BLOCK=m
|
||||
CONFIG_MEMSTICK_TIFM_MS=m
|
||||
CONFIG_MEMSTICK_JMICRON_38X=m
|
||||
CONFIG_MEMSTICK_R592=m
|
||||
CONFIG_MEMSTICK_REALTEK_PCI=m
|
||||
|
||||
CONFIG_ACCESSIBILITY=y
|
||||
CONFIG_A11Y_BRAILLE_CONSOLE=y
|
||||
@ -4423,6 +4477,7 @@ CONFIG_ALTERA_STAPL=m
|
||||
# CONFIG_BPCTL is not set
|
||||
# CONFIG_CED1401 is not set
|
||||
# CONFIG_DGRP is not set
|
||||
# CONFIG_SB105X is not set
|
||||
# END OF STAGING
|
||||
|
||||
#
|
||||
@ -4450,8 +4505,9 @@ CONFIG_LSM_MMAP_MIN_ADDR=65536
|
||||
CONFIG_STRIP_ASM_SYMS=y
|
||||
|
||||
# CONFIG_RCU_FANOUT_EXACT is not set
|
||||
# FIXME: Revisit FAST_NO_HZ after 3.5
|
||||
# CONFIG_RCU_FAST_NO_HZ is not set
|
||||
# FIXME: Revisit FAST_NO_HZ after it's fixed
|
||||
# CONFIG_RCU_FAST_NO_HZ is not setA
|
||||
# CONFIG_RCU_NOCB_CPU is not set
|
||||
CONFIG_RCU_CPU_STALL_TIMEOUT=60
|
||||
# CONFIG_RCU_TORTURE_TEST is not set
|
||||
# CONFIG_RCU_TRACE is not set
|
||||
@ -4508,6 +4564,9 @@ CONFIG_GPIO_SYSFS=y
|
||||
# CONFIG_GPIO_CS5535 is not set
|
||||
# CONFIG_GPIO_ADP5588 is not set
|
||||
# CONFIG_GPIO_IT8761E is not set
|
||||
# CONFIG SB105x is not set
|
||||
# CONFIG_GPIO_TS5500 is not set
|
||||
CONFIG_GPIO_VIPERBOARD=m
|
||||
# CONFIG_GPIO_MAX7300 is not set
|
||||
# CONFIG_UCB1400_CORE is not set
|
||||
# CONFIG_TPS6105X is not set
|
||||
@ -4559,6 +4618,7 @@ CONFIG_BCMA_BLOCKIO=y
|
||||
CONFIG_BCMA_HOST_PCI_POSSIBLE=y
|
||||
CONFIG_BCMA_HOST_PCI=y
|
||||
CONFIG_BCMA_DRIVER_GMAC_CMN=y
|
||||
CONFIG_BCMA_DRIVER_GPIO=y
|
||||
# CONFIG_BCMA_DEBUG is not set
|
||||
|
||||
# CONFIG_GOOGLE_FIRMWARE is not set
|
||||
|
@ -78,6 +78,7 @@ CONFIG_ACPI_SLEEP=y
|
||||
CONFIG_ACPI_THERMAL=y
|
||||
CONFIG_ACPI_TOSHIBA=m
|
||||
CONFIG_ACPI_VIDEO=m
|
||||
CONFIG_ACPI_INITRD_TABLE_OVERRIDE=y
|
||||
# FIXME: Next two are deprecated. Remove them when they disappear upstream
|
||||
# CONFIG_ACPI_PROCFS_POWER is not set
|
||||
# CONFIG_ACPI_PROC_EVENT is not set
|
||||
@ -282,6 +283,7 @@ CONFIG_MTD_CK804XROM=m
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_CPU_IDLE=y
|
||||
# CONFIG_CPU_IDLE_MULTIPLE_DRIVERS is not set
|
||||
# CONFIG_CPU_IDLE_GOV_LADDER is not set
|
||||
CONFIG_CPU_IDLE_GOV_MENU=y
|
||||
|
||||
@ -411,6 +413,7 @@ CONFIG_HYPERV_UTILS=m
|
||||
CONFIG_HID_HYPERV_MOUSE=m
|
||||
CONFIG_HYPERV_NET=m
|
||||
CONFIG_HYPERV_STORAGE=m
|
||||
CONFIG_HYPERV_BALLOON=m
|
||||
|
||||
# Depends on HOTPLUG_PCI_PCIE
|
||||
CONFIG_BLK_DEV_PCIESSD_MTIP32XX=m
|
||||
|
@ -13,6 +13,8 @@ CONFIG_AMD_NUMA=y
|
||||
CONFIG_X86_64_ACPI_NUMA=y
|
||||
# CONFIG_NUMA_EMU is not set
|
||||
# CONFIG_X86_NUMACHIP is not set
|
||||
CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y
|
||||
CONFIG_NUMA_BALANCING=y
|
||||
|
||||
CONFIG_NR_CPUS=128
|
||||
CONFIG_PHYSICAL_START=0x1000000
|
||||
@ -50,6 +52,7 @@ CONFIG_CRYPTO_CAST5_AVX_X86_64=m
|
||||
CONFIG_CRYPTO_CAST6_AVX_X86_64=m
|
||||
CONFIG_CRYPTO_SERPENT_AVX_X86_64=m
|
||||
CONFIG_CRYPTO_TWOFISH_AVX_X86_64=m
|
||||
CONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64=m
|
||||
|
||||
# CONFIG_I2C_ALI1535 is not set
|
||||
# CONFIG_I2C_ALI1563 is not set
|
||||
@ -69,6 +72,7 @@ CONFIG_SPARSEMEM=y
|
||||
CONFIG_HAVE_MEMORY_PRESENT=y
|
||||
CONFIG_SPARSEMEM_EXTREME=y
|
||||
CONFIG_SPARSEMEM_VMEMMAP=y
|
||||
# CONFIG_MOVABLE_NODE is not set
|
||||
# CONFIG_MEMORY_HOTPLUG is not set
|
||||
# CONFIG_MEMORY_HOTREMOVE is not set
|
||||
|
||||
|
1630
efivarfs-3.7.patch
1630
efivarfs-3.7.patch
File diff suppressed because it is too large
Load Diff
@ -1,118 +0,0 @@
|
||||
From 6752ab4cb863fc63ed85f1ca78a42235c09fad83 Mon Sep 17 00:00:00 2001
|
||||
From: Kees Cook <keescook@chromium.org>
|
||||
Date: Mon, 26 Nov 2012 09:07:50 -0500
|
||||
Subject: [PATCH 1/2] exec: do not leave bprm->interp on stack
|
||||
|
||||
If a series of scripts are executed, each triggering module loading via
|
||||
unprintable bytes in the script header, kernel stack contents can leak
|
||||
into the command line.
|
||||
|
||||
Normally execution of binfmt_script and binfmt_misc happens recursively.
|
||||
However, when modules are enabled, and unprintable bytes exist in the
|
||||
bprm->buf, execution will restart after attempting to load matching binfmt
|
||||
modules. Unfortunately, the logic in binfmt_script and binfmt_misc does
|
||||
not expect to get restarted. They leave bprm->interp pointing to their
|
||||
local stack. This means on restart bprm->interp is left pointing into
|
||||
unused stack memory which can then be copied into the userspace argv
|
||||
areas.
|
||||
|
||||
After additional study, it seems that both recursion and restart remains
|
||||
the desirable way to handle exec with scripts, misc, and modules. As
|
||||
such, we need to protect the changes to interp.
|
||||
|
||||
This changes the logic to require allocation for any changes to the
|
||||
bprm->interp. To avoid adding a new kmalloc to every exec, the default
|
||||
value is left as-is. Only when passing through binfmt_script or
|
||||
binfmt_misc does an allocation take place.
|
||||
|
||||
For a proof of concept, see DoTest.sh from:
|
||||
http://www.halfdog.net/Security/2012/LinuxKernelBinfmtScriptStackDataDisclosure/
|
||||
|
||||
Signed-off-by: Kees Cook <keescook@chromium.org>
|
||||
Cc: halfdog <me@halfdog.net>
|
||||
Cc: P J P <ppandit@redhat.com>
|
||||
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
---
|
||||
fs/binfmt_misc.c | 5 ++++-
|
||||
fs/binfmt_script.c | 4 +++-
|
||||
fs/exec.c | 15 +++++++++++++++
|
||||
include/linux/binfmts.h | 1 +
|
||||
4 files changed, 23 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c
|
||||
index 790b3cd..772428d 100644
|
||||
--- a/fs/binfmt_misc.c
|
||||
+++ b/fs/binfmt_misc.c
|
||||
@@ -176,7 +176,10 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs)
|
||||
goto _error;
|
||||
bprm->argc ++;
|
||||
|
||||
- bprm->interp = iname; /* for binfmt_script */
|
||||
+ /* Update interp in case binfmt_script needs it. */
|
||||
+ retval = bprm_change_interp(iname, bprm);
|
||||
+ if (retval < 0)
|
||||
+ goto _error;
|
||||
|
||||
interp_file = open_exec (iname);
|
||||
retval = PTR_ERR (interp_file);
|
||||
diff --git a/fs/binfmt_script.c b/fs/binfmt_script.c
|
||||
index d3b8c1f..df49d48 100644
|
||||
--- a/fs/binfmt_script.c
|
||||
+++ b/fs/binfmt_script.c
|
||||
@@ -82,7 +82,9 @@ static int load_script(struct linux_binprm *bprm,struct pt_regs *regs)
|
||||
retval = copy_strings_kernel(1, &i_name, bprm);
|
||||
if (retval) return retval;
|
||||
bprm->argc++;
|
||||
- bprm->interp = interp;
|
||||
+ retval = bprm_change_interp(interp, bprm);
|
||||
+ if (retval < 0)
|
||||
+ return retval;
|
||||
|
||||
/*
|
||||
* OK, now restart the process with the interpreter's dentry.
|
||||
diff --git a/fs/exec.c b/fs/exec.c
|
||||
index 0039055..c6e6de4 100644
|
||||
--- a/fs/exec.c
|
||||
+++ b/fs/exec.c
|
||||
@@ -1175,9 +1175,24 @@ void free_bprm(struct linux_binprm *bprm)
|
||||
mutex_unlock(¤t->signal->cred_guard_mutex);
|
||||
abort_creds(bprm->cred);
|
||||
}
|
||||
+ /* If a binfmt changed the interp, free it. */
|
||||
+ if (bprm->interp != bprm->filename)
|
||||
+ kfree(bprm->interp);
|
||||
kfree(bprm);
|
||||
}
|
||||
|
||||
+int bprm_change_interp(char *interp, struct linux_binprm *bprm)
|
||||
+{
|
||||
+ /* If a binfmt changed the interp, free it first. */
|
||||
+ if (bprm->interp != bprm->filename)
|
||||
+ kfree(bprm->interp);
|
||||
+ bprm->interp = kstrdup(interp, GFP_KERNEL);
|
||||
+ if (!bprm->interp)
|
||||
+ return -ENOMEM;
|
||||
+ return 0;
|
||||
+}
|
||||
+EXPORT_SYMBOL(bprm_change_interp);
|
||||
+
|
||||
/*
|
||||
* install the new credentials for this executable
|
||||
*/
|
||||
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
|
||||
index cfcc6bf..de0628e 100644
|
||||
--- a/include/linux/binfmts.h
|
||||
+++ b/include/linux/binfmts.h
|
||||
@@ -114,6 +114,7 @@ extern int setup_arg_pages(struct linux_binprm * bprm,
|
||||
unsigned long stack_top,
|
||||
int executable_stack);
|
||||
extern int bprm_mm_init(struct linux_binprm *bprm);
|
||||
+extern int bprm_change_interp(char *interp, struct linux_binprm *bprm);
|
||||
extern int copy_strings_kernel(int argc, const char *const *argv,
|
||||
struct linux_binprm *bprm);
|
||||
extern int prepare_bprm_creds(struct linux_binprm *bprm);
|
||||
--
|
||||
1.8.0
|
||||
|
@ -1,144 +0,0 @@
|
||||
From ba1b23d05259e31d30a78017cdfbc010dcb08aa6 Mon Sep 17 00:00:00 2001
|
||||
From: Kees Cook <keescook@chromium.org>
|
||||
Date: Mon, 26 Nov 2012 09:02:11 -0500
|
||||
Subject: [PATCH 2/2] exec: use -ELOOP for max recursion depth
|
||||
|
||||
To avoid an explosion of request_module calls on a chain of abusive
|
||||
scripts, fail maximum recursion with -ELOOP instead of -ENOEXEC. As soon
|
||||
as maximum recursion depth is hit, the error will fail all the way back
|
||||
up the chain, aborting immediately.
|
||||
|
||||
This also has the side-effect of stopping the user's shell from attempting
|
||||
to reexecute the top-level file as a shell script. As seen in the
|
||||
dash source:
|
||||
|
||||
if (cmd != path_bshell && errno == ENOEXEC) {
|
||||
*argv-- = cmd;
|
||||
*argv = cmd = path_bshell;
|
||||
goto repeat;
|
||||
}
|
||||
|
||||
The above logic was designed for running scripts automatically that lacked
|
||||
the "#!" header, not to re-try failed recursion. On a legitimate -ENOEXEC,
|
||||
things continue to behave as the shell expects.
|
||||
|
||||
Additionally, when tracking recursion, the binfmt handlers should not be
|
||||
involved. The recursion being tracked is the depth of calls through
|
||||
search_binary_handler(), so that function should be exclusively responsible
|
||||
for tracking the depth.
|
||||
|
||||
Signed-off-by: Kees Cook <keescook@chromium.org>
|
||||
Cc: halfdog <me@halfdog.net>
|
||||
Cc: P J P <ppandit@redhat.com>
|
||||
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
|
||||
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
---
|
||||
fs/binfmt_em86.c | 1 -
|
||||
fs/binfmt_misc.c | 6 ------
|
||||
fs/binfmt_script.c | 4 +---
|
||||
fs/exec.c | 10 +++++-----
|
||||
include/linux/binfmts.h | 2 --
|
||||
5 files changed, 6 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/fs/binfmt_em86.c b/fs/binfmt_em86.c
|
||||
index 2790c7e..575796a 100644
|
||||
--- a/fs/binfmt_em86.c
|
||||
+++ b/fs/binfmt_em86.c
|
||||
@@ -42,7 +42,6 @@ static int load_em86(struct linux_binprm *bprm,struct pt_regs *regs)
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
- bprm->recursion_depth++; /* Well, the bang-shell is implicit... */
|
||||
allow_write_access(bprm->file);
|
||||
fput(bprm->file);
|
||||
bprm->file = NULL;
|
||||
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c
|
||||
index 772428d..f0f1a06 100644
|
||||
--- a/fs/binfmt_misc.c
|
||||
+++ b/fs/binfmt_misc.c
|
||||
@@ -117,10 +117,6 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs)
|
||||
if (!enabled)
|
||||
goto _ret;
|
||||
|
||||
- retval = -ENOEXEC;
|
||||
- if (bprm->recursion_depth > BINPRM_MAX_RECURSION)
|
||||
- goto _ret;
|
||||
-
|
||||
/* to keep locking time low, we copy the interpreter string */
|
||||
read_lock(&entries_lock);
|
||||
fmt = check_file(bprm);
|
||||
@@ -200,8 +196,6 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs)
|
||||
if (retval < 0)
|
||||
goto _error;
|
||||
|
||||
- bprm->recursion_depth++;
|
||||
-
|
||||
retval = search_binary_handler (bprm, regs);
|
||||
if (retval < 0)
|
||||
goto _error;
|
||||
diff --git a/fs/binfmt_script.c b/fs/binfmt_script.c
|
||||
index df49d48..8ae4be1 100644
|
||||
--- a/fs/binfmt_script.c
|
||||
+++ b/fs/binfmt_script.c
|
||||
@@ -22,15 +22,13 @@ static int load_script(struct linux_binprm *bprm,struct pt_regs *regs)
|
||||
char interp[BINPRM_BUF_SIZE];
|
||||
int retval;
|
||||
|
||||
- if ((bprm->buf[0] != '#') || (bprm->buf[1] != '!') ||
|
||||
- (bprm->recursion_depth > BINPRM_MAX_RECURSION))
|
||||
+ if ((bprm->buf[0] != '#') || (bprm->buf[1] != '!'))
|
||||
return -ENOEXEC;
|
||||
/*
|
||||
* This section does the #! interpretation.
|
||||
* Sorta complicated, but hopefully it will work. -TYT
|
||||
*/
|
||||
|
||||
- bprm->recursion_depth++;
|
||||
allow_write_access(bprm->file);
|
||||
fput(bprm->file);
|
||||
bprm->file = NULL;
|
||||
diff --git a/fs/exec.c b/fs/exec.c
|
||||
index c6e6de4..85c1f9e 100644
|
||||
--- a/fs/exec.c
|
||||
+++ b/fs/exec.c
|
||||
@@ -1371,6 +1371,10 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
|
||||
struct linux_binfmt *fmt;
|
||||
pid_t old_pid, old_vpid;
|
||||
|
||||
+ /* This allows 4 levels of binfmt rewrites before failing hard. */
|
||||
+ if (depth > 5)
|
||||
+ return -ELOOP;
|
||||
+
|
||||
retval = security_bprm_check(bprm);
|
||||
if (retval)
|
||||
return retval;
|
||||
@@ -1395,12 +1399,8 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
|
||||
if (!try_module_get(fmt->module))
|
||||
continue;
|
||||
read_unlock(&binfmt_lock);
|
||||
+ bprm->recursion_depth = depth + 1;
|
||||
retval = fn(bprm, regs);
|
||||
- /*
|
||||
- * Restore the depth counter to its starting value
|
||||
- * in this call, so we don't have to rely on every
|
||||
- * load_binary function to restore it on return.
|
||||
- */
|
||||
bprm->recursion_depth = depth;
|
||||
if (retval >= 0) {
|
||||
if (depth == 0) {
|
||||
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
|
||||
index de0628e..54135f6 100644
|
||||
--- a/include/linux/binfmts.h
|
||||
+++ b/include/linux/binfmts.h
|
||||
@@ -54,8 +54,6 @@ struct linux_binprm {
|
||||
#define BINPRM_FLAGS_EXECFD_BIT 1
|
||||
#define BINPRM_FLAGS_EXECFD (1 << BINPRM_FLAGS_EXECFD_BIT)
|
||||
|
||||
-#define BINPRM_MAX_RECURSION 4
|
||||
-
|
||||
/* Function parameter for binfmt->coredump */
|
||||
struct coredump_params {
|
||||
siginfo_t *siginfo;
|
||||
--
|
||||
1.8.0
|
||||
|
@ -1,388 +0,0 @@
|
||||
diff -ur linux-3.6.0-0.rc2.git2.1.fc18.x86_64/arch/x86/boot/compressed/eboot.c ../kernel-3.5.fc18.bak/linux-3.6.0-0.rc2.git2.1.fc18.x86_64/arch/x86/boot/compressed/eboot.c
|
||||
--- linux-3.6.0-0.rc2.git2.1.fc18.x86_64/arch/x86/boot/compressed/eboot.c 2012-08-22 15:26:32.485522068 -0400
|
||||
+++ ../kernel-3.5.fc18.bak/linux-3.6.0-0.rc2.git2.1.fc18.x86_64/arch/x86/boot/compressed/eboot.c 2012-08-22 15:25:40.529244868 -0400
|
||||
@@ -8,6 +8,7 @@
|
||||
* ----------------------------------------------------------------------- */
|
||||
|
||||
#include <linux/efi.h>
|
||||
+#include <linux/pci.h>
|
||||
#include <asm/efi.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/desc.h>
|
||||
@@ -243,6 +244,121 @@
|
||||
*size = len;
|
||||
}
|
||||
|
||||
+static efi_status_t setup_efi_pci(struct boot_params *params)
|
||||
+{
|
||||
+ efi_pci_io_protocol *pci;
|
||||
+ efi_status_t status;
|
||||
+ void **pci_handle;
|
||||
+ efi_guid_t pci_proto = EFI_PCI_IO_PROTOCOL_GUID;
|
||||
+ unsigned long nr_pci, size = 0;
|
||||
+ int i;
|
||||
+ struct setup_data *data;
|
||||
+
|
||||
+ data = (struct setup_data *)params->hdr.setup_data;
|
||||
+
|
||||
+ while (data && data->next)
|
||||
+ data = (struct setup_data *)data->next;
|
||||
+
|
||||
+ status = efi_call_phys5(sys_table->boottime->locate_handle,
|
||||
+ EFI_LOCATE_BY_PROTOCOL, &pci_proto,
|
||||
+ NULL, &size, pci_handle);
|
||||
+
|
||||
+ if (status == EFI_BUFFER_TOO_SMALL) {
|
||||
+ status = efi_call_phys3(sys_table->boottime->allocate_pool,
|
||||
+ EFI_LOADER_DATA, size, &pci_handle);
|
||||
+
|
||||
+ if (status != EFI_SUCCESS)
|
||||
+ return status;
|
||||
+
|
||||
+ status = efi_call_phys5(sys_table->boottime->locate_handle,
|
||||
+ EFI_LOCATE_BY_PROTOCOL, &pci_proto,
|
||||
+ NULL, &size, pci_handle);
|
||||
+ }
|
||||
+
|
||||
+ if (status != EFI_SUCCESS)
|
||||
+ goto free_handle;
|
||||
+
|
||||
+ nr_pci = size / sizeof(void *);
|
||||
+ for (i = 0; i < nr_pci; i++) {
|
||||
+ void *h = pci_handle[i];
|
||||
+ uint64_t attributes;
|
||||
+ struct pci_setup_rom *rom;
|
||||
+
|
||||
+ status = efi_call_phys3(sys_table->boottime->handle_protocol,
|
||||
+ h, &pci_proto, &pci);
|
||||
+
|
||||
+ if (status != EFI_SUCCESS)
|
||||
+ continue;
|
||||
+
|
||||
+ if (!pci)
|
||||
+ continue;
|
||||
+
|
||||
+ status = efi_call_phys4(pci->attributes, pci,
|
||||
+ EfiPciIoAttributeOperationGet, 0,
|
||||
+ &attributes);
|
||||
+
|
||||
+ if (status != EFI_SUCCESS)
|
||||
+ continue;
|
||||
+
|
||||
+ if (!attributes & EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM)
|
||||
+ continue;
|
||||
+
|
||||
+ if (!pci->romimage || !pci->romsize)
|
||||
+ continue;
|
||||
+
|
||||
+ size = pci->romsize + sizeof(*rom);
|
||||
+
|
||||
+ status = efi_call_phys3(sys_table->boottime->allocate_pool,
|
||||
+ EFI_LOADER_DATA, size, &rom);
|
||||
+
|
||||
+ if (status != EFI_SUCCESS)
|
||||
+ continue;
|
||||
+
|
||||
+ rom->data.type = SETUP_PCI;
|
||||
+ rom->data.len = size - sizeof(struct setup_data);
|
||||
+ rom->data.next = NULL;
|
||||
+ rom->pcilen = pci->romsize;
|
||||
+
|
||||
+ status = efi_call_phys5(pci->pci.read, pci,
|
||||
+ EfiPciIoWidthUint16, PCI_VENDOR_ID,
|
||||
+ 1, &(rom->vendor));
|
||||
+
|
||||
+ if (status != EFI_SUCCESS)
|
||||
+ goto free_struct;
|
||||
+
|
||||
+ status = efi_call_phys5(pci->pci.read, pci,
|
||||
+ EfiPciIoWidthUint16, PCI_DEVICE_ID,
|
||||
+ 1, &(rom->devid));
|
||||
+
|
||||
+ if (status != EFI_SUCCESS)
|
||||
+ goto free_struct;
|
||||
+
|
||||
+ status = efi_call_phys5(pci->get_location, pci,
|
||||
+ &(rom->segment), &(rom->bus),
|
||||
+ &(rom->device), &(rom->function));
|
||||
+
|
||||
+ if (status != EFI_SUCCESS)
|
||||
+ goto free_struct;
|
||||
+
|
||||
+ memcpy(rom->romdata, pci->romimage, pci->romsize);
|
||||
+
|
||||
+ if (data)
|
||||
+ data->next = (uint64_t)rom;
|
||||
+ else
|
||||
+ params->hdr.setup_data = (uint64_t)rom;
|
||||
+
|
||||
+ data = (struct setup_data *)rom;
|
||||
+
|
||||
+ continue;
|
||||
+ free_struct:
|
||||
+ efi_call_phys1(sys_table->boottime->free_pool, rom);
|
||||
+ }
|
||||
+
|
||||
+free_handle:
|
||||
+ efi_call_phys1(sys_table->boottime->free_pool, pci_handle);
|
||||
+ return status;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* See if we have Graphics Output Protocol
|
||||
*/
|
||||
@@ -1052,6 +1171,8 @@
|
||||
|
||||
setup_graphics(boot_params);
|
||||
|
||||
+ setup_efi_pci(boot_params);
|
||||
+
|
||||
status = efi_call_phys3(sys_table->boottime->allocate_pool,
|
||||
EFI_LOADER_DATA, sizeof(*gdt),
|
||||
(void **)&gdt);
|
||||
diff -ur linux-3.6.0-0.rc2.git2.1.fc18.x86_64/arch/x86/include/asm/bootparam.h ../kernel-3.5.fc18.bak/linux-3.6.0-0.rc2.git2.1.fc18.x86_64/arch/x86/include/asm/bootparam.h
|
||||
--- linux-3.6.0-0.rc2.git2.1.fc18.x86_64/arch/x86/include/asm/bootparam.h 2012-08-22 15:26:32.485522068 -0400
|
||||
+++ ../kernel-3.5.fc18.bak/linux-3.6.0-0.rc2.git2.1.fc18.x86_64/arch/x86/include/asm/bootparam.h 2012-08-22 15:25:40.530244882 -0400
|
||||
@@ -13,6 +13,7 @@
|
||||
#define SETUP_NONE 0
|
||||
#define SETUP_E820_EXT 1
|
||||
#define SETUP_DTB 2
|
||||
+#define SETUP_PCI 3
|
||||
|
||||
/* extensible setup data list node */
|
||||
struct setup_data {
|
||||
diff -ur linux-3.6.0-0.rc2.git2.1.fc18.x86_64/arch/x86/include/asm/pci.h ../kernel-3.5.fc18.bak/linux-3.6.0-0.rc2.git2.1.fc18.x86_64/arch/x86/include/asm/pci.h
|
||||
--- linux-3.6.0-0.rc2.git2.1.fc18.x86_64/arch/x86/include/asm/pci.h 2012-07-21 16:58:29.000000000 -0400
|
||||
+++ ../kernel-3.5.fc18.bak/linux-3.6.0-0.rc2.git2.1.fc18.x86_64/arch/x86/include/asm/pci.h 2012-08-22 15:25:40.530244882 -0400
|
||||
@@ -171,4 +171,16 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
+struct pci_setup_rom {
|
||||
+ struct setup_data data;
|
||||
+ uint16_t vendor;
|
||||
+ uint16_t devid;
|
||||
+ uint64_t pcilen;
|
||||
+ unsigned long segment;
|
||||
+ unsigned long bus;
|
||||
+ unsigned long device;
|
||||
+ unsigned long function;
|
||||
+ uint8_t romdata[0];
|
||||
+};
|
||||
+
|
||||
#endif /* _ASM_X86_PCI_H */
|
||||
diff -ur linux-3.6.0-0.rc2.git2.1.fc18.x86_64/arch/x86/pci/common.c ../kernel-3.5.fc18.bak/linux-3.6.0-0.rc2.git2.1.fc18.x86_64/arch/x86/pci/common.c
|
||||
--- linux-3.6.0-0.rc2.git2.1.fc18.x86_64/arch/x86/pci/common.c 2012-08-22 15:24:45.477951182 -0400
|
||||
+++ ../kernel-3.5.fc18.bak/linux-3.6.0-0.rc2.git2.1.fc18.x86_64/arch/x86/pci/common.c 2012-08-22 15:25:40.530244882 -0400
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/smp.h>
|
||||
#include <asm/pci_x86.h>
|
||||
+#include <asm/setup.h>
|
||||
|
||||
unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 |
|
||||
PCI_PROBE_MMCONF;
|
||||
@@ -608,6 +609,38 @@
|
||||
return (pci_probe & PCI_ASSIGN_ALL_BUSSES) ? 1 : 0;
|
||||
}
|
||||
|
||||
+int pcibios_add_device(struct pci_dev *dev)
|
||||
+{
|
||||
+ struct setup_data *data;
|
||||
+ struct pci_setup_rom *rom;
|
||||
+ u64 pa_data;
|
||||
+
|
||||
+ if (boot_params.hdr.version < 0x0209)
|
||||
+ return 0;
|
||||
+
|
||||
+ pa_data = boot_params.hdr.setup_data;
|
||||
+ while (pa_data) {
|
||||
+ data = phys_to_virt(pa_data);
|
||||
+
|
||||
+ if (data->type == SETUP_PCI) {
|
||||
+ rom = (struct pci_setup_rom *)data;
|
||||
+
|
||||
+ if ((pci_domain_nr(dev->bus) == rom->segment) &&
|
||||
+ (dev->bus->number == rom->bus) &&
|
||||
+ (PCI_SLOT(dev->devfn) == rom->device) &&
|
||||
+ (PCI_FUNC(dev->devfn) == rom->function) &&
|
||||
+ (dev->vendor == rom->vendor) &&
|
||||
+ (dev->device == rom->devid)) {
|
||||
+ dev->rom = (void *)(pa_data +
|
||||
+ offsetof(struct pci_setup_rom, romdata));
|
||||
+ dev->romlen = rom->pcilen;
|
||||
+ }
|
||||
+ }
|
||||
+ pa_data = data->next;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
int pcibios_enable_device(struct pci_dev *dev, int mask)
|
||||
{
|
||||
int err;
|
||||
diff -ur linux-3.6.0-0.rc2.git2.1.fc18.x86_64/drivers/pci/bus.c ../kernel-3.5.fc18.bak/linux-3.6.0-0.rc2.git2.1.fc18.x86_64/drivers/pci/bus.c
|
||||
--- linux-3.6.0-0.rc2.git2.1.fc18.x86_64/drivers/pci/bus.c 2012-08-22 15:24:47.425961575 -0400
|
||||
+++ ../kernel-3.5.fc18.bak/linux-3.6.0-0.rc2.git2.1.fc18.x86_64/drivers/pci/bus.c 2012-08-22 15:26:20.147456241 -0400
|
||||
@@ -166,6 +166,11 @@
|
||||
int retval;
|
||||
|
||||
pci_fixup_device(pci_fixup_final, dev);
|
||||
+
|
||||
+ retval = pcibios_add_device(dev);
|
||||
+ if (retval)
|
||||
+ return retval;
|
||||
+
|
||||
retval = device_add(&dev->dev);
|
||||
if (retval)
|
||||
return retval;
|
||||
diff -ur linux-3.6.0-0.rc2.git2.1.fc18.x86_64/drivers/pci/pci.c ../kernel-3.5.fc18.bak/linux-3.6.0-0.rc2.git2.1.fc18.x86_64/drivers/pci/pci.c
|
||||
--- linux-3.6.0-0.rc2.git2.1.fc18.x86_64/drivers/pci/pci.c 2012-08-22 15:24:47.432961612 -0400
|
||||
+++ ../kernel-3.5.fc18.bak/linux-3.6.0-0.rc2.git2.1.fc18.x86_64/drivers/pci/pci.c 2012-08-22 15:25:40.531244893 -0400
|
||||
@@ -1385,6 +1385,19 @@
|
||||
dr->pinned = 1;
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * pcibios_add_device - provide arch specific hooks when adding device dev
|
||||
+ * @dev: the PCI device being added
|
||||
+ *
|
||||
+ * Permits the platform to provide architecture specific functionality when
|
||||
+ * devices are added. This is the default implementation. Architecture
|
||||
+ * implementations can override this.
|
||||
+ */
|
||||
+int __attribute__ ((weak)) pcibios_add_device (struct pci_dev *dev)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* pcibios_disable_device - disable arch specific PCI resources for device dev
|
||||
* @dev: the PCI device to disable
|
||||
diff -ur linux-3.6.0-0.rc2.git2.1.fc18.x86_64/drivers/pci/rom.c ../kernel-3.5.fc18.bak/linux-3.6.0-0.rc2.git2.1.fc18.x86_64/drivers/pci/rom.c
|
||||
--- linux-3.6.0-0.rc2.git2.1.fc18.x86_64/drivers/pci/rom.c 2012-07-21 16:58:29.000000000 -0400
|
||||
+++ ../kernel-3.5.fc18.bak/linux-3.6.0-0.rc2.git2.1.fc18.x86_64/drivers/pci/rom.c 2012-08-22 15:25:40.531244893 -0400
|
||||
@@ -126,6 +126,12 @@
|
||||
/* primary video rom always starts here */
|
||||
start = (loff_t)0xC0000;
|
||||
*size = 0x20000; /* cover C000:0 through E000:0 */
|
||||
+ /*
|
||||
+ * Some devices may provide ROMs via a source other than the BAR
|
||||
+ */
|
||||
+ } else if (pdev->rom && pdev->romlen) {
|
||||
+ *size = pdev->romlen;
|
||||
+ return phys_to_virt(pdev->rom);
|
||||
} else {
|
||||
if (res->flags &
|
||||
(IORESOURCE_ROM_COPY | IORESOURCE_ROM_BIOS_COPY)) {
|
||||
@@ -219,7 +225,8 @@
|
||||
if (res->flags & (IORESOURCE_ROM_COPY | IORESOURCE_ROM_BIOS_COPY))
|
||||
return;
|
||||
|
||||
- iounmap(rom);
|
||||
+ if (!pdev->rom || !pdev->romlen)
|
||||
+ iounmap(rom);
|
||||
|
||||
/* Disable again before continuing, leave enabled if pci=rom */
|
||||
if (!(res->flags & (IORESOURCE_ROM_ENABLE | IORESOURCE_ROM_SHADOW)))
|
||||
diff -ur linux-3.6.0-0.rc2.git2.1.fc18.x86_64/include/linux/efi.h ../kernel-3.5.fc18.bak/linux-3.6.0-0.rc2.git2.1.fc18.x86_64/include/linux/efi.h
|
||||
--- linux-3.6.0-0.rc2.git2.1.fc18.x86_64/include/linux/efi.h 2012-08-22 15:24:49.550972911 -0400
|
||||
+++ ../kernel-3.5.fc18.bak/linux-3.6.0-0.rc2.git2.1.fc18.x86_64/include/linux/efi.h 2012-08-22 15:25:40.533244906 -0400
|
||||
@@ -196,6 +196,77 @@
|
||||
void *create_event_ex;
|
||||
} efi_boot_services_t;
|
||||
|
||||
+typedef enum {
|
||||
+ EfiPciIoWidthUint8,
|
||||
+ EfiPciIoWidthUint16,
|
||||
+ EfiPciIoWidthUint32,
|
||||
+ EfiPciIoWidthUint64,
|
||||
+ EfiPciIoWidthFifoUint8,
|
||||
+ EfiPciIoWidthFifoUint16,
|
||||
+ EfiPciIoWidthFifoUint32,
|
||||
+ EfiPciIoWidthFifoUint64,
|
||||
+ EfiPciIoWidthFillUint8,
|
||||
+ EfiPciIoWidthFillUint16,
|
||||
+ EfiPciIoWidthFillUint32,
|
||||
+ EfiPciIoWidthFillUint64,
|
||||
+ EfiPciIoWidthMaximum
|
||||
+} EFI_PCI_IO_PROTOCOL_WIDTH;
|
||||
+
|
||||
+typedef enum {
|
||||
+ EfiPciIoAttributeOperationGet,
|
||||
+ EfiPciIoAttributeOperationSet,
|
||||
+ EfiPciIoAttributeOperationEnable,
|
||||
+ EfiPciIoAttributeOperationDisable,
|
||||
+ EfiPciIoAttributeOperationSupported,
|
||||
+ EfiPciIoAttributeOperationMaximum
|
||||
+} EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION;
|
||||
+
|
||||
+
|
||||
+typedef struct {
|
||||
+ void *read;
|
||||
+ void *write;
|
||||
+} efi_pci_io_protocol_access_t;
|
||||
+
|
||||
+typedef struct {
|
||||
+ void *poll_mem;
|
||||
+ void *poll_io;
|
||||
+ efi_pci_io_protocol_access_t mem;
|
||||
+ efi_pci_io_protocol_access_t io;
|
||||
+ efi_pci_io_protocol_access_t pci;
|
||||
+ void *copy_mem;
|
||||
+ void *map;
|
||||
+ void *unmap;
|
||||
+ void *allocate_buffer;
|
||||
+ void *free_buffer;
|
||||
+ void *flush;
|
||||
+ void *get_location;
|
||||
+ void *attributes;
|
||||
+ void *get_bar_attributes;
|
||||
+ void *set_bar_attributes;
|
||||
+ uint64_t romsize;
|
||||
+ void *romimage;
|
||||
+} efi_pci_io_protocol;
|
||||
+
|
||||
+#define EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO 0x0001
|
||||
+#define EFI_PCI_IO_ATTRIBUTE_ISA_IO 0x0002
|
||||
+#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO 0x0004
|
||||
+#define EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY 0x0008
|
||||
+#define EFI_PCI_IO_ATTRIBUTE_VGA_IO 0x0010
|
||||
+#define EFI_PCI_IO_ATTRIBUTE_IDE_PRIMARY_IO 0x0020
|
||||
+#define EFI_PCI_IO_ATTRIBUTE_IDE_SECONDARY_IO 0x0040
|
||||
+#define EFI_PCI_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x0080
|
||||
+#define EFI_PCI_IO_ATTRIBUTE_IO 0x0100
|
||||
+#define EFI_PCI_IO_ATTRIBUTE_MEMORY 0x0200
|
||||
+#define EFI_PCI_IO_ATTRIBUTE_BUS_MASTER 0x0400
|
||||
+#define EFI_PCI_IO_ATTRIBUTE_MEMORY_CACHED 0x0800
|
||||
+#define EFI_PCI_IO_ATTRIBUTE_MEMORY_DISABLE 0x1000
|
||||
+#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_DEVICE 0x2000
|
||||
+#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM 0x4000
|
||||
+#define EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE 0x8000
|
||||
+#define EFI_PCI_IO_ATTRIBUTE_ISA_IO_16 0x10000
|
||||
+#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16 0x20000
|
||||
+#define EFI_PCI_IO_ATTRIBUTE_VGA_IO_16 0x40000
|
||||
+
|
||||
/*
|
||||
* Types and defines for EFI ResetSystem
|
||||
*/
|
||||
diff -ur linux-3.6.0-0.rc2.git2.1.fc18.x86_64/include/linux/pci.h ../kernel-3.5.fc18.bak/linux-3.6.0-0.rc2.git2.1.fc18.x86_64/include/linux/pci.h
|
||||
--- linux-3.6.0-0.rc2.git2.1.fc18.x86_64/include/linux/pci.h 2012-08-22 15:24:48.703968392 -0400
|
||||
+++ ../kernel-3.5.fc18.bak/linux-3.6.0-0.rc2.git2.1.fc18.x86_64/include/linux/pci.h 2012-08-22 15:25:40.534244910 -0400
|
||||
@@ -355,6 +355,8 @@
|
||||
};
|
||||
struct pci_ats *ats; /* Address Translation Service */
|
||||
#endif
|
||||
+ void *rom; /* Physical pointer to ROM if it's not from the BAR */
|
||||
+ size_t romlen; /* Length of ROM if it's not from the BAR */
|
||||
};
|
||||
|
||||
static inline struct pci_dev *pci_physfn(struct pci_dev *dev)
|
||||
@@ -1582,6 +1584,7 @@
|
||||
void pcibios_set_master(struct pci_dev *dev);
|
||||
int pcibios_set_pcie_reset_state(struct pci_dev *dev,
|
||||
enum pcie_reset_state state);
|
||||
+int pcibios_add_device(struct pci_dev *dev);
|
||||
|
||||
#ifdef CONFIG_PCI_MMCONFIG
|
||||
extern void __init pci_mmcfg_early_init(void);
|
62
kernel.spec
62
kernel.spec
@ -6,7 +6,7 @@ Summary: The Linux kernel
|
||||
# For a stable, released kernel, released_kernel should be 1. For rawhide
|
||||
# and/or a kernel built from an rc or git snapshot, released_kernel should
|
||||
# be 0.
|
||||
%global released_kernel 1
|
||||
%global released_kernel 0
|
||||
|
||||
# Sign modules on x86. Make sure the config files match this setting if more
|
||||
# architectures are added.
|
||||
@ -62,7 +62,7 @@ Summary: The Linux kernel
|
||||
# For non-released -rc kernels, this will be appended after the rcX and
|
||||
# gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
|
||||
#
|
||||
%global baserelease 7
|
||||
%global baserelease 1
|
||||
%global fedora_build %{baserelease}
|
||||
|
||||
# base_sublevel is the kernel version we're starting with and patching
|
||||
@ -93,9 +93,9 @@ Summary: The Linux kernel
|
||||
# The next upstream release sublevel (base_sublevel+1)
|
||||
%define upstream_sublevel %(echo $((%{base_sublevel} + 1)))
|
||||
# The rc snapshot level
|
||||
%define rcrev 8
|
||||
%define rcrev 2
|
||||
# The git snapshot level
|
||||
%define gitrev 0
|
||||
%define gitrev 1
|
||||
# Set rpm version accordingly
|
||||
%define rpmversion 3.%{upstream_sublevel}.0
|
||||
%endif
|
||||
@ -654,8 +654,6 @@ Patch04: linux-2.6-compile-fixes.patch
|
||||
# build tweak for build ID magic, even for -vanilla
|
||||
Patch05: linux-2.6-makefile-after_link.patch
|
||||
|
||||
Patch06: power-x86-destdir.patch
|
||||
|
||||
%if !%{nopatches}
|
||||
|
||||
|
||||
@ -690,14 +688,9 @@ Patch700: linux-2.6-e1000-ich9-montevina.patch
|
||||
Patch800: linux-2.6-crash-driver.patch
|
||||
|
||||
# crypto/
|
||||
Patch900: modsign-post-KS-jwb.patch
|
||||
|
||||
# secure boot
|
||||
Patch1000: secure-boot-20121212.patch
|
||||
Patch1001: efivarfs-3.7.patch
|
||||
|
||||
# Improve PCI support on UEFI
|
||||
Patch1100: handle-efi-roms.patch
|
||||
Patch1000: secure-boot-20130104.patch
|
||||
|
||||
# virt + ksm patches
|
||||
|
||||
@ -763,21 +756,9 @@ Patch22001: selinux-apply-different-permission-to-ptrace-child.patch
|
||||
# Build patch, should go away
|
||||
Patch22070: irqnr-build.patch
|
||||
|
||||
#rhbz 874791
|
||||
Patch22125: Bluetooth-Add-support-for-BCM20702A0.patch
|
||||
|
||||
#rhbz 859485
|
||||
Patch21226: vt-Drop-K_OFF-for-VC_MUTE.patch
|
||||
|
||||
#rhbz CVE-2012-4530 868285 880147
|
||||
Patch21228: exec-do-not-leave-bprm-interp-on-stack.patch
|
||||
Patch21229: exec-use-eloop-for-max-recursion-depth.patch
|
||||
|
||||
#rhbz 851278
|
||||
Patch21234: Revert-8139cp-revert-set-ring-address-before-enabling.patch
|
||||
Patch21232: 8139cp-set-ring-address-after-enabling-C-mode.patch
|
||||
Patch21233: 8139cp-re-enable-interrupts-after-tx-timeout.patch
|
||||
|
||||
#rhbz 883414
|
||||
Patch21236: mac80211-fix-ibss-scanning.patch
|
||||
|
||||
@ -1333,8 +1314,6 @@ ApplyPatch linux-2.6-makefile-after_link.patch
|
||||
#
|
||||
ApplyOptionalPatch linux-2.6-compile-fixes.patch
|
||||
|
||||
ApplyPatch power-x86-destdir.patch
|
||||
|
||||
%if !%{nopatches}
|
||||
|
||||
# revert patches from upstream that conflict or that we get via other means
|
||||
@ -1352,11 +1331,11 @@ ApplyPatch vmbugon-warnon.patch
|
||||
#
|
||||
ApplyPatch arm-export-read_current_timer.patch
|
||||
ApplyPatch arm-allnoconfig-error-__LINUX_ARM_ARCH__-undeclared.patch
|
||||
ApplyPatch arm-omapdrm-fixinc.patch
|
||||
# ApplyPatch arm-omapdrm-fixinc.patch
|
||||
ApplyPatch arm-imx-fixdrm.patch
|
||||
ApplyPatch arm-tegra-nvec-kconfig.patch
|
||||
# ApplyPatch arm-tegra-nvec-kconfig.patch
|
||||
ApplyPatch arm-tegra-usb-no-reset-linux33.patch
|
||||
ApplyPatch arm-tegra-sdhci-module-fix.patch
|
||||
# ApplyPatch arm-tegra-sdhci-module-fix.patch
|
||||
|
||||
#
|
||||
# bugfixes to drivers and filesystems
|
||||
@ -1424,14 +1403,9 @@ ApplyPatch linux-2.6-crash-driver.patch
|
||||
ApplyPatch linux-2.6-e1000-ich9-montevina.patch
|
||||
|
||||
# crypto/
|
||||
ApplyPatch modsign-post-KS-jwb.patch
|
||||
|
||||
# secure boot
|
||||
ApplyPatch efivarfs-3.7.patch
|
||||
ApplyPatch secure-boot-20121212.patch
|
||||
|
||||
# Improved PCI support for UEFI
|
||||
ApplyPatch handle-efi-roms.patch
|
||||
ApplyPatch secure-boot-20130104.patch
|
||||
|
||||
# Assorted Virt Fixes
|
||||
|
||||
@ -1481,21 +1455,9 @@ ApplyPatch selinux-apply-different-permission-to-ptrace-child.patch
|
||||
#Build patch, should go away
|
||||
ApplyPatch irqnr-build.patch
|
||||
|
||||
#rhbz 874791
|
||||
ApplyPatch Bluetooth-Add-support-for-BCM20702A0.patch
|
||||
|
||||
#rhbz 859485
|
||||
ApplyPatch vt-Drop-K_OFF-for-VC_MUTE.patch
|
||||
|
||||
#rhbz CVE-2012-4530 868285 880147
|
||||
ApplyPatch exec-do-not-leave-bprm-interp-on-stack.patch
|
||||
ApplyPatch exec-use-eloop-for-max-recursion-depth.patch
|
||||
|
||||
#rhbz 851278
|
||||
ApplyPatch Revert-8139cp-revert-set-ring-address-before-enabling.patch
|
||||
ApplyPatch 8139cp-set-ring-address-after-enabling-C-mode.patch
|
||||
ApplyPatch 8139cp-re-enable-interrupts-after-tx-timeout.patch
|
||||
|
||||
#rhbz 883414
|
||||
ApplyPatch mac80211-fix-ibss-scanning.patch
|
||||
|
||||
@ -2368,6 +2330,12 @@ fi
|
||||
# ||----w |
|
||||
# || ||
|
||||
%changelog
|
||||
* Fri Jan 04 2013 Justin M. Forbes <jforbes@redhat.com> - 3.8.0-0.rc2.git1.1
|
||||
- Linux v3.8-rc2-116-g5f243b9
|
||||
|
||||
* Thu Jan 03 2013 Justin M. Forbes <jforbes@redhat.com>
|
||||
- Initial 3.8-rc2 rebase
|
||||
|
||||
* Wed Jan 02 2013 Josh Boyer <jwboyer@redhat.com>
|
||||
- BR the hostname package (rhbz 886113)
|
||||
|
||||
|
@ -1,78 +0,0 @@
|
||||
From 56713a28675b966e027a824a0130b80dffab209f Mon Sep 17 00:00:00 2001
|
||||
From: Josh Boyer <jwboyer@redhat.com>
|
||||
Date: Mon, 5 Nov 2012 09:09:24 +1030
|
||||
Subject: [PATCH] MODSIGN: Add modules_sign make target
|
||||
|
||||
If CONFIG_MODULE_SIG is set, and 'make modules_sign' is called then this
|
||||
patch will cause the modules to get a signature appended. The make target
|
||||
is intended to be run after 'make modules_install', and will modify the
|
||||
modules in-place in the installed location. It can be used to produce
|
||||
signed modules after they have been processed by distribution build
|
||||
scripts.
|
||||
|
||||
Signed-off-by: Josh Boyer <jwboyer@redhat.com>
|
||||
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (minor typo fix)
|
||||
---
|
||||
Makefile | 6 ++++++
|
||||
scripts/Makefile.modsign | 32 ++++++++++++++++++++++++++++++++
|
||||
2 files changed, 38 insertions(+), 0 deletions(-)
|
||||
create mode 100644 scripts/Makefile.modsign
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 42d0e56..253aa1b 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -981,6 +981,12 @@ _modinst_post: _modinst_
|
||||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modinst
|
||||
$(call cmd,depmod)
|
||||
|
||||
+ifeq ($(CONFIG_MODULE_SIG), y)
|
||||
+PHONY += modules_sign
|
||||
+modules_sign:
|
||||
+ $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modsign
|
||||
+endif
|
||||
+
|
||||
else # CONFIG_MODULES
|
||||
|
||||
# Modules not configured
|
||||
diff --git a/scripts/Makefile.modsign b/scripts/Makefile.modsign
|
||||
new file mode 100644
|
||||
index 0000000..abfda62
|
||||
--- /dev/null
|
||||
+++ b/scripts/Makefile.modsign
|
||||
@@ -0,0 +1,32 @@
|
||||
+# ==========================================================================
|
||||
+# Signing modules
|
||||
+# ==========================================================================
|
||||
+
|
||||
+PHONY := __modsign
|
||||
+__modsign:
|
||||
+
|
||||
+include scripts/Kbuild.include
|
||||
+
|
||||
+__modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod)))
|
||||
+modules := $(patsubst %.o,%.ko,$(wildcard $(__modules:.ko=.o)))
|
||||
+
|
||||
+PHONY += $(modules)
|
||||
+__modsign: $(modules)
|
||||
+ @:
|
||||
+
|
||||
+quiet_cmd_sign_ko = SIGN [M] $(2)/$(notdir $@)
|
||||
+ cmd_sign_ko = $(mod_sign_cmd) $(2)/$(notdir $@)
|
||||
+
|
||||
+# Modules built outside the kernel source tree go into extra by default
|
||||
+INSTALL_MOD_DIR ?= extra
|
||||
+ext-mod-dir = $(INSTALL_MOD_DIR)$(subst $(patsubst %/,%,$(KBUILD_EXTMOD)),,$(@D))
|
||||
+
|
||||
+modinst_dir = $(if $(KBUILD_EXTMOD),$(ext-mod-dir),kernel/$(@D))
|
||||
+
|
||||
+$(modules):
|
||||
+ $(call cmd,sign_ko,$(MODLIB)/$(modinst_dir))
|
||||
+
|
||||
+# Declare the contents of the .PHONY variable as phony. We keep that
|
||||
+# information in a variable se we can use it in if_changed and friends.
|
||||
+
|
||||
+.PHONY: $(PHONY)
|
||||
--
|
||||
1.7.7.6
|
||||
|
@ -1,35 +0,0 @@
|
||||
diff --git a/tools/power/x86/turbostat/Makefile b/tools/power/x86/turbostat/Makefile
|
||||
index f856495..984cc00 100644
|
||||
--- a/tools/power/x86/turbostat/Makefile
|
||||
+++ b/tools/power/x86/turbostat/Makefile
|
||||
@@ -1,3 +1,5 @@
|
||||
+DESTDIR ?=
|
||||
+
|
||||
turbostat : turbostat.c
|
||||
CFLAGS += -Wall
|
||||
|
||||
@@ -5,5 +7,5 @@ clean :
|
||||
rm -f turbostat
|
||||
|
||||
install :
|
||||
- install turbostat /usr/bin/turbostat
|
||||
- install turbostat.8 /usr/share/man/man8
|
||||
+ install turbostat ${DESTDIR}/usr/bin/turbostat
|
||||
+ install turbostat.8 ${DESTDIR}/usr/share/man/man8
|
||||
diff --git a/tools/power/x86/x86_energy_perf_policy/Makefile b/tools/power/x86/x86_energy_perf_policy/Makefile
|
||||
index f458237..f9824f0 100644
|
||||
--- a/tools/power/x86/x86_energy_perf_policy/Makefile
|
||||
+++ b/tools/power/x86/x86_energy_perf_policy/Makefile
|
||||
@@ -1,8 +1,10 @@
|
||||
+DESTDIR ?=
|
||||
+
|
||||
x86_energy_perf_policy : x86_energy_perf_policy.c
|
||||
|
||||
clean :
|
||||
rm -f x86_energy_perf_policy
|
||||
|
||||
install :
|
||||
- install x86_energy_perf_policy /usr/bin/
|
||||
- install x86_energy_perf_policy.8 /usr/share/man/man8/
|
||||
+ install x86_energy_perf_policy ${DESTDIR}/usr/bin/
|
||||
+ install x86_energy_perf_policy.8 ${DESTDIR}/usr/share/man/man8/
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user