From 33aac3fbd98a53eda0eef0fb88bc1710032ea0fc Mon Sep 17 00:00:00 2001 From: "Justin M. Forbes" Date: Fri, 10 Jan 2014 07:32:16 -0600 Subject: [PATCH] Linux v3.12.7 --- ...perly-set-MAC-address-and-BSSID-mask.patch | 103 ------------------ ...fault-due-to-incorrect-getopt_long-a.patch | 40 ------- kernel.spec | 25 +---- ...TRIM-and-apply-it-to-Micro-M500-SSDs.patch | 71 ------------ sources | 2 +- 5 files changed, 6 insertions(+), 235 deletions(-) delete mode 100644 ath9k_htc-properly-set-MAC-address-and-BSSID-mask.patch delete mode 100644 cpupower-Fix-segfault-due-to-incorrect-getopt_long-a.patch delete mode 100644 libata-implement-ATA_HORKAGE_NO_NCQ_TRIM-and-apply-it-to-Micro-M500-SSDs.patch diff --git a/ath9k_htc-properly-set-MAC-address-and-BSSID-mask.patch b/ath9k_htc-properly-set-MAC-address-and-BSSID-mask.patch deleted file mode 100644 index d643af6c7..000000000 --- a/ath9k_htc-properly-set-MAC-address-and-BSSID-mask.patch +++ /dev/null @@ -1,103 +0,0 @@ -Bugzilla: 1032753 -Upstream-status: 3.13 - -From 657eb17d87852c42b55c4b06d5425baa08b2ddb3 Mon Sep 17 00:00:00 2001 -From: Mathy Vanhoef -Date: Thu, 28 Nov 2013 12:21:45 +0100 -Subject: [PATCH] ath9k_htc: properly set MAC address and BSSID mask - -Pick the MAC address of the first virtual interface as the new hardware MAC -address. Set BSSID mask according to this MAC address. This fixes CVE-2013-4579. - -Signed-off-by: Mathy Vanhoef -Signed-off-by: John W. Linville ---- - drivers/net/wireless/ath/ath9k/htc_drv_main.c | 25 +++++++++++++++++-------- - drivers/net/wireless/ath/ath9k/main.c | 5 +++-- - 2 files changed, 20 insertions(+), 10 deletions(-) - -diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c -index 9a2657f..608d739 100644 ---- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c -+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c -@@ -127,21 +127,26 @@ static void ath9k_htc_bssid_iter(void *data, u8 *mac, struct ieee80211_vif *vif) - struct ath9k_vif_iter_data *iter_data = data; - int i; - -- for (i = 0; i < ETH_ALEN; i++) -- iter_data->mask[i] &= ~(iter_data->hw_macaddr[i] ^ mac[i]); -+ if (iter_data->hw_macaddr != NULL) { -+ for (i = 0; i < ETH_ALEN; i++) -+ iter_data->mask[i] &= ~(iter_data->hw_macaddr[i] ^ mac[i]); -+ } else { -+ iter_data->hw_macaddr = mac; -+ } - } - --static void ath9k_htc_set_bssid_mask(struct ath9k_htc_priv *priv, -+static void ath9k_htc_set_mac_bssid_mask(struct ath9k_htc_priv *priv, - struct ieee80211_vif *vif) - { - struct ath_common *common = ath9k_hw_common(priv->ah); - struct ath9k_vif_iter_data iter_data; - - /* -- * Use the hardware MAC address as reference, the hardware uses it -- * together with the BSSID mask when matching addresses. -+ * Pick the MAC address of the first interface as the new hardware -+ * MAC address. The hardware will use it together with the BSSID mask -+ * when matching addresses. - */ -- iter_data.hw_macaddr = common->macaddr; -+ iter_data.hw_macaddr = NULL; - memset(&iter_data.mask, 0xff, ETH_ALEN); - - if (vif) -@@ -153,6 +158,10 @@ static void ath9k_htc_set_bssid_mask(struct ath9k_htc_priv *priv, - ath9k_htc_bssid_iter, &iter_data); - - memcpy(common->bssidmask, iter_data.mask, ETH_ALEN); -+ -+ if (iter_data.hw_macaddr) -+ memcpy(common->macaddr, iter_data.hw_macaddr, ETH_ALEN); -+ - ath_hw_setbssidmask(common); - } - -@@ -1063,7 +1072,7 @@ static int ath9k_htc_add_interface(struct ieee80211_hw *hw, - goto out; - } - -- ath9k_htc_set_bssid_mask(priv, vif); -+ ath9k_htc_set_mac_bssid_mask(priv, vif); - - priv->vif_slot |= (1 << avp->index); - priv->nvifs++; -@@ -1128,7 +1137,7 @@ static void ath9k_htc_remove_interface(struct ieee80211_hw *hw, - - ath9k_htc_set_opmode(priv); - -- ath9k_htc_set_bssid_mask(priv, vif); -+ ath9k_htc_set_mac_bssid_mask(priv, vif); - - /* - * Stop ANI only if there are no associated station interfaces. -diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c -index 74f452c..21aa09e 100644 ---- a/drivers/net/wireless/ath/ath9k/main.c -+++ b/drivers/net/wireless/ath/ath9k/main.c -@@ -965,8 +965,9 @@ void ath9k_calculate_iter_data(struct ieee80211_hw *hw, - struct ath_common *common = ath9k_hw_common(ah); - - /* -- * Use the hardware MAC address as reference, the hardware uses it -- * together with the BSSID mask when matching addresses. -+ * Pick the MAC address of the first interface as the new hardware -+ * MAC address. The hardware will use it together with the BSSID mask -+ * when matching addresses. - */ - memset(iter_data, 0, sizeof(*iter_data)); - memset(&iter_data->mask, 0xff, ETH_ALEN); --- -1.8.4.2 - diff --git a/cpupower-Fix-segfault-due-to-incorrect-getopt_long-a.patch b/cpupower-Fix-segfault-due-to-incorrect-getopt_long-a.patch deleted file mode 100644 index dcc6b84b6..000000000 --- a/cpupower-Fix-segfault-due-to-incorrect-getopt_long-a.patch +++ /dev/null @@ -1,40 +0,0 @@ -From cb8e390d258b7f8073afafcbb163976e27346e9d Mon Sep 17 00:00:00 2001 -From: Josh Boyer -Date: Fri, 11 Oct 2013 08:37:53 -0400 -Subject: [PATCH] cpupower: Fix segfault due to incorrect getopt_long arugments - -If a user calls 'cpupower set --perf-bias 15', the process will end with a -SIGSEGV in libc because cpupower-set passes a NULL optarg to the atoi call. -This is because the getopt_long structure currently has all of the options -as having an optional_argument when they really have a required argument. -We change the structure to use required_argument to match the short options -and it resolves the issue. - -This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1000439 - -Cc: stable@vger.kernel.org -Signed-off-by: Josh Boyer ---- - tools/power/cpupower/utils/cpupower-set.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/tools/power/cpupower/utils/cpupower-set.c b/tools/power/cpupower/utils/cpupower-set.c -index dc4de37..bcf1d2f 100644 ---- a/tools/power/cpupower/utils/cpupower-set.c -+++ b/tools/power/cpupower/utils/cpupower-set.c -@@ -18,9 +18,9 @@ - #include "helpers/bitmask.h" - - static struct option set_opts[] = { -- { .name = "perf-bias", .has_arg = optional_argument, .flag = NULL, .val = 'b'}, -- { .name = "sched-mc", .has_arg = optional_argument, .flag = NULL, .val = 'm'}, -- { .name = "sched-smt", .has_arg = optional_argument, .flag = NULL, .val = 's'}, -+ { .name = "perf-bias", .has_arg = required_argument, .flag = NULL, .val = 'b'}, -+ { .name = "sched-mc", .has_arg = required_argument, .flag = NULL, .val = 'm'}, -+ { .name = "sched-smt", .has_arg = required_argument, .flag = NULL, .val = 's'}, - { }, - }; - --- -1.8.3.1 - diff --git a/kernel.spec b/kernel.spec index 053d4b6c3..c5238468b 100644 --- a/kernel.spec +++ b/kernel.spec @@ -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 201 +%global baserelease 200 %global fedora_build %{baserelease} # base_sublevel is the kernel version we're starting with and patching @@ -74,7 +74,7 @@ Summary: The Linux kernel %if 0%{?released_kernel} # Do we have a -stable update to apply? -%define stable_update 6 +%define stable_update 7 # Is it a -stable RC? %define stable_rc 0 # Set rpm version accordingly @@ -725,9 +725,6 @@ Patch25127: 0002-iwlwifi-don-t-WARN-on-bad-firmware-state.patch #rhbz 993744 Patch25128: dm-cache-policy-mq_fix-large-scale-table-allocation-bug.patch -#rhbz 1000439 -Patch25129: cpupower-Fix-segfault-due-to-incorrect-getopt_long-a.patch - Patch25140: drm-qxl-backport-fixes-for-Fedora.patch #rhbz 1011362 @@ -751,12 +748,6 @@ Patch25171: elantech-Properly-differentiate-between-clickpads-an.patch #rhbz 1025770 Patch25176: br-fix-use-of-rx_handler_data-in-code-executed-on-no.patch -#rhbz 1024002 -Patch25177: libata-implement-ATA_HORKAGE_NO_NCQ_TRIM-and-apply-it-to-Micro-M500-SSDs.patch - -#CVE-2013-4579 rhbz 1032753 1033072 -Patch25178: ath9k_htc-properly-set-MAC-address-and-BSSID-mask.patch - #rhbz 924916 Patch25179: KVM-MMU-handle-invalid-root_hpa-at-__direct_map.patch @@ -1433,9 +1424,6 @@ ApplyPatch 0002-iwlwifi-don-t-WARN-on-bad-firmware-state.patch #rhbz 993744 ApplyPatch dm-cache-policy-mq_fix-large-scale-table-allocation-bug.patch -#rhbz 1000439 -ApplyPatch cpupower-Fix-segfault-due-to-incorrect-getopt_long-a.patch - ApplyPatch drm-qxl-backport-fixes-for-Fedora.patch #rhbz 1011362 @@ -1459,12 +1447,6 @@ ApplyPatch elantech-Properly-differentiate-between-clickpads-an.patch #rhbz 1025770 ApplyPatch br-fix-use-of-rx_handler_data-in-code-executed-on-no.patch -#rhbz 1024002 -ApplyPatch libata-implement-ATA_HORKAGE_NO_NCQ_TRIM-and-apply-it-to-Micro-M500-SSDs.patch - -#CVE-2013-4579 rhbz 1032753 1033072 -ApplyPatch ath9k_htc-properly-set-MAC-address-and-BSSID-mask.patch - #rhbz 924916 ApplyPatch KVM-MMU-handle-invalid-root_hpa-at-__direct_map.patch @@ -2289,6 +2271,9 @@ fi # and build. %changelog +* Fri Jan 10 2014 Justin M. Forbes - Backport support for ALPS Dolphin devices (rhbz 953211) - Enable BCMA_DRIVER_GPIO by turning on GPIOLIB everywhere (rhbz 1021098) diff --git a/libata-implement-ATA_HORKAGE_NO_NCQ_TRIM-and-apply-it-to-Micro-M500-SSDs.patch b/libata-implement-ATA_HORKAGE_NO_NCQ_TRIM-and-apply-it-to-Micro-M500-SSDs.patch deleted file mode 100644 index 6d2c50495..000000000 --- a/libata-implement-ATA_HORKAGE_NO_NCQ_TRIM-and-apply-it-to-Micro-M500-SSDs.patch +++ /dev/null @@ -1,71 +0,0 @@ -Bugzilla: 1024002 -Upstream-status: Should hit 3.13 and CC'd to 3.12 stable - -From f78dea064c5f7de07de4912a6e5136dbc443d614 Mon Sep 17 00:00:00 2001 -From: Marc Carino -Date: Tue, 17 Dec 2013 02:15:53 +0000 -Subject: libata: implement ATA_HORKAGE_NO_NCQ_TRIM and apply it to Micro M500 SSDs - -Certain drives cannot handle queued TRIM commands properly, even -though support is indicated in the IDENTIFY DEVICE buffer. This patch -allows for disabling the commands for the affected drives and apply it -to the Micron/Crucial M500 SSDs which exhibit incorrect protocol -behavior when issued queued TRIM commands, which could lead to silent -data corruption. - -tj: Merged two unnecessarily split patches and made minor edits - including shortening horkage name. - -Signed-off-by: Marc Carino -Signed-off-by: Tejun Heo -Link: http://lkml.kernel.org/g/1387246554-7311-1-git-send-email-marc.ceeeee@gmail.com -Cc: stable@vger.kernel.org # 3.12+ ---- -diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c -index ff01584..1393a58 100644 ---- a/drivers/ata/libata-core.c -+++ b/drivers/ata/libata-core.c -@@ -2149,9 +2149,16 @@ static int ata_dev_config_ncq(struct ata_device *dev, - "failed to get NCQ Send/Recv Log Emask 0x%x\n", - err_mask); - } else { -+ u8 *cmds = dev->ncq_send_recv_cmds; -+ - dev->flags |= ATA_DFLAG_NCQ_SEND_RECV; -- memcpy(dev->ncq_send_recv_cmds, ap->sector_buf, -- ATA_LOG_NCQ_SEND_RECV_SIZE); -+ memcpy(cmds, ap->sector_buf, ATA_LOG_NCQ_SEND_RECV_SIZE); -+ -+ if (dev->horkage & ATA_HORKAGE_NO_NCQ_TRIM) { -+ ata_dev_dbg(dev, "disabling queued TRIM support\n"); -+ cmds[ATA_LOG_NCQ_SEND_RECV_DSM_OFFSET] &= -+ ~ATA_LOG_NCQ_SEND_RECV_DSM_TRIM; -+ } - } - } - -@@ -4205,6 +4212,10 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { - { "PIONEER DVD-RW DVR-212D", NULL, ATA_HORKAGE_NOSETXFER }, - { "PIONEER DVD-RW DVR-216D", NULL, ATA_HORKAGE_NOSETXFER }, - -+ /* devices that don't properly handle queued TRIM commands */ -+ { "Micron_M500*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, }, -+ { "Crucial_CT???M500SSD1", NULL, ATA_HORKAGE_NO_NCQ_TRIM, }, -+ - /* End Marker */ - { } - }; -diff --git a/include/linux/libata.h b/include/linux/libata.h -index 0e23c26..9b50337 100644 ---- a/include/linux/libata.h -+++ b/include/linux/libata.h -@@ -418,6 +418,7 @@ enum { - ATA_HORKAGE_DUMP_ID = (1 << 16), /* dump IDENTIFY data */ - ATA_HORKAGE_MAX_SEC_LBA48 = (1 << 17), /* Set max sects to 65535 */ - ATA_HORKAGE_ATAPI_DMADIR = (1 << 18), /* device requires dmadir */ -+ ATA_HORKAGE_NO_NCQ_TRIM = (1 << 19), /* don't use queued TRIM */ - - /* DMA mask for user DMA control: User visible values; DO NOT - renumber */ --- -cgit v0.9.2 diff --git a/sources b/sources index 4520dde67..dd1c2fbda 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ cc6ee608854e0da4b64f6c1ff8b6398c linux-3.12.tar.xz -9e75be8b127e58f1a76c0015eabb12ae patch-3.12.6.xz +a158a29ecf49e768ebd2f34967991606 patch-3.12.7.xz