Merge branch 'f19' of ssh://pkgs.fedoraproject.org/kernel into f19
This commit is contained in:
commit
d3954234d6
|
@ -0,0 +1,102 @@
|
|||
Bugzilla: 1089583
|
||||
Upstream-status: Sent for 3.15
|
||||
|
||||
From 4cebb979af8d7bd1ec463406eaf57a44bd5b9f04 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
||||
Date: Tue, 22 Apr 2014 11:21:00 -0400
|
||||
Subject: [PATCH] HID: rmi: do not handle touchscreens through hid-rmi
|
||||
|
||||
Currently, hid-rmi drives every Synaptics product, but the touchscreens
|
||||
on the Windows tablets should be handled through hid-multitouch.
|
||||
|
||||
Instead of providing a long list of PIDs, rely on the scan_report
|
||||
capability to detect which should go to hid-multitouch, and which
|
||||
should not go to hid-rmi.
|
||||
|
||||
We introduce a generic HID_GROUP_HAVE_SPECIAL_DRIVER which can be reused
|
||||
amoung other drivers if they want to have a catch rule but still
|
||||
have multitouch devices handled through hid-multitouch.
|
||||
|
||||
related bug:
|
||||
https://bugzilla.kernel.org/show_bug.cgi?id=74241
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1089583
|
||||
|
||||
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
||||
---
|
||||
drivers/hid/hid-core.c | 10 ++++++++--
|
||||
drivers/hid/hid-rmi.c | 6 ++++--
|
||||
include/linux/hid.h | 13 +++++++++++++
|
||||
3 files changed, 25 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
|
||||
index 6ba2fd0..ea18639 100644
|
||||
--- a/drivers/hid/hid-core.c
|
||||
+++ b/drivers/hid/hid-core.c
|
||||
@@ -776,6 +776,14 @@ static int hid_scan_report(struct hid_device *hid)
|
||||
(hid->group == HID_GROUP_MULTITOUCH))
|
||||
hid->group = HID_GROUP_MULTITOUCH_WIN_8;
|
||||
|
||||
+ /*
|
||||
+ * Vendor specific handlings
|
||||
+ */
|
||||
+ if ((hid->vendor == USB_VENDOR_ID_SYNAPTICS) &&
|
||||
+ (hid->group == HID_GROUP_GENERIC))
|
||||
+ /* hid-rmi should take care of them, not hid-generic */
|
||||
+ hid->group = HID_GROUP_HAVE_SPECIAL_DRIVER;
|
||||
+
|
||||
vfree(parser);
|
||||
return 0;
|
||||
}
|
||||
@@ -1840,8 +1848,6 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGP_MOUSE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_STEELSERIES, USB_DEVICE_ID_STEELSERIES_SRWS1) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SUNPLUS, USB_DEVICE_ID_SUNPLUS_WDESKTOP) },
|
||||
- { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, HID_ANY_ID) },
|
||||
- { HID_I2C_DEVICE(USB_VENDOR_ID_SYNAPTICS, HID_ANY_ID) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_THINGM, USB_DEVICE_ID_BLINK1) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb300) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb304) },
|
||||
diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c
|
||||
index a4f04d4..a97a373 100644
|
||||
--- a/drivers/hid/hid-rmi.c
|
||||
+++ b/drivers/hid/hid-rmi.c
|
||||
@@ -863,8 +863,10 @@ static void rmi_remove(struct hid_device *hdev)
|
||||
}
|
||||
|
||||
static const struct hid_device_id rmi_id[] = {
|
||||
- { HID_I2C_DEVICE(USB_VENDOR_ID_SYNAPTICS, HID_ANY_ID) },
|
||||
- { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, HID_ANY_ID) },
|
||||
+ { HID_DEVICE(BUS_I2C, HID_GROUP_HAVE_SPECIAL_DRIVER,
|
||||
+ USB_VENDOR_ID_SYNAPTICS, HID_ANY_ID) },
|
||||
+ { HID_DEVICE(BUS_USB, HID_GROUP_HAVE_SPECIAL_DRIVER,
|
||||
+ USB_VENDOR_ID_SYNAPTICS, HID_ANY_ID) },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(hid, rmi_id);
|
||||
diff --git a/include/linux/hid.h b/include/linux/hid.h
|
||||
index 1b5f1e9..2fdd612 100644
|
||||
--- a/include/linux/hid.h
|
||||
+++ b/include/linux/hid.h
|
||||
@@ -299,6 +299,19 @@ struct hid_item {
|
||||
#define HID_GROUP_MULTITOUCH 0x0002
|
||||
#define HID_GROUP_SENSOR_HUB 0x0003
|
||||
#define HID_GROUP_MULTITOUCH_WIN_8 0x0004
|
||||
+#define HID_GROUP_HAVE_SPECIAL_DRIVER 0xffff
|
||||
+/*
|
||||
+ * HID_GROUP_HAVE_SPECIAL_DRIVER should be used when the device needs to be
|
||||
+ * scanned in case it is handled by either hid-multitouch, hid-generic,
|
||||
+ * hid-sensor-hub or any other generic hid driver.
|
||||
+ *
|
||||
+ * Devices declared in hid_have_special_driver[] in hid-core.c can use
|
||||
+ * HID_GROUP_ANY instead because there will be not overlap between their
|
||||
+ * specific driver and a generic one.
|
||||
+ *
|
||||
+ * Note: HID_GROUP_ANY is declared in linux/mod_devicetable.h
|
||||
+ * and has a value of 0x0000
|
||||
+ */
|
||||
|
||||
/*
|
||||
* This is the global environment of the parser. This information is
|
||||
--
|
||||
1.9.0
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -1,56 +0,0 @@
|
|||
Bugzilla: 1046238
|
||||
Upstream-status: Queued for 3.14
|
||||
|
||||
From 1d0d6df02750b4a6f466768cbfbf860e24f4c8d4 Mon Sep 17 00:00:00 2001
|
||||
From: Ping Cheng <pinglinux@gmail.com>
|
||||
Date: Mon, 25 Nov 2013 18:43:45 -0800
|
||||
Subject: [PATCH] Input: wacom - make sure touch_max is set for touch devices
|
||||
|
||||
Old single touch Tablet PCs do not have touch_max set at
|
||||
wacom_features. Since touch device at lease supports one
|
||||
finger, assign touch_max to 1 when touch usage is defined
|
||||
in its HID Descriptor and touch_max is not pre-defined.
|
||||
|
||||
Tested-by: Jason Gerecke <killertofu@gmail.com>
|
||||
Signed-off-by: Ping Cheng <pingc@wacom.com>
|
||||
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
|
||||
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
||||
---
|
||||
drivers/input/tablet/wacom_sys.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
|
||||
index 8a90da1..3d71b60 100644
|
||||
--- a/drivers/input/tablet/wacom_sys.c
|
||||
+++ b/drivers/input/tablet/wacom_sys.c
|
||||
@@ -304,7 +304,7 @@ static int wacom_parse_hid(struct usb_interface *intf,
|
||||
struct usb_device *dev = interface_to_usbdev(intf);
|
||||
char limit = 0;
|
||||
/* result has to be defined as int for some devices */
|
||||
- int result = 0;
|
||||
+ int result = 0, touch_max = 0;
|
||||
int i = 0, usage = WCM_UNDEFINED, finger = 0, pen = 0;
|
||||
unsigned char *report;
|
||||
|
||||
@@ -351,7 +351,8 @@ static int wacom_parse_hid(struct usb_interface *intf,
|
||||
if (usage == WCM_DESKTOP) {
|
||||
if (finger) {
|
||||
features->device_type = BTN_TOOL_FINGER;
|
||||
-
|
||||
+ /* touch device at least supports one touch point */
|
||||
+ touch_max = 1;
|
||||
switch (features->type) {
|
||||
case TABLETPC2FG:
|
||||
features->pktlen = WACOM_PKGLEN_TPC2FG;
|
||||
@@ -504,6 +505,8 @@ static int wacom_parse_hid(struct usb_interface *intf,
|
||||
}
|
||||
|
||||
out:
|
||||
+ if (!features->touch_max && touch_max)
|
||||
+ features->touch_max = touch_max;
|
||||
result = 0;
|
||||
kfree(report);
|
||||
return result;
|
||||
--
|
||||
1.8.4.2
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
From 5d5ef0e96f03a975feb67f70d57e55cd502885fe Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Wed, 30 Apr 2014 15:24:19 +0200
|
||||
Subject: [PATCH] acpi-video: Add 4 new models to the use_native_backlight dmi
|
||||
list
|
||||
|
||||
Acer Aspire V5-171
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=983342
|
||||
|
||||
Acer Aspire V5-471G
|
||||
Lenovo Yoga 2 11
|
||||
Reported-and-tested-by: Vincent Gerris <vgerris@gmail.com>
|
||||
|
||||
HP EliteBook 8470p
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1093120
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
|
||||
Backport to 3.14, Conflicts: drivers/acpi/video.c, 3.14 is missing the
|
||||
Thinkpad Helix entry from master add that while at it.
|
||||
---
|
||||
drivers/acpi/video.c | 40 ++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 40 insertions(+)
|
||||
|
||||
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
|
||||
index b6ba88e..083c89f 100644
|
||||
--- a/drivers/acpi/video.c
|
||||
+++ b/drivers/acpi/video.c
|
||||
@@ -491,6 +491,22 @@ static struct dmi_system_id video_dmi_table[] __initdata = {
|
||||
},
|
||||
{
|
||||
.callback = video_set_use_native_backlight,
|
||||
+ .ident = "Lenovo Yoga 2 11",
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
+ DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Yoga 2 11"),
|
||||
+ },
|
||||
+ },
|
||||
+ {
|
||||
+ .callback = video_set_use_native_backlight,
|
||||
+ .ident = "Thinkpad Helix",
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
+ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad Helix"),
|
||||
+ },
|
||||
+ },
|
||||
+ {
|
||||
+ .callback = video_set_use_native_backlight,
|
||||
.ident = "Dell Inspiron 7520",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||
@@ -507,6 +523,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = {
|
||||
},
|
||||
{
|
||||
.callback = video_set_use_native_backlight,
|
||||
+ .ident = "Acer Aspire V5-171",
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
|
||||
+ DMI_MATCH(DMI_PRODUCT_NAME, "V5-171"),
|
||||
+ },
|
||||
+ },
|
||||
+ {
|
||||
+ .callback = video_set_use_native_backlight,
|
||||
.ident = "Acer Aspire V5-431",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
|
||||
@@ -514,6 +538,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = {
|
||||
},
|
||||
},
|
||||
{
|
||||
+ .callback = video_set_use_native_backlight,
|
||||
+ .ident = "Acer Aspire V5-471G",
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
|
||||
+ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire V5-471G"),
|
||||
+ },
|
||||
+ },
|
||||
+ {
|
||||
.callback = video_set_use_native_backlight,
|
||||
.ident = "HP ProBook 4340s",
|
||||
.matches = {
|
||||
@@ -565,6 +597,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = {
|
||||
},
|
||||
{
|
||||
.callback = video_set_use_native_backlight,
|
||||
+ .ident = "HP EliteBook 8470p",
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
|
||||
+ DMI_MATCH(DMI_PRODUCT_NAME, "HP EliteBook 8470p"),
|
||||
+ },
|
||||
+ },
|
||||
+ {
|
||||
+ .callback = video_set_use_native_backlight,
|
||||
.ident = "HP EliteBook 8780w",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
|
||||
--
|
||||
1.9.0
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
From 555b84220a7c84c2faa1964d19733d867d7bf61f Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Thu, 10 Apr 2014 11:36:14 +0200
|
||||
Subject: [PATCH v3] synaptics: Add min/max quirk for ThinkPad T431s, L440,
|
||||
L540, S1 Yoga and X1
|
||||
|
||||
We expect that all the Haswell series will need such quirks, sigh.
|
||||
|
||||
The T431s seems to be T430 hardware in a T440s case, using the T440s touchpad,
|
||||
with the same min/max issue.
|
||||
|
||||
The X1 Carbon 3rd generation name says 2nd while it is a 3rd generation.
|
||||
|
||||
The X1 and T431s share a PnPID with the T540p, but the reported ranges are
|
||||
closer to those of the T440s.
|
||||
|
||||
HdG: Squashed 5 quirk patches into one. T431s + L440 + L540 are written by me,
|
||||
S1 Yoga and X1 are written by Benjamin Tissoires.
|
||||
|
||||
Hdg: Standardized S1 Yoga and X1 values, Yoga uses the same touchpad as the
|
||||
X240, X1 uses the same touchpad as the T440.
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
drivers/input/mouse/synaptics.c | 42 +++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 42 insertions(+)
|
||||
|
||||
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
|
||||
index a8b57d7..7c9f509 100644
|
||||
--- a/drivers/input/mouse/synaptics.c
|
||||
+++ b/drivers/input/mouse/synaptics.c
|
||||
@@ -1566,6 +1566,14 @@ static const struct dmi_system_id min_max_dmi_table[] __initconst = {
|
||||
.driver_data = (int []){1232, 5710, 1156, 4696},
|
||||
},
|
||||
{
|
||||
+ /* Lenovo ThinkPad T431s */
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
+ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T431"),
|
||||
+ },
|
||||
+ .driver_data = (int []){1024, 5112, 2024, 4832},
|
||||
+ },
|
||||
+ {
|
||||
/* Lenovo ThinkPad T440s */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
@@ -1574,6 +1582,14 @@ static const struct dmi_system_id min_max_dmi_table[] __initconst = {
|
||||
.driver_data = (int []){1024, 5112, 2024, 4832},
|
||||
},
|
||||
{
|
||||
+ /* Lenovo ThinkPad L440 */
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
+ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L440"),
|
||||
+ },
|
||||
+ .driver_data = (int []){1024, 5112, 2024, 4832},
|
||||
+ },
|
||||
+ {
|
||||
/* Lenovo ThinkPad T540p */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
@@ -1581,6 +1597,32 @@ static const struct dmi_system_id min_max_dmi_table[] __initconst = {
|
||||
},
|
||||
.driver_data = (int []){1024, 5056, 2058, 4832},
|
||||
},
|
||||
+ {
|
||||
+ /* Lenovo ThinkPad L540 */
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
+ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L540"),
|
||||
+ },
|
||||
+ .driver_data = (int []){1024, 5112, 2024, 4832},
|
||||
+ },
|
||||
+ {
|
||||
+ /* Lenovo Yoga S1 */
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
+ DMI_EXACT_MATCH(DMI_PRODUCT_VERSION,
|
||||
+ "ThinkPad S1 Yoga"),
|
||||
+ },
|
||||
+ .driver_data = (int []){1232, 5710, 1156, 4696},
|
||||
+ },
|
||||
+ {
|
||||
+ /* Lenovo ThinkPad X1 Carbon Haswell (3rd generation) */
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
+ DMI_MATCH(DMI_PRODUCT_VERSION,
|
||||
+ "ThinkPad X1 Carbon 2nd"),
|
||||
+ },
|
||||
+ .driver_data = (int []){1024, 5112, 2024, 4832},
|
||||
+ },
|
||||
#endif
|
||||
{ }
|
||||
};
|
||||
--
|
||||
1.9.0
|
||||
|
|
@ -1,216 +0,0 @@
|
|||
Bugzilla: 1046238
|
||||
Upstream-status: Queued for 3.14
|
||||
|
||||
From b5fd2a3e92ca5c8c1f3c20d31ac5daed3ec4d604 Mon Sep 17 00:00:00 2001
|
||||
From: Ping Cheng <pinglinux@gmail.com>
|
||||
Date: Mon, 25 Nov 2013 18:44:55 -0800
|
||||
Subject: [PATCH] Input: wacom - add support for three new Intuos devices
|
||||
|
||||
Two tablets in this series support both pen and touch. One (Intuos S)
|
||||
only supports pen. This patch also updates the driver to process wireless
|
||||
devices that do not support touch interface.
|
||||
|
||||
Tested-by: Jason Gerecke <killertofu@gmail.com>
|
||||
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
|
||||
Signed-off-by: Ping Cheng <pingc@wacom.com>
|
||||
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
||||
---
|
||||
drivers/input/tablet/wacom_sys.c | 6 ++--
|
||||
drivers/input/tablet/wacom_wac.c | 61 ++++++++++++++++++++++++++++++----------
|
||||
drivers/input/tablet/wacom_wac.h | 2 ++
|
||||
3 files changed, 51 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
|
||||
index 3d71b60..3a7d99c 100644
|
||||
--- a/drivers/input/tablet/wacom_sys.c
|
||||
+++ b/drivers/input/tablet/wacom_sys.c
|
||||
@@ -1198,7 +1198,8 @@ static void wacom_wireless_work(struct work_struct *work)
|
||||
goto fail;
|
||||
|
||||
/* Touch interface */
|
||||
- if (wacom_wac1->features.touch_max) {
|
||||
+ if (wacom_wac1->features.touch_max ||
|
||||
+ wacom_wac1->features.type == INTUOSHT) {
|
||||
wacom_wac2->features =
|
||||
*((struct wacom_features *)id->driver_info);
|
||||
wacom_wac2->features.pktlen = WACOM_PKGLEN_BBTOUCH3;
|
||||
@@ -1321,7 +1322,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
|
||||
* HID descriptor. If this is the touch interface (wMaxPacketSize
|
||||
* of WACOM_PKGLEN_BBTOUCH3), override the table values.
|
||||
*/
|
||||
- if (features->type >= INTUOS5S && features->type <= INTUOSPL) {
|
||||
+ if (features->type >= INTUOS5S && features->type <= INTUOSHT) {
|
||||
if (endpoint->wMaxPacketSize == WACOM_PKGLEN_BBTOUCH3) {
|
||||
features->device_type = BTN_TOOL_FINGER;
|
||||
features->pktlen = WACOM_PKGLEN_BBTOUCH3;
|
||||
@@ -1391,7 +1392,6 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
|
||||
goto fail5;
|
||||
}
|
||||
}
|
||||
-
|
||||
return 0;
|
||||
|
||||
fail5: wacom_destroy_leds(wacom);
|
||||
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
|
||||
index 3f75f1d..eb60a28 100644
|
||||
--- a/drivers/input/tablet/wacom_wac.c
|
||||
+++ b/drivers/input/tablet/wacom_wac.c
|
||||
@@ -1176,10 +1176,16 @@ static void wacom_bpt3_touch_msg(struct wacom_wac *wacom, unsigned char *data)
|
||||
static void wacom_bpt3_button_msg(struct wacom_wac *wacom, unsigned char *data)
|
||||
{
|
||||
struct input_dev *input = wacom->input;
|
||||
+ struct wacom_features *features = &wacom->features;
|
||||
|
||||
- input_report_key(input, BTN_LEFT, (data[1] & 0x08) != 0);
|
||||
+ if (features->type == INTUOSHT) {
|
||||
+ input_report_key(input, BTN_LEFT, (data[1] & 0x02) != 0);
|
||||
+ input_report_key(input, BTN_BACK, (data[1] & 0x08) != 0);
|
||||
+ } else {
|
||||
+ input_report_key(input, BTN_BACK, (data[1] & 0x02) != 0);
|
||||
+ input_report_key(input, BTN_LEFT, (data[1] & 0x08) != 0);
|
||||
+ }
|
||||
input_report_key(input, BTN_FORWARD, (data[1] & 0x04) != 0);
|
||||
- input_report_key(input, BTN_BACK, (data[1] & 0x02) != 0);
|
||||
input_report_key(input, BTN_RIGHT, (data[1] & 0x01) != 0);
|
||||
}
|
||||
|
||||
@@ -1217,7 +1223,7 @@ static int wacom_bpt_pen(struct wacom_wac *wacom)
|
||||
unsigned char *data = wacom->data;
|
||||
int prox = 0, x = 0, y = 0, p = 0, d = 0, pen = 0, btn1 = 0, btn2 = 0;
|
||||
|
||||
- if (data[0] != 0x02)
|
||||
+ if (data[0] != WACOM_REPORT_PENABLED)
|
||||
return 0;
|
||||
|
||||
prox = (data[1] & 0x20) == 0x20;
|
||||
@@ -1297,7 +1303,7 @@ static int wacom_wireless_irq(struct wacom_wac *wacom, size_t len)
|
||||
unsigned char *data = wacom->data;
|
||||
int connected;
|
||||
|
||||
- if (len != WACOM_PKGLEN_WIRELESS || data[0] != 0x80)
|
||||
+ if (len != WACOM_PKGLEN_WIRELESS || data[0] != WACOM_REPORT_WL)
|
||||
return 0;
|
||||
|
||||
connected = data[1] & 0x01;
|
||||
@@ -1391,6 +1397,7 @@ void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len)
|
||||
break;
|
||||
|
||||
case BAMBOO_PT:
|
||||
+ case INTUOSHT:
|
||||
sync = wacom_bpt_irq(wacom_wac, len);
|
||||
break;
|
||||
|
||||
@@ -1459,7 +1466,7 @@ void wacom_setup_device_quirks(struct wacom_features *features)
|
||||
|
||||
/* these device have multiple inputs */
|
||||
if (features->type >= WIRELESS ||
|
||||
- (features->type >= INTUOS5S && features->type <= INTUOSPL) ||
|
||||
+ (features->type >= INTUOS5S && features->type <= INTUOSHT) ||
|
||||
(features->oVid && features->oPid))
|
||||
features->quirks |= WACOM_QUIRK_MULTI_INPUT;
|
||||
|
||||
@@ -1771,33 +1778,43 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
|
||||
__set_bit(INPUT_PROP_POINTER, input_dev->propbit);
|
||||
break;
|
||||
|
||||
+ case INTUOSHT:
|
||||
case BAMBOO_PT:
|
||||
__clear_bit(ABS_MISC, input_dev->absbit);
|
||||
|
||||
- __set_bit(INPUT_PROP_POINTER, input_dev->propbit);
|
||||
-
|
||||
if (features->device_type == BTN_TOOL_FINGER) {
|
||||
- unsigned int flags = INPUT_MT_POINTER;
|
||||
|
||||
__set_bit(BTN_LEFT, input_dev->keybit);
|
||||
__set_bit(BTN_FORWARD, input_dev->keybit);
|
||||
__set_bit(BTN_BACK, input_dev->keybit);
|
||||
__set_bit(BTN_RIGHT, input_dev->keybit);
|
||||
|
||||
- if (features->pktlen == WACOM_PKGLEN_BBTOUCH3) {
|
||||
- input_set_abs_params(input_dev,
|
||||
+ if (features->touch_max) {
|
||||
+ /* touch interface */
|
||||
+ unsigned int flags = INPUT_MT_POINTER;
|
||||
+
|
||||
+ __set_bit(INPUT_PROP_POINTER, input_dev->propbit);
|
||||
+ if (features->pktlen == WACOM_PKGLEN_BBTOUCH3) {
|
||||
+ input_set_abs_params(input_dev,
|
||||
ABS_MT_TOUCH_MAJOR,
|
||||
0, features->x_max, 0, 0);
|
||||
- input_set_abs_params(input_dev,
|
||||
+ input_set_abs_params(input_dev,
|
||||
ABS_MT_TOUCH_MINOR,
|
||||
0, features->y_max, 0, 0);
|
||||
+ } else {
|
||||
+ __set_bit(BTN_TOOL_FINGER, input_dev->keybit);
|
||||
+ __set_bit(BTN_TOOL_DOUBLETAP, input_dev->keybit);
|
||||
+ flags = 0;
|
||||
+ }
|
||||
+ input_mt_init_slots(input_dev, features->touch_max, flags);
|
||||
} else {
|
||||
- __set_bit(BTN_TOOL_FINGER, input_dev->keybit);
|
||||
- __set_bit(BTN_TOOL_DOUBLETAP, input_dev->keybit);
|
||||
- flags = 0;
|
||||
+ /* buttons/keys only interface */
|
||||
+ __clear_bit(ABS_X, input_dev->absbit);
|
||||
+ __clear_bit(ABS_Y, input_dev->absbit);
|
||||
+ __clear_bit(BTN_TOUCH, input_dev->keybit);
|
||||
}
|
||||
- input_mt_init_slots(input_dev, features->touch_max, flags);
|
||||
} else if (features->device_type == BTN_TOOL_PEN) {
|
||||
+ __set_bit(INPUT_PROP_POINTER, input_dev->propbit);
|
||||
__set_bit(BTN_TOOL_RUBBER, input_dev->keybit);
|
||||
__set_bit(BTN_TOOL_PEN, input_dev->keybit);
|
||||
__set_bit(BTN_STYLUS, input_dev->keybit);
|
||||
@@ -2194,6 +2211,17 @@ static const struct wacom_features wacom_features_0x300 =
|
||||
static const struct wacom_features wacom_features_0x301 =
|
||||
{ "Wacom Bamboo One M", WACOM_PKGLEN_BBPEN, 21648, 13530, 1023,
|
||||
31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
|
||||
+static const struct wacom_features wacom_features_0x302 =
|
||||
+ { "Wacom Intuos PT S", WACOM_PKGLEN_BBPEN, 15200, 9500, 1023,
|
||||
+ 31, INTUOSHT, WACOM_INTUOS_RES, WACOM_INTUOS_RES,
|
||||
+ .touch_max = 16 };
|
||||
+static const struct wacom_features wacom_features_0x303 =
|
||||
+ { "Wacom Intuos PT M", WACOM_PKGLEN_BBPEN, 21600, 13500, 1023,
|
||||
+ 31, INTUOSHT, WACOM_INTUOS_RES, WACOM_INTUOS_RES,
|
||||
+ .touch_max = 16 };
|
||||
+static const struct wacom_features wacom_features_0x30E =
|
||||
+ { "Wacom Intuos S", WACOM_PKGLEN_BBPEN, 15200, 9500, 1023,
|
||||
+ 31, INTUOSHT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
|
||||
static const struct wacom_features wacom_features_0x6004 =
|
||||
{ "ISD-V4", WACOM_PKGLEN_GRAPHIRE, 12800, 8000, 255,
|
||||
0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
|
||||
@@ -2329,6 +2357,9 @@ const struct usb_device_id wacom_ids[] = {
|
||||
{ USB_DEVICE_WACOM(0x10D) },
|
||||
{ USB_DEVICE_WACOM(0x300) },
|
||||
{ USB_DEVICE_WACOM(0x301) },
|
||||
+ { USB_DEVICE_DETAILED(0x302, USB_CLASS_HID, 0, 0) },
|
||||
+ { USB_DEVICE_DETAILED(0x303, USB_CLASS_HID, 0, 0) },
|
||||
+ { USB_DEVICE_DETAILED(0x30E, USB_CLASS_HID, 0, 0) },
|
||||
{ USB_DEVICE_WACOM(0x304) },
|
||||
{ USB_DEVICE_DETAILED(0x314, USB_CLASS_HID, 0, 0) },
|
||||
{ USB_DEVICE_DETAILED(0x315, USB_CLASS_HID, 0, 0) },
|
||||
diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h
|
||||
index fd23a37..854cceb 100644
|
||||
--- a/drivers/input/tablet/wacom_wac.h
|
||||
+++ b/drivers/input/tablet/wacom_wac.h
|
||||
@@ -54,6 +54,7 @@
|
||||
#define WACOM_REPORT_TPCST 16
|
||||
#define WACOM_REPORT_TPC1FGE 18
|
||||
#define WACOM_REPORT_24HDT 1
|
||||
+#define WACOM_REPORT_WL 128
|
||||
|
||||
/* device quirks */
|
||||
#define WACOM_QUIRK_MULTI_INPUT 0x0001
|
||||
@@ -81,6 +82,7 @@ enum {
|
||||
INTUOSPS,
|
||||
INTUOSPM,
|
||||
INTUOSPL,
|
||||
+ INTUOSHT,
|
||||
WACOM_21UX2,
|
||||
WACOM_22HD,
|
||||
DTK,
|
||||
--
|
||||
1.8.4.2
|
||||
|
|
@ -1,155 +0,0 @@
|
|||
Bugzilla: 1046238
|
||||
Upstream-status: Queued for 3.14
|
||||
|
||||
From 961794a00eab03f4344b7d5e825e8e789e55da87 Mon Sep 17 00:00:00 2001
|
||||
From: Ping Cheng <pinglinux@gmail.com>
|
||||
Date: Thu, 5 Dec 2013 12:54:53 -0800
|
||||
Subject: [PATCH] Input: wacom - add reporting of SW_MUTE_DEVICE events
|
||||
|
||||
New Intuos series models added a hardware switch to turn touch
|
||||
data on/off. The state of the switch is reported periodically
|
||||
from the tablet. To report the state the driver will emit SW_MUTE_DEVICE
|
||||
events.
|
||||
|
||||
Reviewed_by: Chris Bagwell <chris@cnpbagwell.com>
|
||||
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Tested-by: Jason Gerecke <killertofu@gmail.com>
|
||||
Signed-off-by: Ping Cheng <pingc@wacom.com>
|
||||
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
||||
---
|
||||
drivers/input/tablet/wacom_sys.c | 12 ++++++++++++
|
||||
drivers/input/tablet/wacom_wac.c | 30 +++++++++++++++++++++++++++---
|
||||
drivers/input/tablet/wacom_wac.h | 5 +++++
|
||||
3 files changed, 44 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
|
||||
index 8318826..b16ebef 100644
|
||||
--- a/drivers/input/tablet/wacom_sys.c
|
||||
+++ b/drivers/input/tablet/wacom_sys.c
|
||||
@@ -1197,6 +1197,8 @@ static void wacom_wireless_work(struct work_struct *work)
|
||||
wacom_wac1->features.device_type = BTN_TOOL_PEN;
|
||||
snprintf(wacom_wac1->name, WACOM_NAME_MAX, "%s (WL) Pen",
|
||||
wacom_wac1->features.name);
|
||||
+ wacom_wac1->shared->touch_max = wacom_wac1->features.touch_max;
|
||||
+ wacom_wac1->shared->type = wacom_wac1->features.type;
|
||||
error = wacom_register_input(wacom1);
|
||||
if (error)
|
||||
goto fail;
|
||||
@@ -1218,6 +1220,10 @@ static void wacom_wireless_work(struct work_struct *work)
|
||||
error = wacom_register_input(wacom2);
|
||||
if (error)
|
||||
goto fail;
|
||||
+
|
||||
+ if (wacom_wac1->features.type == INTUOSHT &&
|
||||
+ wacom_wac1->features.touch_max)
|
||||
+ wacom_wac->shared->touch_input = wacom_wac2->input;
|
||||
}
|
||||
|
||||
error = wacom_initialize_battery(wacom);
|
||||
@@ -1396,6 +1402,12 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
|
||||
goto fail5;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ if (wacom_wac->features.type == INTUOSHT && wacom_wac->features.touch_max) {
|
||||
+ if (wacom_wac->features.device_type == BTN_TOOL_FINGER)
|
||||
+ wacom_wac->shared->touch_input = wacom_wac->input;
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
|
||||
fail5: wacom_destroy_leds(wacom);
|
||||
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
|
||||
index 7655088..048e5b3 100644
|
||||
--- a/drivers/input/tablet/wacom_wac.c
|
||||
+++ b/drivers/input/tablet/wacom_wac.c
|
||||
@@ -1219,13 +1219,23 @@ static int wacom_bpt3_touch(struct wacom_wac *wacom)
|
||||
|
||||
static int wacom_bpt_pen(struct wacom_wac *wacom)
|
||||
{
|
||||
+ struct wacom_features *features = &wacom->features;
|
||||
struct input_dev *input = wacom->input;
|
||||
unsigned char *data = wacom->data;
|
||||
int prox = 0, x = 0, y = 0, p = 0, d = 0, pen = 0, btn1 = 0, btn2 = 0;
|
||||
|
||||
- if (data[0] != WACOM_REPORT_PENABLED)
|
||||
+ if (data[0] != WACOM_REPORT_PENABLED && data[0] != WACOM_REPORT_USB)
|
||||
return 0;
|
||||
|
||||
+ if (data[0] == WACOM_REPORT_USB) {
|
||||
+ if (features->type == INTUOSHT && features->touch_max) {
|
||||
+ input_report_switch(wacom->shared->touch_input,
|
||||
+ SW_MUTE_DEVICE, data[8] & 0x40);
|
||||
+ input_sync(wacom->shared->touch_input);
|
||||
+ }
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
prox = (data[1] & 0x20) == 0x20;
|
||||
|
||||
/*
|
||||
@@ -1258,8 +1268,8 @@ static int wacom_bpt_pen(struct wacom_wac *wacom)
|
||||
* touching and applying pressure; do not report negative
|
||||
* distance.
|
||||
*/
|
||||
- if (data[8] <= wacom->features.distance_max)
|
||||
- d = wacom->features.distance_max - data[8];
|
||||
+ if (data[8] <= features->distance_max)
|
||||
+ d = features->distance_max - data[8];
|
||||
|
||||
pen = data[1] & 0x01;
|
||||
btn1 = data[1] & 0x02;
|
||||
@@ -1310,6 +1320,13 @@ static int wacom_wireless_irq(struct wacom_wac *wacom, size_t len)
|
||||
if (connected) {
|
||||
int pid, battery;
|
||||
|
||||
+ if ((wacom->shared->type == INTUOSHT) &&
|
||||
+ wacom->shared->touch_max) {
|
||||
+ input_report_switch(wacom->shared->touch_input,
|
||||
+ SW_MUTE_DEVICE, data[5] & 0x40);
|
||||
+ input_sync(wacom->shared->touch_input);
|
||||
+ }
|
||||
+
|
||||
pid = get_unaligned_be16(&data[6]);
|
||||
battery = data[5] & 0x3f;
|
||||
if (wacom->pid != pid) {
|
||||
@@ -1779,6 +1796,13 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
|
||||
break;
|
||||
|
||||
case INTUOSHT:
|
||||
+ if (features->touch_max &&
|
||||
+ features->device_type == BTN_TOOL_FINGER) {
|
||||
+ input_dev->evbit[0] |= BIT_MASK(EV_SW);
|
||||
+ __set_bit(SW_MUTE_DEVICE, input_dev->swbit);
|
||||
+ }
|
||||
+ /* fall through */
|
||||
+
|
||||
case BAMBOO_PT:
|
||||
__clear_bit(ABS_MISC, input_dev->absbit);
|
||||
|
||||
diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h
|
||||
index 854cceb..3600cf7 100644
|
||||
--- a/drivers/input/tablet/wacom_wac.h
|
||||
+++ b/drivers/input/tablet/wacom_wac.h
|
||||
@@ -55,6 +55,7 @@
|
||||
#define WACOM_REPORT_TPC1FGE 18
|
||||
#define WACOM_REPORT_24HDT 1
|
||||
#define WACOM_REPORT_WL 128
|
||||
+#define WACOM_REPORT_USB 192
|
||||
|
||||
/* device quirks */
|
||||
#define WACOM_QUIRK_MULTI_INPUT 0x0001
|
||||
@@ -131,6 +132,10 @@ struct wacom_features {
|
||||
struct wacom_shared {
|
||||
bool stylus_in_proximity;
|
||||
bool touch_down;
|
||||
+ /* for wireless device to access USB interfaces */
|
||||
+ unsigned touch_max;
|
||||
+ int type;
|
||||
+ struct input_dev *touch_input;
|
||||
};
|
||||
|
||||
struct wacom_wac {
|
||||
--
|
||||
1.8.4.2
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
From f46debb4f324d6ab66782de6ad3b884fbf223ec4 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Thu, 1 May 2014 14:20:06 +0200
|
||||
Subject: [PATCH 3/4] samsung-laptop: Add broken-acpi-video quirk for
|
||||
NC210/NC110
|
||||
|
||||
Reported (and tested) here:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=861573
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
drivers/platform/x86/samsung-laptop.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c
|
||||
index d1f03005..98f61f6 100644
|
||||
--- a/drivers/platform/x86/samsung-laptop.c
|
||||
+++ b/drivers/platform/x86/samsung-laptop.c
|
||||
@@ -1534,6 +1534,16 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = {
|
||||
},
|
||||
.driver_data = &samsung_broken_acpi_video,
|
||||
},
|
||||
+ {
|
||||
+ .callback = samsung_dmi_matched,
|
||||
+ .ident = "NC210",
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
|
||||
+ DMI_MATCH(DMI_PRODUCT_NAME, "NC210/NC110"),
|
||||
+ DMI_MATCH(DMI_BOARD_NAME, "NC210/NC110"),
|
||||
+ },
|
||||
+ .driver_data = &samsung_broken_acpi_video,
|
||||
+ },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(dmi, samsung_dmi_table);
|
||||
--
|
||||
1.9.0
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
Bugzilla: 1094270
|
||||
Upstream-status: 3.15 and queued for stable
|
||||
|
||||
From a7e6a36c02e8a4c6547bfc2b789bfbfcc95072f9 Mon Sep 17 00:00:00 2001
|
||||
From: "Eric W. Biederman" <ebiederm@xmission.com>
|
||||
Date: Wed, 23 Apr 2014 14:25:48 -0700
|
||||
Subject: [PATCH 2/6] netlink: Rename netlink_capable netlink_allowed
|
||||
|
||||
netlink_capable is a static internal function in af_netlink.c and we
|
||||
have better uses for the name netlink_capable.
|
||||
|
||||
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
|
||||
---
|
||||
net/netlink/af_netlink.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
|
||||
index 04748ab649c2..28d66fbc7cef 100644
|
||||
--- a/net/netlink/af_netlink.c
|
||||
+++ b/net/netlink/af_netlink.c
|
||||
@@ -1360,7 +1360,7 @@ retry:
|
||||
return err;
|
||||
}
|
||||
|
||||
-static inline int netlink_capable(const struct socket *sock, unsigned int flag)
|
||||
+static inline int netlink_allowed(const struct socket *sock, unsigned int flag)
|
||||
{
|
||||
return (nl_table[sock->sk->sk_protocol].flags & flag) ||
|
||||
ns_capable(sock_net(sock->sk)->user_ns, CAP_NET_ADMIN);
|
||||
@@ -1428,7 +1428,7 @@ static int netlink_bind(struct socket *sock, struct sockaddr *addr,
|
||||
|
||||
/* Only superuser is allowed to listen multicasts */
|
||||
if (nladdr->nl_groups) {
|
||||
- if (!netlink_capable(sock, NL_CFG_F_NONROOT_RECV))
|
||||
+ if (!netlink_allowed(sock, NL_CFG_F_NONROOT_RECV))
|
||||
return -EPERM;
|
||||
err = netlink_realloc_groups(sk);
|
||||
if (err)
|
||||
@@ -1490,7 +1490,7 @@ static int netlink_connect(struct socket *sock, struct sockaddr *addr,
|
||||
return -EINVAL;
|
||||
|
||||
if ((nladdr->nl_groups || nladdr->nl_pid) &&
|
||||
- !netlink_capable(sock, NL_CFG_F_NONROOT_SEND))
|
||||
+ !netlink_allowed(sock, NL_CFG_F_NONROOT_SEND))
|
||||
return -EPERM;
|
||||
|
||||
if (!nlk->portid)
|
||||
@@ -2096,7 +2096,7 @@ static int netlink_setsockopt(struct socket *sock, int level, int optname,
|
||||
break;
|
||||
case NETLINK_ADD_MEMBERSHIP:
|
||||
case NETLINK_DROP_MEMBERSHIP: {
|
||||
- if (!netlink_capable(sock, NL_CFG_F_NONROOT_RECV))
|
||||
+ if (!netlink_allowed(sock, NL_CFG_F_NONROOT_RECV))
|
||||
return -EPERM;
|
||||
err = netlink_realloc_groups(sk);
|
||||
if (err)
|
||||
@@ -2247,7 +2247,7 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
|
||||
dst_group = ffs(addr->nl_groups);
|
||||
err = -EPERM;
|
||||
if ((dst_group || dst_portid) &&
|
||||
- !netlink_capable(sock, NL_CFG_F_NONROOT_SEND))
|
||||
+ !netlink_allowed(sock, NL_CFG_F_NONROOT_SEND))
|
||||
goto out;
|
||||
} else {
|
||||
dst_portid = nlk->dst_portid;
|
||||
--
|
||||
1.9.0
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
Bugzilla: 1094270
|
||||
Upstream-status: 3.15 and queued for stable
|
||||
|
||||
From 568ddf41e32a9b4337d87fdb507e729029a69e49 Mon Sep 17 00:00:00 2001
|
||||
From: "Eric W. Biederman" <ebiederm@xmission.com>
|
||||
Date: Wed, 23 Apr 2014 14:26:25 -0700
|
||||
Subject: [PATCH 3/6] net: Move the permission check in
|
||||
sock_diag_put_filterinfo to packet_diag_dump
|
||||
|
||||
The permission check in sock_diag_put_filterinfo is wrong, and it is so removed
|
||||
from it's sources it is not clear why it is wrong. Move the computation
|
||||
into packet_diag_dump and pass a bool of the result into sock_diag_filterinfo.
|
||||
|
||||
This does not yet correct the capability check but instead simply moves it to make
|
||||
it clear what is going on.
|
||||
|
||||
Reported-by: Andy Lutomirski <luto@amacapital.net>
|
||||
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
|
||||
---
|
||||
include/linux/sock_diag.h | 2 +-
|
||||
net/core/sock_diag.c | 4 ++--
|
||||
net/packet/diag.c | 7 ++++++-
|
||||
3 files changed, 9 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/include/linux/sock_diag.h b/include/linux/sock_diag.h
|
||||
index 302ab805b0bb..46cca4c06848 100644
|
||||
--- a/include/linux/sock_diag.h
|
||||
+++ b/include/linux/sock_diag.h
|
||||
@@ -23,7 +23,7 @@ int sock_diag_check_cookie(void *sk, __u32 *cookie);
|
||||
void sock_diag_save_cookie(void *sk, __u32 *cookie);
|
||||
|
||||
int sock_diag_put_meminfo(struct sock *sk, struct sk_buff *skb, int attr);
|
||||
-int sock_diag_put_filterinfo(struct sock *sk,
|
||||
+int sock_diag_put_filterinfo(bool may_report_filterinfo, struct sock *sk,
|
||||
struct sk_buff *skb, int attrtype);
|
||||
|
||||
#endif
|
||||
diff --git a/net/core/sock_diag.c b/net/core/sock_diag.c
|
||||
index 6a7fae228634..c38e7a2b5a8e 100644
|
||||
--- a/net/core/sock_diag.c
|
||||
+++ b/net/core/sock_diag.c
|
||||
@@ -49,7 +49,7 @@ int sock_diag_put_meminfo(struct sock *sk, struct sk_buff *skb, int attrtype)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(sock_diag_put_meminfo);
|
||||
|
||||
-int sock_diag_put_filterinfo(struct sock *sk,
|
||||
+int sock_diag_put_filterinfo(bool may_report_filterinfo, struct sock *sk,
|
||||
struct sk_buff *skb, int attrtype)
|
||||
{
|
||||
struct nlattr *attr;
|
||||
@@ -57,7 +57,7 @@ int sock_diag_put_filterinfo(struct sock *sk,
|
||||
unsigned int len;
|
||||
int err = 0;
|
||||
|
||||
- if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) {
|
||||
+ if (!may_report_filterinfo) {
|
||||
nla_reserve(skb, attrtype, 0);
|
||||
return 0;
|
||||
}
|
||||
diff --git a/net/packet/diag.c b/net/packet/diag.c
|
||||
index 435ff99ba8c7..b34d0de24091 100644
|
||||
--- a/net/packet/diag.c
|
||||
+++ b/net/packet/diag.c
|
||||
@@ -128,6 +128,7 @@ static int pdiag_put_fanout(struct packet_sock *po, struct sk_buff *nlskb)
|
||||
|
||||
static int sk_diag_fill(struct sock *sk, struct sk_buff *skb,
|
||||
struct packet_diag_req *req,
|
||||
+ bool may_report_filterinfo,
|
||||
struct user_namespace *user_ns,
|
||||
u32 portid, u32 seq, u32 flags, int sk_ino)
|
||||
{
|
||||
@@ -172,7 +173,8 @@ static int sk_diag_fill(struct sock *sk, struct sk_buff *skb,
|
||||
goto out_nlmsg_trim;
|
||||
|
||||
if ((req->pdiag_show & PACKET_SHOW_FILTER) &&
|
||||
- sock_diag_put_filterinfo(sk, skb, PACKET_DIAG_FILTER))
|
||||
+ sock_diag_put_filterinfo(may_report_filterinfo, sk, skb,
|
||||
+ PACKET_DIAG_FILTER))
|
||||
goto out_nlmsg_trim;
|
||||
|
||||
return nlmsg_end(skb, nlh);
|
||||
@@ -188,9 +190,11 @@ static int packet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb)
|
||||
struct packet_diag_req *req;
|
||||
struct net *net;
|
||||
struct sock *sk;
|
||||
+ bool may_report_filterinfo;
|
||||
|
||||
net = sock_net(skb->sk);
|
||||
req = nlmsg_data(cb->nlh);
|
||||
+ may_report_filterinfo = ns_capable(net->user_ns, CAP_NET_ADMIN);
|
||||
|
||||
mutex_lock(&net->packet.sklist_lock);
|
||||
sk_for_each(sk, &net->packet.sklist) {
|
||||
@@ -200,6 +204,7 @@ static int packet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb)
|
||||
goto next;
|
||||
|
||||
if (sk_diag_fill(sk, skb, req,
|
||||
+ may_report_filterinfo,
|
||||
sk_user_ns(NETLINK_CB(cb->skb).sk),
|
||||
NETLINK_CB(cb->skb).portid,
|
||||
cb->nlh->nlmsg_seq, NLM_F_MULTI,
|
||||
--
|
||||
1.9.0
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
Bugzilla: 1094270
|
||||
Upstream-status: 3.15 and queued for stable
|
||||
|
||||
From ca469eb66a7b3e97a230c750de4d01b1dc53906a Mon Sep 17 00:00:00 2001
|
||||
From: "Eric W. Biederman" <ebiederm@xmission.com>
|
||||
Date: Wed, 23 Apr 2014 14:26:56 -0700
|
||||
Subject: [PATCH 4/6] net: Add variants of capable for use on on sockets
|
||||
|
||||
sk_net_capable - The common case, operations that are safe in a network namespace.
|
||||
sk_capable - Operations that are not known to be safe in a network namespace
|
||||
sk_ns_capable - The general case for special cases.
|
||||
|
||||
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
|
||||
---
|
||||
include/net/sock.h | 5 +++++
|
||||
net/core/sock.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 54 insertions(+)
|
||||
|
||||
diff --git a/include/net/sock.h b/include/net/sock.h
|
||||
index b9586a137cad..57c31dd15e64 100644
|
||||
--- a/include/net/sock.h
|
||||
+++ b/include/net/sock.h
|
||||
@@ -2278,6 +2278,11 @@ int sock_get_timestampns(struct sock *, struct timespec __user *);
|
||||
int sock_recv_errqueue(struct sock *sk, struct msghdr *msg, int len, int level,
|
||||
int type);
|
||||
|
||||
+bool sk_ns_capable(const struct sock *sk,
|
||||
+ struct user_namespace *user_ns, int cap);
|
||||
+bool sk_capable(const struct sock *sk, int cap);
|
||||
+bool sk_net_capable(const struct sock *sk, int cap);
|
||||
+
|
||||
/*
|
||||
* Enable debug/info messages
|
||||
*/
|
||||
diff --git a/net/core/sock.c b/net/core/sock.c
|
||||
index c0fc6bdad1e3..c8069561bdb7 100644
|
||||
--- a/net/core/sock.c
|
||||
+++ b/net/core/sock.c
|
||||
@@ -145,6 +145,55 @@
|
||||
static DEFINE_MUTEX(proto_list_mutex);
|
||||
static LIST_HEAD(proto_list);
|
||||
|
||||
+/**
|
||||
+ * sk_ns_capable - General socket capability test
|
||||
+ * @sk: Socket to use a capability on or through
|
||||
+ * @user_ns: The user namespace of the capability to use
|
||||
+ * @cap: The capability to use
|
||||
+ *
|
||||
+ * Test to see if the opener of the socket had when the socket was
|
||||
+ * created and the current process has the capability @cap in the user
|
||||
+ * namespace @user_ns.
|
||||
+ */
|
||||
+bool sk_ns_capable(const struct sock *sk,
|
||||
+ struct user_namespace *user_ns, int cap)
|
||||
+{
|
||||
+ return file_ns_capable(sk->sk_socket->file, user_ns, cap) &&
|
||||
+ ns_capable(user_ns, cap);
|
||||
+}
|
||||
+EXPORT_SYMBOL(sk_ns_capable);
|
||||
+
|
||||
+/**
|
||||
+ * sk_capable - Socket global capability test
|
||||
+ * @sk: Socket to use a capability on or through
|
||||
+ * @cap: The global capbility to use
|
||||
+ *
|
||||
+ * Test to see if the opener of the socket had when the socket was
|
||||
+ * created and the current process has the capability @cap in all user
|
||||
+ * namespaces.
|
||||
+ */
|
||||
+bool sk_capable(const struct sock *sk, int cap)
|
||||
+{
|
||||
+ return sk_ns_capable(sk, &init_user_ns, cap);
|
||||
+}
|
||||
+EXPORT_SYMBOL(sk_capable);
|
||||
+
|
||||
+/**
|
||||
+ * sk_net_capable - Network namespace socket capability test
|
||||
+ * @sk: Socket to use a capability on or through
|
||||
+ * @cap: The capability to use
|
||||
+ *
|
||||
+ * Test to see if the opener of the socket had when the socke was created
|
||||
+ * and the current process has the capability @cap over the network namespace
|
||||
+ * the socket is a member of.
|
||||
+ */
|
||||
+bool sk_net_capable(const struct sock *sk, int cap)
|
||||
+{
|
||||
+ return sk_ns_capable(sk, sock_net(sk)->user_ns, cap);
|
||||
+}
|
||||
+EXPORT_SYMBOL(sk_net_capable);
|
||||
+
|
||||
+
|
||||
#ifdef CONFIG_MEMCG_KMEM
|
||||
int mem_cgroup_sockets_init(struct mem_cgroup *memcg, struct cgroup_subsys *ss)
|
||||
{
|
||||
--
|
||||
1.9.0
|
||||
|
|
@ -0,0 +1,116 @@
|
|||
Bugzilla: 1094270
|
||||
Upstream-status: 3.15 and queued for stable
|
||||
|
||||
From 71f40189cc9a0a28296d201652a5766d7c8aa66f Mon Sep 17 00:00:00 2001
|
||||
From: "Eric W. Biederman" <ebiederm@xmission.com>
|
||||
Date: Wed, 23 Apr 2014 14:28:03 -0700
|
||||
Subject: [PATCH 5/6] net: Add variants of capable for use on netlink messages
|
||||
|
||||
netlink_net_capable - The common case use, for operations that are safe on a network namespace
|
||||
netlink_capable - For operations that are only known to be safe for the global root
|
||||
netlink_ns_capable - The general case of capable used to handle special cases
|
||||
|
||||
__netlink_ns_capable - Same as netlink_ns_capable except taking a netlink_skb_parms instead of
|
||||
the skbuff of a netlink message.
|
||||
|
||||
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
|
||||
---
|
||||
include/linux/netlink.h | 7 ++++++
|
||||
net/netlink/af_netlink.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 72 insertions(+)
|
||||
|
||||
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
|
||||
index aad8eeaf416d..f64b01787ddc 100644
|
||||
--- a/include/linux/netlink.h
|
||||
+++ b/include/linux/netlink.h
|
||||
@@ -169,4 +169,11 @@ struct netlink_tap {
|
||||
extern int netlink_add_tap(struct netlink_tap *nt);
|
||||
extern int netlink_remove_tap(struct netlink_tap *nt);
|
||||
|
||||
+bool __netlink_ns_capable(const struct netlink_skb_parms *nsp,
|
||||
+ struct user_namespace *ns, int cap);
|
||||
+bool netlink_ns_capable(const struct sk_buff *skb,
|
||||
+ struct user_namespace *ns, int cap);
|
||||
+bool netlink_capable(const struct sk_buff *skb, int cap);
|
||||
+bool netlink_net_capable(const struct sk_buff *skb, int cap);
|
||||
+
|
||||
#endif /* __LINUX_NETLINK_H */
|
||||
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
|
||||
index 28d66fbc7cef..6d69c27897f3 100644
|
||||
--- a/net/netlink/af_netlink.c
|
||||
+++ b/net/netlink/af_netlink.c
|
||||
@@ -1360,6 +1360,71 @@ retry:
|
||||
return err;
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * __netlink_ns_capable - General netlink message capability test
|
||||
+ * @nsp: NETLINK_CB of the socket buffer holding a netlink command from userspace.
|
||||
+ * @user_ns: The user namespace of the capability to use
|
||||
+ * @cap: The capability to use
|
||||
+ *
|
||||
+ * Test to see if the opener of the socket we received the message
|
||||
+ * from had when the netlink socket was created and the sender of the
|
||||
+ * message has has the capability @cap in the user namespace @user_ns.
|
||||
+ */
|
||||
+bool __netlink_ns_capable(const struct netlink_skb_parms *nsp,
|
||||
+ struct user_namespace *user_ns, int cap)
|
||||
+{
|
||||
+ return sk_ns_capable(nsp->sk, user_ns, cap);
|
||||
+}
|
||||
+EXPORT_SYMBOL(__netlink_ns_capable);
|
||||
+
|
||||
+/**
|
||||
+ * netlink_ns_capable - General netlink message capability test
|
||||
+ * @skb: socket buffer holding a netlink command from userspace
|
||||
+ * @user_ns: The user namespace of the capability to use
|
||||
+ * @cap: The capability to use
|
||||
+ *
|
||||
+ * Test to see if the opener of the socket we received the message
|
||||
+ * from had when the netlink socket was created and the sender of the
|
||||
+ * message has has the capability @cap in the user namespace @user_ns.
|
||||
+ */
|
||||
+bool netlink_ns_capable(const struct sk_buff *skb,
|
||||
+ struct user_namespace *user_ns, int cap)
|
||||
+{
|
||||
+ return __netlink_ns_capable(&NETLINK_CB(skb), user_ns, cap);
|
||||
+}
|
||||
+EXPORT_SYMBOL(netlink_ns_capable);
|
||||
+
|
||||
+/**
|
||||
+ * netlink_capable - Netlink global message capability test
|
||||
+ * @skb: socket buffer holding a netlink command from userspace
|
||||
+ * @cap: The capability to use
|
||||
+ *
|
||||
+ * Test to see if the opener of the socket we received the message
|
||||
+ * from had when the netlink socket was created and the sender of the
|
||||
+ * message has has the capability @cap in all user namespaces.
|
||||
+ */
|
||||
+bool netlink_capable(const struct sk_buff *skb, int cap)
|
||||
+{
|
||||
+ return netlink_ns_capable(skb, &init_user_ns, cap);
|
||||
+}
|
||||
+EXPORT_SYMBOL(netlink_capable);
|
||||
+
|
||||
+/**
|
||||
+ * netlink_net_capable - Netlink network namespace message capability test
|
||||
+ * @skb: socket buffer holding a netlink command from userspace
|
||||
+ * @cap: The capability to use
|
||||
+ *
|
||||
+ * Test to see if the opener of the socket we received the message
|
||||
+ * from had when the netlink socket was created and the sender of the
|
||||
+ * message has has the capability @cap over the network namespace of
|
||||
+ * the socket we received the message from.
|
||||
+ */
|
||||
+bool netlink_net_capable(const struct sk_buff *skb, int cap)
|
||||
+{
|
||||
+ return netlink_ns_capable(skb, sock_net(skb->sk)->user_ns, cap);
|
||||
+}
|
||||
+EXPORT_SYMBOL(netlink_net_capable);
|
||||
+
|
||||
static inline int netlink_allowed(const struct socket *sock, unsigned int flag)
|
||||
{
|
||||
return (nl_table[sock->sk->sk_protocol].flags & flag) ||
|
||||
--
|
||||
1.9.0
|
||||
|
|
@ -0,0 +1,433 @@
|
|||
Bugzilla: 1094270
|
||||
Upstream-status: 3.15 and queued for stable
|
||||
|
||||
From 386e6689d3a9234ab00a80ab51906adedfa7fea7 Mon Sep 17 00:00:00 2001
|
||||
From: "Eric W. Biederman" <ebiederm@xmission.com>
|
||||
Date: Wed, 23 Apr 2014 14:29:27 -0700
|
||||
Subject: [PATCH 6/6] net: Use netlink_ns_capable to verify the permisions of
|
||||
netlink messages
|
||||
|
||||
It is possible by passing a netlink socket to a more privileged
|
||||
executable and then to fool that executable into writing to the socket
|
||||
data that happens to be valid netlink message to do something that
|
||||
privileged executable did not intend to do.
|
||||
|
||||
To keep this from happening replace bare capable and ns_capable calls
|
||||
with netlink_capable, netlink_net_calls and netlink_ns_capable calls.
|
||||
Which act the same as the previous calls except they verify that the
|
||||
opener of the socket had the desired permissions as well.
|
||||
|
||||
Reported-by: Andy Lutomirski <luto@amacapital.net>
|
||||
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
|
||||
---
|
||||
crypto/crypto_user.c | 2 +-
|
||||
drivers/connector/cn_proc.c | 2 +-
|
||||
drivers/scsi/scsi_netlink.c | 2 +-
|
||||
kernel/audit.c | 4 ++--
|
||||
net/can/gw.c | 4 ++--
|
||||
net/core/rtnetlink.c | 20 +++++++++++---------
|
||||
net/dcb/dcbnl.c | 2 +-
|
||||
net/decnet/dn_dev.c | 4 ++--
|
||||
net/decnet/dn_fib.c | 4 ++--
|
||||
net/decnet/netfilter/dn_rtmsg.c | 2 +-
|
||||
net/netfilter/nfnetlink.c | 2 +-
|
||||
net/netlink/genetlink.c | 2 +-
|
||||
net/packet/diag.c | 2 +-
|
||||
net/phonet/pn_netlink.c | 8 ++++----
|
||||
net/sched/act_api.c | 2 +-
|
||||
net/sched/cls_api.c | 2 +-
|
||||
net/sched/sch_api.c | 6 +++---
|
||||
net/tipc/netlink.c | 2 +-
|
||||
net/xfrm/xfrm_user.c | 2 +-
|
||||
19 files changed, 38 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c
|
||||
index 1512e41cd93d..43665d0d0905 100644
|
||||
--- a/crypto/crypto_user.c
|
||||
+++ b/crypto/crypto_user.c
|
||||
@@ -466,7 +466,7 @@ static int crypto_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
type -= CRYPTO_MSG_BASE;
|
||||
link = &crypto_dispatch[type];
|
||||
|
||||
- if (!capable(CAP_NET_ADMIN))
|
||||
+ if (!netlink_capable(skb, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
if ((type == (CRYPTO_MSG_GETALG - CRYPTO_MSG_BASE) &&
|
||||
diff --git a/drivers/connector/cn_proc.c b/drivers/connector/cn_proc.c
|
||||
index 18c5b9b16645..3165811e2407 100644
|
||||
--- a/drivers/connector/cn_proc.c
|
||||
+++ b/drivers/connector/cn_proc.c
|
||||
@@ -369,7 +369,7 @@ static void cn_proc_mcast_ctl(struct cn_msg *msg,
|
||||
return;
|
||||
|
||||
/* Can only change if privileged. */
|
||||
- if (!capable(CAP_NET_ADMIN)) {
|
||||
+ if (!__netlink_ns_capable(nsp, &init_user_ns, CAP_NET_ADMIN)) {
|
||||
err = EPERM;
|
||||
goto out;
|
||||
}
|
||||
diff --git a/drivers/scsi/scsi_netlink.c b/drivers/scsi/scsi_netlink.c
|
||||
index fe30ea94ffe6..109802f776ed 100644
|
||||
--- a/drivers/scsi/scsi_netlink.c
|
||||
+++ b/drivers/scsi/scsi_netlink.c
|
||||
@@ -77,7 +77,7 @@ scsi_nl_rcv_msg(struct sk_buff *skb)
|
||||
goto next_msg;
|
||||
}
|
||||
|
||||
- if (!capable(CAP_SYS_ADMIN)) {
|
||||
+ if (!netlink_capable(skb, CAP_SYS_ADMIN)) {
|
||||
err = -EPERM;
|
||||
goto next_msg;
|
||||
}
|
||||
diff --git a/kernel/audit.c b/kernel/audit.c
|
||||
index 95a20f3f52f1..f7e680d896ec 100644
|
||||
--- a/kernel/audit.c
|
||||
+++ b/kernel/audit.c
|
||||
@@ -639,13 +639,13 @@ static int audit_netlink_ok(struct sk_buff *skb, u16 msg_type)
|
||||
case AUDIT_TTY_SET:
|
||||
case AUDIT_TRIM:
|
||||
case AUDIT_MAKE_EQUIV:
|
||||
- if (!capable(CAP_AUDIT_CONTROL))
|
||||
+ if (!netlink_capable(skb, CAP_AUDIT_CONTROL))
|
||||
err = -EPERM;
|
||||
break;
|
||||
case AUDIT_USER:
|
||||
case AUDIT_FIRST_USER_MSG ... AUDIT_LAST_USER_MSG:
|
||||
case AUDIT_FIRST_USER_MSG2 ... AUDIT_LAST_USER_MSG2:
|
||||
- if (!capable(CAP_AUDIT_WRITE))
|
||||
+ if (!netlink_capable(skb, CAP_AUDIT_WRITE))
|
||||
err = -EPERM;
|
||||
break;
|
||||
default: /* bad msg */
|
||||
diff --git a/net/can/gw.c b/net/can/gw.c
|
||||
index ac31891967da..050a2110d43f 100644
|
||||
--- a/net/can/gw.c
|
||||
+++ b/net/can/gw.c
|
||||
@@ -804,7 +804,7 @@ static int cgw_create_job(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
u8 limhops = 0;
|
||||
int err = 0;
|
||||
|
||||
- if (!capable(CAP_NET_ADMIN))
|
||||
+ if (!netlink_capable(skb, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
if (nlmsg_len(nlh) < sizeof(*r))
|
||||
@@ -893,7 +893,7 @@ static int cgw_remove_job(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
u8 limhops = 0;
|
||||
int err = 0;
|
||||
|
||||
- if (!capable(CAP_NET_ADMIN))
|
||||
+ if (!netlink_capable(skb, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
if (nlmsg_len(nlh) < sizeof(*r))
|
||||
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
|
||||
index 120eecc0f5a4..463dfe6496b4 100644
|
||||
--- a/net/core/rtnetlink.c
|
||||
+++ b/net/core/rtnetlink.c
|
||||
@@ -1386,7 +1386,8 @@ static int do_set_master(struct net_device *dev, int ifindex)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int do_setlink(struct net_device *dev, struct ifinfomsg *ifm,
|
||||
+static int do_setlink(const struct sk_buff *skb,
|
||||
+ struct net_device *dev, struct ifinfomsg *ifm,
|
||||
struct nlattr **tb, char *ifname, int modified)
|
||||
{
|
||||
const struct net_device_ops *ops = dev->netdev_ops;
|
||||
@@ -1398,7 +1399,7 @@ static int do_setlink(struct net_device *dev, struct ifinfomsg *ifm,
|
||||
err = PTR_ERR(net);
|
||||
goto errout;
|
||||
}
|
||||
- if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) {
|
||||
+ if (!netlink_ns_capable(skb, net->user_ns, CAP_NET_ADMIN)) {
|
||||
err = -EPERM;
|
||||
goto errout;
|
||||
}
|
||||
@@ -1652,7 +1653,7 @@ static int rtnl_setlink(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
if (err < 0)
|
||||
goto errout;
|
||||
|
||||
- err = do_setlink(dev, ifm, tb, ifname, 0);
|
||||
+ err = do_setlink(skb, dev, ifm, tb, ifname, 0);
|
||||
errout:
|
||||
return err;
|
||||
}
|
||||
@@ -1769,7 +1770,8 @@ err:
|
||||
}
|
||||
EXPORT_SYMBOL(rtnl_create_link);
|
||||
|
||||
-static int rtnl_group_changelink(struct net *net, int group,
|
||||
+static int rtnl_group_changelink(const struct sk_buff *skb,
|
||||
+ struct net *net, int group,
|
||||
struct ifinfomsg *ifm,
|
||||
struct nlattr **tb)
|
||||
{
|
||||
@@ -1778,7 +1780,7 @@ static int rtnl_group_changelink(struct net *net, int group,
|
||||
|
||||
for_each_netdev(net, dev) {
|
||||
if (dev->group == group) {
|
||||
- err = do_setlink(dev, ifm, tb, NULL, 0);
|
||||
+ err = do_setlink(skb, dev, ifm, tb, NULL, 0);
|
||||
if (err < 0)
|
||||
return err;
|
||||
}
|
||||
@@ -1920,12 +1922,12 @@ replay:
|
||||
modified = 1;
|
||||
}
|
||||
|
||||
- return do_setlink(dev, ifm, tb, ifname, modified);
|
||||
+ return do_setlink(skb, dev, ifm, tb, ifname, modified);
|
||||
}
|
||||
|
||||
if (!(nlh->nlmsg_flags & NLM_F_CREATE)) {
|
||||
if (ifm->ifi_index == 0 && tb[IFLA_GROUP])
|
||||
- return rtnl_group_changelink(net,
|
||||
+ return rtnl_group_changelink(skb, net,
|
||||
nla_get_u32(tb[IFLA_GROUP]),
|
||||
ifm, tb);
|
||||
return -ENODEV;
|
||||
@@ -2312,7 +2314,7 @@ static int rtnl_fdb_del(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
int err = -EINVAL;
|
||||
__u8 *addr;
|
||||
|
||||
- if (!capable(CAP_NET_ADMIN))
|
||||
+ if (!netlink_capable(skb, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
err = nlmsg_parse(nlh, sizeof(*ndm), tb, NDA_MAX, NULL);
|
||||
@@ -2764,7 +2766,7 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
sz_idx = type>>2;
|
||||
kind = type&3;
|
||||
|
||||
- if (kind != 2 && !ns_capable(net->user_ns, CAP_NET_ADMIN))
|
||||
+ if (kind != 2 && !netlink_net_capable(skb, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
if (kind == 2 && nlh->nlmsg_flags&NLM_F_DUMP) {
|
||||
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
|
||||
index 553644402670..f8b98d89c285 100644
|
||||
--- a/net/dcb/dcbnl.c
|
||||
+++ b/net/dcb/dcbnl.c
|
||||
@@ -1669,7 +1669,7 @@ static int dcb_doit(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
struct nlmsghdr *reply_nlh = NULL;
|
||||
const struct reply_func *fn;
|
||||
|
||||
- if ((nlh->nlmsg_type == RTM_SETDCB) && !capable(CAP_NET_ADMIN))
|
||||
+ if ((nlh->nlmsg_type == RTM_SETDCB) && !netlink_capable(skb, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
ret = nlmsg_parse(nlh, sizeof(*dcb), tb, DCB_ATTR_MAX,
|
||||
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
|
||||
index a603823a3e27..3b726f31c64c 100644
|
||||
--- a/net/decnet/dn_dev.c
|
||||
+++ b/net/decnet/dn_dev.c
|
||||
@@ -574,7 +574,7 @@ static int dn_nl_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
struct dn_ifaddr __rcu **ifap;
|
||||
int err = -EINVAL;
|
||||
|
||||
- if (!capable(CAP_NET_ADMIN))
|
||||
+ if (!netlink_capable(skb, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
if (!net_eq(net, &init_net))
|
||||
@@ -618,7 +618,7 @@ static int dn_nl_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
struct dn_ifaddr *ifa;
|
||||
int err;
|
||||
|
||||
- if (!capable(CAP_NET_ADMIN))
|
||||
+ if (!netlink_capable(skb, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
if (!net_eq(net, &init_net))
|
||||
diff --git a/net/decnet/dn_fib.c b/net/decnet/dn_fib.c
|
||||
index 57dc159245ec..d332aefb0846 100644
|
||||
--- a/net/decnet/dn_fib.c
|
||||
+++ b/net/decnet/dn_fib.c
|
||||
@@ -505,7 +505,7 @@ static int dn_fib_rtm_delroute(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
struct nlattr *attrs[RTA_MAX+1];
|
||||
int err;
|
||||
|
||||
- if (!capable(CAP_NET_ADMIN))
|
||||
+ if (!netlink_capable(skb, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
if (!net_eq(net, &init_net))
|
||||
@@ -530,7 +530,7 @@ static int dn_fib_rtm_newroute(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
struct nlattr *attrs[RTA_MAX+1];
|
||||
int err;
|
||||
|
||||
- if (!capable(CAP_NET_ADMIN))
|
||||
+ if (!netlink_capable(skb, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
if (!net_eq(net, &init_net))
|
||||
diff --git a/net/decnet/netfilter/dn_rtmsg.c b/net/decnet/netfilter/dn_rtmsg.c
|
||||
index e83015cecfa7..e4d9560a910b 100644
|
||||
--- a/net/decnet/netfilter/dn_rtmsg.c
|
||||
+++ b/net/decnet/netfilter/dn_rtmsg.c
|
||||
@@ -107,7 +107,7 @@ static inline void dnrmg_receive_user_skb(struct sk_buff *skb)
|
||||
if (nlh->nlmsg_len < sizeof(*nlh) || skb->len < nlh->nlmsg_len)
|
||||
return;
|
||||
|
||||
- if (!capable(CAP_NET_ADMIN))
|
||||
+ if (!netlink_capable(skb, CAP_NET_ADMIN))
|
||||
RCV_SKB_FAIL(-EPERM);
|
||||
|
||||
/* Eventually we might send routing messages too */
|
||||
diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c
|
||||
index 046aa13b4fea..c6881781d70a 100644
|
||||
--- a/net/netfilter/nfnetlink.c
|
||||
+++ b/net/netfilter/nfnetlink.c
|
||||
@@ -367,7 +367,7 @@ static void nfnetlink_rcv(struct sk_buff *skb)
|
||||
skb->len < nlh->nlmsg_len)
|
||||
return;
|
||||
|
||||
- if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) {
|
||||
+ if (!netlink_net_capable(skb, CAP_NET_ADMIN)) {
|
||||
netlink_ack(skb, nlh, -EPERM);
|
||||
return;
|
||||
}
|
||||
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
|
||||
index b1dcdb932a86..a3ba3ca0ff92 100644
|
||||
--- a/net/netlink/genetlink.c
|
||||
+++ b/net/netlink/genetlink.c
|
||||
@@ -561,7 +561,7 @@ static int genl_family_rcv_msg(struct genl_family *family,
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if ((ops->flags & GENL_ADMIN_PERM) &&
|
||||
- !capable(CAP_NET_ADMIN))
|
||||
+ !netlink_capable(skb, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
if ((nlh->nlmsg_flags & NLM_F_DUMP) == NLM_F_DUMP) {
|
||||
diff --git a/net/packet/diag.c b/net/packet/diag.c
|
||||
index b34d0de24091..92f2c7107eec 100644
|
||||
--- a/net/packet/diag.c
|
||||
+++ b/net/packet/diag.c
|
||||
@@ -194,7 +194,7 @@ static int packet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb)
|
||||
|
||||
net = sock_net(skb->sk);
|
||||
req = nlmsg_data(cb->nlh);
|
||||
- may_report_filterinfo = ns_capable(net->user_ns, CAP_NET_ADMIN);
|
||||
+ may_report_filterinfo = netlink_net_capable(cb->skb, CAP_NET_ADMIN);
|
||||
|
||||
mutex_lock(&net->packet.sklist_lock);
|
||||
sk_for_each(sk, &net->packet.sklist) {
|
||||
diff --git a/net/phonet/pn_netlink.c b/net/phonet/pn_netlink.c
|
||||
index dc15f4300808..b64151ade6b3 100644
|
||||
--- a/net/phonet/pn_netlink.c
|
||||
+++ b/net/phonet/pn_netlink.c
|
||||
@@ -70,10 +70,10 @@ static int addr_doit(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
int err;
|
||||
u8 pnaddr;
|
||||
|
||||
- if (!capable(CAP_NET_ADMIN))
|
||||
+ if (!netlink_capable(skb, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
- if (!capable(CAP_SYS_ADMIN))
|
||||
+ if (!netlink_capable(skb, CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
ASSERT_RTNL();
|
||||
@@ -233,10 +233,10 @@ static int route_doit(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
int err;
|
||||
u8 dst;
|
||||
|
||||
- if (!capable(CAP_NET_ADMIN))
|
||||
+ if (!netlink_capable(skb, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
- if (!capable(CAP_SYS_ADMIN))
|
||||
+ if (!netlink_capable(skb, CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
ASSERT_RTNL();
|
||||
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
|
||||
index 72bdc7166345..3b2265523552 100644
|
||||
--- a/net/sched/act_api.c
|
||||
+++ b/net/sched/act_api.c
|
||||
@@ -908,7 +908,7 @@ static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n)
|
||||
u32 portid = skb ? NETLINK_CB(skb).portid : 0;
|
||||
int ret = 0, ovr = 0;
|
||||
|
||||
- if ((n->nlmsg_type != RTM_GETACTION) && !capable(CAP_NET_ADMIN))
|
||||
+ if ((n->nlmsg_type != RTM_GETACTION) && !netlink_capable(skb, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
ret = nlmsg_parse(n, sizeof(struct tcamsg), tca, TCA_ACT_MAX, NULL);
|
||||
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
|
||||
index 29a30a14c315..bdbdb1a7920a 100644
|
||||
--- a/net/sched/cls_api.c
|
||||
+++ b/net/sched/cls_api.c
|
||||
@@ -134,7 +134,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n)
|
||||
int err;
|
||||
int tp_created = 0;
|
||||
|
||||
- if ((n->nlmsg_type != RTM_GETTFILTER) && !capable(CAP_NET_ADMIN))
|
||||
+ if ((n->nlmsg_type != RTM_GETTFILTER) && !netlink_capable(skb, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
replay:
|
||||
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
|
||||
index a07d55e75698..98532cfa7823 100644
|
||||
--- a/net/sched/sch_api.c
|
||||
+++ b/net/sched/sch_api.c
|
||||
@@ -1084,7 +1084,7 @@ static int tc_get_qdisc(struct sk_buff *skb, struct nlmsghdr *n)
|
||||
struct Qdisc *p = NULL;
|
||||
int err;
|
||||
|
||||
- if ((n->nlmsg_type != RTM_GETQDISC) && !capable(CAP_NET_ADMIN))
|
||||
+ if ((n->nlmsg_type != RTM_GETQDISC) && !netlink_capable(skb, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
err = nlmsg_parse(n, sizeof(*tcm), tca, TCA_MAX, NULL);
|
||||
@@ -1151,7 +1151,7 @@ static int tc_modify_qdisc(struct sk_buff *skb, struct nlmsghdr *n)
|
||||
struct Qdisc *q, *p;
|
||||
int err;
|
||||
|
||||
- if (!capable(CAP_NET_ADMIN))
|
||||
+ if (!netlink_capable(skb, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
replay:
|
||||
@@ -1491,7 +1491,7 @@ static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n)
|
||||
u32 qid;
|
||||
int err;
|
||||
|
||||
- if ((n->nlmsg_type != RTM_GETTCLASS) && !capable(CAP_NET_ADMIN))
|
||||
+ if ((n->nlmsg_type != RTM_GETTCLASS) && !netlink_capable(skb, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
err = nlmsg_parse(n, sizeof(*tcm), tca, TCA_MAX, NULL);
|
||||
diff --git a/net/tipc/netlink.c b/net/tipc/netlink.c
|
||||
index 3aaf73de9e2d..ad844d365340 100644
|
||||
--- a/net/tipc/netlink.c
|
||||
+++ b/net/tipc/netlink.c
|
||||
@@ -47,7 +47,7 @@ static int handle_cmd(struct sk_buff *skb, struct genl_info *info)
|
||||
int hdr_space = nlmsg_total_size(GENL_HDRLEN + TIPC_GENL_HDRLEN);
|
||||
u16 cmd;
|
||||
|
||||
- if ((req_userhdr->cmd & 0xC000) && (!capable(CAP_NET_ADMIN)))
|
||||
+ if ((req_userhdr->cmd & 0xC000) && (!netlink_capable(skb, CAP_NET_ADMIN)))
|
||||
cmd = TIPC_CMD_NOT_NET_ADMIN;
|
||||
else
|
||||
cmd = req_userhdr->cmd;
|
||||
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
|
||||
index 2f7ddc3a59b4..b10d04fa3933 100644
|
||||
--- a/net/xfrm/xfrm_user.c
|
||||
+++ b/net/xfrm/xfrm_user.c
|
||||
@@ -2350,7 +2350,7 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
link = &xfrm_dispatch[type];
|
||||
|
||||
/* All operations require privileges, even GET */
|
||||
- if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
|
||||
+ if (!netlink_net_capable(skb, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
if ((type == (XFRM_MSG_GETSA - XFRM_MSG_BASE) ||
|
||||
--
|
||||
1.9.0
|
||||
|
|
@ -1,175 +0,0 @@
|
|||
Bugzilla: 1003602
|
||||
Upstream-status: Queued for 3.15 https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?id=27095111cbafd3212c7e9a4a8cef1099b7520ca8
|
||||
|
||||
From 27095111cbafd3212c7e9a4a8cef1099b7520ca8 Mon Sep 17 00:00:00 2001
|
||||
From: Kieran Clancy <clancy.kieran@gmail.com>
|
||||
Date: Fri, 28 Feb 2014 14:12:28 +0000
|
||||
Subject: ACPI / EC: Clear stale EC events on Samsung systems
|
||||
|
||||
A number of Samsung notebooks (530Uxx/535Uxx/540Uxx/550Pxx/900Xxx/etc)
|
||||
continue to log events during sleep (lid open/close, AC plug/unplug,
|
||||
battery level change), which accumulate in the EC until a buffer fills.
|
||||
After the buffer is full (tests suggest it holds 8 events), GPEs stop
|
||||
being triggered for new events. This state persists on wake or even on
|
||||
power cycle, and prevents new events from being registered until the EC
|
||||
is manually polled.
|
||||
|
||||
This is the root cause of a number of bugs, including AC not being
|
||||
detected properly, lid close not triggering suspend, and low ambient
|
||||
light not triggering the keyboard backlight. The bug also seemed to be
|
||||
responsible for performance issues on at least one user's machine.
|
||||
|
||||
Juan Manuel Cabo found the cause of bug and the workaround of polling
|
||||
the EC manually on wake.
|
||||
|
||||
The loop which clears the stale events is based on an earlier patch by
|
||||
Lan Tianyu (see referenced attachment).
|
||||
|
||||
This patch:
|
||||
- Adds a function acpi_ec_clear() which polls the EC for stale _Q
|
||||
events at most ACPI_EC_CLEAR_MAX (currently 100) times. A warning is
|
||||
logged if this limit is reached.
|
||||
- Adds a flag EC_FLAGS_CLEAR_ON_RESUME which is set to 1 if the DMI
|
||||
system vendor is Samsung. This check could be replaced by several
|
||||
more specific DMI vendor/product pairs, but it's likely that the bug
|
||||
affects more Samsung products than just the five series mentioned
|
||||
above. Further, it should not be harmful to run acpi_ec_clear() on
|
||||
systems without the bug; it will return immediately after finding no
|
||||
data waiting.
|
||||
- Runs acpi_ec_clear() on initialisation (boot), from acpi_ec_add()
|
||||
- Runs acpi_ec_clear() on wake, from acpi_ec_unblock_transactions()
|
||||
|
||||
References: https://bugzilla.kernel.org/show_bug.cgi?id=44161
|
||||
References: https://bugzilla.kernel.org/show_bug.cgi?id=45461
|
||||
References: https://bugzilla.kernel.org/show_bug.cgi?id=57271
|
||||
References: https://bugzilla.kernel.org/attachment.cgi?id=126801
|
||||
Suggested-by: Juan Manuel Cabo <juanmanuel.cabo@gmail.com>
|
||||
Signed-off-by: Kieran Clancy <clancy.kieran@gmail.com>
|
||||
Reviewed-by: Lan Tianyu <tianyu.lan@intel.com>
|
||||
Reviewed-by: Dennis Jansen <dennis.jansen@web.de>
|
||||
Tested-by: Kieran Clancy <clancy.kieran@gmail.com>
|
||||
Tested-by: Juan Manuel Cabo <juanmanuel.cabo@gmail.com>
|
||||
Tested-by: Dennis Jansen <dennis.jansen@web.de>
|
||||
Tested-by: Maurizio D'Addona <mauritiusdadd@gmail.com>
|
||||
Tested-by: San Zamoyski <san@plusnet.pl>
|
||||
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
||||
---
|
||||
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
|
||||
index 959d41a..d7d32c2 100644
|
||||
--- a/drivers/acpi/ec.c
|
||||
+++ b/drivers/acpi/ec.c
|
||||
@@ -67,6 +67,8 @@ enum ec_command {
|
||||
#define ACPI_EC_DELAY 500 /* Wait 500ms max. during EC ops */
|
||||
#define ACPI_EC_UDELAY_GLK 1000 /* Wait 1ms max. to get global lock */
|
||||
#define ACPI_EC_MSI_UDELAY 550 /* Wait 550us for MSI EC */
|
||||
+#define ACPI_EC_CLEAR_MAX 100 /* Maximum number of events to query
|
||||
+ * when trying to clear the EC */
|
||||
|
||||
enum {
|
||||
EC_FLAGS_QUERY_PENDING, /* Query is pending */
|
||||
@@ -116,6 +118,7 @@ EXPORT_SYMBOL(first_ec);
|
||||
static int EC_FLAGS_MSI; /* Out-of-spec MSI controller */
|
||||
static int EC_FLAGS_VALIDATE_ECDT; /* ASUStec ECDTs need to be validated */
|
||||
static int EC_FLAGS_SKIP_DSDT_SCAN; /* Not all BIOS survive early DSDT scan */
|
||||
+static int EC_FLAGS_CLEAR_ON_RESUME; /* Needs acpi_ec_clear() on boot/resume */
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
Transaction Management
|
||||
@@ -440,6 +443,29 @@ acpi_handle ec_get_handle(void)
|
||||
|
||||
EXPORT_SYMBOL(ec_get_handle);
|
||||
|
||||
+static int acpi_ec_query_unlocked(struct acpi_ec *ec, u8 *data);
|
||||
+
|
||||
+/*
|
||||
+ * Clears stale _Q events that might have accumulated in the EC.
|
||||
+ * Run with locked ec mutex.
|
||||
+ */
|
||||
+static void acpi_ec_clear(struct acpi_ec *ec)
|
||||
+{
|
||||
+ int i, status;
|
||||
+ u8 value = 0;
|
||||
+
|
||||
+ for (i = 0; i < ACPI_EC_CLEAR_MAX; i++) {
|
||||
+ status = acpi_ec_query_unlocked(ec, &value);
|
||||
+ if (status || !value)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (unlikely(i == ACPI_EC_CLEAR_MAX))
|
||||
+ pr_warn("Warning: Maximum of %d stale EC events cleared\n", i);
|
||||
+ else
|
||||
+ pr_info("%d stale EC events cleared\n", i);
|
||||
+}
|
||||
+
|
||||
void acpi_ec_block_transactions(void)
|
||||
{
|
||||
struct acpi_ec *ec = first_ec;
|
||||
@@ -463,6 +489,10 @@ void acpi_ec_unblock_transactions(void)
|
||||
mutex_lock(&ec->mutex);
|
||||
/* Allow transactions to be carried out again */
|
||||
clear_bit(EC_FLAGS_BLOCKED, &ec->flags);
|
||||
+
|
||||
+ if (EC_FLAGS_CLEAR_ON_RESUME)
|
||||
+ acpi_ec_clear(ec);
|
||||
+
|
||||
mutex_unlock(&ec->mutex);
|
||||
}
|
||||
|
||||
@@ -821,6 +851,13 @@ static int acpi_ec_add(struct acpi_device *device)
|
||||
|
||||
/* EC is fully operational, allow queries */
|
||||
clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
|
||||
+
|
||||
+ /* Clear stale _Q events if hardware might require that */
|
||||
+ if (EC_FLAGS_CLEAR_ON_RESUME) {
|
||||
+ mutex_lock(&ec->mutex);
|
||||
+ acpi_ec_clear(ec);
|
||||
+ mutex_unlock(&ec->mutex);
|
||||
+ }
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -922,6 +959,30 @@ static int ec_enlarge_storm_threshold(const struct dmi_system_id *id)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * On some hardware it is necessary to clear events accumulated by the EC during
|
||||
+ * sleep. These ECs stop reporting GPEs until they are manually polled, if too
|
||||
+ * many events are accumulated. (e.g. Samsung Series 5/9 notebooks)
|
||||
+ *
|
||||
+ * https://bugzilla.kernel.org/show_bug.cgi?id=44161
|
||||
+ *
|
||||
+ * Ideally, the EC should also be instructed NOT to accumulate events during
|
||||
+ * sleep (which Windows seems to do somehow), but the interface to control this
|
||||
+ * behaviour is not known at this time.
|
||||
+ *
|
||||
+ * Models known to be affected are Samsung 530Uxx/535Uxx/540Uxx/550Pxx/900Xxx,
|
||||
+ * however it is very likely that other Samsung models are affected.
|
||||
+ *
|
||||
+ * On systems which don't accumulate _Q events during sleep, this extra check
|
||||
+ * should be harmless.
|
||||
+ */
|
||||
+static int ec_clear_on_resume(const struct dmi_system_id *id)
|
||||
+{
|
||||
+ pr_debug("Detected system needing EC poll on resume.\n");
|
||||
+ EC_FLAGS_CLEAR_ON_RESUME = 1;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static struct dmi_system_id ec_dmi_table[] __initdata = {
|
||||
{
|
||||
ec_skip_dsdt_scan, "Compal JFL92", {
|
||||
@@ -965,6 +1026,9 @@ static struct dmi_system_id ec_dmi_table[] __initdata = {
|
||||
ec_validate_ecdt, "ASUS hardware", {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTek Computer Inc."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "L4R"),}, NULL},
|
||||
+ {
|
||||
+ ec_clear_on_resume, "Samsung hardware", {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD.")}, NULL},
|
||||
{},
|
||||
};
|
||||
|
||||
--
|
||||
cgit v0.9.2
|
|
@ -1,95 +0,0 @@
|
|||
Bugzilla: 1027465
|
||||
Upstream-status: 3.14
|
||||
|
||||
From a4b1b5877b514b276f0f31efe02388a9c2836728 Mon Sep 17 00:00:00 2001
|
||||
From: David Herrmann <dh.herrmann@gmail.com>
|
||||
Date: Thu, 19 Dec 2013 12:09:32 +0100
|
||||
Subject: [PATCH] HID: Bluetooth: hidp: make sure input buffers are big enough
|
||||
|
||||
HID core expects the input buffers to be at least of size 4096
|
||||
(HID_MAX_BUFFER_SIZE). Other sizes will result in buffer-overflows if an
|
||||
input-report is smaller than advertised. We could, like i2c, compute the
|
||||
biggest report-size instead of using HID_MAX_BUFFER_SIZE, but this will
|
||||
blow up if report-descriptors are changed after ->start() has been called.
|
||||
So lets be safe and just use the biggest buffer we have.
|
||||
|
||||
Note that this adds an additional copy to the HIDP input path. If there is
|
||||
a way to make sure the skb-buf is big enough, we should use that instead.
|
||||
|
||||
The best way would be to make hid-core honor the @size argument, though,
|
||||
that sounds easier than it is. So lets just fix the buffer-overflows for
|
||||
now and afterwards look for a faster way for all transport drivers.
|
||||
|
||||
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
||||
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
||||
---
|
||||
net/bluetooth/hidp/core.c | 16 ++++++++++++++--
|
||||
net/bluetooth/hidp/hidp.h | 4 ++++
|
||||
2 files changed, 18 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
|
||||
index 292e619..d9fb934 100644
|
||||
--- a/net/bluetooth/hidp/core.c
|
||||
+++ b/net/bluetooth/hidp/core.c
|
||||
@@ -430,6 +430,16 @@ static void hidp_del_timer(struct hidp_session *session)
|
||||
del_timer(&session->timer);
|
||||
}
|
||||
|
||||
+static void hidp_process_report(struct hidp_session *session,
|
||||
+ int type, const u8 *data, int len, int intr)
|
||||
+{
|
||||
+ if (len > HID_MAX_BUFFER_SIZE)
|
||||
+ len = HID_MAX_BUFFER_SIZE;
|
||||
+
|
||||
+ memcpy(session->input_buf, data, len);
|
||||
+ hid_input_report(session->hid, type, session->input_buf, len, intr);
|
||||
+}
|
||||
+
|
||||
static void hidp_process_handshake(struct hidp_session *session,
|
||||
unsigned char param)
|
||||
{
|
||||
@@ -502,7 +512,8 @@ static int hidp_process_data(struct hidp_session *session, struct sk_buff *skb,
|
||||
hidp_input_report(session, skb);
|
||||
|
||||
if (session->hid)
|
||||
- hid_input_report(session->hid, HID_INPUT_REPORT, skb->data, skb->len, 0);
|
||||
+ hidp_process_report(session, HID_INPUT_REPORT,
|
||||
+ skb->data, skb->len, 0);
|
||||
break;
|
||||
|
||||
case HIDP_DATA_RTYPE_OTHER:
|
||||
@@ -584,7 +595,8 @@ static void hidp_recv_intr_frame(struct hidp_session *session,
|
||||
hidp_input_report(session, skb);
|
||||
|
||||
if (session->hid) {
|
||||
- hid_input_report(session->hid, HID_INPUT_REPORT, skb->data, skb->len, 1);
|
||||
+ hidp_process_report(session, HID_INPUT_REPORT,
|
||||
+ skb->data, skb->len, 1);
|
||||
BT_DBG("report len %d", skb->len);
|
||||
}
|
||||
} else {
|
||||
diff --git a/net/bluetooth/hidp/hidp.h b/net/bluetooth/hidp/hidp.h
|
||||
index ab52414..8798492 100644
|
||||
--- a/net/bluetooth/hidp/hidp.h
|
||||
+++ b/net/bluetooth/hidp/hidp.h
|
||||
@@ -24,6 +24,7 @@
|
||||
#define __HIDP_H
|
||||
|
||||
#include <linux/types.h>
|
||||
+#include <linux/hid.h>
|
||||
#include <linux/kref.h>
|
||||
#include <net/bluetooth/bluetooth.h>
|
||||
#include <net/bluetooth/l2cap.h>
|
||||
@@ -179,6 +180,9 @@ struct hidp_session {
|
||||
|
||||
/* Used in hidp_output_raw_report() */
|
||||
int output_report_success; /* boolean */
|
||||
+
|
||||
+ /* temporary input buffer */
|
||||
+ u8 input_buf[HID_MAX_BUFFER_SIZE];
|
||||
};
|
||||
|
||||
/* HIDP init defines */
|
||||
--
|
||||
1.8.5.3
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
Bugzilla: 1090161
|
||||
Upstream-status: sent https://patchwork.kernel.org/patch/4055781/
|
||||
|
||||
From patchwork Thu Apr 24 22:26:38 2014
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: HID: rmi: do not fetch more than 16 bytes in a query
|
||||
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
||||
X-Patchwork-Id: 4055781
|
||||
Message-Id: <1398378398-24825-1-git-send-email-benjamin.tissoires@redhat.com>
|
||||
To: Andrew Duggan <aduggan@synaptics.com>,
|
||||
Christopher Heiny <cheiny@synaptics.com>,
|
||||
Jiri Kosina <jkosina@suse.cz>, linux-input@vger.kernel.org,
|
||||
linux-kernel@vger.kernel.org
|
||||
Date: Thu, 24 Apr 2014 18:26:38 -0400
|
||||
|
||||
A firmware bug is present on the XPS Haswell edition which silently
|
||||
split the request in two responses when the caller ask for a read of
|
||||
more than 16 bytes.
|
||||
The FW sends the first 16 then the 4 next, but it says that it answered
|
||||
the 20 bytes in the first report.
|
||||
|
||||
This occurs only on the retrieving of the min/max of X and Y of the F11
|
||||
function.
|
||||
We only use the first 10 bytes of the Ctrl register, so we can get only
|
||||
those 10 bytes to prevent the bug from happening.
|
||||
|
||||
Resolves:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1090161
|
||||
|
||||
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
||||
|
||||
---
|
||||
drivers/hid/hid-rmi.c | 11 ++++++++---
|
||||
1 file changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c
|
||||
index 7da9509..cee89c9 100644
|
||||
--- a/drivers/hid/hid-rmi.c
|
||||
+++ b/drivers/hid/hid-rmi.c
|
||||
@@ -613,10 +613,15 @@ static int rmi_populate_f11(struct hid_device *hdev)
|
||||
}
|
||||
}
|
||||
|
||||
- /* retrieve the ctrl registers */
|
||||
- ret = rmi_read_block(hdev, data->f11.control_base_addr, buf, 20);
|
||||
+ /*
|
||||
+ * retrieve the ctrl registers
|
||||
+ * the ctrl register has a size of 20 but a fw bug split it into 16 + 4,
|
||||
+ * and there is no way to know if the first 20 bytes are here or not.
|
||||
+ * We use only the first 10 bytes, so get only them.
|
||||
+ */
|
||||
+ ret = rmi_read_block(hdev, data->f11.control_base_addr, buf, 10);
|
||||
if (ret) {
|
||||
- hid_err(hdev, "can not read ctrl block of size 20: %d.\n", ret);
|
||||
+ hid_err(hdev, "can not read ctrl block of size 10: %d.\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -1,348 +0,0 @@
|
|||
Bugzilla: 953211
|
||||
Upstream-status: Queued for 3.14
|
||||
|
||||
From 4081924b7b6ce876fdb8e8049f1a5ba9c1496483 Mon Sep 17 00:00:00 2001
|
||||
From: Yunkang Tang <tommywill2011@gmail.com>
|
||||
Date: Thu, 26 Dec 2013 14:54:19 -0800
|
||||
Subject: [PATCH] Input: ALPS - add support for "Dolphin" devices
|
||||
|
||||
This adds support for another flavor of ALPS protocol used in newer
|
||||
"Dolphin" devices.
|
||||
|
||||
Signed-off-by: Yunkang Tang <yunkang.tang@cn.alps.com>
|
||||
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
||||
---
|
||||
drivers/input/mouse/alps.c | 214 ++++++++++++++++++++++++++++++++++++---------
|
||||
drivers/input/mouse/alps.h | 7 +-
|
||||
2 files changed, 179 insertions(+), 42 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
|
||||
index 5cf62e3..fb15c64 100644
|
||||
--- a/drivers/input/mouse/alps.c
|
||||
+++ b/drivers/input/mouse/alps.c
|
||||
@@ -277,6 +277,57 @@ static void alps_process_packet_v1_v2(struct psmouse *psmouse)
|
||||
}
|
||||
|
||||
/*
|
||||
+ * Process bitmap data for V5 protocols. Return value is null.
|
||||
+ *
|
||||
+ * The bitmaps don't have enough data to track fingers, so this function
|
||||
+ * only generates points representing a bounding box of at most two contacts.
|
||||
+ * These two points are returned in x1, y1, x2, and y2.
|
||||
+ */
|
||||
+static void alps_process_bitmap_dolphin(struct alps_data *priv,
|
||||
+ struct alps_fields *fields,
|
||||
+ int *x1, int *y1, int *x2, int *y2)
|
||||
+{
|
||||
+ int box_middle_x, box_middle_y;
|
||||
+ unsigned int x_map, y_map;
|
||||
+ unsigned char start_bit, end_bit;
|
||||
+ unsigned char x_msb, x_lsb, y_msb, y_lsb;
|
||||
+
|
||||
+ x_map = fields->x_map;
|
||||
+ y_map = fields->y_map;
|
||||
+
|
||||
+ if (!x_map || !y_map)
|
||||
+ return;
|
||||
+
|
||||
+ /* Get Most-significant and Least-significant bit */
|
||||
+ x_msb = fls(x_map);
|
||||
+ x_lsb = ffs(x_map);
|
||||
+ y_msb = fls(y_map);
|
||||
+ y_lsb = ffs(y_map);
|
||||
+
|
||||
+ /* Most-significant bit should never exceed max sensor line number */
|
||||
+ if (x_msb > priv->x_bits || y_msb > priv->y_bits)
|
||||
+ return;
|
||||
+
|
||||
+ *x1 = *y1 = *x2 = *y2 = 0;
|
||||
+
|
||||
+ if (fields->fingers > 1) {
|
||||
+ start_bit = priv->x_bits - x_msb;
|
||||
+ end_bit = priv->x_bits - x_lsb;
|
||||
+ box_middle_x = (priv->x_max * (start_bit + end_bit)) /
|
||||
+ (2 * (priv->x_bits - 1));
|
||||
+
|
||||
+ start_bit = y_lsb - 1;
|
||||
+ end_bit = y_msb - 1;
|
||||
+ box_middle_y = (priv->y_max * (start_bit + end_bit)) /
|
||||
+ (2 * (priv->y_bits - 1));
|
||||
+ *x1 = fields->x;
|
||||
+ *y1 = fields->y;
|
||||
+ *x2 = 2 * box_middle_x - *x1;
|
||||
+ *y2 = 2 * box_middle_y - *y1;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
* Process bitmap data from v3 and v4 protocols. Returns the number of
|
||||
* fingers detected. A return value of 0 means at least one of the
|
||||
* bitmaps was empty.
|
||||
@@ -481,7 +532,8 @@ static void alps_decode_buttons_v3(struct alps_fields *f, unsigned char *p)
|
||||
f->ts_middle = !!(p[3] & 0x40);
|
||||
}
|
||||
|
||||
-static void alps_decode_pinnacle(struct alps_fields *f, unsigned char *p)
|
||||
+static void alps_decode_pinnacle(struct alps_fields *f, unsigned char *p,
|
||||
+ struct psmouse *psmouse)
|
||||
{
|
||||
f->first_mp = !!(p[4] & 0x40);
|
||||
f->is_mp = !!(p[0] & 0x40);
|
||||
@@ -502,48 +554,61 @@ static void alps_decode_pinnacle(struct alps_fields *f, unsigned char *p)
|
||||
alps_decode_buttons_v3(f, p);
|
||||
}
|
||||
|
||||
-static void alps_decode_rushmore(struct alps_fields *f, unsigned char *p)
|
||||
+static void alps_decode_rushmore(struct alps_fields *f, unsigned char *p,
|
||||
+ struct psmouse *psmouse)
|
||||
{
|
||||
- alps_decode_pinnacle(f, p);
|
||||
+ alps_decode_pinnacle(f, p, psmouse);
|
||||
|
||||
f->x_map |= (p[5] & 0x10) << 11;
|
||||
f->y_map |= (p[5] & 0x20) << 6;
|
||||
}
|
||||
|
||||
-static void alps_decode_dolphin(struct alps_fields *f, unsigned char *p)
|
||||
+static void alps_decode_dolphin(struct alps_fields *f, unsigned char *p,
|
||||
+ struct psmouse *psmouse)
|
||||
{
|
||||
+ u64 palm_data = 0;
|
||||
+ struct alps_data *priv = psmouse->private;
|
||||
+
|
||||
f->first_mp = !!(p[0] & 0x02);
|
||||
f->is_mp = !!(p[0] & 0x20);
|
||||
|
||||
- f->fingers = ((p[0] & 0x6) >> 1 |
|
||||
+ if (!f->is_mp) {
|
||||
+ f->x = ((p[1] & 0x7f) | ((p[4] & 0x0f) << 7));
|
||||
+ f->y = ((p[2] & 0x7f) | ((p[4] & 0xf0) << 3));
|
||||
+ f->z = (p[0] & 4) ? 0 : p[5] & 0x7f;
|
||||
+ alps_decode_buttons_v3(f, p);
|
||||
+ } else {
|
||||
+ f->fingers = ((p[0] & 0x6) >> 1 |
|
||||
(p[0] & 0x10) >> 2);
|
||||
- f->x_map = ((p[2] & 0x60) >> 5) |
|
||||
- ((p[4] & 0x7f) << 2) |
|
||||
- ((p[5] & 0x7f) << 9) |
|
||||
- ((p[3] & 0x07) << 16) |
|
||||
- ((p[3] & 0x70) << 15) |
|
||||
- ((p[0] & 0x01) << 22);
|
||||
- f->y_map = (p[1] & 0x7f) |
|
||||
- ((p[2] & 0x1f) << 7);
|
||||
-
|
||||
- f->x = ((p[1] & 0x7f) | ((p[4] & 0x0f) << 7));
|
||||
- f->y = ((p[2] & 0x7f) | ((p[4] & 0xf0) << 3));
|
||||
- f->z = (p[0] & 4) ? 0 : p[5] & 0x7f;
|
||||
|
||||
- alps_decode_buttons_v3(f, p);
|
||||
+ palm_data = (p[1] & 0x7f) |
|
||||
+ ((p[2] & 0x7f) << 7) |
|
||||
+ ((p[4] & 0x7f) << 14) |
|
||||
+ ((p[5] & 0x7f) << 21) |
|
||||
+ ((p[3] & 0x07) << 28) |
|
||||
+ (((u64)p[3] & 0x70) << 27) |
|
||||
+ (((u64)p[0] & 0x01) << 34);
|
||||
+
|
||||
+ /* Y-profile is stored in P(0) to p(n-1), n = y_bits; */
|
||||
+ f->y_map = palm_data & (BIT(priv->y_bits) - 1);
|
||||
+
|
||||
+ /* X-profile is stored in p(n) to p(n+m-1), m = x_bits; */
|
||||
+ f->x_map = (palm_data >> priv->y_bits) &
|
||||
+ (BIT(priv->x_bits) - 1);
|
||||
+ }
|
||||
}
|
||||
|
||||
-static void alps_process_touchpad_packet_v3(struct psmouse *psmouse)
|
||||
+static void alps_process_touchpad_packet_v3_v5(struct psmouse *psmouse)
|
||||
{
|
||||
struct alps_data *priv = psmouse->private;
|
||||
unsigned char *packet = psmouse->packet;
|
||||
struct input_dev *dev = psmouse->dev;
|
||||
struct input_dev *dev2 = priv->dev2;
|
||||
int x1 = 0, y1 = 0, x2 = 0, y2 = 0;
|
||||
- int fingers = 0, bmap_fingers;
|
||||
- struct alps_fields f;
|
||||
+ int fingers = 0, bmap_fn;
|
||||
+ struct alps_fields f = {0};
|
||||
|
||||
- priv->decode_fields(&f, packet);
|
||||
+ priv->decode_fields(&f, packet, psmouse);
|
||||
|
||||
/*
|
||||
* There's no single feature of touchpad position and bitmap packets
|
||||
@@ -560,19 +625,38 @@ static void alps_process_touchpad_packet_v3(struct psmouse *psmouse)
|
||||
*/
|
||||
if (f.is_mp) {
|
||||
fingers = f.fingers;
|
||||
- bmap_fingers = alps_process_bitmap(priv,
|
||||
- f.x_map, f.y_map,
|
||||
- &x1, &y1, &x2, &y2);
|
||||
-
|
||||
- /*
|
||||
- * We shouldn't report more than one finger if
|
||||
- * we don't have two coordinates.
|
||||
- */
|
||||
- if (fingers > 1 && bmap_fingers < 2)
|
||||
- fingers = bmap_fingers;
|
||||
-
|
||||
- /* Now process position packet */
|
||||
- priv->decode_fields(&f, priv->multi_data);
|
||||
+ if (priv->proto_version == ALPS_PROTO_V3) {
|
||||
+ bmap_fn = alps_process_bitmap(priv, f.x_map,
|
||||
+ f.y_map, &x1, &y1,
|
||||
+ &x2, &y2);
|
||||
+
|
||||
+ /*
|
||||
+ * We shouldn't report more than one finger if
|
||||
+ * we don't have two coordinates.
|
||||
+ */
|
||||
+ if (fingers > 1 && bmap_fn < 2)
|
||||
+ fingers = bmap_fn;
|
||||
+
|
||||
+ /* Now process position packet */
|
||||
+ priv->decode_fields(&f, priv->multi_data,
|
||||
+ psmouse);
|
||||
+ } else {
|
||||
+ /*
|
||||
+ * Because Dolphin uses position packet's
|
||||
+ * coordinate data as Pt1 and uses it to
|
||||
+ * calculate Pt2, so we need to do position
|
||||
+ * packet decode first.
|
||||
+ */
|
||||
+ priv->decode_fields(&f, priv->multi_data,
|
||||
+ psmouse);
|
||||
+
|
||||
+ /*
|
||||
+ * Since Dolphin's finger number is reliable,
|
||||
+ * there is no need to compare with bmap_fn.
|
||||
+ */
|
||||
+ alps_process_bitmap_dolphin(priv, &f, &x1, &y1,
|
||||
+ &x2, &y2);
|
||||
+ }
|
||||
} else {
|
||||
priv->multi_packet = 0;
|
||||
}
|
||||
@@ -662,7 +746,7 @@ static void alps_process_packet_v3(struct psmouse *psmouse)
|
||||
return;
|
||||
}
|
||||
|
||||
- alps_process_touchpad_packet_v3(psmouse);
|
||||
+ alps_process_touchpad_packet_v3_v5(psmouse);
|
||||
}
|
||||
|
||||
static void alps_process_packet_v6(struct psmouse *psmouse)
|
||||
@@ -1709,6 +1793,52 @@ error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
+static int alps_dolphin_get_device_area(struct psmouse *psmouse,
|
||||
+ struct alps_data *priv)
|
||||
+{
|
||||
+ struct ps2dev *ps2dev = &psmouse->ps2dev;
|
||||
+ unsigned char param[4] = {0};
|
||||
+ int num_x_electrode, num_y_electrode;
|
||||
+
|
||||
+ if (alps_enter_command_mode(psmouse))
|
||||
+ return -1;
|
||||
+
|
||||
+ param[0] = 0x0a;
|
||||
+ if (ps2_command(ps2dev, NULL, PSMOUSE_CMD_RESET_WRAP) ||
|
||||
+ ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETPOLL) ||
|
||||
+ ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETPOLL) ||
|
||||
+ ps2_command(ps2dev, ¶m[0], PSMOUSE_CMD_SETRATE) ||
|
||||
+ ps2_command(ps2dev, ¶m[0], PSMOUSE_CMD_SETRATE))
|
||||
+ return -1;
|
||||
+
|
||||
+ if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO))
|
||||
+ return -1;
|
||||
+
|
||||
+ /*
|
||||
+ * Dolphin's sensor line number is not fixed. It can be calculated
|
||||
+ * by adding the device's register value with DOLPHIN_PROFILE_X/YOFFSET.
|
||||
+ * Further more, we can get device's x_max and y_max by multiplying
|
||||
+ * sensor line number with DOLPHIN_COUNT_PER_ELECTRODE.
|
||||
+ *
|
||||
+ * e.g. When we get register's sensor_x = 11 & sensor_y = 8,
|
||||
+ * real sensor line number X = 11 + 8 = 19, and
|
||||
+ * real sensor line number Y = 8 + 1 = 9.
|
||||
+ * So, x_max = (19 - 1) * 64 = 1152, and
|
||||
+ * y_max = (9 - 1) * 64 = 512.
|
||||
+ */
|
||||
+ num_x_electrode = DOLPHIN_PROFILE_XOFFSET + (param[2] & 0x0F);
|
||||
+ num_y_electrode = DOLPHIN_PROFILE_YOFFSET + ((param[2] >> 4) & 0x0F);
|
||||
+ priv->x_bits = num_x_electrode;
|
||||
+ priv->y_bits = num_y_electrode;
|
||||
+ priv->x_max = (num_x_electrode - 1) * DOLPHIN_COUNT_PER_ELECTRODE;
|
||||
+ priv->y_max = (num_y_electrode - 1) * DOLPHIN_COUNT_PER_ELECTRODE;
|
||||
+
|
||||
+ if (alps_exit_command_mode(psmouse))
|
||||
+ return -1;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int alps_hw_init_dolphin_v1(struct psmouse *psmouse)
|
||||
{
|
||||
struct ps2dev *ps2dev = &psmouse->ps2dev;
|
||||
@@ -1763,13 +1893,13 @@ static void alps_set_defaults(struct alps_data *priv)
|
||||
break;
|
||||
case ALPS_PROTO_V5:
|
||||
priv->hw_init = alps_hw_init_dolphin_v1;
|
||||
- priv->process_packet = alps_process_packet_v3;
|
||||
+ priv->process_packet = alps_process_touchpad_packet_v3_v5;
|
||||
priv->decode_fields = alps_decode_dolphin;
|
||||
priv->set_abs_params = alps_set_abs_params_mt;
|
||||
priv->nibble_commands = alps_v3_nibble_commands;
|
||||
priv->addr_command = PSMOUSE_CMD_RESET_WRAP;
|
||||
priv->byte0 = 0xc8;
|
||||
- priv->mask0 = 0xc8;
|
||||
+ priv->mask0 = 0xd8;
|
||||
priv->flags = 0;
|
||||
priv->x_max = 1360;
|
||||
priv->y_max = 660;
|
||||
@@ -1845,11 +1975,13 @@ static int alps_identify(struct psmouse *psmouse, struct alps_data *priv)
|
||||
if (alps_match_table(psmouse, priv, e7, ec) == 0) {
|
||||
return 0;
|
||||
} else if (e7[0] == 0x73 && e7[1] == 0x03 && e7[2] == 0x50 &&
|
||||
- ec[0] == 0x73 && ec[1] == 0x01) {
|
||||
+ ec[0] == 0x73 && (ec[1] == 0x01 || ec[1] == 0x02)) {
|
||||
priv->proto_version = ALPS_PROTO_V5;
|
||||
alps_set_defaults(priv);
|
||||
-
|
||||
- return 0;
|
||||
+ if (alps_dolphin_get_device_area(psmouse, priv))
|
||||
+ return -EIO;
|
||||
+ else
|
||||
+ return 0;
|
||||
} else if (ec[0] == 0x88 && ec[1] == 0x08) {
|
||||
priv->proto_version = ALPS_PROTO_V3;
|
||||
alps_set_defaults(priv);
|
||||
diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h
|
||||
index 704f0f9..03f88b6 100644
|
||||
--- a/drivers/input/mouse/alps.h
|
||||
+++ b/drivers/input/mouse/alps.h
|
||||
@@ -19,6 +19,10 @@
|
||||
#define ALPS_PROTO_V5 5
|
||||
#define ALPS_PROTO_V6 6
|
||||
|
||||
+#define DOLPHIN_COUNT_PER_ELECTRODE 64
|
||||
+#define DOLPHIN_PROFILE_XOFFSET 8 /* x-electrode offset */
|
||||
+#define DOLPHIN_PROFILE_YOFFSET 1 /* y-electrode offset */
|
||||
+
|
||||
/**
|
||||
* struct alps_model_info - touchpad ID table
|
||||
* @signature: E7 response string to match.
|
||||
@@ -146,7 +150,8 @@ struct alps_data {
|
||||
|
||||
int (*hw_init)(struct psmouse *psmouse);
|
||||
void (*process_packet)(struct psmouse *psmouse);
|
||||
- void (*decode_fields)(struct alps_fields *f, unsigned char *p);
|
||||
+ void (*decode_fields)(struct alps_fields *f, unsigned char *p,
|
||||
+ struct psmouse *psmouse);
|
||||
void (*set_abs_params)(struct alps_data *priv, struct input_dev *dev1);
|
||||
|
||||
int prev_fin;
|
||||
--
|
||||
1.8.4.2
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
Bugzilla: 1051668
|
||||
Upstream-status: 3.15
|
||||
|
||||
From ae4bedf0679d99f0a9b80a7ea9b8dd205de05d06 Mon Sep 17 00:00:00 2001
|
||||
From: Jordan Rife <jrife0@gmail.com>
|
||||
Date: Tue, 22 Apr 2014 17:44:51 -0700
|
||||
Subject: Input: elantech - add support for newer elantech touchpads
|
||||
|
||||
Newer elantech touchpads are not recognized by the current driver, since it
|
||||
fails to detect their firmware version number. This prevents more advanced
|
||||
touchpad features from being usable such as two-finger scrolling. This
|
||||
patch allows newer touchpads to be detected and be fully functional. Tested
|
||||
on Sony Vaio SVF13N17PXB.
|
||||
|
||||
Signed-off-by: Jordan Rife <jrife0@gmail.com>
|
||||
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
||||
|
||||
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
|
||||
index ef1cf52..088d354 100644
|
||||
--- a/drivers/input/mouse/elantech.c
|
||||
+++ b/drivers/input/mouse/elantech.c
|
||||
@@ -1353,6 +1353,7 @@ static int elantech_set_properties(struct elantech_data *etd)
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
+ case 9:
|
||||
etd->hw_version = 4;
|
||||
break;
|
||||
default:
|
||||
--
|
||||
cgit v0.10.1
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
Bugzilla: 924916
|
||||
Upstream-status: Queued for 3.14 in kvm tree
|
||||
|
||||
From 989c6b34f6a9480e397b170cc62237e89bf4fdb9 Mon Sep 17 00:00:00 2001
|
||||
From: Marcelo Tosatti <mtosatti@redhat.com>
|
||||
Date: Thu, 19 Dec 2013 17:28:51 +0000
|
||||
Subject: KVM: MMU: handle invalid root_hpa at __direct_map
|
||||
|
||||
It is possible for __direct_map to be called on invalid root_hpa
|
||||
(-1), two examples:
|
||||
|
||||
1) try_async_pf -> can_do_async_pf
|
||||
-> vmx_interrupt_allowed -> nested_vmx_vmexit
|
||||
2) vmx_handle_exit -> vmx_interrupt_allowed -> nested_vmx_vmexit
|
||||
|
||||
Then to load_vmcs12_host_state and kvm_mmu_reset_context.
|
||||
|
||||
Check for this possibility, let fault exception be regenerated.
|
||||
|
||||
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=924916
|
||||
|
||||
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
||||
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
||||
---
|
||||
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
|
||||
index 40772ef..31a5702 100644
|
||||
--- a/arch/x86/kvm/mmu.c
|
||||
+++ b/arch/x86/kvm/mmu.c
|
||||
@@ -2659,6 +2659,9 @@ static int __direct_map(struct kvm_vcpu *vcpu, gpa_t v, int write,
|
||||
int emulate = 0;
|
||||
gfn_t pseudo_gfn;
|
||||
|
||||
+ if (!VALID_PAGE(vcpu->arch.mmu.root_hpa))
|
||||
+ return 0;
|
||||
+
|
||||
for_each_shadow_entry(vcpu, (u64)gfn << PAGE_SHIFT, iterator) {
|
||||
if (iterator.level == level) {
|
||||
mmu_set_spte(vcpu, iterator.sptep, ACC_ALL,
|
||||
--
|
||||
cgit v0.9.2
|
|
@ -1,88 +0,0 @@
|
|||
Bugzilla: 1047892
|
||||
Upstream-status: Submitted for 3.14
|
||||
|
||||
Path: news.gmane.org!not-for-mail
|
||||
From: Marcelo Tosatti <mtosatti@redhat.com>
|
||||
Newsgroups: gmane.comp.emulators.kvm.devel
|
||||
Subject: KVM: VMX: fix use after free of vmx->loaded_vmcs
|
||||
Date: Fri, 3 Jan 2014 17:00:51 -0200
|
||||
Lines: 31
|
||||
Approved: news@gmane.org
|
||||
Message-ID: <20140103190051.GA16151@amt.cnet>
|
||||
NNTP-Posting-Host: plane.gmane.org
|
||||
Mime-Version: 1.0
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
X-Trace: ger.gmane.org 1388775805 10008 80.91.229.3 (3 Jan 2014 19:03:25 GMT)
|
||||
X-Complaints-To: usenet@ger.gmane.org
|
||||
NNTP-Posting-Date: Fri, 3 Jan 2014 19:03:25 +0000 (UTC)
|
||||
Cc: Jan Kiszka <jan.kiszka@web.de>, Paolo Bonzini <pbonzini@redhat.com>
|
||||
To: kvm-devel <kvm@vger.kernel.org>
|
||||
Original-X-From: kvm-owner@vger.kernel.org Fri Jan 03 20:03:30 2014
|
||||
Return-path: <kvm-owner@vger.kernel.org>
|
||||
Envelope-to: gcekd-kvm-devel@plane.gmane.org
|
||||
Original-Received: from vger.kernel.org ([209.132.180.67])
|
||||
by plane.gmane.org with esmtp (Exim 4.69)
|
||||
(envelope-from <kvm-owner@vger.kernel.org>)
|
||||
id 1VzA1p-0000BI-F0
|
||||
for gcekd-kvm-devel@plane.gmane.org; Fri, 03 Jan 2014 20:03:29 +0100
|
||||
Original-Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
|
||||
id S1752819AbaACTDZ (ORCPT <rfc822;gcekd-kvm-devel@m.gmane.org>);
|
||||
Fri, 3 Jan 2014 14:03:25 -0500
|
||||
Original-Received: from mx1.redhat.com ([209.132.183.28]:26936 "EHLO mx1.redhat.com"
|
||||
rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
|
||||
id S1751681AbaACTDY (ORCPT <rfc822;kvm@vger.kernel.org>);
|
||||
Fri, 3 Jan 2014 14:03:24 -0500
|
||||
Original-Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
|
||||
by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s03J3NIr007205
|
||||
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
|
||||
Fri, 3 Jan 2014 14:03:24 -0500
|
||||
Original-Received: from amt.cnet (vpn1-4-118.gru2.redhat.com [10.97.4.118])
|
||||
by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s03J3Mxl004396;
|
||||
Fri, 3 Jan 2014 14:03:23 -0500
|
||||
Original-Received: from amt.cnet (localhost [127.0.0.1])
|
||||
by amt.cnet (Postfix) with ESMTP id 98901104ADF;
|
||||
Fri, 3 Jan 2014 17:00:53 -0200 (BRST)
|
||||
Original-Received: (from marcelo@localhost)
|
||||
by amt.cnet (8.14.6/8.14.6/Submit) id s03J0pCL016186;
|
||||
Fri, 3 Jan 2014 17:00:51 -0200
|
||||
Content-Disposition: inline
|
||||
User-Agent: Mutt/1.5.21 (2010-09-15)
|
||||
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
|
||||
Original-Sender: kvm-owner@vger.kernel.org
|
||||
Precedence: bulk
|
||||
List-ID: <kvm.vger.kernel.org>
|
||||
X-Mailing-List: kvm@vger.kernel.org
|
||||
Xref: news.gmane.org gmane.comp.emulators.kvm.devel:117837
|
||||
Archived-At: <http://permalink.gmane.org/gmane.comp.emulators.kvm.devel/117837>
|
||||
|
||||
|
||||
After free_loaded_vmcs executes, the "loaded_vmcs" structure
|
||||
is kfreed, and now vmx->loaded_vmcs points to a kfreed area.
|
||||
Subsequent free_loaded_vmcs then attempts to manipulate
|
||||
vmx->loaded_vmcs.
|
||||
|
||||
Switch the order to avoid the problem.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1047892
|
||||
|
||||
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
||||
|
||||
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
|
||||
index da7837e..2efa33f0 100644
|
||||
--- a/arch/x86/kvm/vmx.c
|
||||
+++ b/arch/x86/kvm/vmx.c
|
||||
@@ -7332,8 +7332,8 @@ static void vmx_free_vcpu(struct kvm_vcpu *vcpu)
|
||||
struct vcpu_vmx *vmx = to_vmx(vcpu);
|
||||
|
||||
free_vpid(vmx);
|
||||
- free_nested(vmx);
|
||||
free_loaded_vmcs(vmx->loaded_vmcs);
|
||||
+ free_nested(vmx);
|
||||
kfree(vmx->guest_msrs);
|
||||
kvm_vcpu_uninit(vcpu);
|
||||
kmem_cache_free(kvm_vcpu_cache, vmx);
|
||||
--
|
||||
To unsubscribe from this list: send the line "unsubscribe kvm" in
|
||||
the body of a message to majordomo@vger.kernel.org
|
||||
More majordomo info at http://vger.kernel.org/majordomo-info.html
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
Bugzilla: 1085016
|
||||
Upstream-status: Queued for 3.15
|
||||
|
||||
From 5678de3f15010b9022ee45673f33bcfc71d47b60 Mon Sep 17 00:00:00 2001
|
||||
From: Paolo Bonzini <pbonzini@redhat.com>
|
||||
Date: Fri, 28 Mar 2014 20:41:50 +0100
|
||||
Subject: KVM: ioapic: fix assignment of ioapic->rtc_status.pending_eoi
|
||||
(CVE-2014-0155)
|
||||
|
||||
QE reported that they got the BUG_ON in ioapic_service to trigger.
|
||||
I cannot reproduce it, but there are two reasons why this could happen.
|
||||
|
||||
The less likely but also easiest one, is when kvm_irq_delivery_to_apic
|
||||
does not deliver to any APIC and returns -1.
|
||||
|
||||
Because irqe.shorthand == 0, the kvm_for_each_vcpu loop in that
|
||||
function is never reached. However, you can target the similar loop in
|
||||
kvm_irq_delivery_to_apic_fast; just program a zero logical destination
|
||||
address into the IOAPIC, or an out-of-range physical destination address.
|
||||
|
||||
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
||||
|
||||
diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c
|
||||
index d4b6015..d98d107 100644
|
||||
--- a/virt/kvm/ioapic.c
|
||||
+++ b/virt/kvm/ioapic.c
|
||||
@@ -356,7 +356,7 @@ static int ioapic_service(struct kvm_ioapic *ioapic, int irq, bool line_status)
|
||||
BUG_ON(ioapic->rtc_status.pending_eoi != 0);
|
||||
ret = kvm_irq_delivery_to_apic(ioapic->kvm, NULL, &irqe,
|
||||
ioapic->rtc_status.dest_map);
|
||||
- ioapic->rtc_status.pending_eoi = ret;
|
||||
+ ioapic->rtc_status.pending_eoi = (ret < 0 ? 0 : ret);
|
||||
} else
|
||||
ret = kvm_irq_delivery_to_apic(ioapic->kvm, NULL, &irqe, NULL);
|
||||
|
||||
--
|
||||
cgit v0.10.1
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
Bugzilla: 1099761
|
||||
Upstream-status: 3.16 and CC'd for stable
|
||||
|
||||
From a914722f333b3359d2f4f12919380a334176bb89 Mon Sep 17 00:00:00 2001
|
||||
From: Mateusz Guzik <mguzik@redhat.com>
|
||||
Date: Tue, 10 Jun 2014 12:44:12 +0200
|
||||
Subject: [PATCH] NFS: populate ->net in mount data when remounting
|
||||
|
||||
Otherwise the kernel oopses when remounting with IPv6 server because
|
||||
net is dereferenced in dev_get_by_name.
|
||||
|
||||
Use net ns of current thread so that dev_get_by_name does not operate on
|
||||
foreign ns. Changing the address is prohibited anyway so this should not
|
||||
affect anything.
|
||||
|
||||
Signed-off-by: Mateusz Guzik <mguzik@redhat.com>
|
||||
Cc: linux-nfs@vger.kernel.org
|
||||
Cc: linux-kernel@vger.kernel.org
|
||||
Cc: stable@vger.kernel.org # 3.4+
|
||||
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
|
||||
---
|
||||
fs/nfs/super.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
|
||||
index 1a6d7ac9d9d2..084af1060d79 100644
|
||||
--- a/fs/nfs/super.c
|
||||
+++ b/fs/nfs/super.c
|
||||
@@ -2260,6 +2260,7 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data)
|
||||
data->nfs_server.addrlen = nfss->nfs_client->cl_addrlen;
|
||||
data->version = nfsvers;
|
||||
data->minorversion = nfss->nfs_client->cl_minorversion;
|
||||
+ data->net = current->nsproxy->net_ns;
|
||||
memcpy(&data->nfs_server.address, &nfss->nfs_client->cl_addr,
|
||||
data->nfs_server.addrlen);
|
||||
|
||||
--
|
||||
1.9.3
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
From 1b4b61e873240faea96995cd87cfbe7bc51a2b39 Mon Sep 17 00:00:00 2001
|
||||
From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
|
||||
Date: Tue, 04 Mar 2014 22:23:47 +0000
|
||||
Subject: Revert "USBNET: ax88179_178a: enable tso if usb host supports sg dma"
|
||||
|
||||
This reverts commit 3804fad45411b48233b48003e33a78f290d227c8.
|
||||
|
||||
The xHCI driver does not implement TD fragment rules yet, so we can't
|
||||
properly support arbitrary-length scatter gather. USB storage seems
|
||||
immune to these issues, and only the ASIX host seems to hit them, so
|
||||
disable scatter gather.
|
||||
|
||||
Note that we can't simply work around this by clearing the
|
||||
no_sg_constraint flag for 1.0 xHCI hosts that need TD fragments (and
|
||||
thus would cause the ASIX chipsets to drop packets). We tried that with
|
||||
commit 247bf557273d "xhci 1.0: Limit arbitrarily-aligned scatter
|
||||
gather." We found that commit breaks USB 3.0 mass storage devices. It
|
||||
needs to get reverted, and this commit needs to get reverted before it
|
||||
to avoid dropped packets with the ASIX ethernet adapters.
|
||||
|
||||
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
|
||||
Cc: stable@vger.kernel.org # 3.12
|
||||
---
|
||||
diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
|
||||
index 955df81..42085e6 100644
|
||||
--- a/drivers/net/usb/ax88179_178a.c
|
||||
+++ b/drivers/net/usb/ax88179_178a.c
|
||||
@@ -1029,20 +1029,12 @@ static int ax88179_bind(struct usbnet *dev, struct usb_interface *intf)
|
||||
dev->mii.phy_id = 0x03;
|
||||
dev->mii.supports_gmii = 1;
|
||||
|
||||
- if (usb_device_no_sg_constraint(dev->udev))
|
||||
- dev->can_dma_sg = 1;
|
||||
-
|
||||
dev->net->features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
|
||||
NETIF_F_RXCSUM;
|
||||
|
||||
dev->net->hw_features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
|
||||
NETIF_F_RXCSUM;
|
||||
|
||||
- if (dev->can_dma_sg) {
|
||||
- dev->net->features |= NETIF_F_SG | NETIF_F_TSO;
|
||||
- dev->net->hw_features |= NETIF_F_SG | NETIF_F_TSO;
|
||||
- }
|
||||
-
|
||||
/* Enable checksum offload */
|
||||
*tmp = AX_RXCOE_IP | AX_RXCOE_TCP | AX_RXCOE_UDP |
|
||||
AX_RXCOE_TCPV6 | AX_RXCOE_UDPV6;
|
||||
--
|
||||
cgit v0.9.2
|
|
@ -1,86 +0,0 @@
|
|||
From 7efb6dbd0d825899955fd4035504823bb5c1124c Mon Sep 17 00:00:00 2001
|
||||
From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
|
||||
Date: Tue, 04 Mar 2014 22:28:16 +0000
|
||||
Subject: Revert "xhci 1.0: Limit arbitrarily-aligned scatter gather."
|
||||
|
||||
This reverts commit 247bf557273dd775505fb9240d2d152f4f20d304, since it
|
||||
causes USB 3.0 mass storage devices to fail on xHCI 1.0 hosts.
|
||||
|
||||
The block layer may submit scatter-gather lists with entries that
|
||||
are multiples of 512-byte blocks. That's fine for USB 2.0 devices,
|
||||
where the bulk endpoint max packet size is 512 bytes. But USB 3.0
|
||||
devices have bulk endpoints with a 1024 byte max packet size.
|
||||
|
||||
That means when the block layer submits a scatter-gather list with one
|
||||
entry that includes, say, three 512-byte blocks, this code will reject
|
||||
the URB if it's submitted to a USB 3.0 bulk endpoint:
|
||||
|
||||
int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
|
||||
{
|
||||
...
|
||||
max = usb_endpoint_maxp(&ep->desc);
|
||||
...
|
||||
} else if (urb->num_sgs && !urb->dev->bus->no_sg_constraint &&
|
||||
dev->speed != USB_SPEED_WIRELESS) {
|
||||
struct scatterlist *sg;
|
||||
int i;
|
||||
|
||||
for_each_sg(urb->sg, sg, urb->num_sgs - 1, i)
|
||||
if (sg->length % max)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
This results in failures with USB 3.0 drives. For me, a failure to
|
||||
auto-mount the device. For others, a read or write SCSI command
|
||||
failure.
|
||||
|
||||
This commit was put in place so that we could get scatter-gather support
|
||||
for the ASIX USB ethernet adapter on non-1.0 hosts. It was a quick fix
|
||||
until we implemented TD fragments properly in the driver. Since it
|
||||
breaks USB 3.0 mass storage, we need to revert it, and revert
|
||||
scatter-gather support for the ASIX devices.
|
||||
|
||||
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
|
||||
Cc: stable@vger.kernel.org # 3.12
|
||||
---
|
||||
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
|
||||
index 652be21..8fe4e12 100644
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -4762,6 +4762,9 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
|
||||
/* Accept arbitrarily long scatter-gather lists */
|
||||
hcd->self.sg_tablesize = ~0;
|
||||
|
||||
+ /* support to build packet from discontinuous buffers */
|
||||
+ hcd->self.no_sg_constraint = 1;
|
||||
+
|
||||
/* XHCI controllers don't stop the ep queue on short packets :| */
|
||||
hcd->self.no_stop_on_short = 1;
|
||||
|
||||
@@ -4786,14 +4789,6 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
|
||||
/* xHCI private pointer was set in xhci_pci_probe for the second
|
||||
* registered roothub.
|
||||
*/
|
||||
- xhci = hcd_to_xhci(hcd);
|
||||
- /*
|
||||
- * Support arbitrarily aligned sg-list entries on hosts without
|
||||
- * TD fragment rules (which are currently unsupported).
|
||||
- */
|
||||
- if (xhci->hci_version < 0x100)
|
||||
- hcd->self.no_sg_constraint = 1;
|
||||
-
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -4822,9 +4817,6 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
|
||||
if (xhci->hci_version > 0x96)
|
||||
xhci->quirks |= XHCI_SPURIOUS_SUCCESS;
|
||||
|
||||
- if (xhci->hci_version < 0x100)
|
||||
- hcd->self.no_sg_constraint = 1;
|
||||
-
|
||||
/* Make sure the HC is halted. */
|
||||
retval = xhci_halt(xhci);
|
||||
if (retval)
|
||||
--
|
||||
cgit v0.9.2
|
|
@ -1,610 +0,0 @@
|
|||
Bugzilla: 1012025
|
||||
Upstream-status: In beagle github repository https://github.com/beagleboard/kernel
|
||||
|
||||
From 82fe302f565e00cfde3e96c6132df93b39525e7b Mon Sep 17 00:00:00 2001
|
||||
From: Philipp Zabel <p.zabel@pengutronix.de>
|
||||
Date: Tue, 28 May 2013 17:06:15 +0200
|
||||
Subject: [PATCH] reset: Add driver for gpio-controlled reset pins
|
||||
|
||||
This driver implements a reset controller device that toggle a gpio
|
||||
connected to a reset pin of a peripheral IC. The delay between assertion
|
||||
and de-assertion of the reset signal can be configured via device tree.
|
||||
|
||||
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
|
||||
Reviewed-by: Stephen Warren <swarren@nvidia.com>
|
||||
---
|
||||
.../devicetree/bindings/reset/gpio-reset.txt | 35 +++++
|
||||
drivers/reset/Kconfig | 11 ++
|
||||
drivers/reset/Makefile | 1 +
|
||||
drivers/reset/gpio-reset.c | 169 +++++++++++++++++++++
|
||||
4 files changed, 216 insertions(+)
|
||||
create mode 100644 Documentation/devicetree/bindings/reset/gpio-reset.txt
|
||||
create mode 100644 drivers/reset/gpio-reset.c
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/reset/gpio-reset.txt b/Documentation/devicetree/bindings/reset/gpio-reset.txt
|
||||
new file mode 100644
|
||||
index 0000000..bca5348
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/reset/gpio-reset.txt
|
||||
@@ -0,0 +1,35 @@
|
||||
+GPIO reset controller
|
||||
+=====================
|
||||
+
|
||||
+A GPIO reset controller controls a single GPIO that is connected to the reset
|
||||
+pin of a peripheral IC. Please also refer to reset.txt in this directory for
|
||||
+common reset controller binding usage.
|
||||
+
|
||||
+Required properties:
|
||||
+- compatible: Should be "gpio-reset"
|
||||
+- reset-gpios: A gpio used as reset line. The gpio specifier for this property
|
||||
+ depends on the gpio controller that provides the gpio.
|
||||
+- #reset-cells: 0, see below
|
||||
+
|
||||
+Optional properties:
|
||||
+- reset-delay-us: delay in microseconds. The gpio reset line will be asserted for
|
||||
+ this duration to reset.
|
||||
+- initially-in-reset: boolean. If not set, the initial state should be a
|
||||
+ deasserted reset line. If this property exists, the
|
||||
+ reset line should be kept in reset.
|
||||
+
|
||||
+example:
|
||||
+
|
||||
+sii902x_reset: gpio-reset {
|
||||
+ compatible = "gpio-reset";
|
||||
+ reset-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
|
||||
+ reset-delay-us = <10000>;
|
||||
+ initially-in-reset;
|
||||
+ #reset-cells = <0>;
|
||||
+};
|
||||
+
|
||||
+/* Device with nRESET pin connected to GPIO5_0 */
|
||||
+sii902x@39 {
|
||||
+ /* ... */
|
||||
+ resets = <&sii902x_reset>; /* active-low GPIO5_0, 10 ms delay */
|
||||
+};
|
||||
diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
|
||||
index c9d04f7..1a862df 100644
|
||||
--- a/drivers/reset/Kconfig
|
||||
+++ b/drivers/reset/Kconfig
|
||||
@@ -11,3 +11,14 @@ menuconfig RESET_CONTROLLER
|
||||
via GPIOs or SoC-internal reset controller modules.
|
||||
|
||||
If unsure, say no.
|
||||
+
|
||||
+if RESET_CONTROLLER
|
||||
+
|
||||
+config RESET_GPIO
|
||||
+ tristate "GPIO reset controller support"
|
||||
+ depends on GPIOLIB && OF
|
||||
+ help
|
||||
+ This driver provides support for reset lines that are controlled
|
||||
+ directly by GPIOs.
|
||||
+
|
||||
+endif
|
||||
diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile
|
||||
index 1e2d83f..b854f20 100644
|
||||
--- a/drivers/reset/Makefile
|
||||
+++ b/drivers/reset/Makefile
|
||||
@@ -1 +1,2 @@
|
||||
obj-$(CONFIG_RESET_CONTROLLER) += core.o
|
||||
+obj-$(CONFIG_RESET_GPIO) += gpio-reset.o
|
||||
diff --git a/drivers/reset/gpio-reset.c b/drivers/reset/gpio-reset.c
|
||||
new file mode 100644
|
||||
index 0000000..acc1076
|
||||
--- /dev/null
|
||||
+++ b/drivers/reset/gpio-reset.c
|
||||
@@ -0,0 +1,169 @@
|
||||
+/*
|
||||
+ * GPIO Reset Controller driver
|
||||
+ *
|
||||
+ * Copyright 2013 Philipp Zabel, Pengutronix
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation; either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ */
|
||||
+#include <linux/delay.h>
|
||||
+#include <linux/err.h>
|
||||
+#include <linux/gpio.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/of_gpio.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/reset-controller.h>
|
||||
+
|
||||
+struct gpio_reset_data {
|
||||
+ struct reset_controller_dev rcdev;
|
||||
+ unsigned int gpio;
|
||||
+ bool active_low;
|
||||
+ u32 delay_us;
|
||||
+};
|
||||
+
|
||||
+static void __gpio_reset_set(struct reset_controller_dev *rcdev, int asserted)
|
||||
+{
|
||||
+ struct gpio_reset_data *drvdata = container_of(rcdev,
|
||||
+ struct gpio_reset_data, rcdev);
|
||||
+ int value = asserted;
|
||||
+
|
||||
+ if (drvdata->active_low)
|
||||
+ value = !value;
|
||||
+
|
||||
+ gpio_set_value(drvdata->gpio, value);
|
||||
+}
|
||||
+
|
||||
+static int gpio_reset(struct reset_controller_dev *rcdev, unsigned long id)
|
||||
+{
|
||||
+ struct gpio_reset_data *drvdata = container_of(rcdev,
|
||||
+ struct gpio_reset_data, rcdev);
|
||||
+
|
||||
+ if (drvdata->delay_us < 0)
|
||||
+ return -ENOSYS;
|
||||
+
|
||||
+ __gpio_reset_set(rcdev, 1);
|
||||
+ udelay(drvdata->delay_us);
|
||||
+ __gpio_reset_set(rcdev, 0);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int gpio_reset_assert(struct reset_controller_dev *rcdev,
|
||||
+ unsigned long id)
|
||||
+{
|
||||
+ __gpio_reset_set(rcdev, 1);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int gpio_reset_deassert(struct reset_controller_dev *rcdev,
|
||||
+ unsigned long id)
|
||||
+{
|
||||
+ __gpio_reset_set(rcdev, 0);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct reset_control_ops gpio_reset_ops = {
|
||||
+ .reset = gpio_reset,
|
||||
+ .assert = gpio_reset_assert,
|
||||
+ .deassert = gpio_reset_deassert,
|
||||
+};
|
||||
+
|
||||
+static int of_gpio_reset_xlate(struct reset_controller_dev *rcdev,
|
||||
+ const struct of_phandle_args *reset_spec)
|
||||
+{
|
||||
+ if (WARN_ON(reset_spec->args_count != 0))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int gpio_reset_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct device_node *np = pdev->dev.of_node;
|
||||
+ struct gpio_reset_data *drvdata;
|
||||
+ enum of_gpio_flags flags;
|
||||
+ unsigned long gpio_flags;
|
||||
+ bool initially_in_reset;
|
||||
+ int ret;
|
||||
+
|
||||
+ drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL);
|
||||
+ if (drvdata == NULL)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ if (of_gpio_named_count(np, "reset-gpios") != 1)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ drvdata->gpio = of_get_named_gpio_flags(np, "reset-gpios", 0, &flags);
|
||||
+ if (drvdata->gpio == -EPROBE_DEFER) {
|
||||
+ return drvdata->gpio;
|
||||
+ } else if (!gpio_is_valid(drvdata->gpio)) {
|
||||
+ dev_err(&pdev->dev, "invalid reset gpio: %d\n", drvdata->gpio);
|
||||
+ return drvdata->gpio;
|
||||
+ }
|
||||
+
|
||||
+ drvdata->active_low = flags & OF_GPIO_ACTIVE_LOW;
|
||||
+
|
||||
+ ret = of_property_read_u32(np, "reset-delay-us", &drvdata->delay_us);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ initially_in_reset = of_property_read_bool(np, "initially-in-reset");
|
||||
+ if (drvdata->active_low ^ initially_in_reset)
|
||||
+ gpio_flags = GPIOF_OUT_INIT_HIGH;
|
||||
+ else
|
||||
+ gpio_flags = GPIOF_OUT_INIT_LOW;
|
||||
+
|
||||
+ ret = devm_gpio_request_one(&pdev->dev, drvdata->gpio, gpio_flags, NULL);
|
||||
+ if (ret < 0) {
|
||||
+ dev_err(&pdev->dev, "failed to request gpio %d: %d\n",
|
||||
+ drvdata->gpio, ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ drvdata->rcdev.of_node = np;
|
||||
+ drvdata->rcdev.owner = THIS_MODULE;
|
||||
+ drvdata->rcdev.nr_resets = 1;
|
||||
+ drvdata->rcdev.ops = &gpio_reset_ops;
|
||||
+ drvdata->rcdev.of_xlate = of_gpio_reset_xlate;
|
||||
+ reset_controller_register(&drvdata->rcdev);
|
||||
+
|
||||
+ platform_set_drvdata(pdev, drvdata);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int gpio_reset_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct gpio_reset_data *drvdata = platform_get_drvdata(pdev);
|
||||
+
|
||||
+ reset_controller_unregister(&drvdata->rcdev);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct of_device_id gpio_reset_dt_ids[] = {
|
||||
+ { .compatible = "gpio-reset" },
|
||||
+ { }
|
||||
+};
|
||||
+
|
||||
+static struct platform_driver gpio_reset_driver = {
|
||||
+ .probe = gpio_reset_probe,
|
||||
+ .remove = gpio_reset_remove,
|
||||
+ .driver = {
|
||||
+ .name = "gpio-reset",
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .of_match_table = of_match_ptr(gpio_reset_dt_ids),
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+module_platform_driver(gpio_reset_driver);
|
||||
+
|
||||
+MODULE_AUTHOR("Philipp Zabel <p.zabel@pengutronix.de>");
|
||||
+MODULE_DESCRIPTION("gpio reset controller");
|
||||
+MODULE_LICENSE("GPL");
|
||||
+MODULE_ALIAS("platform:gpio-reset");
|
||||
+MODULE_DEVICE_TABLE(of, gpio_reset_dt_ids);
|
||||
--
|
||||
1.8.2.1
|
||||
|
||||
From 03664ac63b20b55af9522449bbad048476d259d5 Mon Sep 17 00:00:00 2001
|
||||
From: Joel Fernandes <joelf@ti.com>
|
||||
Date: Wed, 3 Jul 2013 17:29:44 -0500
|
||||
Subject: [PATCH 2/2] sound: soc: soc-dmaengine-pcm: Add support for new
|
||||
DMAEngine request API
|
||||
|
||||
Formerly these resources were coming HWMOD on OMAP-like SoCs. With the
|
||||
impending removal of HWMOD data, drivers are being converted to use the
|
||||
"of-dma" method of requesting DMA channels which from DT and can be obtained
|
||||
using the dma_request_slave_channel API. Add support to the soc-dmaengine-pcm
|
||||
helpers so that we can fetch and open channels using this method.
|
||||
|
||||
Signed-off-by: Joel Fernandes <joelf@ti.com>
|
||||
---
|
||||
sound/core/pcm_dmaengine.c | 22 ++++++++++++++++++++++
|
||||
1 file changed, 22 insertions(+)
|
||||
|
||||
diff --git a/sound/core/pcm_dmaengine.c b/sound/core/pcm_dmaengine.c
|
||||
index aa924d9..461fe4f 100644
|
||||
--- a/sound/core/pcm_dmaengine.c
|
||||
+++ b/sound/core/pcm_dmaengine.c
|
||||
@@ -276,6 +276,16 @@ struct dma_chan *snd_dmaengine_pcm_request_channel(dma_filter_fn filter_fn,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_request_channel);
|
||||
|
||||
+struct dma_chan *snd_dmaengine_pcm_request_slave_channel(
|
||||
+ struct snd_pcm_substream *substream, char *name)
|
||||
+{
|
||||
+ struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
+ struct device *dev = snd_soc_dai_get_drvdata(rtd->cpu_dai);
|
||||
+
|
||||
+ return dma_request_slave_channel(dev, name);
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_request_slave_channel);
|
||||
+
|
||||
/**
|
||||
* snd_dmaengine_pcm_open - Open a dmaengine based PCM substream
|
||||
* @substream: PCM substream
|
||||
@@ -334,6 +344,18 @@ int snd_dmaengine_pcm_open_request_chan(struct snd_pcm_substream *substream,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_open_request_chan);
|
||||
|
||||
+int snd_dmaengine_pcm_open_request_slave_chan(struct snd_pcm_substream *substream, char *name)
|
||||
+{
|
||||
+ if(substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
|
||||
+ return snd_dmaengine_pcm_open(substream,
|
||||
+ snd_dmaengine_pcm_request_slave_channel(substream, "tx"));
|
||||
+ } else {
|
||||
+ return snd_dmaengine_pcm_open(substream,
|
||||
+ snd_dmaengine_pcm_request_slave_channel(substream, "rx"));
|
||||
+ }
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_open_request_slave_chan);
|
||||
+
|
||||
/**
|
||||
* snd_dmaengine_pcm_close - Close a dmaengine based PCM substream
|
||||
* @substream: PCM substream
|
||||
--
|
||||
1.8.4.rc3
|
||||
|
||||
From ae38683badc8c80b29ccc8aa4e059f900b603551 Mon Sep 17 00:00:00 2001
|
||||
From: Pantelis Antoniou <panto@antoniou-consulting.com>
|
||||
Date: Fri, 26 Oct 2012 15:48:00 +0300
|
||||
Subject: [PATCH 1/2] omap-hsmmc: Correct usage of of_find_node_by_name
|
||||
|
||||
of_find_node_by_name expect to have the parent node reference taken.
|
||||
---
|
||||
drivers/mmc/host/omap_hsmmc.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
|
||||
index 6ac63df..f5b660c 100644
|
||||
--- a/drivers/mmc/host/omap_hsmmc.c
|
||||
+++ b/drivers/mmc/host/omap_hsmmc.c
|
||||
@@ -1893,6 +1893,16 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
|
||||
* as we want. */
|
||||
mmc->max_segs = 1024;
|
||||
|
||||
+ /* Eventually we should get our max_segs limitation for EDMA by
|
||||
+ * querying the dmaengine API */
|
||||
+ if (pdev->dev.of_node) {
|
||||
+ struct device_node *parent = of_node_get(pdev->dev.of_node->parent);
|
||||
+ struct device_node *node;
|
||||
+ node = of_find_node_by_name(parent, "edma");
|
||||
+ if (node)
|
||||
+ mmc->max_segs = 16;
|
||||
+ }
|
||||
+
|
||||
mmc->max_blk_size = 512; /* Block Length at max can be 1024 */
|
||||
mmc->max_blk_count = 0xFFFF; /* No. of Blocks is 16 bits */
|
||||
mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count;
|
||||
--
|
||||
1.8.2.1
|
||||
|
||||
From 5d93a65cfc4ff6aaf78ab49f71daa2a644ea2ace Mon Sep 17 00:00:00 2001
|
||||
From: Pantelis Antoniou <panto@antoniou-consulting.com>
|
||||
Date: Fri, 30 Nov 2012 12:18:16 +0200
|
||||
Subject: [PATCH 2/2] omap_hsmmc: Add reset gpio
|
||||
|
||||
Add a gpio property for controlling reset of the mmc device.
|
||||
eMMC on the beaglebone black requires it.
|
||||
|
||||
Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
|
||||
---
|
||||
drivers/mmc/host/omap_hsmmc.c | 40 +++++++++++++++++++++++++++++++++-
|
||||
include/linux/platform_data/mmc-omap.h | 3 +++
|
||||
2 files changed, 42 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
|
||||
index f5b660c..1bdb90f 100644
|
||||
--- a/drivers/mmc/host/omap_hsmmc.c
|
||||
+++ b/drivers/mmc/host/omap_hsmmc.c
|
||||
@@ -41,6 +41,8 @@
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/platform_data/mmc-omap.h>
|
||||
+#include <linux/pinctrl/consumer.h>
|
||||
+#include <linux/err.h>
|
||||
|
||||
/* OMAP HSMMC Host Controller Registers */
|
||||
#define OMAP_HSMMC_SYSSTATUS 0x0014
|
||||
@@ -392,6 +394,7 @@ static inline int omap_hsmmc_have_reg(void)
|
||||
static int omap_hsmmc_gpio_init(struct omap_mmc_platform_data *pdata)
|
||||
{
|
||||
int ret;
|
||||
+ unsigned long flags;
|
||||
|
||||
if (gpio_is_valid(pdata->slots[0].switch_pin)) {
|
||||
if (pdata->slots[0].cover)
|
||||
@@ -421,6 +424,24 @@ static int omap_hsmmc_gpio_init(struct omap_mmc_platform_data *pdata)
|
||||
} else
|
||||
pdata->slots[0].gpio_wp = -EINVAL;
|
||||
|
||||
+ if (gpio_is_valid(pdata->slots[0].gpio_reset)) {
|
||||
+ flags = pdata->slots[0].gpio_reset_active_low ?
|
||||
+ GPIOF_OUT_INIT_LOW : GPIOF_OUT_INIT_HIGH;
|
||||
+ ret = gpio_request_one(pdata->slots[0].gpio_reset, flags,
|
||||
+ "mmc_reset");
|
||||
+ if (ret)
|
||||
+ goto err_free_wp;
|
||||
+
|
||||
+ /* hold reset */
|
||||
+ udelay(pdata->slots[0].gpio_reset_hold_us);
|
||||
+
|
||||
+ gpio_set_value(pdata->slots[0].gpio_reset,
|
||||
+ !pdata->slots[0].gpio_reset_active_low);
|
||||
+
|
||||
+ } else
|
||||
+ pdata->slots[0].gpio_reset = -EINVAL;
|
||||
+
|
||||
+
|
||||
return 0;
|
||||
|
||||
err_free_wp:
|
||||
@@ -434,6 +455,8 @@ err_free_sp:
|
||||
|
||||
static void omap_hsmmc_gpio_free(struct omap_mmc_platform_data *pdata)
|
||||
{
|
||||
+ if (gpio_is_valid(pdata->slots[0].gpio_reset))
|
||||
+ gpio_free(pdata->slots[0].gpio_reset);
|
||||
if (gpio_is_valid(pdata->slots[0].gpio_wp))
|
||||
gpio_free(pdata->slots[0].gpio_wp);
|
||||
if (gpio_is_valid(pdata->slots[0].switch_pin))
|
||||
@@ -788,7 +811,7 @@ omap_hsmmc_start_command(struct omap_hsmmc_host *host, struct mmc_command *cmd,
|
||||
* ac, bc, adtc, bcr. Only commands ending an open ended transfer need
|
||||
* a val of 0x3, rest 0x0.
|
||||
*/
|
||||
- if (cmd == host->mrq->stop)
|
||||
+ if (host->mrq && cmd == host->mrq->stop)
|
||||
cmdtype = 0x3;
|
||||
|
||||
cmdreg = (cmd->opcode << 24) | (resptype << 16) | (cmdtype << 22);
|
||||
@@ -830,6 +853,8 @@ static void omap_hsmmc_request_done(struct omap_hsmmc_host *host, struct mmc_req
|
||||
int dma_ch;
|
||||
unsigned long flags;
|
||||
|
||||
+ BUG_ON(mrq == NULL);
|
||||
+
|
||||
spin_lock_irqsave(&host->irq_lock, flags);
|
||||
host->req_in_progress = 0;
|
||||
dma_ch = host->dma_ch;
|
||||
@@ -1720,6 +1745,7 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
|
||||
struct device_node *np = dev->of_node;
|
||||
u32 bus_width, max_freq;
|
||||
int cd_gpio, wp_gpio;
|
||||
+ enum of_gpio_flags reset_flags;
|
||||
|
||||
cd_gpio = of_get_named_gpio(np, "cd-gpios", 0);
|
||||
wp_gpio = of_get_named_gpio(np, "wp-gpios", 0);
|
||||
@@ -1737,6 +1763,14 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
|
||||
pdata->nr_slots = 1;
|
||||
pdata->slots[0].switch_pin = cd_gpio;
|
||||
pdata->slots[0].gpio_wp = wp_gpio;
|
||||
+ reset_flags = 0;
|
||||
+ pdata->slots[0].gpio_reset = of_get_named_gpio_flags(np,
|
||||
+ "reset-gpios", 0, &reset_flags);
|
||||
+ pdata->slots[0].gpio_reset_active_low =
|
||||
+ (reset_flags & OF_GPIO_ACTIVE_LOW) != 0;
|
||||
+ pdata->slots[0].gpio_reset_hold_us = 100; /* default */
|
||||
+ of_property_read_u32(np, "reset-gpio-hold-us",
|
||||
+ &pdata->slots[0].gpio_reset_hold_us);
|
||||
|
||||
if (of_find_property(np, "ti,non-removable", NULL)) {
|
||||
pdata->slots[0].nonremovable = true;
|
||||
@@ -1802,6 +1836,10 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
+ pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
|
||||
+ if (IS_ERR(pinctrl))
|
||||
+ dev_warn(&pdev->dev, "unable to select pin group\n");
|
||||
+
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (res == NULL || irq < 0)
|
||||
diff --git a/include/linux/platform_data/mmc-omap.h b/include/linux/platform_data/mmc-omap.h
|
||||
index 2bf1b30..d548994 100644
|
||||
--- a/include/linux/platform_data/mmc-omap.h
|
||||
+++ b/include/linux/platform_data/mmc-omap.h
|
||||
@@ -115,6 +115,9 @@ struct omap_mmc_platform_data {
|
||||
|
||||
int switch_pin; /* gpio (card detect) */
|
||||
int gpio_wp; /* gpio (write protect) */
|
||||
+ int gpio_reset; /* gpio (reset) */
|
||||
+ int gpio_reset_active_low; /* 1 if reset is active low */
|
||||
+ u32 gpio_reset_hold_us; /* time to hold in us */
|
||||
|
||||
int (*set_bus_mode)(struct device *dev, int slot, int bus_mode);
|
||||
int (*set_power)(struct device *dev, int slot,
|
||||
--
|
||||
1.8.2.1
|
||||
|
||||
From b45e4df71f07f2178db133db540e3f15e0b4ec05 Mon Sep 17 00:00:00 2001
|
||||
From: Pantelis Antoniou <panto@antoniou-consulting.com>
|
||||
Date: Sat, 15 Sep 2012 12:00:41 +0300
|
||||
Subject: [PATCH] pinctrl: pinctrl-single must be initialized early.
|
||||
|
||||
When using pinctrl-single to handle i2c initialization, it has
|
||||
to be done early. Whether this is the best way to do so, is an
|
||||
exercise left to the reader.
|
||||
---
|
||||
drivers/pinctrl/pinctrl-single.c | 12 +++++++++++-
|
||||
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
|
||||
index a82ace4..aeef35d 100644
|
||||
--- a/drivers/pinctrl/pinctrl-single.c
|
||||
+++ b/drivers/pinctrl/pinctrl-single.c
|
||||
@@ -1673,7 +1673,17 @@ static struct platform_driver pcs_driver = {
|
||||
#endif
|
||||
};
|
||||
|
||||
-module_platform_driver(pcs_driver);
|
||||
+static int __init pcs_init(void)
|
||||
+{
|
||||
+ return platform_driver_register(&pcs_driver);
|
||||
+}
|
||||
+postcore_initcall(pcs_init);
|
||||
+
|
||||
+static void __exit pcs_exit(void)
|
||||
+{
|
||||
+ platform_driver_unregister(&pcs_driver);
|
||||
+}
|
||||
+module_exit(pcs_exit);
|
||||
|
||||
MODULE_AUTHOR("Tony Lindgren <tony@atomide.com>");
|
||||
MODULE_DESCRIPTION("One-register-per-pin type device tree based pinctrl driver");
|
||||
--
|
||||
1.8.2.1
|
||||
|
||||
From e5e7abd2de7d8d4c74b5a1ccc6d47988250bd17d Mon Sep 17 00:00:00 2001
|
||||
From: Pantelis Antoniou <panto@antoniou-consulting.com>
|
||||
Date: Fri, 28 Jun 2013 18:39:55 +0300
|
||||
Subject: [PATCH 1/4] dts: beaglebone: Add I2C definitions for EEPROMs & capes
|
||||
|
||||
Add the I2C definitions for the EEPROM devices on the baseboard
|
||||
and on the possibly connected capes.
|
||||
|
||||
Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
|
||||
---
|
||||
arch/arm/boot/dts/am335x-bone-common.dtsi | 39 +++++++++++++++++++++++++++++++
|
||||
1 file changed, 39 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
|
||||
index e3f27ec..2d12775 100644
|
||||
--- a/arch/arm/boot/dts/am335x-bone-common.dtsi
|
||||
+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
|
||||
@@ -84,6 +84,13 @@
|
||||
>;
|
||||
};
|
||||
|
||||
+ i2c2_pins: pinmux_i2c2_pins {
|
||||
+ pinctrl-single,pins = <
|
||||
+ 0x178 0x73 /* uart1_ctsn.i2c2_sda, SLEWCTRL_SLOW | INPUT_PULLUP | MODE3 */
|
||||
+ 0x17c 0x73 /* uart1_rtsn.i2c2_scl, SLEWCTRL_SLOW | INPUT_PULLUP | MODE3 */
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
uart0_pins: pinmux_uart0_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */
|
||||
@@ -220,6 +227,38 @@
|
||||
reg = <0x24>;
|
||||
};
|
||||
|
||||
+ baseboard_eeprom: baseboard_eeprom@50 {
|
||||
+ compatible = "at,24c256";
|
||||
+ reg = <0x50>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c2 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2c2_pins>;
|
||||
+
|
||||
+ status = "okay";
|
||||
+ clock-frequency = <100000>;
|
||||
+
|
||||
+ cape_eeprom0: cape_eeprom0@54 {
|
||||
+ compatible = "at,24c256";
|
||||
+ reg = <0x54>;
|
||||
+ };
|
||||
+
|
||||
+ cape_eeprom1: cape_eeprom1@55 {
|
||||
+ compatible = "at,24c256";
|
||||
+ reg = <0x55>;
|
||||
+ };
|
||||
+
|
||||
+ cape_eeprom2: cape_eeprom2@56 {
|
||||
+ compatible = "at,24c256";
|
||||
+ reg = <0x56>;
|
||||
+ };
|
||||
+
|
||||
+ cape_eeprom3: cape_eeprom3@57 {
|
||||
+ compatible = "at,24c256";
|
||||
+ reg = <0x57>;
|
||||
+ };
|
||||
};
|
||||
|
||||
/include/ "tps65217.dtsi"
|
||||
--
|
||||
1.8.4.rc3
|
|
@ -1,36 +1,55 @@
|
|||
Add initial support for cm-fx6 module.
|
||||
commit 682d055e6ac5c3855f51649de6d68e9bb29c26a6
|
||||
Author: Valentin Raevsky <valentin@compulab.co.il>
|
||||
Date: Tue Oct 29 14:11:43 2013 +0200
|
||||
|
||||
cm-fx6 is a module based on mx6q SoC with the following features:
|
||||
- Up to 4GB of DDR3
|
||||
- 1 LCD/DVI output port
|
||||
- 1 HDMI output port
|
||||
- 2 LVDS LCD ports
|
||||
- Gigabit Ethernet
|
||||
- Analog Audio
|
||||
- CAN
|
||||
- SATA
|
||||
- NAND
|
||||
- PCIE
|
||||
|
||||
This patch allows to boot up the module, configures the serial console,
|
||||
the Ethernet adapter and the hearbeat led.
|
||||
|
||||
Signed-off-by: Valentin Raevsky <valentin@xxxxxxxxxxxxxx>
|
||||
Acked-by: Igor Grinberg <grinberg@xxxxxxxxxxxxxx>
|
||||
---
|
||||
arch/arm/boot/dts/imx6q-cm-fx6.dts | 51 ++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 51 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/imx6q-cm-fx6.dts
|
||||
ARM: dts: Add initial support for cm-fx6.
|
||||
|
||||
Add initial support for cm-fx6 module.
|
||||
|
||||
cm-fx6 is a module based on mx6q SoC with the following features:
|
||||
- Up to 4GB of DDR3
|
||||
- 1 LCD/DVI output port
|
||||
- 1 HDMI output port
|
||||
- 2 LVDS LCD ports
|
||||
- Gigabit Ethernet
|
||||
- Analog Audio
|
||||
- CAN
|
||||
- SATA
|
||||
- NAND
|
||||
- PCIE
|
||||
|
||||
This patch allows to boot up the module, configures the serial console,
|
||||
the Ethernet adapter and the heartbeat led.
|
||||
|
||||
cm-fx6 is embedded inside the Utilite computer.
|
||||
|
||||
Signed-off-by: Valentin Raevsky <valentin@compulab.co.il>
|
||||
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
|
||||
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
|
||||
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index 8081479..5672e91 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -162,6 +162,7 @@ dtb-$(CONFIG_ARCH_MXC) += \
|
||||
imx6dl-sabresd.dtb \
|
||||
imx6dl-wandboard.dtb \
|
||||
imx6q-arm2.dtb \
|
||||
+ imx6q-cm-fx6.dtb \
|
||||
imx6q-cubox-i.dtb \
|
||||
imx6q-phytec-pbab01.dtb \
|
||||
imx6q-sabreauto.dtb \
|
||||
diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts
|
||||
new file mode 100644
|
||||
index 0000000..1080215
|
||||
index 0000000..99b46f8
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts
|
||||
@@ -0,0 +1,51 @@
|
||||
@@ -0,0 +1,107 @@
|
||||
+/*
|
||||
+ * Copyright 2013 CompuLab Ltd.
|
||||
+ *
|
||||
+ * Author: Valentin Raevsky <valentin@compulab.co.il>
|
||||
+ *
|
||||
+ * The code contained herein is licensed under the GNU General Public
|
||||
+ * License. You may obtain a copy of the GNU General Public License
|
||||
+ * Version 2 or later at the following locations:
|
||||
|
@ -53,7 +72,7 @@ index 0000000..1080215
|
|||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ debug-led {
|
||||
+ heartbeat-led {
|
||||
+ label = "Heartbeat";
|
||||
+ gpios = <&gpio2 31 0>;
|
||||
+ linux,default-trigger = "heartbeat";
|
||||
|
@ -61,35 +80,79 @@ index 0000000..1080215
|
|||
+ };
|
||||
+};
|
||||
+
|
||||
+&gpmi {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_gpmi_nand_1>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&fec {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_enet_1>;
|
||||
+ pinctrl-0 = <&pinctrl_enet>;
|
||||
+ phy-mode = "rgmii";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart4 {
|
||||
+&gpmi {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_uart4_1>;
|
||||
+ pinctrl-0 = <&pinctrl_gpmi_nand>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -137,6 +137,7 @@
|
||||
imx6dl-sabresd.dtb \
|
||||
imx6dl-wandboard.dtb \
|
||||
imx6q-arm2.dtb \
|
||||
+ imx6q-cm-fx6.dtb \
|
||||
imx6q-phytec-pbab01.dtb \
|
||||
imx6q-sabreauto.dtb \
|
||||
imx6q-sabrelite.dtb \
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
+
|
||||
+&iomuxc {
|
||||
+ imx6q-cm-fx6 {
|
||||
+ pinctrl_enet: enetgrp {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0
|
||||
+ MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b0b0
|
||||
+ MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b0b0
|
||||
+ MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0
|
||||
+ MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0
|
||||
+ MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0
|
||||
+ MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x1b0b0
|
||||
+ MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b0b0
|
||||
+ MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b0b0
|
||||
+ MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b0b0
|
||||
+ MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b0b0
|
||||
+ MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b0b0
|
||||
+ MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0
|
||||
+ MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0
|
||||
+ MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0
|
||||
+ MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0x4001b0a8
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_gpmi_nand: gpminandgrp {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_NANDF_CLE__NAND_CLE 0xb0b1
|
||||
+ MX6QDL_PAD_NANDF_ALE__NAND_ALE 0xb0b1
|
||||
+ MX6QDL_PAD_NANDF_WP_B__NAND_WP_B 0xb0b1
|
||||
+ MX6QDL_PAD_NANDF_RB0__NAND_READY_B 0xb000
|
||||
+ MX6QDL_PAD_NANDF_CS0__NAND_CE0_B 0xb0b1
|
||||
+ MX6QDL_PAD_NANDF_CS1__NAND_CE1_B 0xb0b1
|
||||
+ MX6QDL_PAD_SD4_CMD__NAND_RE_B 0xb0b1
|
||||
+ MX6QDL_PAD_SD4_CLK__NAND_WE_B 0xb0b1
|
||||
+ MX6QDL_PAD_NANDF_D0__NAND_DATA00 0xb0b1
|
||||
+ MX6QDL_PAD_NANDF_D1__NAND_DATA01 0xb0b1
|
||||
+ MX6QDL_PAD_NANDF_D2__NAND_DATA02 0xb0b1
|
||||
+ MX6QDL_PAD_NANDF_D3__NAND_DATA03 0xb0b1
|
||||
+ MX6QDL_PAD_NANDF_D4__NAND_DATA04 0xb0b1
|
||||
+ MX6QDL_PAD_NANDF_D5__NAND_DATA05 0xb0b1
|
||||
+ MX6QDL_PAD_NANDF_D6__NAND_DATA06 0xb0b1
|
||||
+ MX6QDL_PAD_NANDF_D7__NAND_DATA07 0xb0b1
|
||||
+ MX6QDL_PAD_SD4_DAT0__NAND_DQS 0x00b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_uart4: uart4grp {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_KEY_COL0__UART4_TX_DATA 0x1b0b1
|
||||
+ MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA 0x1b0b1
|
||||
+ >;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart4 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_uart4>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sata {
|
||||
+ status = "okay";
|
||||
+};
|
||||
|
|
|
@ -0,0 +1,99 @@
|
|||
From fb4a8356eb67514b10618d1e9e4059ced14c05f2 Mon Sep 17 00:00:00 2001
|
||||
From: Marc Dietrich <marvin24@gmx.de>
|
||||
Date: Sat, 21 Dec 2013 21:38:13 +0100
|
||||
Subject: [PATCH] ARM: tegra: paz00: Add LVDS support to device tree
|
||||
|
||||
Add backlight and panel nodes for the PAZ00 TFT LCD panel.
|
||||
|
||||
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
|
||||
---
|
||||
arch/arm/boot/dts/tegra20-paz00.dts | 46 ++++++++++++++++++++++++++++++++++-
|
||||
1 files changed, 45 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/tegra20-paz00.dts b/arch/arm/boot/dts/tegra20-paz00.dts
|
||||
index c7cd8e6..9a39a80 100644
|
||||
--- a/arch/arm/boot/dts/tegra20-paz00.dts
|
||||
+++ b/arch/arm/boot/dts/tegra20-paz00.dts
|
||||
@@ -17,6 +17,14 @@
|
||||
};
|
||||
|
||||
host1x@50000000 {
|
||||
+ dc@54200000 {
|
||||
+ rgb {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ nvidia,panel = <&panel>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
hdmi@54280000 {
|
||||
status = "okay";
|
||||
|
||||
@@ -257,7 +265,11 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
- i2c@7000c000 {
|
||||
+ pwm: pwm@7000a000 {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ lvds_ddc: i2c@7000c000 {
|
||||
status = "okay";
|
||||
clock-frequency = <400000>;
|
||||
|
||||
@@ -475,6 +487,18 @@
|
||||
non-removable;
|
||||
};
|
||||
|
||||
+ backlight: backlight {
|
||||
+ compatible = "pwm-backlight";
|
||||
+
|
||||
+ enable-gpios = <&gpio TEGRA_GPIO(U, 4) GPIO_ACTIVE_HIGH>;
|
||||
+ pwms = <&pwm 0 5000000>;
|
||||
+
|
||||
+ brightness-levels = <0 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240 255>;
|
||||
+ default-brightness-level = <10>;
|
||||
+
|
||||
+ backlight-boot-off;
|
||||
+ };
|
||||
+
|
||||
clocks {
|
||||
compatible = "simple-bus";
|
||||
#address-cells = <1>;
|
||||
@@ -509,6 +533,16 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ panel: panel {
|
||||
+ compatible = "samsung,ltn101nt05", "simple-panel";
|
||||
+
|
||||
+ ddc-i2c-bus = <&lvds_ddc>;
|
||||
+ power-supply = <&vdd_pnl_reg>;
|
||||
+ enable-gpios = <&gpio TEGRA_GPIO(M, 6) GPIO_ACTIVE_HIGH>;
|
||||
+
|
||||
+ backlight = <&backlight>;
|
||||
+ };
|
||||
+
|
||||
regulators {
|
||||
compatible = "simple-bus";
|
||||
#address-cells = <1>;
|
||||
@@ -522,6 +556,16 @@
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
+
|
||||
+ vdd_pnl_reg: regulator@1 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ reg = <1>;
|
||||
+ regulator-name = "+3VS,vdd_pnl";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ gpio = <&gpio TEGRA_GPIO(A, 4) GPIO_ACTIVE_HIGH>;
|
||||
+ enable-active-high;
|
||||
+ };
|
||||
};
|
||||
|
||||
sound {
|
||||
--
|
||||
1.7.1
|
|
@ -1,36 +0,0 @@
|
|||
Bugzilla: 1066064
|
||||
Upstream-status: 3.14-rc1
|
||||
|
||||
From c2412d91c68426e22add16550f97ae5cd988a159 Mon Sep 17 00:00:00 2001
|
||||
From: Gao feng <gaofeng@cn.fujitsu.com>
|
||||
Date: Fri, 1 Nov 2013 19:34:45 +0800
|
||||
Subject: [PATCH] audit: don't generate loginuid log when audit disabled
|
||||
|
||||
If audit is disabled, we shouldn't generate loginuid audit
|
||||
log.
|
||||
|
||||
Acked-by: Eric Paris <eparis@redhat.com>
|
||||
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
|
||||
Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
|
||||
Signed-off-by: Eric Paris <eparis@redhat.com>
|
||||
---
|
||||
kernel/auditsc.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
|
||||
index df1e685..9ab02fa 100644
|
||||
--- a/kernel/auditsc.c
|
||||
+++ b/kernel/auditsc.c
|
||||
@@ -1971,6 +1971,9 @@ static void audit_log_set_loginuid(kuid_t koldloginuid, kuid_t kloginuid,
|
||||
struct audit_buffer *ab;
|
||||
uid_t uid, ologinuid, nloginuid;
|
||||
|
||||
+ if (!audit_enabled)
|
||||
+ return;
|
||||
+
|
||||
uid = from_kuid(&init_user_ns, task_uid(current));
|
||||
ologinuid = from_kuid(&init_user_ns, koldloginuid);
|
||||
nloginuid = from_kuid(&init_user_ns, kloginuid),
|
||||
--
|
||||
1.8.5.3
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
Bugzilla: 1102715
|
||||
Upstream-status: Submitted for 3.15 and CC'd to stable
|
||||
Delivered-To: jwboyer@gmail.com
|
||||
Received: by 10.76.6.212 with SMTP id d20csp285523oaa;
|
||||
Wed, 28 May 2014 20:10:58 -0700 (PDT)
|
||||
X-Received: by 10.66.250.166 with SMTP id zd6mr4872927pac.7.1401333057574;
|
||||
Wed, 28 May 2014 20:10:57 -0700 (PDT)
|
||||
Return-Path: <stable-owner@vger.kernel.org>
|
||||
Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67])
|
||||
by mx.google.com with ESMTP id j1si26042371pbw.214.2014.05.28.20.10.31
|
||||
for <multiple recipients>;
|
||||
Wed, 28 May 2014 20:10:57 -0700 (PDT)
|
||||
Received-SPF: none (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67;
|
||||
Authentication-Results: mx.google.com;
|
||||
spf=neutral (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) smtp.mail=stable-owner@vger.kernel.org
|
||||
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
|
||||
id S1755059AbaE2DKa (ORCPT <rfc822;takashi.bg@gmail.com>
|
||||
+ 73 others); Wed, 28 May 2014 23:10:30 -0400
|
||||
Received: from mx1.redhat.com ([209.132.183.28]:34907 "EHLO mx1.redhat.com"
|
||||
rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
|
||||
id S1753861AbaE2DK3 (ORCPT <rfc822;stable@vger.kernel.org>);
|
||||
Wed, 28 May 2014 23:10:29 -0400
|
||||
Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26])
|
||||
by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4T3AQfK017267
|
||||
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
|
||||
Wed, 28 May 2014 23:10:26 -0400
|
||||
Received: from paris.rdu.redhat.com (paris.rdu.redhat.com [10.13.136.28])
|
||||
by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s4T3APd7019240;
|
||||
Wed, 28 May 2014 23:10:26 -0400
|
||||
From: Eric Paris <eparis@redhat.com>
|
||||
To: torvalds@linux-foundation.org
|
||||
Cc: linux-audit@redhat.com, linux-kernel@vger.kernel.org,
|
||||
Andy Lutomirski <luto@amacapital.net>, stable@vger.kernel.org,
|
||||
Eric Paris <eparis@redhat.com>
|
||||
Subject: [PATCH 1/2] auditsc: audit_krule mask accesses need bounds checking
|
||||
Date: Wed, 28 May 2014 23:09:58 -0400
|
||||
Message-Id: <1401332999-15167-1-git-send-email-eparis@redhat.com>
|
||||
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26
|
||||
Sender: stable-owner@vger.kernel.org
|
||||
Precedence: bulk
|
||||
List-ID: <stable.vger.kernel.org>
|
||||
X-Mailing-List: stable@vger.kernel.org
|
||||
|
||||
From: Andy Lutomirski <luto@amacapital.net>
|
||||
|
||||
Fixes an easy DoS and possible information disclosure.
|
||||
|
||||
This does nothing about the broken state of x32 auditing.
|
||||
|
||||
eparis: If the admin has enabled auditd and has specifically loaded audit
|
||||
rules. This bug has been around since before git. Wow...
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
|
||||
Signed-off-by: Eric Paris <eparis@redhat.com>
|
||||
---
|
||||
kernel/auditsc.c | 27 ++++++++++++++++++---------
|
||||
1 file changed, 18 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
|
||||
index 254ce20..842f58a 100644
|
||||
--- a/kernel/auditsc.c
|
||||
+++ b/kernel/auditsc.c
|
||||
@@ -728,6 +728,22 @@ static enum audit_state audit_filter_task(struct task_struct *tsk, char **key)
|
||||
return AUDIT_BUILD_CONTEXT;
|
||||
}
|
||||
|
||||
+static int audit_in_mask(const struct audit_krule *rule, unsigned long val)
|
||||
+{
|
||||
+ int word, bit;
|
||||
+
|
||||
+ if (val > 0xffffffff)
|
||||
+ return false;
|
||||
+
|
||||
+ word = AUDIT_WORD(val);
|
||||
+ if (word >= AUDIT_BITMASK_SIZE)
|
||||
+ return false;
|
||||
+
|
||||
+ bit = AUDIT_BIT(val);
|
||||
+
|
||||
+ return rule->mask[word] & bit;
|
||||
+}
|
||||
+
|
||||
/* At syscall entry and exit time, this filter is called if the
|
||||
* audit_state is not low enough that auditing cannot take place, but is
|
||||
* also not high enough that we already know we have to write an audit
|
||||
@@ -745,11 +761,8 @@ static enum audit_state audit_filter_syscall(struct task_struct *tsk,
|
||||
|
||||
rcu_read_lock();
|
||||
if (!list_empty(list)) {
|
||||
- int word = AUDIT_WORD(ctx->major);
|
||||
- int bit = AUDIT_BIT(ctx->major);
|
||||
-
|
||||
list_for_each_entry_rcu(e, list, list) {
|
||||
- if ((e->rule.mask[word] & bit) == bit &&
|
||||
+ if (audit_in_mask(&e->rule, ctx->major) &&
|
||||
audit_filter_rules(tsk, &e->rule, ctx, NULL,
|
||||
&state, false)) {
|
||||
rcu_read_unlock();
|
||||
@@ -769,20 +782,16 @@ static enum audit_state audit_filter_syscall(struct task_struct *tsk,
|
||||
static int audit_filter_inode_name(struct task_struct *tsk,
|
||||
struct audit_names *n,
|
||||
struct audit_context *ctx) {
|
||||
- int word, bit;
|
||||
int h = audit_hash_ino((u32)n->ino);
|
||||
struct list_head *list = &audit_inode_hash[h];
|
||||
struct audit_entry *e;
|
||||
enum audit_state state;
|
||||
|
||||
- word = AUDIT_WORD(ctx->major);
|
||||
- bit = AUDIT_BIT(ctx->major);
|
||||
-
|
||||
if (list_empty(list))
|
||||
return 0;
|
||||
|
||||
list_for_each_entry_rcu(e, list, list) {
|
||||
- if ((e->rule.mask[word] & bit) == bit &&
|
||||
+ if (audit_in_mask(&e->rule, ctx->major) &&
|
||||
audit_filter_rules(tsk, &e->rule, ctx, n, &state, false)) {
|
||||
ctx->current_state = state;
|
||||
return 1;
|
||||
--
|
||||
1.9.0
|
||||
|
||||
--
|
||||
To unsubscribe from this list: send the line "unsubscribe stable" in
|
||||
the body of a message to majordomo@vger.kernel.org
|
||||
More majordomo info at http://vger.kernel.org/majordomo-info.html
|
|
@ -1,21 +0,0 @@
|
|||
@@ -, +, @@
|
||||
---
|
||||
drivers/net/wireless/iwlwifi/mvm/coex.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
--- a/drivers/net/wireless/iwlwifi/mvm/bt-coex.c
|
||||
+++ a/drivers/net/wireless/iwlwifi/mvm/bt-coex.c
|
||||
@@ -1119,8 +1119,11 @@ void iwl_mvm_bt_rssi_event(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
|
||||
lockdep_assert_held(&mvm->mutex);
|
||||
|
||||
- /* Rssi update while not associated ?! */
|
||||
- if (WARN_ON_ONCE(mvmvif->ap_sta_id == IWL_MVM_STATION_COUNT))
|
||||
+ /*
|
||||
+ * Rssi update while not associated - can happen since the statistics
|
||||
+ * are handled asynchronously
|
||||
+ */
|
||||
+ if (mvmvif->ap_sta_id == IWL_MVM_STATION_COUNT)
|
||||
return;
|
||||
|
||||
/* No BT - reports should be disabled */
|
||||
--
|
|
@ -1,180 +0,0 @@
|
|||
Bugzilla: 1045775
|
||||
Upstream-status: queued for 3.14-rc3 and stable 3.12+
|
||||
|
||||
Path: news.gmane.org!not-for-mail
|
||||
From: Michal Hocko <mhocko@suse.cz>
|
||||
Newsgroups: gmane.linux.kernel,gmane.linux.kernel.cgroups
|
||||
Subject: Re: [PATCH] cgroup: protect modifications to cgroup_idr with
|
||||
cgroup_mutex
|
||||
Date: Wed, 12 Feb 2014 10:12:38 +0100
|
||||
Lines: 127
|
||||
Approved: news@gmane.org
|
||||
Message-ID: <20140212091238.GC28085@dhcp22.suse.cz>
|
||||
References: <52F9D9DA.7040108@huawei.com>
|
||||
<20140211102032.GA11946@dhcp22.suse.cz>
|
||||
NNTP-Posting-Host: plane.gmane.org
|
||||
Mime-Version: 1.0
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
X-Trace: ger.gmane.org 1392196376 529 80.91.229.3 (12 Feb 2014 09:12:56 GMT)
|
||||
X-Complaints-To: usenet@ger.gmane.org
|
||||
NNTP-Posting-Date: Wed, 12 Feb 2014 09:12:56 +0000 (UTC)
|
||||
Cc: Tejun Heo <tj@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
|
||||
Cgroups <cgroups@vger.kernel.org>
|
||||
To: Li Zefan <lizefan@huawei.com>
|
||||
Original-X-From: linux-kernel-owner@vger.kernel.org Wed Feb 12 10:13:03 2014
|
||||
Return-path: <linux-kernel-owner@vger.kernel.org>
|
||||
Envelope-to: glk-linux-kernel-3@plane.gmane.org
|
||||
Original-Received: from vger.kernel.org ([209.132.180.67])
|
||||
by plane.gmane.org with esmtp (Exim 4.69)
|
||||
(envelope-from <linux-kernel-owner@vger.kernel.org>)
|
||||
id 1WDVsM-0003po-4o
|
||||
for glk-linux-kernel-3@plane.gmane.org; Wed, 12 Feb 2014 10:13:02 +0100
|
||||
Original-Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
|
||||
id S1751758AbaBLJMs (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
|
||||
Wed, 12 Feb 2014 04:12:48 -0500
|
||||
Original-Received: from cantor2.suse.de ([195.135.220.15]:34766 "EHLO mx2.suse.de"
|
||||
rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
|
||||
id S1750890AbaBLJMk (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
|
||||
Wed, 12 Feb 2014 04:12:40 -0500
|
||||
Original-Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254])
|
||||
by mx2.suse.de (Postfix) with ESMTP id 216F1ABB2;
|
||||
Wed, 12 Feb 2014 09:12:39 +0000 (UTC)
|
||||
Content-Disposition: inline
|
||||
In-Reply-To: <20140211102032.GA11946@dhcp22.suse.cz>
|
||||
User-Agent: Mutt/1.5.21 (2010-09-15)
|
||||
Original-Sender: linux-kernel-owner@vger.kernel.org
|
||||
Precedence: bulk
|
||||
List-ID: <linux-kernel.vger.kernel.org>
|
||||
X-Mailing-List: linux-kernel@vger.kernel.org
|
||||
Xref: news.gmane.org gmane.linux.kernel:1646465 gmane.linux.kernel.cgroups:10357
|
||||
Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1646465>
|
||||
|
||||
Li has pointed out that my previous backport was not correct because
|
||||
err_unlock label releases a reference to supperblock which was not taken
|
||||
before idr_alloc. I've also removed cgroup_mutex from free_css_id as per
|
||||
Li.
|
||||
Fixed in this version.
|
||||
|
||||
---
|
||||
Date: Tue, 11 Feb 2014 16:05:46 +0800
|
||||
From: Li Zefan <lizefan@huawei.com>
|
||||
Subject: [PATCH - for 3.12] cgroup: protect modifications to cgroup_idr with cgroup_mutex
|
||||
|
||||
Setup cgroupfs like this:
|
||||
# mount -t cgroup -o cpuacct xxx /cgroup
|
||||
# mkdir /cgroup/sub1
|
||||
# mkdir /cgroup/sub2
|
||||
|
||||
Then run these two commands:
|
||||
# for ((; ;)) { mkdir /cgroup/sub1/tmp && rmdir /mnt/sub1/tmp; } &
|
||||
# for ((; ;)) { mkdir /cgroup/sub2/tmp && rmdir /mnt/sub2/tmp; } &
|
||||
|
||||
After seconds you may see this warning:
|
||||
|
||||
------------[ cut here ]------------
|
||||
WARNING: CPU: 1 PID: 25243 at lib/idr.c:527 sub_remove+0x87/0x1b0()
|
||||
idr_remove called for id=6 which is not allocated.
|
||||
...
|
||||
Call Trace:
|
||||
[<ffffffff8156063c>] dump_stack+0x7a/0x96
|
||||
[<ffffffff810591ac>] warn_slowpath_common+0x8c/0xc0
|
||||
[<ffffffff81059296>] warn_slowpath_fmt+0x46/0x50
|
||||
[<ffffffff81300aa7>] sub_remove+0x87/0x1b0
|
||||
[<ffffffff810f3f02>] ? css_killed_work_fn+0x32/0x1b0
|
||||
[<ffffffff81300bf5>] idr_remove+0x25/0xd0
|
||||
[<ffffffff810f2bab>] cgroup_destroy_css_killed+0x5b/0xc0
|
||||
[<ffffffff810f4000>] css_killed_work_fn+0x130/0x1b0
|
||||
[<ffffffff8107cdbc>] process_one_work+0x26c/0x550
|
||||
[<ffffffff8107eefe>] worker_thread+0x12e/0x3b0
|
||||
[<ffffffff81085f96>] kthread+0xe6/0xf0
|
||||
[<ffffffff81570bac>] ret_from_fork+0x7c/0xb0
|
||||
---[ end trace 2d1577ec10cf80d0 ]---
|
||||
|
||||
It's because allocating/removing cgroup ID is not properly synchronized.
|
||||
|
||||
The bug was introduced when we converted cgroup_ida to cgroup_idr.
|
||||
While synchronization is already done inside ida_simple_{get,remove}(),
|
||||
users are responsible for concurrent calls to idr_{alloc,remove}().
|
||||
|
||||
[mhocko@suse.cz: ported to 3.12]
|
||||
Fixes: 4e96ee8e981b ("cgroup: convert cgroup_ida to cgroup_idr")
|
||||
Cc: <stable@vger.kernel.org> #3.12+
|
||||
Reported-by: Michal Hocko <mhocko@suse.cz>
|
||||
Signed-off-by: Li Zefan <lizefan@huawei.com>
|
||||
Signed-off-by: Michal Hocko <mhocko@suse.cz>
|
||||
---
|
||||
include/linux/cgroup.h | 2 ++
|
||||
kernel/cgroup.c | 23 ++++++++++++-----------
|
||||
2 files changed, 14 insertions(+), 11 deletions(-)
|
||||
|
||||
--- a/include/linux/cgroup.h
|
||||
+++ b/include/linux/cgroup.h
|
||||
@@ -169,6 +169,8 @@ struct cgroup {
|
||||
*
|
||||
* The ID of the root cgroup is always 0, and a new cgroup
|
||||
* will be assigned with a smallest available ID.
|
||||
+ *
|
||||
+ * Allocating/Removing ID must be protected by cgroup_mutex.
|
||||
*/
|
||||
int id;
|
||||
|
||||
--- a/kernel/cgroup.c
|
||||
+++ b/kernel/cgroup.c
|
||||
@@ -4410,16 +4410,6 @@ static long cgroup_create(struct cgroup
|
||||
rcu_assign_pointer(cgrp->name, name);
|
||||
|
||||
/*
|
||||
- * Temporarily set the pointer to NULL, so idr_find() won't return
|
||||
- * a half-baked cgroup.
|
||||
- */
|
||||
- cgrp->id = idr_alloc(&root->cgroup_idr, NULL, 1, 0, GFP_KERNEL);
|
||||
- if (cgrp->id < 0) {
|
||||
- err = -ENOMEM;
|
||||
- goto err_free_name;
|
||||
- }
|
||||
-
|
||||
- /*
|
||||
* Only live parents can have children. Note that the liveliness
|
||||
* check isn't strictly necessary because cgroup_mkdir() and
|
||||
* cgroup_rmdir() are fully synchronized by i_mutex; however, do it
|
||||
@@ -4426,7 +4418,7 @@ static long cgroup_create(struct cgroup
|
||||
*/
|
||||
if (!cgroup_lock_live_group(parent)) {
|
||||
err = -ENODEV;
|
||||
- goto err_free_id;
|
||||
+ goto err_free_name;
|
||||
}
|
||||
|
||||
/* Grab a reference on the superblock so the hierarchy doesn't
|
||||
@@ -4436,6 +4428,14 @@ static long cgroup_create(struct cgroup
|
||||
* fs */
|
||||
atomic_inc(&sb->s_active);
|
||||
|
||||
+ /*
|
||||
+ * Temporarily set the pointer to NULL, so idr_find() won't return
|
||||
+ * a half-baked cgroup.
|
||||
+ */
|
||||
+ cgrp->id = idr_alloc(&root->cgroup_idr, NULL, 1, 0, GFP_KERNEL);
|
||||
+ if (cgrp->id < 0)
|
||||
+ goto err_unlock;
|
||||
+
|
||||
init_cgroup_housekeeping(cgrp);
|
||||
|
||||
dentry->d_fsdata = cgrp;
|
||||
@@ -4542,11 +4542,11 @@ err_free_all:
|
||||
ss->css_free(css);
|
||||
}
|
||||
}
|
||||
+ idr_remove(&root->cgroup_idr, cgrp->id);
|
||||
+err_unlock:
|
||||
mutex_unlock(&cgroup_mutex);
|
||||
/* Release the reference count that we took on the superblock */
|
||||
deactivate_super(sb);
|
||||
-err_free_id:
|
||||
- idr_remove(&root->cgroup_idr, cgrp->id);
|
||||
err_free_name:
|
||||
kfree(rcu_dereference_raw(cgrp->name));
|
||||
err_free_cgrp:
|
||||
--
|
||||
Michal Hocko
|
||||
SUSE Labs
|
|
@ -1,88 +0,0 @@
|
|||
Path: news.gmane.org!not-for-mail
|
||||
From: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
|
||||
Newsgroups: gmane.linux.kernel.cifs
|
||||
Subject: [PATCH] cifs: mask off top byte in get_rfc1002_length()
|
||||
Date: Tue, 25 Feb 2014 05:27:17 -0800
|
||||
Lines: 31
|
||||
Approved: news@gmane.org
|
||||
Message-ID: <1393334837-6480-1-git-send-email-jlayton@redhat.com>
|
||||
NNTP-Posting-Host: plane.gmane.org
|
||||
X-Trace: ger.gmane.org 1393334843 15695 80.91.229.3 (25 Feb 2014 13:27:23 GMT)
|
||||
X-Complaints-To: usenet@ger.gmane.org
|
||||
NNTP-Posting-Date: Tue, 25 Feb 2014 13:27:23 +0000 (UTC)
|
||||
Cc: klaus-jjkdzbv0JQgAvxtiuMwx3w@public.gmane.org, sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
|
||||
To: smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
|
||||
Original-X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Tue Feb 25 14:27:30 2014
|
||||
Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
|
||||
Envelope-to: glkc-linux-cifs-wOFGN7rlS/M9smdsby/KFg@public.gmane.org
|
||||
Original-Received: from vger.kernel.org ([209.132.180.67])
|
||||
by plane.gmane.org with esmtp (Exim 4.69)
|
||||
(envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
|
||||
id 1WII2h-0005Fo-GS
|
||||
for glkc-linux-cifs-wOFGN7rlS/M9smdsby/KFg@public.gmane.org; Tue, 25 Feb 2014 14:27:27 +0100
|
||||
Original-Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
|
||||
id S1752439AbaBYN10 (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
|
||||
Tue, 25 Feb 2014 08:27:26 -0500
|
||||
Original-Received: from mail-pa0-f41.google.com ([209.85.220.41]:49339 "EHLO
|
||||
mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
|
||||
with ESMTP id S1752329AbaBYN10 (ORCPT
|
||||
<rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>); Tue, 25 Feb 2014 08:27:26 -0500
|
||||
Original-Received: by mail-pa0-f41.google.com with SMTP id fa1so8081181pad.14
|
||||
for <linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>; Tue, 25 Feb 2014 05:27:25 -0800 (PST)
|
||||
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=1e100.net; s=20130820;
|
||||
h=x-gm-message-state:sender:from:to:cc:subject:date:message-id;
|
||||
bh=I4guc46K5w45idU9LGsBcibRE60G/EkhmnDXX8d4lFc=;
|
||||
b=YI5Ag6zKBzcWzALN9+g56fwi/XbV8N9i0JCfbhVRCEv9/JYNUHzVBZ+WO3Wqaf54U/
|
||||
qNNjrH1Io0LpiVTF5+ZuiDEee4Vt8QbMP7iD7rkxh4RZq9clRgum/wVTwV5l/SfIwud7
|
||||
HqGJlJ3jSGtTO4bhBuvX5mD4FrHw4RZJvaWzowzMvYH536b8nZu9typSL4G+KQEV34la
|
||||
19S6ikv1BjtJ49PUS3Gf9xMsqwkJNrLVBauag3yqhztcTSnP5UrxuauSWX0c68R2Lt70
|
||||
hdx5HGMQ0P2wgG6+Qvs3tEl2+infCJkpOH5X7KSvN1pT9hxtt6iE5QGFh5dtUTKe7FlA
|
||||
/grg==
|
||||
X-Gm-Message-State: ALoCoQlVCE5L6UI8IEC9kyuJlrAWBVyYN/eaeZJVp0fm2f2fDE/042yEkI6q9uGoP1vHrftB4/7C
|
||||
X-Received: by 10.69.31.65 with SMTP id kk1mr6563795pbd.47.1393334845726;
|
||||
Tue, 25 Feb 2014 05:27:25 -0800 (PST)
|
||||
Original-Received: from corrin.poochiereds.net.cthon.org (64-71-23-226.static.wiline.com. [64.71.23.226])
|
||||
by mx.google.com with ESMTPSA id eb5sm143431078pad.22.2014.02.25.05.27.24
|
||||
for <multiple recipients>
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
|
||||
Tue, 25 Feb 2014 05:27:25 -0800 (PST)
|
||||
X-Mailer: git-send-email 1.8.5.3
|
||||
Original-Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
|
||||
Precedence: bulk
|
||||
List-ID: <linux-cifs.vger.kernel.org>
|
||||
X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
|
||||
Xref: news.gmane.org gmane.linux.kernel.cifs:9419
|
||||
Archived-At: <http://permalink.gmane.org/gmane.linux.kernel.cifs/9419>
|
||||
|
||||
The 32-bit rfc1002 header field consists of a type byte and then a
|
||||
24-bit length field, but get_rfc1002_length doesn't mask off the top
|
||||
byte.
|
||||
|
||||
In most cases, it's not a problem since the RFC1002_SESSION_MESSAGE type
|
||||
is '\0', but when doing a RFC1002 session establishment, the type is
|
||||
non-zero and that throws off the returned length in smb_send_rqst.
|
||||
|
||||
Reported-by: klaus-jjkdzbv0JQgAvxtiuMwx3w@public.gmane.org
|
||||
Tested-by: Sachin Prabhu <sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
|
||||
Signed-off-by: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
|
||||
---
|
||||
fs/cifs/cifsglob.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
|
||||
index e7fe49e..45376a4 100644
|
||||
--- a/fs/cifs/cifsglob.h
|
||||
+++ b/fs/cifs/cifsglob.h
|
||||
@@ -506,7 +506,7 @@ struct cifs_mnt_data {
|
||||
static inline unsigned int
|
||||
get_rfc1002_length(void *buf)
|
||||
{
|
||||
- return be32_to_cpu(*((__be32 *)buf));
|
||||
+ return be32_to_cpu(*((__be32 *)buf)) & 0xffffff;
|
||||
}
|
||||
|
||||
static inline void
|
||||
--
|
||||
1.8.5.3
|
||||
|
|
@ -1,129 +0,0 @@
|
|||
Path: news.gmane.org!not-for-mail
|
||||
From: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
|
||||
Newsgroups: gmane.linux.kernel.cifs
|
||||
Subject: [PATCH] cifs: sanity check length of data to send before sending
|
||||
Date: Fri, 14 Feb 2014 07:21:00 -0500
|
||||
Lines: 72
|
||||
Approved: news@gmane.org
|
||||
Message-ID: <1392380460-6997-1-git-send-email-jlayton@redhat.com>
|
||||
NNTP-Posting-Host: plane.gmane.org
|
||||
X-Trace: ger.gmane.org 1392380460 7637 80.91.229.3 (14 Feb 2014 12:21:00 GMT)
|
||||
X-Complaints-To: usenet@ger.gmane.org
|
||||
NNTP-Posting-Date: Fri, 14 Feb 2014 12:21:00 +0000 (UTC)
|
||||
Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
|
||||
To: smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
|
||||
Original-X-From: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Fri Feb 14 13:21:08 2014
|
||||
Return-path: <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
|
||||
Envelope-to: glkc-linux-cifs-wOFGN7rlS/M9smdsby/KFg@public.gmane.org
|
||||
Original-Received: from vger.kernel.org ([209.132.180.67])
|
||||
by plane.gmane.org with esmtp (Exim 4.69)
|
||||
(envelope-from <linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
|
||||
id 1WEHlT-0001gj-Pf
|
||||
for glkc-linux-cifs-wOFGN7rlS/M9smdsby/KFg@public.gmane.org; Fri, 14 Feb 2014 13:21:08 +0100
|
||||
Original-Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
|
||||
id S1751935AbaBNMVH (ORCPT <rfc822;glkc-linux-cifs@m.gmane.org>);
|
||||
Fri, 14 Feb 2014 07:21:07 -0500
|
||||
Original-Received: from mail-qc0-f170.google.com ([209.85.216.170]:60206 "EHLO
|
||||
mail-qc0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
|
||||
with ESMTP id S1751288AbaBNMVG (ORCPT
|
||||
<rfc822;linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>); Fri, 14 Feb 2014 07:21:06 -0500
|
||||
Original-Received: by mail-qc0-f170.google.com with SMTP id e9so20306487qcy.29
|
||||
for <linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>; Fri, 14 Feb 2014 04:21:05 -0800 (PST)
|
||||
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=1e100.net; s=20130820;
|
||||
h=x-gm-message-state:sender:from:to:cc:subject:date:message-id;
|
||||
bh=8FvTfO9jKY+Fzw5nmoxw6PuPxfXM/khvtS/Hnxnu+to=;
|
||||
b=i7Gy5AwQiFX7hVMJJMjvAR61u2zO8E7tTAgE0SfPp25untipj/RTae8xcA+0vVrznY
|
||||
sZwOPATUyFmu2mXAKh5L0WutFNF3SQirPVgM5jaKlMZQT253YInioO1AwD00Jtio00LX
|
||||
wOt19I6v3umZfSqCBw1dyDiH66kX4xKaKqdQoY2+nEsicG4RJvp4PpaLhG454nfpVxfN
|
||||
HeskcNJ5RBvg17JpDvKX6THqbKWsHSHHqKKCROERxeTbs7HTgV9jTNSDeOuPr6Loiovi
|
||||
9DBQwQwMmlC9NebDqR5xatva30WRhyCp/xyHNaoY+aVk8N6r5YlFphLmLRvmaZ0Ed2CH
|
||||
17WA==
|
||||
X-Gm-Message-State: ALoCoQmHyaepi0IHvwKS024wRq/srAdGRdo0UGUynLggzf843S3Yj7dwW53RjNbTDG1Y4w+/mqOB
|
||||
X-Received: by 10.229.13.133 with SMTP id c5mr12315963qca.22.1392380465000;
|
||||
Fri, 14 Feb 2014 04:21:05 -0800 (PST)
|
||||
Original-Received: from tlielax.poochiereds.net ([2001:470:8:d63:3a60:77ff:fe93:a95d])
|
||||
by mx.google.com with ESMTPSA id u4sm15047497qai.21.2014.02.14.04.21.04
|
||||
for <multiple recipients>
|
||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
|
||||
Fri, 14 Feb 2014 04:21:04 -0800 (PST)
|
||||
X-Mailer: git-send-email 1.8.5.3
|
||||
Original-Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
|
||||
Precedence: bulk
|
||||
List-ID: <linux-cifs.vger.kernel.org>
|
||||
X-Mailing-List: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
|
||||
Xref: news.gmane.org gmane.linux.kernel.cifs:9402
|
||||
Archived-At: <http://permalink.gmane.org/gmane.linux.kernel.cifs/9402>
|
||||
|
||||
We had a bug discovered recently where an upper layer function
|
||||
(cifs_iovec_write) could pass down a smb_rqst with an invalid amount of
|
||||
data in it. The length of the SMB frame would be correct, but the rqst
|
||||
struct would cause smb_send_rqst to send nearly 4GB of data.
|
||||
|
||||
This should never be the case. Add some sanity checking to the beginning
|
||||
of smb_send_rqst that ensures that the amount of data we're going to
|
||||
send agrees with the length in the RFC1002 header. If it doesn't, WARN()
|
||||
and return -EIO to the upper layers.
|
||||
|
||||
Signed-off-by: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
|
||||
---
|
||||
fs/cifs/transport.c | 29 +++++++++++++++++++++++++++++
|
||||
1 file changed, 29 insertions(+)
|
||||
|
||||
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
|
||||
index b37570952846..18cd5650a5fc 100644
|
||||
--- a/fs/cifs/transport.c
|
||||
+++ b/fs/cifs/transport.c
|
||||
@@ -270,6 +270,26 @@ cifs_rqst_page_to_kvec(struct smb_rqst *rqst, unsigned int idx,
|
||||
iov->iov_len = rqst->rq_pagesz;
|
||||
}
|
||||
|
||||
+static unsigned long
|
||||
+rqst_len(struct smb_rqst *rqst)
|
||||
+{
|
||||
+ unsigned int i;
|
||||
+ struct kvec *iov = rqst->rq_iov;
|
||||
+ unsigned long buflen = 0;
|
||||
+
|
||||
+ /* total up iov array first */
|
||||
+ for (i = 0; i < rqst->rq_nvec; i++)
|
||||
+ buflen += iov[i].iov_len;
|
||||
+
|
||||
+ /* add in the page array if there is one */
|
||||
+ if (rqst->rq_npages) {
|
||||
+ buflen += rqst->rq_pagesz * (rqst->rq_npages - 1);
|
||||
+ buflen += rqst->rq_tailsz;
|
||||
+ }
|
||||
+
|
||||
+ return buflen;
|
||||
+}
|
||||
+
|
||||
static int
|
||||
smb_send_rqst(struct TCP_Server_Info *server, struct smb_rqst *rqst)
|
||||
{
|
||||
@@ -277,6 +297,7 @@ smb_send_rqst(struct TCP_Server_Info *server, struct smb_rqst *rqst)
|
||||
struct kvec *iov = rqst->rq_iov;
|
||||
int n_vec = rqst->rq_nvec;
|
||||
unsigned int smb_buf_length = get_rfc1002_length(iov[0].iov_base);
|
||||
+ unsigned long send_length;
|
||||
unsigned int i;
|
||||
size_t total_len = 0, sent;
|
||||
struct socket *ssocket = server->ssocket;
|
||||
@@ -285,6 +306,14 @@ smb_send_rqst(struct TCP_Server_Info *server, struct smb_rqst *rqst)
|
||||
if (ssocket == NULL)
|
||||
return -ENOTSOCK;
|
||||
|
||||
+ /* sanity check send length */
|
||||
+ send_length = rqst_len(rqst);
|
||||
+ if (send_length != smb_buf_length + 4) {
|
||||
+ WARN(1, "Send length mismatch(send_length=%lu smb_buf_length=%u)\n",
|
||||
+ send_length, smb_buf_length);
|
||||
+ return -EIO;
|
||||
+ }
|
||||
+
|
||||
cifs_dbg(FYI, "Sending smb: smb_len=%u\n", smb_buf_length);
|
||||
dump_smb(iov[0].iov_base, iov[0].iov_len);
|
||||
|
||||
--
|
||||
1.8.5.3
|
||||
|
|
@ -20,6 +20,7 @@ CONFIG_RESET_GPIO=y
|
|||
|
||||
CONFIG_RCU_FANOUT_LEAF=16
|
||||
# CONFIG_RTC_DRV_SNVS is not set
|
||||
# CONFIG_RTC_DRV_HYM8563 is not set
|
||||
CONFIG_BACKLIGHT_PWM=m
|
||||
CONFIG_INPUT_PWM_BEEPER=m
|
||||
CONFIG_ARM_SP805_WATCHDOG=m
|
||||
|
@ -28,7 +29,6 @@ CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
|
|||
# CONFIG_ARM_DT_BL_CPUFREQ is not set
|
||||
CONFIG_NR_CPUS=8
|
||||
|
||||
CONFIG_ARM_DMA_USE_IOMMU=y
|
||||
CONFIG_SWIOTLB=y
|
||||
CONFIG_DMA_VIRTUAL_CHANNELS=y
|
||||
CONFIG_FB_SIMPLE=y
|
||||
|
@ -38,10 +38,14 @@ CONFIG_HAVE_PERF_USER_STACK_DUMP=y
|
|||
|
||||
# ARM AMBA generic HW
|
||||
CONFIG_ARM_AMBA=y
|
||||
CONFIG_ARM_CCI=y
|
||||
CONFIG_ARM_DMA_USE_IOMMU=y
|
||||
CONFIG_ARM_GIC=y
|
||||
CONFIG_ARM_GLOBAL_TIMER=y
|
||||
CONFIG_ARM_SMMU=y
|
||||
CONFIG_MMC_ARMMMCI=y
|
||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
||||
CONFIG_SERIAL_AMBA_PL011=y
|
||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
||||
CONFIG_SERIO_AMBAKMI=y
|
||||
CONFIG_OC_ETM=y
|
||||
CONFIG_FB_ARMCLCD=y
|
||||
|
@ -67,14 +71,18 @@ CONFIG_OF_EARLY_FLATTREE=y
|
|||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_I2C=m
|
||||
CONFIG_OF_IOMMU=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_MDIO=m
|
||||
CONFIG_OF_MTD=y
|
||||
CONFIG_OF_NET=y
|
||||
CONFIG_OF_PCI_IRQ=m
|
||||
CONFIG_OF_PCI=m
|
||||
CONFIG_OF_RESERVED_MEM=y
|
||||
CONFIG_PATA_OF_PLATFORM=m
|
||||
# CONFIG_OF_SELFTEST is not set
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_THERMAL_OF=y
|
||||
|
||||
# External Connectors
|
||||
CONFIG_EXTCON=m
|
||||
|
@ -100,6 +108,7 @@ CONFIG_MTD_PHYSMAP_OF=m
|
|||
CONFIG_GPIO_DEVRES=y
|
||||
CONFIG_GPIO_GENERIC=m
|
||||
CONFIG_GPIO_GENERIC_PLATFORM=m
|
||||
CONFIG_GPIO_WATCHDOG=m
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
|
||||
CONFIG_ARCH_REQUIRE_GPIOLIB=y
|
||||
|
@ -109,10 +118,10 @@ CONFIG_POWER_RESET_GPIO=y
|
|||
CONFIG_POWER_RESET_RESTART=y
|
||||
|
||||
#i2c
|
||||
CONFIG_I2C_ARB_GPIO_CHALLENGE=m
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_GPIO=m
|
||||
CONFIG_I2C_MUX=m
|
||||
# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set
|
||||
CONFIG_I2C_MUX_GPIO=m
|
||||
CONFIG_I2C_MUX_PINCTRL=m
|
||||
CONFIG_I2C_MUX_PCA9541=m
|
||||
|
@ -122,7 +131,7 @@ CONFIG_SENSORS_IIO_HWMON=m
|
|||
CONFIG_IIO_SYSFS_TRIGGER=m
|
||||
|
||||
# PHY framework
|
||||
CONFIG_GENERIC_PHY=m
|
||||
CONFIG_GENERIC_PHY=y
|
||||
|
||||
# MFD
|
||||
CONFIG_MFD_CORE=m
|
||||
|
@ -130,8 +139,21 @@ CONFIG_MFD_CORE=m
|
|||
CONFIG_SMC91X=m
|
||||
CONFIG_SMC911X=m
|
||||
|
||||
CONFIG_CPU_THERMAL=y
|
||||
CONFIG_THERMAL_GOV_USER_SPACE=y
|
||||
|
||||
# Contiguous Memory Allocator
|
||||
CONFIG_CMA=y
|
||||
CONFIG_DMA_CMA=y
|
||||
# CONFIG_CMA_DEBUG is not set
|
||||
CONFIG_CMA_SIZE_MBYTES=16
|
||||
CONFIG_CMA_SIZE_SEL_MBYTES=y
|
||||
# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
|
||||
# CONFIG_CMA_SIZE_SEL_MIN is not set
|
||||
# CONFIG_CMA_SIZE_SEL_MAX is not set
|
||||
CONFIG_CMA_ALIGNMENT=8
|
||||
CONFIG_CMA_AREAS=7
|
||||
|
||||
# CONFIG_CRYPTO_TEST is not set
|
||||
# CONFIG_TRANSPARENT_HUGEPAGE is not set
|
||||
# CONFIG_XEN is not set
|
||||
|
@ -140,7 +162,6 @@ CONFIG_THERMAL_GOV_USER_SPACE=y
|
|||
# CONFIG_DRM_SHMOBILE is not set
|
||||
# CONFIG_I2C_SH_MOBILE is not set
|
||||
# CONFIG_MMC_DW_SOCFPGA is not set
|
||||
# CONFIG_ARM_SMMU is not set
|
||||
# CONFIG_I2C_NOMADIK is not set
|
||||
# CONFIG_IRQ_DOMAIN_DEBUG is not set
|
||||
# CONFIG_LEDS_RENESAS_TPU is not set
|
||||
|
@ -150,6 +171,13 @@ CONFIG_THERMAL_GOV_USER_SPACE=y
|
|||
# CONFIG_DRM_TEGRA is not set
|
||||
# CONFIG_SHMOBILE_IOMMU is not set
|
||||
|
||||
# CONFIG_COMMON_CLK_SI570 is not set
|
||||
# CONFIG_COMMON_CLK_QCOM is not set
|
||||
|
||||
# CONFIG_ARM_PTDUMP is not set
|
||||
|
||||
# CONFIG_PATA_PLATFORM is not set
|
||||
|
||||
### turn off things which make no sense on embedded SoC
|
||||
|
||||
# core
|
||||
|
@ -164,6 +192,7 @@ CONFIG_THERMAL_GOV_USER_SPACE=y
|
|||
# CONFIG_NET_VENDOR_EXAR is not set
|
||||
# CONFIG_NET_VENDOR_INTEL is not set
|
||||
# CONFIG_NET_VENDOR_MELLANOX is not set
|
||||
# CONFIG_NET_VENDOR_BROCADE is not set
|
||||
|
||||
# scsi
|
||||
|
||||
|
@ -173,8 +202,11 @@ CONFIG_THERMAL_GOV_USER_SPACE=y
|
|||
# CONFIG_SCSI_IPS is not set
|
||||
# CONFIG_SCSI_CXGB3_ISCSI is not set
|
||||
# CONFIG_SCSI_CXGB4_ISCSI is not set
|
||||
# CONFIG_SCSI_BFA_FC is not set
|
||||
|
||||
# serial
|
||||
# CONFIG_SERIAL_SH_SCI is not set
|
||||
|
||||
CONFIG_CRASH=m
|
||||
|
||||
# CONFIG_DEBUG_SET_MODULE_RONX is not set
|
||||
|
|
88
config-armv7
88
config-armv7
|
@ -1,6 +1,6 @@
|
|||
# ARM unified arch kernel
|
||||
|
||||
# CONFIG_ARCH_EXYNOS_MULTI is not set
|
||||
# CONFIG_ARCH_BERLIN is not set
|
||||
# CONFIG_ARCH_KEYSTONE is not set
|
||||
CONFIG_ARCH_MVEBU=y
|
||||
CONFIG_ARCH_MXC=y
|
||||
|
@ -10,7 +10,6 @@ CONFIG_ARCH_OMAP4=y
|
|||
CONFIG_ARCH_PICOXCELL=y
|
||||
CONFIG_ARCH_ROCKCHIP=y
|
||||
CONFIG_ARCH_SOCFPGA=y
|
||||
CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_ARCH_TEGRA=y
|
||||
CONFIG_ARCH_U8500=y
|
||||
# CONFIG_ARCH_VIRT is not set
|
||||
|
@ -32,7 +31,6 @@ CONFIG_CACHE_TAUROS2=y
|
|||
CONFIG_MV_XOR=y
|
||||
CONFIG_CRYPTO_DEV_MV_CESA=m
|
||||
CONFIG_MV643XX_ETH=m
|
||||
CONFIG_I2C_MV64XXX=m
|
||||
CONFIG_PINCTRL_MVEBU=y
|
||||
CONFIG_PINCTRL_ARMADA_370=y
|
||||
CONFIG_PINCTRL_ARMADA_XP=y
|
||||
|
@ -44,11 +42,13 @@ CONFIG_RTC_DRV_MV=m
|
|||
CONFIG_MVNETA=m
|
||||
CONFIG_GPIO_MVEBU=y
|
||||
CONFIG_MVEBU_CLK_CORE=y
|
||||
CONFIG_MVEBU_CLK_COREDIV=y
|
||||
CONFIG_MVEBU_CLK_GATING=y
|
||||
CONFIG_MMC_MVSDIO=m
|
||||
CONFIG_SPI_ORION=m
|
||||
CONFIG_USB_MV_UDC=m
|
||||
CONFIG_MVEBU_MBUS=y
|
||||
CONFIG_PHY_MVEBU_SATA=y
|
||||
CONFIG_ARMADA_THERMAL=m
|
||||
CONFIG_DRM_ARMADA=m
|
||||
|
||||
|
@ -100,7 +100,6 @@ CONFIG_OMAP_IOVMM=m
|
|||
CONFIG_HWSPINLOCK_OMAP=m
|
||||
CONFIG_OMAP3_EMU=y
|
||||
# CONFIG_OMAP3_SDRC_AC_TIMING is not set
|
||||
CONFIG_OMAP_WATCHDOG=m
|
||||
|
||||
CONFIG_SERIAL_OMAP=y
|
||||
CONFIG_SERIAL_OMAP_CONSOLE=y
|
||||
|
@ -124,7 +123,6 @@ CONFIG_TWL6040_CORE=y
|
|||
CONFIG_CLK_TWL6040=m
|
||||
CONFIG_OMAP_INTERCONNECT=m
|
||||
CONFIG_MFD_OMAP_USB_HOST=y
|
||||
CONFIG_MTD_ONENAND_OMAP2=m
|
||||
CONFIG_HDQ_MASTER_OMAP=m
|
||||
CONFIG_REGULATOR_TWL4030=y
|
||||
CONFIG_BACKLIGHT_PANDORA=m
|
||||
|
@ -146,11 +144,11 @@ CONFIG_TWL6030_GPADC=m
|
|||
|
||||
# OMAP5 (possibly other devices too)
|
||||
CONFIG_MFD_PALMAS=y
|
||||
CONFIG_PINCTRL_PALMAS=y
|
||||
CONFIG_EXTCON_PALMAS=m
|
||||
CONFIG_RTC_DRV_PALMAS=m
|
||||
CONFIG_REGULATOR_PALMAS=m
|
||||
CONFIG_GPIO_PALMAS=y
|
||||
CONFIG_PINCTRL_PALMAS=y
|
||||
CONFIG_REGULATOR_PALMAS=y
|
||||
CONFIG_RTC_DRV_PALMAS=m
|
||||
|
||||
CONFIG_WL_TI=y
|
||||
CONFIG_WLCORE_SDIO=m
|
||||
|
@ -160,7 +158,9 @@ CONFIG_WILINK_PLATFORM_DATA=y
|
|||
CONFIG_MFD_WL1273_CORE=m
|
||||
CONFIG_NFC_WILINK=m
|
||||
|
||||
CONFIG_MTD_ONENAND_OMAP2=m
|
||||
CONFIG_MTD_NAND_OMAP2=m
|
||||
CONFIG_MTD_NAND_OMAP_BCH=y
|
||||
CONFIG_SPI_OMAP24XX=m
|
||||
CONFIG_MFD_TI_SSP=m
|
||||
CONFIG_SPI_TI_SSP=m
|
||||
|
@ -185,7 +185,7 @@ CONFIG_POWER_AVS=y
|
|||
CONFIG_POWER_AVS_OMAP=y
|
||||
CONFIG_POWER_AVS_OMAP_CLASS3=y
|
||||
|
||||
# CONFIG_ARM_OMAP2PLUS_CPUFREQ is not set
|
||||
CONFIG_ARM_OMAP2PLUS_CPUFREQ=y
|
||||
|
||||
CONFIG_PWM_TIECAP=m
|
||||
CONFIG_PWM_TIEHRPWM=m
|
||||
|
@ -307,29 +307,29 @@ CONFIG_TI_DAVINCI_EMAC=m
|
|||
CONFIG_TI_DAVINCI_MDIO=m
|
||||
CONFIG_TI_CPSW=m
|
||||
CONFIG_TI_CPSW_PHY_SEL=y
|
||||
# CONFIG_TI_CPTS is not set
|
||||
CONFIG_TI_CPTS=y
|
||||
# Needed for BBone White
|
||||
CONFIG_REGULATOR_TPS65217=y
|
||||
CONFIG_TI_EMIF=m
|
||||
CONFIG_DRM_TILCDC=m
|
||||
CONFIG_SPI_DAVINCI=m
|
||||
CONFIG_SND_DAVINCI_SOC=m
|
||||
CONFIG_SND_DAVINCI_SOC_I2S=m
|
||||
CONFIG_SND_DAVINCI_SOC_MCASP=m
|
||||
CONFIG_SND_DAVINCI_SOC_VCIF=m
|
||||
CONFIG_SND_DAVINCI_SOC_GENERIC_EVM=m
|
||||
CONFIG_SND_AM33XX_SOC_EVM=m
|
||||
CONFIG_REGULATOR_TI_ABB=m
|
||||
CONFIG_TI_ADC081C=m
|
||||
CONFIG_TI_AM335X_ADC=m
|
||||
CONFIG_PWM_TIPWMSS=y
|
||||
CONFIG_SND_AM33XX_SOC_EVM=m
|
||||
CONFIG_SND_AM335X_SOC_NXPTDA_EVM=m
|
||||
|
||||
# Allwinner a1x
|
||||
CONFIG_PINCTRL_SUNXI=y
|
||||
CONFIG_SUNXI_WATCHDOG=m
|
||||
CONFIG_MDIO_SUN4I=m
|
||||
CONFIG_NET_VENDOR_ALLWINNER=y
|
||||
CONFIG_SUN4I_EMAC=m
|
||||
CONFIG_EEPROM_SUNXI_SID=m
|
||||
# CONFIG_GPIO_DAVINCI is not set
|
||||
# CONFIG_DAVINCI_WATCHDOG is not set
|
||||
|
||||
# i.MX
|
||||
CONFIG_MXC_IRQ_PRIOR=y
|
||||
# CONFIG_MXC_DEBUG_BOARD is not set
|
||||
CONFIG_SOC_IMX50=y
|
||||
CONFIG_SOC_IMX53=y
|
||||
CONFIG_SOC_IMX6Q=y
|
||||
CONFIG_SOC_IMX6SL=y
|
||||
|
@ -340,6 +340,7 @@ CONFIG_ARM_IMX6Q_CPUFREQ=m
|
|||
CONFIG_IMX_THERMAL=m
|
||||
CONFIG_PATA_IMX=m
|
||||
CONFIG_PCI_IMX6=y
|
||||
# CONFIG_USB_EHCI_MXC is not set
|
||||
CONFIG_USB_CHIPIDEA=m
|
||||
CONFIG_USB_CHIPIDEA_UDC=y
|
||||
CONFIG_USB_CHIPIDEA_HOST=y
|
||||
|
@ -348,13 +349,18 @@ CONFIG_USB_FSL_USB2=m
|
|||
CONFIG_NET_VENDOR_FREESCALE=y
|
||||
CONFIG_FEC=m
|
||||
CONFIG_KEYBOARD_IMX=m
|
||||
CONFIG_KEYBOARD_STMPE=m
|
||||
CONFIG_TOUCHSCREEN_STMPE=m
|
||||
CONFIG_SERIAL_IMX=y
|
||||
CONFIG_SERIAL_IMX_CONSOLE=y
|
||||
CONFIG_PINCTRL_IMX6SL=y
|
||||
CONFIG_I2C_IMX=m
|
||||
CONFIG_STMPE_I2C=y
|
||||
CONFIG_SPI_IMX=m
|
||||
CONFIG_STMPE_SPI=y
|
||||
CONFIG_MFD_MC13783=m
|
||||
CONFIG_MFD_MC13XXX_SPI=m
|
||||
CONFIG_MFD_STMPE=y
|
||||
CONFIG_W1_MASTER_MXC=m
|
||||
CONFIG_IMX_WEIM=y
|
||||
CONFIG_IMX2_WDT=m
|
||||
|
@ -362,8 +368,10 @@ CONFIG_HW_RANDOM_MXC_RNGA=m
|
|||
CONFIG_CRYPTO_DEV_SAHARA=m
|
||||
CONFIG_RTC_DRV_SNVS=m
|
||||
# CONFIG_FB_MX3 is not set
|
||||
# CONFIG_FB_IMX is not set
|
||||
|
||||
CONFIG_SND_IMX_SOC=m
|
||||
CONFIG_SND_SOC_FSL_SPDIF=m
|
||||
CONFIG_SND_SOC_FSL_SSI=m
|
||||
CONFIG_SND_SOC_FSL_UTILS=m
|
||||
CONFIG_SND_SOC_IMX_SSI=m
|
||||
|
@ -375,7 +383,6 @@ CONFIG_SND_SOC_IMX_WM8962=m
|
|||
CONFIG_SND_SOC_IMX_MC13783=m
|
||||
CONFIG_SND_SOC_IMX_SPDIF=m
|
||||
|
||||
CONFIG_USB_EHCI_MXC=m
|
||||
CONFIG_USB_IMX21_HCD=m
|
||||
CONFIG_USB_MXS_PHY=m
|
||||
CONFIG_MMC_DW_SOCFPGA=m
|
||||
|
@ -392,7 +399,6 @@ CONFIG_AHCI_IMX=m
|
|||
# CONFIG_MXS_DMA is not set
|
||||
|
||||
CONFIG_PWM_IMX=m
|
||||
CONFIG_BACKLIGHT_PWM=m
|
||||
CONFIG_DRM_IMX=m
|
||||
CONFIG_DRM_IMX_FB_HELPER=m
|
||||
CONFIG_DRM_IMX_HDMI=m
|
||||
|
@ -424,6 +430,7 @@ CONFIG_INPUT_DA9052_ONKEY=m
|
|||
CONFIG_INPUT_DA9055_ONKEY=m
|
||||
CONFIG_GPIO_DA9052=m
|
||||
CONFIG_GPIO_DA9055=m
|
||||
CONFIG_GPIO_STMPE=y
|
||||
CONFIG_BATTERY_DA9052=m
|
||||
CONFIG_SENSORS_DA9052_ADC=m
|
||||
CONFIG_SENSORS_DA9055=m
|
||||
|
@ -476,15 +483,9 @@ CONFIG_AB8500_BM=y
|
|||
CONFIG_AB8500_GPADC=y
|
||||
CONFIG_SENSORS_AB8500=m
|
||||
CONFIG_STE_MODEM_RPROC=m
|
||||
CONFIG_CW1200=m
|
||||
CONFIG_CW1200_WLAN_SDIO=m
|
||||
CONFIG_CW1200_WLAN_SPI=m
|
||||
CONFIG_UX500_WATCHDOG=m
|
||||
CONFIG_IIO_ST_ACCEL_3AXIS=m
|
||||
CONFIG_IIO_ST_GYRO_3AXIS=m
|
||||
|
||||
CONFIG_IIO_ST_GYRO_I2C_3AXIS=m
|
||||
CONFIG_IIO_ST_GYRO_SPI_3AXIS=m
|
||||
CONFIG_IIO_ST_MAGN_3AXIS=m
|
||||
CONFIG_IIO_ST_MAGN_I2C_3AXIS=m
|
||||
CONFIG_IIO_ST_MAGN_SPI_3AXIS=m
|
||||
CONFIG_IIO_ST_PRESS=m
|
||||
|
@ -497,11 +498,12 @@ CONFIG_IIO_ST_SENSORS_CORE=m
|
|||
# tegra
|
||||
CONFIG_ARCH_TEGRA_2x_SOC=y
|
||||
CONFIG_ARCH_TEGRA_3x_SOC=y
|
||||
# CONFIG_ARCH_TEGRA_114_SOC is not set
|
||||
# CONFIG_ARCH_TEGRA_124_SOC is not set
|
||||
CONFIG_ARCH_TEGRA_114_SOC=y
|
||||
CONFIG_ARCH_TEGRA_124_SOC=y
|
||||
CONFIG_ARM_TEGRA_CPUFREQ=y
|
||||
CONFIG_TEGRA20_MC=y
|
||||
CONFIG_TEGRA30_MC=y
|
||||
CONFIG_TRUSTED_FOUNDATIONS=y
|
||||
|
||||
CONFIG_SERIAL_TEGRA=y
|
||||
|
||||
|
@ -511,12 +513,13 @@ CONFIG_TEGRA_IOMMU_SMMU=y
|
|||
CONFIG_MMC_SDHCI_TEGRA=m
|
||||
|
||||
CONFIG_I2C_TEGRA=m
|
||||
CONFIG_I2C_MUX_PCA954x=m
|
||||
|
||||
CONFIG_TEGRA_SYSTEM_DMA=y
|
||||
CONFIG_TEGRA_EMC_SCALING_ENABLE=y
|
||||
CONFIG_TEGRA_AHB=y
|
||||
CONFIG_TEGRA20_APB_DMA=y
|
||||
# CONFIG_SPI_TEGRA114 is not set
|
||||
CONFIG_SPI_TEGRA114=m
|
||||
CONFIG_SPI_TEGRA20_SFLASH=m
|
||||
CONFIG_SPI_TEGRA20_SLINK=m
|
||||
|
||||
|
@ -530,19 +533,18 @@ CONFIG_RTC_DRV_TEGRA=m
|
|||
|
||||
CONFIG_SND_SOC_TEGRA=m
|
||||
CONFIG_SND_SOC_TEGRA_ALC5632=m
|
||||
CONFIG_SND_SOC_TEGRA_MAX98090=m
|
||||
CONFIG_SND_SOC_TEGRA_RT5640=m
|
||||
CONFIG_SND_SOC_TEGRA_TRIMSLICE=m
|
||||
CONFIG_SND_SOC_TEGRA_WM8753=m
|
||||
CONFIG_SND_SOC_TEGRA_WM8903=m
|
||||
CONFIG_SND_SOC_TEGRA_WM9712=m
|
||||
CONFIG_SND_SOC_TEGRA20_AC97=m
|
||||
CONFIG_SND_SOC_TEGRA20_DAS=m
|
||||
CONFIG_SND_SOC_TEGRA20_SPDIF=m
|
||||
CONFIG_SND_SOC_TEGRA30_AHUB=m
|
||||
CONFIG_SND_SOC_TEGRA30_I2S=m
|
||||
|
||||
# bool only, upstream aiming for modular in 3.14
|
||||
# https://lkml.org/lkml/2013/11/18/47
|
||||
# CONFIG_DRM_TEGRA is not set
|
||||
|
||||
# AC100 (PAZ00)
|
||||
CONFIG_MFD_NVEC=y
|
||||
CONFIG_MFD_TPS80031=y
|
||||
|
@ -560,10 +562,13 @@ CONFIG_PWM_TEGRA=m
|
|||
|
||||
CONFIG_TEGRA_HOST1X=m
|
||||
CONFIG_TEGRA_HOST1X_FIREWALL=y
|
||||
|
||||
CONFIG_DRM_TEGRA=y
|
||||
# CONFIG_DRM_TEGRA_STAGING is not set
|
||||
CONFIG_DRM_TEGRA=m
|
||||
CONFIG_DRM_TEGRA_FBDEV=y
|
||||
# CONFIG_DRM_TEGRA_DEBUG is not set
|
||||
CONFIG_DRM_TEGRA_STAGING=y
|
||||
CONFIG_DRM_PANEL=y
|
||||
CONFIG_DRM_PANEL_SIMPLE=m
|
||||
|
||||
|
||||
CONFIG_CRYPTO_DEV_TEGRA_AES=m
|
||||
|
||||
|
@ -586,6 +591,7 @@ CONFIG_XILINX_EMACLITE=m
|
|||
CONFIG_GPIO_XILINX=y
|
||||
CONFIG_I2C_XILINX=m
|
||||
CONFIG_SPI_XILINX=m
|
||||
CONFIG_MMC_SDHCI_OF_ARASAN=m
|
||||
|
||||
# Multi function devices
|
||||
CONFIG_MFD_88PM800=m
|
||||
|
@ -631,6 +637,7 @@ CONFIG_REGULATOR_MAX8973=m
|
|||
# CONFIG_MFD_MAX77686 is not set
|
||||
# CONFIG_MFD_MAX77693 is not set
|
||||
# CONFIG_MFD_MAX8997 is not set
|
||||
# CONFIG_MFD_MAX14577 is not set
|
||||
# CONFIG_MFD_AAT2870_CORE is not set
|
||||
# CONFIG_MFD_RC5T583 is not set
|
||||
# CONFIG_MFD_SMSC is not set
|
||||
|
@ -648,10 +655,9 @@ CONFIG_REGULATOR_MAX8973=m
|
|||
# CONFIG_VIRTUALIZATION is not set
|
||||
# CONFIG_POWER_RESET_QNAP is not set
|
||||
# CONFIG_OMAP2_DSS_DEBUG is not set
|
||||
# CONFIG_DRM_TEGRA_DEBUG is not set
|
||||
# CONFIG_CRYPTO_DEV_UX500_DEBUG is not set
|
||||
# CONFIG_AB8500_DEBUG is not set
|
||||
|
||||
# CONFIG_SOC_VF610 is not set
|
||||
# CONFIG_ARM_CCI is not set
|
||||
# CONFIG_MMC_TMIO is not set
|
||||
# CONFIG_SND_SOC_ADI is not set
|
||||
|
|
|
@ -50,6 +50,7 @@ CONFIG_ALWAYS_USE_PERSISTENT_CLOCK=y
|
|||
|
||||
# Platforms enabled/disabled globally on ARMv7
|
||||
CONFIG_ARCH_HIGHBANK=y
|
||||
CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_ARCH_VEXPRESS_CA9X4=y
|
||||
CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA=y
|
||||
# CONFIG_ARCH_VEXPRESS_SPC is not set
|
||||
|
@ -60,13 +61,9 @@ CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA=y
|
|||
# CONFIG_ARCH_U8500 is not set
|
||||
# CONFIG_ARCH_WM8850 is not set
|
||||
# CONFIG_ARCH_SHMOBILE_MULTI is not set
|
||||
|
||||
# highbank
|
||||
CONFIG_EDAC_HIGHBANK_MC=m
|
||||
CONFIG_EDAC_HIGHBANK_L2=m
|
||||
CONFIG_SATA_HIGHBANK=m
|
||||
CONFIG_ARM_HIGHBANK_CPUFREQ=m
|
||||
# CONFIG_ARM_HIGHBANK_CPUIDLE is not set
|
||||
# CONFIG_ARCH_BERLIN is not set
|
||||
# CONFIG_ARCH_HI3xxx is not set
|
||||
# CONFIG_ARCH_MSM_DT is not set
|
||||
|
||||
# errata
|
||||
# v5/v6
|
||||
|
@ -118,15 +115,8 @@ CONFIG_CPU_IDLE_GOV_MENU=y
|
|||
CONFIG_DEFAULT_MMAP_MIN_ADDR=32768
|
||||
CONFIG_LSM_MMAP_MIN_ADDR=32768
|
||||
|
||||
CONFIG_ARM_GLOBAL_TIMER=y
|
||||
|
||||
CONFIG_XZ_DEC_ARM=y
|
||||
|
||||
# Power management
|
||||
CONFIG_PM_OPP=y
|
||||
CONFIG_ARM_CPU_SUSPEND=y
|
||||
CONFIG_GENERIC_CPUFREQ_CPU0=m
|
||||
|
||||
CONFIG_LOCAL_TIMERS=y
|
||||
CONFIG_UACCESS_WITH_MEMCPY=y
|
||||
CONFIG_CC_STACKPROTECTOR=y
|
||||
|
@ -159,10 +149,27 @@ CONFIG_RTC_DRV_PL031=y
|
|||
|
||||
CONFIG_PL330_DMA=m
|
||||
CONFIG_AMBA_PL08X=y
|
||||
CONFIG_ARM_SP805_WATCHDOG=m
|
||||
CONFIG_GPIO_PL061=y
|
||||
CONFIG_PL320_MBOX=y
|
||||
|
||||
# highbank
|
||||
CONFIG_EDAC_HIGHBANK_MC=m
|
||||
CONFIG_EDAC_HIGHBANK_L2=m
|
||||
CONFIG_SATA_HIGHBANK=m
|
||||
CONFIG_ARM_HIGHBANK_CPUFREQ=m
|
||||
# CONFIG_ARM_HIGHBANK_CPUIDLE is not set
|
||||
|
||||
# Allwinner a1x
|
||||
CONFIG_PINCTRL_SUNXI=y
|
||||
CONFIG_SUNXI_WATCHDOG=m
|
||||
CONFIG_MDIO_SUN4I=m
|
||||
CONFIG_NET_VENDOR_ALLWINNER=y
|
||||
CONFIG_SUN4I_EMAC=m
|
||||
CONFIG_STMMAC_PLATFORM=y
|
||||
CONFIG_DWMAC_SUNXI=y
|
||||
CONFIG_EEPROM_SUNXI_SID=m
|
||||
CONFIG_RTC_DRV_SUNXI=m
|
||||
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_I2C=m
|
||||
CONFIG_REGMAP_SPI=m
|
||||
|
@ -170,6 +177,11 @@ CONFIG_REGMAP_SPMI=m
|
|||
CONFIG_REGMAP_MMIO=m
|
||||
CONFIG_REGMAP_IRQ=y
|
||||
|
||||
# Power management
|
||||
CONFIG_PM_OPP=y
|
||||
CONFIG_ARM_CPU_SUSPEND=y
|
||||
CONFIG_GENERIC_CPUFREQ_CPU0=m
|
||||
|
||||
# usb
|
||||
CONFIG_USB_OTG=y
|
||||
# CONFIG_USB_OTG_WHITELIST is not set
|
||||
|
@ -214,6 +226,8 @@ CONFIG_USB_CONFIGFS_OBEX=y
|
|||
# CONFIG_USB_CONFIGFS_RNDIS is not set
|
||||
CONFIG_USB_CONFIGFS_SERIAL=y
|
||||
CONFIG_USB_CONFIGFS_STORAGE=y
|
||||
# CONFIG_USB_CONFIGFS_F_LB_SS is not set
|
||||
# CONFIG_USB_CONFIGFS_F_FS is not set
|
||||
|
||||
# CONFIG_MUSB_PIO_ONLY is not set
|
||||
# CONFIG_USB_MUSB_DEBUG is not set
|
||||
|
@ -256,6 +270,8 @@ CONFIG_PINCTRL_SINGLE=y
|
|||
CONFIG_GENERIC_PINCONF=y
|
||||
# CONFIG_PINCTRL_SAMSUNG is not set
|
||||
# CONFIG_PINCTRL_EXYNOS4 is not set
|
||||
# CONFIG_PINCTRL_CAPRI is not set
|
||||
# CONFIG_PINCTRL_MSM8X74 is not set
|
||||
|
||||
# GPIO
|
||||
# CONFIG_GPIO_EM is not set
|
||||
|
@ -267,8 +283,11 @@ CONFIG_GPIO_MC33880=m
|
|||
CONFIG_GPIO_TPS65910=y
|
||||
CONFIG_GPIO_TPS65912=m
|
||||
CONFIG_LEDS_GPIO=m
|
||||
CONFIG_MDIO_BUS_MUX=m
|
||||
CONFIG_MDIO_BUS_MUX_GPIO=m
|
||||
CONFIG_MDIO_BUS_MUX_MMIOREG=m
|
||||
CONFIG_INPUT_GPIO=m
|
||||
CONFIG_INPUT_GPIO_BEEPER=m
|
||||
CONFIG_INPUT_GPIO_TILT_POLLED=m
|
||||
CONFIG_INPUT_MATRIXKMAP=m
|
||||
CONFIG_KEYBOARD_GPIO=m
|
||||
|
@ -300,6 +319,7 @@ CONFIG_NFC_NCI_SPI=y
|
|||
# i2c
|
||||
CONFIG_I2C_DESIGNWARE_CORE=m
|
||||
CONFIG_I2C_DESIGNWARE_PLATFORM=m
|
||||
CONFIG_I2C_MV64XXX=m
|
||||
|
||||
# HW crypto and rng
|
||||
CONFIG_CRYPTO_SHA1_ARM=m
|
||||
|
@ -331,6 +351,22 @@ CONFIG_MTD_DATAFLASH=m
|
|||
CONFIG_MTD_DATAFLASH_WRITE_VERIFY=y
|
||||
CONFIG_MTD_DATAFLASH_OTP=y
|
||||
CONFIG_MTD_M25P80=m
|
||||
CONFIG_MTD_NAND=m
|
||||
CONFIG_MTD_NAND_CAFE=m
|
||||
# CONFIG_MTD_NAND_DENALI is not set
|
||||
CONFIG_MTD_NAND_DOCG4=m
|
||||
CONFIG_MTD_NAND_ECC_SMC=y
|
||||
CONFIG_MTD_NAND_FSMC=m
|
||||
CONFIG_MTD_NAND_GPIO=m
|
||||
CONFIG_MTD_NAND_MXC=m
|
||||
CONFIG_MTD_NAND_NANDSIM=m
|
||||
CONFIG_MTD_NAND_ORION=m
|
||||
CONFIG_MTD_NAND_PLATFORM=m
|
||||
CONFIG_MTD_NAND_PXA3xx=m
|
||||
CONFIG_MTD_NAND_RICOH=m
|
||||
CONFIG_MTD_NAND_TMIO=m
|
||||
CONFIG_MTD_SPINAND_MT29F=m
|
||||
CONFIG_MTD_SPINAND_ONDIEECC=y
|
||||
CONFIG_MTD_SST25L=m
|
||||
CONFIG_EEPROM_AT25=m
|
||||
CONFIG_EEPROM_93XX46=m
|
||||
|
@ -347,6 +383,7 @@ CONFIG_SPI_DW_PCI=m
|
|||
# CONFIG_MMC_DW_SOCFPGA is not set
|
||||
# CONFIG_MMC_DW_EXYNOS is not set
|
||||
# CONFIG_MMC_DW_IDMAC is not set
|
||||
# CONFIG_MMC_DW_K3 is not set
|
||||
CONFIG_USB_DWC2=m
|
||||
# CONFIG_USB_DWC2_DEBUG is not set
|
||||
# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set
|
||||
|
@ -355,6 +392,7 @@ CONFIG_USB_DWC3_OMAP=m
|
|||
CONFIG_USB_DWC3_EXYNOS=m
|
||||
CONFIG_USB_DWC3_PCI=m
|
||||
# CONFIG_USB_DWC3_DEBUG is not set
|
||||
# CONFIG_USB_DWC3_KEYSTONE is not set
|
||||
CONFIG_DW_WATCHDOG=m
|
||||
CONFIG_PCIE_DW=y
|
||||
CONFIG_PCI_EXYNOS=y
|
||||
|
@ -395,11 +433,12 @@ CONFIG_RTC_DRV_TPS80031=m
|
|||
# Regulators
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_RFKILL_REGULATOR=m
|
||||
# CONFIG_REGULATOR_DUMMY is not set
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=m
|
||||
CONFIG_REGULATOR_DUMMY=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_REGULATOR_VIRTUAL_CONSUMER=m
|
||||
CONFIG_REGULATOR_USERSPACE_CONSUMER=m
|
||||
CONFIG_REGULATOR_GPIO=m
|
||||
# CONFIG_REGULATOR_ACT8865 is not set
|
||||
CONFIG_REGULATOR_AD5398=m
|
||||
CONFIG_REGULATOR_DA9210=m
|
||||
CONFIG_REGULATOR_FAN53555=m
|
||||
|
@ -476,18 +515,6 @@ CONFIG_LEDS_DAC124S085=m
|
|||
CONFIG_LEDS_PWM=m
|
||||
CONFIG_BMP085_SPI=m
|
||||
|
||||
# Contiguous Memory Allocator
|
||||
CONFIG_OF_RESERVED_MEM=y
|
||||
CONFIG_CMA=y
|
||||
CONFIG_DMA_CMA=y
|
||||
# CONFIG_CMA_DEBUG is not set
|
||||
CONFIG_CMA_SIZE_MBYTES=16
|
||||
CONFIG_CMA_SIZE_SEL_MBYTES=y
|
||||
# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
|
||||
# CONFIG_CMA_SIZE_SEL_MIN is not set
|
||||
# CONFIG_CMA_SIZE_SEL_MAX is not set
|
||||
CONFIG_CMA_ALIGNMENT=8
|
||||
CONFIG_CMA_AREAS=7
|
||||
CONFIG_SRAM=y
|
||||
|
||||
# Ethernet
|
||||
|
@ -524,6 +551,9 @@ CONFIG_UBIFS_FS_LZO=y
|
|||
CONFIG_UBIFS_FS_ZLIB=y
|
||||
# CONFIG_UBIFS_FS_DEBUG is not set
|
||||
|
||||
# Sensors
|
||||
CONFIG_SENSORS_HTU21=m
|
||||
|
||||
# Chromebook
|
||||
CONFIG_MFD_CROS_EC=m
|
||||
CONFIG_MFD_CROS_EC_I2C=m
|
||||
|
@ -532,11 +562,10 @@ CONFIG_KEYBOARD_CROS_EC=m
|
|||
|
||||
# Should be in generic
|
||||
CONFIG_BPF_JIT=y
|
||||
|
||||
# CONFIG_NET_VENDOR_CIRRUS is not set
|
||||
# CONFIG_NET_VENDOR_MICROCHIP is not set
|
||||
|
||||
# CONFIG_PATA_PLATFORM is not set
|
||||
|
||||
# CONFIG_DRM_EXYNOS is not set
|
||||
# CONFIG_DRM_TILCDC is not set
|
||||
# CONFIG_DRM_IMX is not set
|
||||
|
@ -565,6 +594,8 @@ CONFIG_BPF_JIT=y
|
|||
# CONFIG_SPI_TOPCLIFF_PCH is not set
|
||||
# CONFIG_SPI_PXA2XX is not set
|
||||
# CONFIG_SPI_FSL_DSPI is not set
|
||||
# CONFIG_FB_XILINX is not set
|
||||
# CONFIG_USB_S3C_HSOTG is not set
|
||||
|
||||
# these modules all fail with missing __bad_udelay
|
||||
# http://www.spinics.net/lists/arm/msg15615.html provides some background
|
||||
|
@ -586,7 +617,5 @@ CONFIG_BPF_JIT=y
|
|||
# CONFIG_DEBUG_USER is not set
|
||||
# CONFIG_DEBUG_LL is not set
|
||||
# CONFIG_DEBUG_PINCTRL is not set
|
||||
# CONFIG_ARM_DT_BL_CPUFREQ is not set
|
||||
|
||||
# FIX ME
|
||||
# CONFIG_FB_XILINX is not set
|
||||
# CONFIG_DMADEVICES_VDEBUG is not set
|
||||
# CONFIG_DMADEVICES_DEBUG is not set
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# ARM A15 lpae unified arch kernel
|
||||
CONFIG_ARCH_EXYNOS_MULTI=y
|
||||
CONFIG_ARCH_KEYSTONE=y
|
||||
CONFIG_ARCH_VIRT=y
|
||||
CONFIG_ARCH_EXYNOS5=y
|
||||
|
||||
# CONFIG_ARCH_MVEBU is not set
|
||||
# CONFIG_ARCH_MXC is not set
|
||||
|
@ -12,23 +10,17 @@ CONFIG_ARCH_EXYNOS5=y
|
|||
# CONFIG_SOC_AM33XX is not set
|
||||
# CONFIG_SND_AM33XX_SOC_EVM is not set
|
||||
# CONFIG_SOC_AM43XX is not set
|
||||
# CONFIG_SOC_DRA7XX is not set
|
||||
# CONFIG_ARCH_ROCKCHIP is not set
|
||||
# CONFIG_ARCH_SOCFPGA is not set
|
||||
# CONFIG_ARCH_SUNXI is not set
|
||||
# CONFIG_ARCH_TEGRA is not set
|
||||
# CONFIG_ARCH_ZYNQ is not set
|
||||
|
||||
|
||||
# CONFIG_ARCH_EXYNOS4 is not set
|
||||
|
||||
# CONFIG_EXYNOS_ATAGS is not set
|
||||
|
||||
CONFIG_ARM_LPAE=y
|
||||
CONFIG_SYS_SUPPORTS_HUGETLBFS=y
|
||||
CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y
|
||||
CONFIG_ARM_VIRT_EXT=y
|
||||
CONFIG_VIRTUALIZATION=y
|
||||
CONFIG_ARM_SMMU=y
|
||||
CONFIG_ARM_DMA_IOMMU_ALIGNMENT=8
|
||||
|
||||
# Cortex-A15
|
||||
|
@ -41,7 +33,7 @@ CONFIG_KVM_ARM_MAX_VCPUS=8
|
|||
CONFIG_KVM_ARM_VGIC=y
|
||||
CONFIG_KVM_ARM_TIMER=y
|
||||
|
||||
CONFIG_XEN=y
|
||||
# CONFIG_XEN is not set
|
||||
CONFIG_XEN_FBDEV_FRONTEND=y
|
||||
CONFIG_INPUT_XEN_KBDDEV_FRONTEND=m
|
||||
CONFIG_XEN_BLKDEV_FRONTEND=m
|
||||
|
@ -58,6 +50,7 @@ CONFIG_XEN_SYS_HYPERVISOR=y
|
|||
CONFIG_XEN_GNTDEV=y
|
||||
CONFIG_XEN_GRANT_DEV_ALLOC=m
|
||||
CONFIG_XEN_WDT=m
|
||||
# CONFIG_XEN_BALLOON is not set
|
||||
|
||||
CONFIG_SERIAL_SAMSUNG=y
|
||||
CONFIG_SERIAL_SAMSUNG_CONSOLE=y
|
||||
|
@ -72,9 +65,9 @@ CONFIG_SOC_EXYNOS5440=y
|
|||
CONFIG_EXYNOS_THERMAL=m
|
||||
CONFIG_PCI_EXYNOS=y
|
||||
|
||||
CONFIG_ARM_CCI=y
|
||||
CONFIG_TCG_TIS_I2C_INFINEON=m
|
||||
|
||||
# CONFIG_EXYNOS_ATAGS is not set
|
||||
CONFIG_PINCTRL_EXYNOS=y
|
||||
CONFIG_PINCTRL_EXYNOS5440=y
|
||||
CONFIG_EXYNOS_IOMMU=y
|
||||
|
@ -113,11 +106,15 @@ CONFIG_SAMSUNG_USB3PHY=m
|
|||
CONFIG_MMC_DW_EXYNOS=m
|
||||
CONFIG_RTC_DRV_S3C=m
|
||||
|
||||
# Chromebook
|
||||
CONFIG_MFD_CROS_EC=m
|
||||
CONFIG_MFD_CROS_EC_I2C=m
|
||||
CONFIG_MFD_CROS_EC_SPI=m
|
||||
CONFIG_KEYBOARD_CROS_EC=m
|
||||
# TI Keystone
|
||||
CONFIG_KEYSTONE_USB_PHY=m
|
||||
CONFIG_USB_DWC3_KEYSTONE=m
|
||||
CONFIG_GPIO_DAVINCI=y
|
||||
CONFIG_I2C_DAVINCI=m
|
||||
# CONFIG_DAVINCI_WATCHDOG is not set
|
||||
# CONFIG_SPI_DAVINCI is not set
|
||||
# CONFIG_SND_DAVINCI_SOC is not set
|
||||
# CONFIG_TI_SOC_THERMAL is not set
|
||||
|
||||
# Arndale/Origen
|
||||
CONFIG_MFD_MAX8997=y
|
||||
|
@ -136,7 +133,3 @@ CONFIG_S3C_LOWLEVEL_UART_PORT=1
|
|||
# CONFIG_S3C2410_WATCHDOG is not set
|
||||
# CONFIG_MMC_SDHCI_S3C is not set
|
||||
# CONFIG_TEGRA_HOST1X is not set
|
||||
# CONFIG_SPI_DAVINCI is not set
|
||||
# CONFIG_I2C_DAVINCI is not set
|
||||
# CONFIG_SND_DAVINCI_SOC is not set
|
||||
# CONFIG_TI_SOC_THERMAL is not set
|
||||
|
|
|
@ -26,8 +26,6 @@ CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y
|
|||
CONFIG_FAIL_IO_TIMEOUT=y
|
||||
CONFIG_FAIL_MMC_REQUEST=y
|
||||
|
||||
CONFIG_SLUB_DEBUG_ON=y
|
||||
|
||||
CONFIG_LOCK_STAT=y
|
||||
|
||||
CONFIG_DEBUG_STACK_USAGE=y
|
||||
|
|
|
@ -128,7 +128,8 @@ CONFIG_MMC=m
|
|||
CONFIG_SDIO_UART=m
|
||||
# CONFIG_MMC_TEST is not set
|
||||
# CONFIG_MMC_DEBUG is not set
|
||||
# CONFIG_MMC_UNSAFE_RESUME is not set
|
||||
# https://lists.fedoraproject.org/pipermail/kernel/2014-February/004889.html
|
||||
CONFIG_MMC_UNSAFE_RESUME=y
|
||||
# CONFIG_MMC_CLKGATE is not set
|
||||
CONFIG_MMC_BLOCK=m
|
||||
CONFIG_MMC_BLOCK_MINORS=8
|
||||
|
@ -148,6 +149,7 @@ CONFIG_MMC_REALTEK_PCI=m
|
|||
CONFIG_MMC_VUB300=m
|
||||
# CONFIG_MMC_SDHCI_PXAV2 is not set
|
||||
# CONFIG_MMC_SDHCI_PXAV3 is not set
|
||||
# CONFIG_MMC_SDHCI_OF_ARASAN is not set
|
||||
|
||||
|
||||
CONFIG_CB710_CORE=m
|
||||
|
@ -182,6 +184,7 @@ CONFIG_INFINIBAND_NES=m
|
|||
CONFIG_INFINIBAND_QIB=m
|
||||
CONFIG_INFINIBAND_QIB_DCA=y
|
||||
# CONFIG_INFINIBAND_OCRDMA is not set
|
||||
# CONFIG_INFINIBAND_USNIC is not set
|
||||
|
||||
#
|
||||
# Executable file formats
|
||||
|
@ -196,7 +199,6 @@ CONFIG_BINFMT_MISC=m
|
|||
# Device Drivers
|
||||
#
|
||||
|
||||
# CONFIG_COMMON_CLK_DEBUG is not set
|
||||
# CONFIG_COMMON_CLK_SI5351 is not set
|
||||
|
||||
#
|
||||
|
@ -313,6 +315,8 @@ CONFIG_BLK_DEV=y
|
|||
CONFIG_BLK_DEV_NULL_BLK=m
|
||||
CONFIG_BLK_DEV_FD=m
|
||||
# CONFIG_PARIDE is not set
|
||||
CONFIG_ZRAM=m
|
||||
# CONFIG_ZRAM_DEBUG is not set
|
||||
|
||||
CONFIG_BLK_CPQ_DA=m
|
||||
CONFIG_BLK_CPQ_CISS_DA=m
|
||||
|
@ -665,7 +669,7 @@ CONFIG_FIREWIRE_SBP2=m
|
|||
CONFIG_FIREWIRE_NET=m
|
||||
CONFIG_FIREWIRE_OHCI_DEBUG=y
|
||||
CONFIG_FIREWIRE_NOSY=m
|
||||
CONFIG_FIREWIRE_SERIAL=m
|
||||
# CONFIG_FIREWIRE_SERIAL is not set
|
||||
# CONFIG_FIREWIRE_OHCI_REMOTE_DMA is not set
|
||||
|
||||
#
|
||||
|
@ -857,6 +861,7 @@ CONFIG_NETFILTER_XT_TARGET_TPROXY=m
|
|||
|
||||
CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m
|
||||
CONFIG_NETFILTER_XT_MATCH_BPF=m
|
||||
CONFIG_NETFILTER_XT_MATCH_CGROUP=m
|
||||
CONFIG_NETFILTER_XT_MATCH_CLUSTER=m
|
||||
CONFIG_NETFILTER_XT_MATCH_COMMENT=m
|
||||
CONFIG_NETFILTER_XT_MATCH_CPU=m
|
||||
|
@ -873,8 +878,10 @@ CONFIG_NETFILTER_XT_MATCH_ESP=m
|
|||
CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
|
||||
CONFIG_NETFILTER_XT_MATCH_HELPER=m
|
||||
CONFIG_NETFILTER_XT_MATCH_HL=m
|
||||
CONFIG_NETFILTER_XT_MATCH_IPCOMP=m
|
||||
CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
|
||||
CONFIG_NETFILTER_XT_MATCH_IPVS=m
|
||||
CONFIG_NETFILTER_XT_MATCH_L2TP=m
|
||||
CONFIG_NETFILTER_XT_MATCH_LENGTH=m
|
||||
CONFIG_NETFILTER_XT_MATCH_LIMIT=m
|
||||
CONFIG_NETFILTER_XT_MATCH_MAC=m
|
||||
|
@ -988,6 +995,7 @@ CONFIG_IP6_NF_TARGET_MASQUERADE=m
|
|||
|
||||
# nf_tables support
|
||||
CONFIG_NF_TABLES=m
|
||||
CONFIG_NF_TABLES_INET=m
|
||||
CONFIG_NFT_EXTHDR=m
|
||||
CONFIG_NFT_META=m
|
||||
CONFIG_NFT_CT=m
|
||||
|
@ -997,6 +1005,8 @@ CONFIG_NFT_COUNTER=m
|
|||
CONFIG_NFT_LOG=m
|
||||
CONFIG_NFT_LIMIT=m
|
||||
CONFIG_NFT_NAT=m
|
||||
CONFIG_NFT_QUEUE=m
|
||||
CONFIG_NFT_REJECT=m
|
||||
CONFIG_NFT_COMPAT=m
|
||||
|
||||
CONFIG_NF_TABLES_IPV4=m
|
||||
|
@ -1137,6 +1147,8 @@ CONFIG_NET_SCH_QFQ=m
|
|||
CONFIG_NET_SCH_CODEL=m
|
||||
CONFIG_NET_SCH_FQ_CODEL=m
|
||||
CONFIG_NET_SCH_FQ=m
|
||||
CONFIG_NET_SCH_HHF=m
|
||||
CONFIG_NET_SCH_PIE=m
|
||||
CONFIG_NET_SCH_PLUG=m
|
||||
CONFIG_NET_CLS=y
|
||||
CONFIG_NET_CLS_ACT=y
|
||||
|
@ -1186,7 +1198,6 @@ CONFIG_OPENVSWITCH=m
|
|||
CONFIG_OPENVSWITCH_GRE=y
|
||||
CONFIG_OPENVSWITCH_VXLAN=y
|
||||
CONFIG_VSOCKETS=m
|
||||
CONFIG_NETPRIO_CGROUP=m
|
||||
|
||||
|
||||
#
|
||||
|
@ -1374,6 +1385,10 @@ CONFIG_IXGBE_DCB=y
|
|||
CONFIG_IXGBE_HWMON=y
|
||||
CONFIG_IXGBE_PTP=y
|
||||
CONFIG_I40E=m
|
||||
# CONFIG_I40E_VXLAN is not set
|
||||
# CONFIG_I40E_DCB is not set
|
||||
# CONFIG_I40EVF is not set
|
||||
|
||||
|
||||
# CONFIG_NET_VENDOR_I825XX is not set
|
||||
CONFIG_NET_VENDOR_MARVELL=y
|
||||
|
@ -1620,6 +1635,9 @@ CONFIG_ATH9K_HTC=m
|
|||
CONFIG_ATH9K_BTCOEX_SUPPORT=y
|
||||
# CONFIG_ATH9K_HTC_DEBUGFS is not set
|
||||
# CONFIG_ATH9K_LEGACY_RATE_CONTROL is not set
|
||||
# CONFIG_ATH9K_STATION_STATISTICS is not set
|
||||
# CONFIG_ATH9K_WOW is not set
|
||||
#
|
||||
CONFIG_ATH10K=m
|
||||
CONFIG_ATH10K_PCI=m
|
||||
# CONFIG_ATH10K_DEBUG is not set
|
||||
|
@ -1737,6 +1755,7 @@ CONFIG_RT73USB=m
|
|||
CONFIG_RTL8180=m
|
||||
CONFIG_RTL8187=m
|
||||
# CONFIG_USB_ZD1201 is not set
|
||||
# CONFIG_USB_NET_SR9800 is not set
|
||||
CONFIG_USB_NET_RNDIS_WLAN=m
|
||||
CONFIG_USB_NET_KALMIA=m
|
||||
CONFIG_USB_NET_QMI_WWAN=m
|
||||
|
@ -1814,6 +1833,8 @@ CONFIG_NFC_HCI=m
|
|||
CONFIG_NFC_SHDLC=y
|
||||
CONFIG_NFC_LLCP=y
|
||||
CONFIG_NFC_SIM=m
|
||||
CONFIG_NFC_MRVL=m
|
||||
CONFIG_NFC_MRVL_USB=m
|
||||
|
||||
#
|
||||
# Near Field Communication (NFC) devices
|
||||
|
@ -2312,7 +2333,12 @@ CONFIG_I2C=m
|
|||
CONFIG_I2C_COMPAT=y
|
||||
CONFIG_I2C_CHARDEV=m
|
||||
# CONFIG_I2C_MUX is not set
|
||||
# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set
|
||||
# CONFIG_I2C_MUX_PCA954x is not set
|
||||
# CONFIG_I2C_MUX_GPIO is not set
|
||||
# CONFIG_I2C_MUX_PCA9541 is not set
|
||||
# CONFIG_I2C_MUX_PINCTRL is not set
|
||||
#
|
||||
|
||||
#
|
||||
# I2C Algorithms
|
||||
|
@ -2352,6 +2378,7 @@ CONFIG_I2C_NFORCE2=m
|
|||
# CONFIG_I2C_OCORES is not set
|
||||
CONFIG_I2C_PARPORT=m
|
||||
CONFIG_I2C_PARPORT_LIGHT=m
|
||||
# CONFIG_I2C_ROBOTFUZZ_OSIF is not set
|
||||
CONFIG_I2C_PASEMI=m
|
||||
CONFIG_I2C_PCA_PLATFORM=m
|
||||
# CONFIG_I2C_PIIX4 is not set
|
||||
|
@ -2536,6 +2563,7 @@ CONFIG_HID_SENSOR_ENUM_BASE_QUIRKS=y
|
|||
# CONFIG_MCP4725 is not set
|
||||
# CONFIG_ITG3200 is not set
|
||||
# CONFIG_APDS9300 is not set
|
||||
# CONFIG_CM32181 is not set
|
||||
# CONFIG_CM36651 is not set
|
||||
# CONFIG_GP2AP020A00F is not set
|
||||
# CONFIG_TSL2583 is not set
|
||||
|
@ -2550,6 +2578,7 @@ CONFIG_HID_SENSOR_ENUM_BASE_QUIRKS=y
|
|||
CONFIG_IIO_ST_GYRO_3AXIS=m
|
||||
CONFIG_IIO_ST_MAGN_3AXIS=m
|
||||
CONFIG_IIO_ST_ACCEL_3AXIS=m
|
||||
CONFIG_HID_SENSOR_INCLINOMETER_3D=m
|
||||
# CONFIG_ADJD_S311 is not set
|
||||
# CONFIG_SENSORS_TSL2563 is not set
|
||||
# CONFIG_VCNL4000 is not set
|
||||
|
@ -2587,6 +2616,8 @@ CONFIG_IIO_ST_ACCEL_3AXIS=m
|
|||
# CONFIG_ADXRS450 is not set
|
||||
# CONFIG_ADIS16400 is not set
|
||||
# CONFIG_ADIS16480 is not set
|
||||
# CONFIG_DHT11 is not set
|
||||
# CONFIG_MPL3115 is not set
|
||||
|
||||
# staging IIO drivers
|
||||
# CONFIG_AD7291 is not set
|
||||
|
@ -2718,6 +2749,7 @@ CONFIG_WM831X_WATCHDOG=m
|
|||
# CONFIG_DW_WATCHDOG is not set
|
||||
CONFIG_W83697UG_WDT=m
|
||||
# CONFIG_MEN_A21_WDT is not set
|
||||
# CONFIG_GPIO_WATCHDOG is not set
|
||||
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_TIMERIOMEM=m
|
||||
|
@ -2781,6 +2813,7 @@ CONFIG_RTC_DRV_DS3232=m
|
|||
CONFIG_RTC_DRV_ISL12022=m
|
||||
# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set
|
||||
# CONFIG_RTC_DRV_MOXART is not set
|
||||
# CONFIG_RTC_DRV_ISL12057 is not set
|
||||
|
||||
CONFIG_R3964=m
|
||||
# CONFIG_APPLICOM is not set
|
||||
|
@ -2824,6 +2857,7 @@ CONFIG_DRM_I915=m
|
|||
CONFIG_DRM_I915_KMS=y
|
||||
CONFIG_DRM_I915_FBDEV=y
|
||||
# CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT is not set
|
||||
# CONFIG_DRM_I915_UMS is not set
|
||||
CONFIG_DRM_VIA=m
|
||||
CONFIG_DRM_NOUVEAU=m
|
||||
CONFIG_NOUVEAU_DEBUG=5
|
||||
|
@ -2838,6 +2872,7 @@ CONFIG_DRM_UDL=m
|
|||
CONFIG_DRM_VMWGFX=m
|
||||
CONFIG_DRM_VMWGFX_FBCON=y
|
||||
CONFIG_DRM_QXL=m
|
||||
CONFIG_DRM_BOCHS=m
|
||||
|
||||
#
|
||||
# PCMCIA character devices
|
||||
|
@ -2871,6 +2906,10 @@ CONFIG_VIDEO_V4L2=y
|
|||
# CONFIG_VIDEO_V4L2_INT_DEVICE is not set
|
||||
CONFIG_VIDEO_V4L2_SUBDEV_API=y
|
||||
# CONFIG_VIDEO_VIVI is not set
|
||||
# CONFIG_USB_SI4713 is not set
|
||||
# CONFIG_PLATFORM_SI4713 is not set
|
||||
# CONFIG_I2C_SI4713 is not set
|
||||
# CONFIG_USB_RAREMONO is not set
|
||||
|
||||
#
|
||||
# Video For Linux
|
||||
|
@ -2904,6 +2943,7 @@ CONFIG_VIDEO_CX88_BLACKBIRD=m
|
|||
CONFIG_VIDEO_CX88_ENABLE_VP3054=y
|
||||
CONFIG_VIDEO_CX88_VP3054=m
|
||||
CONFIG_VIDEO_EM28XX=m
|
||||
CONFIG_VIDEO_EM28XX_V4L2=m
|
||||
CONFIG_VIDEO_EM28XX_ALSA=m
|
||||
CONFIG_VIDEO_EM28XX_DVB=m
|
||||
CONFIG_VIDEO_EM28XX_RC=y
|
||||
|
@ -3195,6 +3235,7 @@ CONFIG_FB_EFI=y
|
|||
# CONFIG_FB_BROADSHEET is not set
|
||||
# CONFIG_FB_UDL is not set
|
||||
# CONFIG_FB_GOLDFISH is not set
|
||||
# CONFIG_FB_OPENCORES is not set
|
||||
|
||||
# CONFIG_FIRMWARE_EDID is not set
|
||||
|
||||
|
@ -3419,6 +3460,7 @@ CONFIG_USB_EHCI_TT_NEWSCHED=y
|
|||
CONFIG_USB_ISP1362_HCD=m
|
||||
CONFIG_USB_FUSBH200_HCD=m
|
||||
# CONFIG_USB_FOTG210_HCD is not set
|
||||
# CONFIG_USB_GR_UDC is not set
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD_PCI=y
|
||||
# CONFIG_USB_OHCI_HCD_SSB is not set
|
||||
|
@ -3509,6 +3551,7 @@ CONFIG_HID_ORTEK=m
|
|||
CONFIG_HID_PANTHERLORD=m
|
||||
CONFIG_HID_PETALYNX=m
|
||||
CONFIG_HID_PICOLCD=m
|
||||
CONFIG_HID_RMI=m
|
||||
CONFIG_HID_ROCCAT=m
|
||||
CONFIG_HID_ROCCAT_KONE=m
|
||||
CONFIG_HID_SAMSUNG=m
|
||||
|
@ -3734,6 +3777,7 @@ CONFIG_USB_SERIAL_MOS7715_PARPORT=y
|
|||
# CONFIG_USB_SERIAL_ZTE is not set
|
||||
CONFIG_USB_SERIAL_MOS7840=m
|
||||
CONFIG_USB_SERIAL_MOTOROLA=m
|
||||
# CONFIG_USB_SERIAL_MXUPORT is not set
|
||||
CONFIG_USB_SERIAL_NAVMAN=m
|
||||
CONFIG_USB_SERIAL_OPTION=m
|
||||
CONFIG_USB_SERIAL_OTI6858=m
|
||||
|
@ -3777,6 +3821,7 @@ CONFIG_USB_APPLEDISPLAY=m
|
|||
|
||||
# Physical Layer USB driver
|
||||
CONFIG_USB_PHY=y
|
||||
# CONFIG_USB_OTG_FSM is not set
|
||||
|
||||
# CONFIG_GENERIC_PHY is not set
|
||||
# CONFIG_PHY_EXYNOS_MIPI_VIDEO is not set
|
||||
|
@ -3788,6 +3833,7 @@ CONFIG_USB_PHY=y
|
|||
# CONFIG_SAMSUNG_USBPHY is not set
|
||||
# CONFIG_SAMSUNG_USB2PHY is not set
|
||||
# CONFIG_SAMSUNG_USB3PHY is not set
|
||||
# CONFIG_BCM_KONA_USB2_PHY is not set
|
||||
CONFIG_USB_RCAR_PHY=m
|
||||
CONFIG_USB_ATM=m
|
||||
CONFIG_USB_CXACRU=m
|
||||
|
@ -3908,6 +3954,7 @@ CONFIG_MFD_VIPERBOARD=m
|
|||
# CONFIG_MFD_TPS65912 is not set
|
||||
# CONFIG_MFD_SYSCON is not set
|
||||
# CONFIG_MFD_DA9063 is not set
|
||||
# CONFIG_MFD_LP3943 is not set
|
||||
|
||||
#
|
||||
# File systems
|
||||
|
@ -3960,6 +4007,7 @@ CONFIG_CEPH_FS=m
|
|||
CONFIG_CEPH_FSCACHE=y
|
||||
CONFIG_BLK_DEV_RBD=m
|
||||
CONFIG_CEPH_LIB=m
|
||||
CONFIG_CEPH_FS_POSIX_ACL=y
|
||||
# CONFIG_CEPH_LIB_USE_DNS_RESOLVER is not set
|
||||
|
||||
CONFIG_FSCACHE=m
|
||||
|
@ -4268,6 +4316,7 @@ CONFIG_LOCKUP_DETECTOR=y
|
|||
# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
|
||||
# CONFIG_BOOTPARAM_HARDLOCKUP_PANIC is not set
|
||||
# CONFIG_PANIC_ON_OOPS is not set
|
||||
CONFIG_PANIC_TIMEOUT=0
|
||||
CONFIG_ATOMIC64_SELFTEST=y
|
||||
CONFIG_MEMORY_FAILURE=y
|
||||
CONFIG_HWPOISON_INJECT=m
|
||||
|
@ -4478,6 +4527,8 @@ CONFIG_MEMCG_SWAP_ENABLED=y
|
|||
CONFIG_MEMCG_KMEM=y
|
||||
# CONFIG_CGROUP_HUGETLB is not set
|
||||
CONFIG_CGROUP_PERF=y
|
||||
CONFIG_CGROUP_NET_PRIO=m
|
||||
# CONFIG_CGROUP_NET_CLASSID is not set
|
||||
CONFIG_BLK_CGROUP=y
|
||||
|
||||
# CONFIG_SYSFS_DEPRECATED is not set
|
||||
|
@ -4500,6 +4551,7 @@ CONFIG_THERMAL_GOV_FAIR_SHARE=y
|
|||
# CONFIG_THERMAL_GOV_USER_SPACE is not set
|
||||
CONFIG_THERMAL_GOV_STEP_WISE=y
|
||||
# CONFIG_THERMAL_EMULATION is not set
|
||||
# CONFIG_THERMAL_OF is not set
|
||||
# CONFIG_CPU_THERMAL is not set
|
||||
|
||||
CONFIG_INOTIFY=y
|
||||
|
@ -4761,6 +4813,7 @@ CONFIG_NOZOMI=m
|
|||
CONFIG_INPUT_APANEL=m
|
||||
CONFIG_INPUT_GP2A=m
|
||||
# CONFIG_INPUT_GPIO_TILT_POLLED is not set
|
||||
# CONFIG_INPUT_GPIO_BEEPER is not set
|
||||
|
||||
# CONFIG_INTEL_MENLOW is not set
|
||||
CONFIG_ENCLOSURE_SERVICES=m
|
||||
|
@ -4840,6 +4893,9 @@ CONFIG_STAGING_MEDIA=y
|
|||
# CONFIG_TI_ST is not set
|
||||
# CONFIG_FB_XGI is not set
|
||||
# CONFIG_VIDEO_GO7007 is not set
|
||||
# CONFIG_I2C_BCM2048 is not set
|
||||
# CONFIG_VIDEO_TCM825X is not set
|
||||
# CONFIG_VIDEO_OMAP4 is not set
|
||||
# CONFIG_USB_MSI3101 is not set
|
||||
# CONFIG_DT3155 is not set
|
||||
# CONFIG_W35UND is not set
|
||||
|
@ -4867,10 +4923,10 @@ CONFIG_RTL8192E=m
|
|||
# CONFIG_VIDEO_CX25821 is not set
|
||||
# CONFIG_R8187SE is not set
|
||||
# CONFIG_R8188EU is not set
|
||||
# CONFIG_R8821AE is not set
|
||||
# CONFIG_RTL8192U 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
|
||||
|
@ -4895,7 +4951,6 @@ CONFIG_ALTERA_STAPL=m
|
|||
# CONFIG_RTS5139 is not set
|
||||
# CONFIG_NVEC_LEDS is not set
|
||||
# CONFIG_VT6655 is not set
|
||||
# CONFIG_ZSMALLOC is not set
|
||||
# CONFIG_RAMSTER is not set
|
||||
# CONFIG_USB_WPAN_HCD is not set
|
||||
# CONFIG_WIMAX_GDM72XX is not set
|
||||
|
@ -4912,6 +4967,7 @@ CONFIG_ALTERA_STAPL=m
|
|||
# CONFIG_XILLYBUS is not set
|
||||
# CONFIG_DGAP is not set
|
||||
# CONFIG_DGNC is not set
|
||||
# CONFIG_RTS5208 is not set
|
||||
# END OF STAGING
|
||||
|
||||
#
|
||||
|
@ -4987,6 +5043,8 @@ CONFIG_PTP_1588_CLOCK_PCH=m
|
|||
CONFIG_CLEANCACHE=y
|
||||
CONFIG_FRONTSWAP=y
|
||||
CONFIG_ZSWAP=y
|
||||
CONFIG_ZSMALLOC=y
|
||||
# CONFIG_PGTABLE_MAPPING is not set
|
||||
|
||||
# CONFIG_MDIO_GPIO is not set
|
||||
# CONFIG_KEYBOARD_GPIO is not set
|
||||
|
@ -5026,16 +5084,17 @@ CONFIG_GPIO_VIPERBOARD=m
|
|||
# CONFIG_GPIO_GRGPIO is not set
|
||||
# CONFIG_GPIO_PL061 is not set
|
||||
# CONFIG_GPIO_BCM_KONA is not set
|
||||
# CONFIG_GPIO_SCH311X is not set
|
||||
|
||||
# FIXME: Why?
|
||||
CONFIG_EVENT_POWER_TRACING_DEPRECATED=y
|
||||
|
||||
CONFIG_TEST_KSTRTOX=y
|
||||
CONFIG_XZ_DEC=y
|
||||
# CONFIG_XZ_DEC_X86 is not set
|
||||
# CONFIG_XZ_DEC_POWERPC is not set
|
||||
CONFIG_XZ_DEC_X86=y
|
||||
CONFIG_XZ_DEC_POWERPC=y
|
||||
# CONFIG_XZ_DEC_IA64 is not set
|
||||
# CONFIG_XZ_DEC_ARM is not set
|
||||
CONFIG_XZ_DEC_ARM=y
|
||||
# CONFIG_XZ_DEC_ARMTHUMB is not set
|
||||
# CONFIG_XZ_DEC_SPARC is not set
|
||||
# CONFIG_XZ_DEC_TEST is not set
|
||||
|
@ -5058,6 +5117,8 @@ CONFIG_PSTORE_RAM=m
|
|||
# CONFIG_PSTORE_CONSOLE is not set
|
||||
# CONFIG_PSTORE_FTRACE is not set
|
||||
|
||||
# CONFIG_TEST_MODULE is not set
|
||||
# CONFIG_TEST_USER_COPY is not set
|
||||
|
||||
# CONFIG_AVERAGE is not set
|
||||
# CONFIG_VMXNET3 is not set
|
||||
|
@ -5089,10 +5150,14 @@ CONFIG_FMC_TRIVIAL=m
|
|||
CONFIG_FMC_WRITE_EEPROM=m
|
||||
CONFIG_FMC_CHARDEV=m
|
||||
|
||||
# CONFIG_GENWQE is not set
|
||||
|
||||
# CONFIG_POWERCAP is not set
|
||||
|
||||
# CONFIG_HSI is not set
|
||||
|
||||
# CONFIG_CPU_IDLE is not set
|
||||
|
||||
# CONFIG_ARM_ARCH_TIMER_EVTSTREAM is not set
|
||||
|
||||
# CONFIG_PM_DEVFREQ is not set
|
||||
|
|
|
@ -26,8 +26,6 @@ CONFIG_CPUMASK_OFFSTACK=y
|
|||
# CONFIG_FAIL_IO_TIMEOUT is not set
|
||||
# CONFIG_FAIL_MMC_REQUEST is not set
|
||||
|
||||
# CONFIG_SLUB_DEBUG_ON is not set
|
||||
|
||||
# CONFIG_LOCK_STAT is not set
|
||||
|
||||
# CONFIG_DEBUG_STACK_USAGE is not set
|
||||
|
|
|
@ -321,6 +321,7 @@ CONFIG_SERIAL_GRLIB_GAISLER_APBUART=m
|
|||
|
||||
# CONFIG_PPC_MPC512x is not set
|
||||
# CONFIG_RTC_DRV_MPC5121 is not set
|
||||
# CONFIG_RTC_DRV_HYM8563 is not set
|
||||
|
||||
# CONFIG_MPC512X_DMA is not set
|
||||
|
||||
|
@ -360,7 +361,7 @@ CONFIG_RCU_FANOUT_LEAF=16
|
|||
# CONFIG_SPAPR_TCE_IOMMU is not set
|
||||
# CONFIG_TRANSPARENT_HUGEPAGE is not set
|
||||
|
||||
# CONFIG_PPC_DENORMALISATION is not set
|
||||
CONFIG_PPC_DENORMALISATION=y
|
||||
# CONFIG_MDIO_BUS_MUX_MMIOREG is not set
|
||||
# CONFIG_GPIO_ADNP is not set
|
||||
# CONFIG_MFD_SYSCON is not set
|
||||
|
|
|
@ -89,6 +89,8 @@ CONFIG_NR_CPUS=1024
|
|||
CONFIG_RTAS_PROC=y
|
||||
CONFIG_IOMMU_VMERGE=y
|
||||
CONFIG_NUMA=y
|
||||
CONFIG_NUMA_BALANCING=y
|
||||
CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y
|
||||
CONFIG_PPC_64K_PAGES=y
|
||||
CONFIG_PPC_SUBPAGE_PROT=y
|
||||
CONFIG_SCHED_SMT=y
|
||||
|
@ -99,6 +101,8 @@ CONFIG_HZ_100=y
|
|||
|
||||
CONFIG_MEMORY_HOTREMOVE=y
|
||||
|
||||
CONFIG_PPC64_SUPPORTS_MEMORY_FAILURE=y
|
||||
|
||||
CONFIG_CGROUP_HUGETLB=y
|
||||
|
||||
# CONFIG_MV643XX_ETH is not set
|
||||
|
@ -159,7 +163,8 @@ CONFIG_PSERIES_ENERGY=m
|
|||
|
||||
CONFIG_CPU_IDLE=y
|
||||
# CONFIG_CPU_IDLE_GOV_LADDER is not set
|
||||
CONFIG_PSERIES_IDLE=y
|
||||
CONFIG_PSERIES_CPUIDLE=y
|
||||
CONFIG_POWERNV_CPUIDLE=y
|
||||
|
||||
CONFIG_PPC_ICSWX=y
|
||||
CONFIG_IO_EVENT_IRQ=y
|
||||
|
|
|
@ -80,6 +80,8 @@ CONFIG_NR_CPUS=1024
|
|||
CONFIG_RTAS_PROC=y
|
||||
CONFIG_IOMMU_VMERGE=y
|
||||
CONFIG_NUMA=y
|
||||
CONFIG_NUMA_BALANCING=y
|
||||
CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y
|
||||
CONFIG_PPC_64K_PAGES=y
|
||||
CONFIG_PPC_SUBPAGE_PROT=y
|
||||
CONFIG_SCHED_SMT=y
|
||||
|
@ -90,6 +92,8 @@ CONFIG_HZ_100=y
|
|||
|
||||
CONFIG_MEMORY_HOTREMOVE=y
|
||||
|
||||
CONFIG_PPC64_SUPPORTS_MEMORY_FAILURE=y
|
||||
|
||||
CONFIG_CGROUP_HUGETLB=y
|
||||
|
||||
# CONFIG_MV643XX_ETH is not set
|
||||
|
@ -150,7 +154,8 @@ CONFIG_PSERIES_ENERGY=m
|
|||
|
||||
CONFIG_CPU_IDLE=y
|
||||
# CONFIG_CPU_IDLE_GOV_LADDER is not set
|
||||
CONFIG_PSERIES_IDLE=y
|
||||
CONFIG_PSERIES_CPUIDLE=y
|
||||
CONFIG_POWERNV_CPUIDLE=y
|
||||
|
||||
CONFIG_PPC_ICSWX=y
|
||||
CONFIG_IO_EVENT_IRQ=y
|
||||
|
|
|
@ -224,8 +224,13 @@ CONFIG_BACKLIGHT_PWM=m
|
|||
# CONFIG_GPIO_ADNP is not set
|
||||
# CONFIG_BACKLIGHT_OT200 is not set
|
||||
# CONFIG_RTC_DRV_SNVS is not set
|
||||
# CONFIG_RTC_DRV_HYM8563 is not set
|
||||
# CONFIG_OF_DISPLAY_TIMING is not set
|
||||
# CONFIG_OF_VIDEOMODE is not set
|
||||
|
||||
# CONFIG_MLX5_INFINIBAND is not set
|
||||
# CONFIG_PINCTRL_SINGLE is not set
|
||||
# CONFIG_PINCTRL_CAPRI is not set
|
||||
# CONFIG_PINCTRL_MSM8X74 is not set
|
||||
# CONFIG_COMMON_CLK_SI570 is not set
|
||||
# CONFIG_COMMON_CLK_QCOM is not set
|
||||
|
|
|
@ -41,6 +41,7 @@ CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE=y
|
|||
CONFIG_EFI_PCDP=y
|
||||
CONFIG_FB_EFI=y
|
||||
CONFIG_EARLY_PRINTK_EFI=y
|
||||
CONFIG_EFI_RUNTIME_MAP=y
|
||||
# needs FB_SIMPLE to work correctly
|
||||
# CONFIG_X86_SYSFB is not set
|
||||
|
||||
|
@ -114,6 +115,9 @@ CONFIG_NVRAM=y
|
|||
CONFIG_CRYPTO_DEV_PADLOCK=m
|
||||
CONFIG_CRYPTO_DEV_PADLOCK_AES=m
|
||||
CONFIG_CRYPTO_DEV_PADLOCK_SHA=m
|
||||
CONFIG_CRYPTO_DEV_CCP=y
|
||||
CONFIG_CRYPTO_DEV_CCP_DD=m
|
||||
CONFIG_CRYPTO_DEV_CCP_CRYPTO=m
|
||||
|
||||
CONFIG_GENERIC_ISA_DMA=y
|
||||
|
||||
|
@ -200,6 +204,7 @@ CONFIG_COMPAL_LAPTOP=m
|
|||
CONFIG_DELL_LAPTOP=m
|
||||
CONFIG_CHROME_PLATFORMS=y
|
||||
CONFIG_CHROMEOS_LAPTOP=m
|
||||
CONFIG_CHROMEOS_PSTORE=m
|
||||
CONFIG_EEEPC_LAPTOP=m
|
||||
CONFIG_FUJITSU_TABLET=m
|
||||
CONFIG_FUJITSU_LAPTOP=m
|
||||
|
@ -216,6 +221,7 @@ CONFIG_ACER_WMI=m
|
|||
CONFIG_ACERHDF=m
|
||||
CONFIG_ASUS_WMI=m
|
||||
CONFIG_ASUS_NB_WMI=m
|
||||
CONFIG_HP_WIRELESS=m
|
||||
CONFIG_HP_WMI=m
|
||||
# CONFIG_INTEL_SCU_IPC is not set
|
||||
CONFIG_DELL_WMI=m
|
||||
|
@ -410,6 +416,7 @@ CONFIG_HP_ACCEL=m
|
|||
|
||||
CONFIG_SCHED_SMT=y
|
||||
CONFIG_CC_STACKPROTECTOR=y
|
||||
CONFIG_CC_STACKPROTECTOR_STRONG=y
|
||||
CONFIG_RELOCATABLE=y
|
||||
|
||||
CONFIG_HYPERV=m
|
||||
|
@ -446,6 +453,7 @@ CONFIG_PINCTRL_BAYTRAIL=y
|
|||
|
||||
# CONFIG_INTEL_POWERCLAMP is not set
|
||||
CONFIG_X86_PKG_TEMP_THERMAL=m
|
||||
CONFIG_ACPI_INT3403_THERMAL=m
|
||||
|
||||
CONFIG_VMWARE_VMCI=m
|
||||
CONFIG_VMWARE_VMCI_VSOCKETS=m
|
||||
|
|
|
@ -37,6 +37,7 @@ CONFIG_SWIOTLB=y
|
|||
# CONFIG_GART_IOMMU is not set
|
||||
|
||||
CONFIG_TRANSPARENT_HUGEPAGE=y
|
||||
CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y
|
||||
CONFIG_CGROUP_HUGETLB=y
|
||||
CONFIG_MEM_SOFT_DIRTY=y
|
||||
|
||||
|
@ -93,7 +94,8 @@ 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_HOTPLUG=y
|
||||
# CONFIG_ARCH_MEMORY_PROBE is not set
|
||||
# CONFIG_MEMORY_HOTREMOVE is not set
|
||||
|
||||
# CONFIG_BLK_DEV_CMD640 is not set
|
||||
|
@ -116,6 +118,7 @@ CONFIG_XEN_DEV_EVTCHN=m
|
|||
CONFIG_XEN_SYS_HYPERVISOR=y
|
||||
# CONFIG_XEN_MCE_LOG is not set
|
||||
# CONFIG_XEN_STUB is not set
|
||||
# CONFIG_XEN_PVH is not set
|
||||
|
||||
CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
|
||||
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
Bugzilla: 993744
|
||||
Upstream-status: ??
|
||||
|
||||
diff --git a/drivers/md/dm-cache-policy-mq.c b/drivers/md/dm-cache-policy-mq.c
|
||||
index 416b7b7..9105771 100644
|
||||
--- a/drivers/md/dm-cache-policy-mq.c
|
||||
+++ b/drivers/md/dm-cache-policy-mq.c
|
||||
@@ -866,7 +866,7 @@ static void mq_destroy(struct dm_cache_policy *p)
|
||||
{
|
||||
struct mq_policy *mq = to_mq_policy(p);
|
||||
|
||||
- kfree(mq->table);
|
||||
+ vfree(mq->table);
|
||||
epool_exit(&mq->cache_pool);
|
||||
epool_exit(&mq->pre_cache_pool);
|
||||
kfree(mq);
|
||||
@@ -1221,7 +1221,7 @@ static struct dm_cache_policy *mq_create(dm_cblock_t cache_size,
|
||||
|
||||
mq->nr_buckets = next_power(from_cblock(cache_size) / 2, 16);
|
||||
mq->hash_bits = ffs(mq->nr_buckets) - 1;
|
||||
- mq->table = kzalloc(sizeof(*mq->table) * mq->nr_buckets, GFP_KERNEL);
|
||||
+ mq->table = vzalloc(sizeof(*mq->table) * mq->nr_buckets);
|
||||
if (!mq->table)
|
||||
goto bad_alloc_table;
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
Bugzilla: 1106856
|
||||
Upstream-status: 3.16 and CC'd to stable
|
||||
|
||||
From 4adc9ea8915ff9904c3279b1b36478482d1c0825 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Czerner <lczerner@redhat.com>
|
||||
Date: Wed, 11 Jun 2014 12:28:43 -0400
|
||||
Subject: dm thin: update discard_granularity to reflect the thin-pool
|
||||
blocksize
|
||||
|
||||
DM thinp already checks whether the discard_granularity of the data
|
||||
device is a factor of the thin-pool block size. But when using the
|
||||
dm-thin-pool's discard passdown support, DM thinp was not selecting the
|
||||
max of the underlying data device's discard_granularity and the
|
||||
thin-pool's block size.
|
||||
|
||||
Update set_discard_limits() to set discard_granularity to the max of
|
||||
these values. This enables blkdev_issue_discard() to properly align the
|
||||
discards that are sent to the DM thin device on a full block boundary.
|
||||
As such each discard will now cover an entire DM thin-pool block and the
|
||||
block will be reclaimed.
|
||||
|
||||
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
|
||||
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
|
||||
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
|
||||
Cc: stable@vger.kernel.org
|
||||
|
||||
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
|
||||
index a0bdd56..fc9c848 100644
|
||||
--- a/drivers/md/dm-thin.c
|
||||
+++ b/drivers/md/dm-thin.c
|
||||
@@ -3094,7 +3094,8 @@ static void set_discard_limits(struct pool_c *pt, struct queue_limits *limits)
|
||||
*/
|
||||
if (pt->adjusted_pf.discard_passdown) {
|
||||
data_limits = &bdev_get_queue(pt->data_dev->bdev)->limits;
|
||||
- limits->discard_granularity = data_limits->discard_granularity;
|
||||
+ limits->discard_granularity = max(data_limits->discard_granularity,
|
||||
+ pool->sectors_per_block << SECTOR_SHIFT);
|
||||
} else
|
||||
limits->discard_granularity = pool->sectors_per_block << SECTOR_SHIFT;
|
||||
}
|
||||
--
|
||||
cgit v0.10.1
|
||||
|
|
@ -0,0 +1,119 @@
|
|||
Bugzilla: 1060327
|
||||
Upstream-status: Queued for 3.16
|
||||
|
||||
diff -up linux-3.14.2-200.fc20.i686/drivers/gpu/drm/drm_crtc_helper.c.dma linux-3.14.2-200.fc20.i686/drivers/gpu/drm/drm_crtc_helper.c
|
||||
--- linux-3.14.2-200.fc20.i686/drivers/gpu/drm/drm_crtc_helper.c.dma 2014-03-31 13:40:15.000000000 +1000
|
||||
+++ linux-3.14.2-200.fc20.i686/drivers/gpu/drm/drm_crtc_helper.c 2014-05-01 10:27:07.410210002 +1000
|
||||
@@ -120,8 +120,8 @@ static void drm_mode_validate_flag(struc
|
||||
* RETURNS:
|
||||
* Number of modes found on @connector.
|
||||
*/
|
||||
-int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
|
||||
- uint32_t maxX, uint32_t maxY)
|
||||
+static int drm_helper_probe_single_connector_modes_merge_bits(struct drm_connector *connector,
|
||||
+ uint32_t maxX, uint32_t maxY, bool merge_type_bits)
|
||||
{
|
||||
struct drm_device *dev = connector->dev;
|
||||
struct drm_display_mode *mode;
|
||||
@@ -173,7 +173,7 @@ int drm_helper_probe_single_connector_mo
|
||||
if (count == 0)
|
||||
goto prune;
|
||||
|
||||
- drm_mode_connector_list_update(connector);
|
||||
+ drm_mode_connector_list_update(connector, merge_type_bits);
|
||||
|
||||
if (maxX && maxY)
|
||||
drm_mode_validate_size(dev, &connector->modes, maxX,
|
||||
@@ -213,8 +213,21 @@ prune:
|
||||
|
||||
return count;
|
||||
}
|
||||
+
|
||||
+int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
|
||||
+ uint32_t maxX, uint32_t maxY)
|
||||
+{
|
||||
+ return drm_helper_probe_single_connector_modes_merge_bits(connector, maxX, maxY, true);
|
||||
+}
|
||||
EXPORT_SYMBOL(drm_helper_probe_single_connector_modes);
|
||||
|
||||
+int drm_helper_probe_single_connector_modes_nomerge(struct drm_connector *connector,
|
||||
+ uint32_t maxX, uint32_t maxY)
|
||||
+{
|
||||
+ return drm_helper_probe_single_connector_modes_merge_bits(connector, maxX, maxY, false);
|
||||
+}
|
||||
+EXPORT_SYMBOL(drm_helper_probe_single_connector_modes_nomerge);
|
||||
+
|
||||
/**
|
||||
* drm_helper_encoder_in_use - check if a given encoder is in use
|
||||
* @encoder: encoder to check
|
||||
diff -up linux-3.14.2-200.fc20.i686/drivers/gpu/drm/drm_modes.c.dma linux-3.14.2-200.fc20.i686/drivers/gpu/drm/drm_modes.c
|
||||
--- linux-3.14.2-200.fc20.i686/drivers/gpu/drm/drm_modes.c.dma 2014-03-31 13:40:15.000000000 +1000
|
||||
+++ linux-3.14.2-200.fc20.i686/drivers/gpu/drm/drm_modes.c 2014-05-01 10:27:59.015207267 +1000
|
||||
@@ -1025,7 +1025,7 @@ EXPORT_SYMBOL(drm_mode_sort);
|
||||
* list and only adds different modes. All modes unverified after this point
|
||||
* will be removed by the prune invalid modes.
|
||||
*/
|
||||
-void drm_mode_connector_list_update(struct drm_connector *connector)
|
||||
+void drm_mode_connector_list_update(struct drm_connector *connector, bool merge_type_bits)
|
||||
{
|
||||
struct drm_display_mode *mode;
|
||||
struct drm_display_mode *pmode, *pt;
|
||||
@@ -1041,7 +1041,10 @@ void drm_mode_connector_list_update(stru
|
||||
/* if equal delete the probed mode */
|
||||
mode->status = pmode->status;
|
||||
/* Merge type bits together */
|
||||
- mode->type |= pmode->type;
|
||||
+ if (merge_type_bits)
|
||||
+ mode->type |= pmode->type;
|
||||
+ else
|
||||
+ mode->type = pmode->type;
|
||||
list_del(&pmode->head);
|
||||
drm_mode_destroy(connector->dev, pmode);
|
||||
break;
|
||||
diff -up linux-3.14.2-200.fc20.i686/drivers/gpu/drm/qxl/qxl_display.c.dma linux-3.14.2-200.fc20.i686/drivers/gpu/drm/qxl/qxl_display.c
|
||||
--- linux-3.14.2-200.fc20.i686/drivers/gpu/drm/qxl/qxl_display.c.dma 2014-03-31 13:40:15.000000000 +1000
|
||||
+++ linux-3.14.2-200.fc20.i686/drivers/gpu/drm/qxl/qxl_display.c 2014-05-01 10:27:07.411210001 +1000
|
||||
@@ -841,7 +841,7 @@ static const struct drm_connector_funcs
|
||||
.save = qxl_conn_save,
|
||||
.restore = qxl_conn_restore,
|
||||
.detect = qxl_conn_detect,
|
||||
- .fill_modes = drm_helper_probe_single_connector_modes,
|
||||
+ .fill_modes = drm_helper_probe_single_connector_modes_nomerge,
|
||||
.set_property = qxl_conn_set_property,
|
||||
.destroy = qxl_conn_destroy,
|
||||
};
|
||||
diff -up linux-3.14.2-200.fc20.i686/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c.dma linux-3.14.2-200.fc20.i686/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
|
||||
--- linux-3.14.2-200.fc20.i686/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c.dma 2014-03-31 13:40:15.000000000 +1000
|
||||
+++ linux-3.14.2-200.fc20.i686/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c 2014-05-01 10:27:07.411210001 +1000
|
||||
@@ -2003,7 +2003,7 @@ int vmw_du_connector_fill_modes(struct d
|
||||
if (du->pref_mode)
|
||||
list_move(&du->pref_mode->head, &connector->probed_modes);
|
||||
|
||||
- drm_mode_connector_list_update(connector);
|
||||
+ drm_mode_connector_list_update(connector, true);
|
||||
|
||||
return 1;
|
||||
}
|
||||
diff -up linux-3.14.2-200.fc20.i686/include/drm/drm_crtc.h.dma linux-3.14.2-200.fc20.i686/include/drm/drm_crtc.h
|
||||
--- linux-3.14.2-200.fc20.i686/include/drm/drm_crtc.h.dma 2014-03-31 13:40:15.000000000 +1000
|
||||
+++ linux-3.14.2-200.fc20.i686/include/drm/drm_crtc.h 2014-05-01 10:27:07.412210001 +1000
|
||||
@@ -1033,7 +1033,7 @@ extern int drm_mode_hsync(const struct d
|
||||
extern int drm_mode_vrefresh(const struct drm_display_mode *mode);
|
||||
extern void drm_mode_set_crtcinfo(struct drm_display_mode *p,
|
||||
int adjust_flags);
|
||||
-extern void drm_mode_connector_list_update(struct drm_connector *connector);
|
||||
+extern void drm_mode_connector_list_update(struct drm_connector *connector, bool merge_type_bits);
|
||||
extern int drm_mode_connector_update_edid_property(struct drm_connector *connector,
|
||||
struct edid *edid);
|
||||
extern int drm_object_property_set_value(struct drm_mode_object *obj,
|
||||
diff -up linux-3.14.2-200.fc20.i686/include/drm/drm_crtc_helper.h.dma linux-3.14.2-200.fc20.i686/include/drm/drm_crtc_helper.h
|
||||
--- linux-3.14.2-200.fc20.i686/include/drm/drm_crtc_helper.h.dma 2014-03-31 13:40:15.000000000 +1000
|
||||
+++ linux-3.14.2-200.fc20.i686/include/drm/drm_crtc_helper.h 2014-05-01 10:27:07.412210001 +1000
|
||||
@@ -126,6 +126,7 @@ struct drm_connector_helper_funcs {
|
||||
};
|
||||
|
||||
extern int drm_helper_probe_single_connector_modes(struct drm_connector *connector, uint32_t maxX, uint32_t maxY);
|
||||
+extern int drm_helper_probe_single_connector_modes_nomerge(struct drm_connector *connector, uint32_t maxX, uint32_t maxY);
|
||||
extern void drm_helper_disable_unused_functions(struct drm_device *dev);
|
||||
extern int drm_crtc_helper_set_config(struct drm_mode_set *set);
|
||||
extern bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
|
|
@ -0,0 +1,113 @@
|
|||
Bugzilla: 1094066
|
||||
Upstream-status: Sent for 3.16 and CC'd to stable
|
||||
|
||||
Return-Path: intel-gfx-bounces@lists.freedesktop.org
|
||||
Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
|
||||
zmta02.collab.prod.int.phx2.redhat.com) (10.5.81.9) by
|
||||
zmail15.collab.prod.int.phx2.redhat.com with LMTP; Mon, 9 Jun 2014 11:25:31
|
||||
-0400 (EDT)
|
||||
Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26])
|
||||
by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 096281200BD;
|
||||
Mon, 9 Jun 2014 11:25:31 -0400 (EDT)
|
||||
Received: from mx1.redhat.com (ext-mx15.extmail.prod.ext.phx2.redhat.com [10.5.110.20])
|
||||
by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s59FPUv0027350;
|
||||
Mon, 9 Jun 2014 11:25:30 -0400
|
||||
Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177])
|
||||
by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s59FPTet021179;
|
||||
Mon, 9 Jun 2014 11:25:29 -0400
|
||||
Received: from gabe.freedesktop.org (localhost [127.0.0.1])
|
||||
by gabe.freedesktop.org (Postfix) with ESMTP id 7B8736E587;
|
||||
Mon, 9 Jun 2014 08:25:28 -0700 (PDT)
|
||||
X-Original-To: intel-gfx@lists.freedesktop.org
|
||||
Delivered-To: intel-gfx@lists.freedesktop.org
|
||||
Received: from mga11.intel.com (mga11.intel.com [192.55.52.93])
|
||||
by gabe.freedesktop.org (Postfix) with ESMTP id D28006E587
|
||||
for <intel-gfx@lists.freedesktop.org>; Mon, 9 Jun 2014 08:25:27 -0700 (PDT)
|
||||
Received: from fmsmga002.fm.intel.com ([10.253.24.26])
|
||||
by fmsmga102.fm.intel.com with ESMTP; 09 Jun 2014 08:24:37 -0700
|
||||
X-ExtLoop1: 1
|
||||
X-IronPort-AV: E=Sophos;i="4.98,1002,1392192000"; d="scan'208";a="552705861"
|
||||
Received: from jnikula-mobl1.fi.intel.com (HELO localhost) ([10.237.72.185])
|
||||
by fmsmga002.fm.intel.com with ESMTP; 09 Jun 2014 08:24:35 -0700
|
||||
From: Jani Nikula <jani.nikula@intel.com>
|
||||
To: intel-gfx@lists.freedesktop.org
|
||||
Date: Mon, 9 Jun 2014 18:24:34 +0300
|
||||
Message-Id: <1402327474-27930-1-git-send-email-jani.nikula@intel.com>
|
||||
Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo
|
||||
Cc: jani.nikula@intel.com, Marc Milgram <mmilgram@redhat.com>,
|
||||
Stable <stable@vger.kernel.org>, mcy@lm7.fr
|
||||
Subject: [Intel-gfx] [PATCH] drm/i915: set backlight duty cycle after
|
||||
backlight enable for gen4
|
||||
X-BeenThere: intel-gfx@lists.freedesktop.org
|
||||
X-Mailman-Version: 2.1.15
|
||||
Precedence: list
|
||||
List-Id: Intel graphics driver community testing & development
|
||||
<intel-gfx.lists.freedesktop.org>
|
||||
List-Unsubscribe: <http://lists.freedesktop.org/mailman/options/intel-gfx>,
|
||||
<mailto:intel-gfx-request@lists.freedesktop.org?subject=unsubscribe>
|
||||
List-Archive: <http://lists.freedesktop.org/archives/intel-gfx>
|
||||
List-Post: <mailto:intel-gfx@lists.freedesktop.org>
|
||||
List-Help: <mailto:intel-gfx-request@lists.freedesktop.org?subject=help>
|
||||
List-Subscribe: <http://lists.freedesktop.org/mailman/listinfo/intel-gfx>,
|
||||
<mailto:intel-gfx-request@lists.freedesktop.org?subject=subscribe>
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="us-ascii"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Errors-To: intel-gfx-bounces@lists.freedesktop.org
|
||||
Sender: "Intel-gfx" <intel-gfx-bounces@lists.freedesktop.org>
|
||||
X-RedHat-Spam-Score: -5.25 (BAYES_00,DCC_REPUT_00_12,RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,URIBL_BLOCKED)
|
||||
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26
|
||||
X-Scanned-By: MIMEDefang 2.68 on 10.5.110.20
|
||||
|
||||
For reasons I can't claim to fully understand gen4 seems to require
|
||||
backlight duty cycle setting after the backlight has been enabled, or
|
||||
else black screen follows. I don't have documentation for the correct
|
||||
sequence on gen4 either. Confirmed on Dell Latitude D630 and MacBook4,1.
|
||||
|
||||
This fixes a regression introduced by
|
||||
commit b35684b8fa94e04f55fd38bf672b737741d2f9e2
|
||||
Author: Jani Nikula <jani.nikula@intel.com>
|
||||
Date: Thu Nov 14 12:13:41 2013 +0200
|
||||
|
||||
drm/i915: do full backlight setup at enable time
|
||||
|
||||
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=75791
|
||||
Reported-and-tested-by: mcy@lm7.fr
|
||||
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79423
|
||||
Reported-and-tested-by: Marc Milgram <mmilgram@redhat.com>
|
||||
Cc: Stable <stable@vger.kernel.org> # 3.14+
|
||||
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
|
||||
---
|
||||
drivers/gpu/drm/i915/intel_panel.c | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
|
||||
index 5e6c888b4928..38a98570d10c 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_panel.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_panel.c
|
||||
@@ -798,9 +798,6 @@ static void i965_enable_backlight(struct intel_connector *connector)
|
||||
ctl = freq << 16;
|
||||
I915_WRITE(BLC_PWM_CTL, ctl);
|
||||
|
||||
- /* XXX: combine this into above write? */
|
||||
- intel_panel_actually_set_backlight(connector, panel->backlight.level);
|
||||
-
|
||||
ctl2 = BLM_PIPE(pipe);
|
||||
if (panel->backlight.combination_mode)
|
||||
ctl2 |= BLM_COMBINATION_MODE;
|
||||
@@ -809,6 +806,8 @@ static void i965_enable_backlight(struct intel_connector *connector)
|
||||
I915_WRITE(BLC_PWM_CTL2, ctl2);
|
||||
POSTING_READ(BLC_PWM_CTL2);
|
||||
I915_WRITE(BLC_PWM_CTL2, ctl2 | BLM_PWM_ENABLE);
|
||||
+
|
||||
+ intel_panel_actually_set_backlight(connector, panel->backlight.level);
|
||||
}
|
||||
|
||||
static void vlv_enable_backlight(struct intel_connector *connector)
|
||||
--
|
||||
1.9.1
|
||||
|
||||
_______________________________________________
|
||||
Intel-gfx mailing list
|
||||
Intel-gfx@lists.freedesktop.org
|
||||
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
|
|
@ -1,65 +0,0 @@
|
|||
Bugzilla: 994438
|
||||
Upstream-status: 3.14
|
||||
|
||||
From 2b6e0ca175fe4a20f21ba82b1e7ccc71029c4dd4 Mon Sep 17 00:00:00 2001
|
||||
From: Michele Baldessari <michele@acksyn.org>
|
||||
Date: Thu, 30 Jan 2014 10:51:04 +0000
|
||||
Subject: [PATCH] e100: Fix "disabling already-disabled device" warning
|
||||
|
||||
In https://bugzilla.redhat.com/show_bug.cgi?id=994438 and
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=970480 we
|
||||
received different reports of e100 throwing the following
|
||||
warning:
|
||||
|
||||
[<c06a0ba5>] ? pci_disable_device+0x85/0x90
|
||||
[<c044a153>] warn_slowpath_fmt+0x33/0x40
|
||||
[<c06a0ba5>] pci_disable_device+0x85/0x90
|
||||
[<f7fdf7e0>] __e100_shutdown+0x80/0x120 [e100]
|
||||
[<c0476ca5>] ? check_preempt_curr+0x65/0x90
|
||||
[<f7fdf8d6>] e100_suspend+0x16/0x30 [e100]
|
||||
[<c06a1ebb>] pci_legacy_suspend+0x2b/0xb0
|
||||
[<c098fc0f>] ? wait_for_completion+0x1f/0xd0
|
||||
[<c06a2d50>] ? pci_pm_poweroff+0xb0/0xb0
|
||||
[<c06a2de4>] pci_pm_freeze+0x94/0xa0
|
||||
[<c0767bb7>] dpm_run_callback+0x37/0x80
|
||||
[<c076a204>] ? pm_wakeup_pending+0xc4/0x140
|
||||
[<c0767f12>] __device_suspend+0xb2/0x1f0
|
||||
[<c076806f>] async_suspend+0x1f/0x90
|
||||
[<c04706e5>] async_run_entry_fn+0x35/0x140
|
||||
[<c0478aef>] ? wake_up_process+0x1f/0x40
|
||||
[<c0464495>] process_one_work+0x115/0x370
|
||||
[<c0462645>] ? start_worker+0x25/0x30
|
||||
[<c0464dc5>] ? manage_workers.isra.27+0x1a5/0x250
|
||||
[<c0464f6e>] worker_thread+0xfe/0x330
|
||||
[<c0464e70>] ? manage_workers.isra.27+0x250/0x250
|
||||
[<c046a224>] kthread+0x94/0xa0
|
||||
[<c0997f37>] ret_from_kernel_thread+0x1b/0x28
|
||||
[<c046a190>] ? insert_kthread_work+0x30/0x30
|
||||
|
||||
This patch removes pci_disable_device() from __e100_shutdown().
|
||||
pci_clear_master() is enough.
|
||||
|
||||
Signed-off-by: Michele Baldessari <michele@acksyn.org>
|
||||
Tested-by: Mark Harig <idirectscm@aim.com>
|
||||
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/intel/e100.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c
|
||||
index cbaba44..bf7a01e 100644
|
||||
--- a/drivers/net/ethernet/intel/e100.c
|
||||
+++ b/drivers/net/ethernet/intel/e100.c
|
||||
@@ -3034,7 +3034,7 @@ static void __e100_shutdown(struct pci_dev *pdev, bool *enable_wake)
|
||||
*enable_wake = false;
|
||||
}
|
||||
|
||||
- pci_disable_device(pdev);
|
||||
+ pci_clear_master(pdev);
|
||||
}
|
||||
|
||||
static int __e100_power_off(struct pci_dev *pdev, bool wake)
|
||||
--
|
||||
1.8.5.3
|
||||
|
|
@ -0,0 +1,287 @@
|
|||
Bugzilla: 1064516
|
||||
Upstream-status: Sent for 3.16
|
||||
|
||||
From b3e5bf1ff32cbc58c56675498565020460c683cd Mon Sep 17 00:00:00 2001
|
||||
From: David Ertman <davidx.m.ertman@intel.com>
|
||||
Date: Tue, 6 May 2014 03:50:17 +0000
|
||||
Subject: e1000e: Failure to write SHRA turns on PROMISC mode
|
||||
|
||||
Previously, the check to turn on promiscuous mode only took into account
|
||||
the total number of SHared Receive Address (SHRA) registers and if the
|
||||
request was for a register within that range. It is possible that the
|
||||
Management Engine might have locked a number of SHRA and not allowed a
|
||||
new address to be written to the requested register.
|
||||
|
||||
Add a function to determine the number of unlocked SHRA registers. Then
|
||||
determine if the number of registers available is sufficient for our needs,
|
||||
if not then return -ENOMEM so that UNICAST PROMISC mode is activated.
|
||||
|
||||
Since the method by which ME claims SHRA registers is non-deterministic,
|
||||
also add a return value to the function attempting to write an address
|
||||
to a SHRA, and return a -E1000_ERR_CONFIG if the write fails. The error
|
||||
will be passed up the function chain and allow the driver to also set
|
||||
UNICAST PROMISC when this happens.
|
||||
|
||||
Cc: Vlad Yasevich <vyasevic@redhat.com>
|
||||
Signed-off-by: Dave Ertman <davidx.m.ertman@intel.com>
|
||||
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
|
||||
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
|
||||
|
||||
diff --git a/drivers/net/ethernet/intel/e1000e/80003es2lan.c b/drivers/net/ethernet/intel/e1000e/80003es2lan.c
|
||||
index a5f6b11..08f22f3 100644
|
||||
--- a/drivers/net/ethernet/intel/e1000e/80003es2lan.c
|
||||
+++ b/drivers/net/ethernet/intel/e1000e/80003es2lan.c
|
||||
@@ -1365,6 +1365,7 @@ static const struct e1000_mac_operations es2_mac_ops = {
|
||||
.setup_led = e1000e_setup_led_generic,
|
||||
.config_collision_dist = e1000e_config_collision_dist_generic,
|
||||
.rar_set = e1000e_rar_set_generic,
|
||||
+ .rar_get_count = e1000e_rar_get_count_generic,
|
||||
};
|
||||
|
||||
static const struct e1000_phy_operations es2_phy_ops = {
|
||||
diff --git a/drivers/net/ethernet/intel/e1000e/82571.c b/drivers/net/ethernet/intel/e1000e/82571.c
|
||||
index e0aa7f1..218481e 100644
|
||||
--- a/drivers/net/ethernet/intel/e1000e/82571.c
|
||||
+++ b/drivers/net/ethernet/intel/e1000e/82571.c
|
||||
@@ -1896,6 +1896,7 @@ static const struct e1000_mac_operations e82571_mac_ops = {
|
||||
.config_collision_dist = e1000e_config_collision_dist_generic,
|
||||
.read_mac_addr = e1000_read_mac_addr_82571,
|
||||
.rar_set = e1000e_rar_set_generic,
|
||||
+ .rar_get_count = e1000e_rar_get_count_generic,
|
||||
};
|
||||
|
||||
static const struct e1000_phy_operations e82_phy_ops_igp = {
|
||||
diff --git a/drivers/net/ethernet/intel/e1000e/hw.h b/drivers/net/ethernet/intel/e1000e/hw.h
|
||||
index 6b3de5f..72f5475 100644
|
||||
--- a/drivers/net/ethernet/intel/e1000e/hw.h
|
||||
+++ b/drivers/net/ethernet/intel/e1000e/hw.h
|
||||
@@ -469,8 +469,9 @@ struct e1000_mac_operations {
|
||||
s32 (*setup_led)(struct e1000_hw *);
|
||||
void (*write_vfta)(struct e1000_hw *, u32, u32);
|
||||
void (*config_collision_dist)(struct e1000_hw *);
|
||||
- void (*rar_set)(struct e1000_hw *, u8 *, u32);
|
||||
+ int (*rar_set)(struct e1000_hw *, u8 *, u32);
|
||||
s32 (*read_mac_addr)(struct e1000_hw *);
|
||||
+ u32 (*rar_get_count)(struct e1000_hw *);
|
||||
};
|
||||
|
||||
/* When to use various PHY register access functions:
|
||||
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c
|
||||
index 5f55395..b75862d 100644
|
||||
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
|
||||
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
|
||||
@@ -139,8 +139,9 @@ static s32 e1000_k1_gig_workaround_hv(struct e1000_hw *hw, bool link);
|
||||
static s32 e1000_set_mdio_slow_mode_hv(struct e1000_hw *hw);
|
||||
static bool e1000_check_mng_mode_ich8lan(struct e1000_hw *hw);
|
||||
static bool e1000_check_mng_mode_pchlan(struct e1000_hw *hw);
|
||||
-static void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index);
|
||||
-static void e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index);
|
||||
+static int e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index);
|
||||
+static int e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index);
|
||||
+static u32 e1000_rar_get_count_pch_lpt(struct e1000_hw *hw);
|
||||
static s32 e1000_k1_workaround_lv(struct e1000_hw *hw);
|
||||
static void e1000_gate_hw_phy_config_ich8lan(struct e1000_hw *hw, bool gate);
|
||||
static s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force);
|
||||
@@ -704,6 +705,7 @@ static s32 e1000_init_mac_params_ich8lan(struct e1000_hw *hw)
|
||||
mac->ops.rar_set = e1000_rar_set_pch_lpt;
|
||||
mac->ops.setup_physical_interface =
|
||||
e1000_setup_copper_link_pch_lpt;
|
||||
+ mac->ops.rar_get_count = e1000_rar_get_count_pch_lpt;
|
||||
}
|
||||
|
||||
/* Enable PCS Lock-loss workaround for ICH8 */
|
||||
@@ -1668,7 +1670,7 @@ static bool e1000_check_mng_mode_pchlan(struct e1000_hw *hw)
|
||||
* contain the MAC address but RAR[1-6] are reserved for manageability (ME).
|
||||
* Use SHRA[0-3] in place of those reserved for ME.
|
||||
**/
|
||||
-static void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index)
|
||||
+static int e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index)
|
||||
{
|
||||
u32 rar_low, rar_high;
|
||||
|
||||
@@ -1690,7 +1692,7 @@ static void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index)
|
||||
e1e_flush();
|
||||
ew32(RAH(index), rar_high);
|
||||
e1e_flush();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* RAR[1-6] are owned by manageability. Skip those and program the
|
||||
@@ -1713,7 +1715,7 @@ static void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index)
|
||||
/* verify the register updates */
|
||||
if ((er32(SHRAL(index - 1)) == rar_low) &&
|
||||
(er32(SHRAH(index - 1)) == rar_high))
|
||||
- return;
|
||||
+ return 0;
|
||||
|
||||
e_dbg("SHRA[%d] might be locked by ME - FWSM=0x%8.8x\n",
|
||||
(index - 1), er32(FWSM));
|
||||
@@ -1721,6 +1723,43 @@ static void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index)
|
||||
|
||||
out:
|
||||
e_dbg("Failed to write receive address at index %d\n", index);
|
||||
+ return -E1000_ERR_CONFIG;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * e1000_rar_get_count_pch_lpt - Get the number of available SHRA
|
||||
+ * @hw: pointer to the HW structure
|
||||
+ *
|
||||
+ * Get the number of available receive registers that the Host can
|
||||
+ * program. SHRA[0-10] are the shared receive address registers
|
||||
+ * that are shared between the Host and manageability engine (ME).
|
||||
+ * ME can reserve any number of addresses and the host needs to be
|
||||
+ * able to tell how many available registers it has access to.
|
||||
+ **/
|
||||
+static u32 e1000_rar_get_count_pch_lpt(struct e1000_hw *hw)
|
||||
+{
|
||||
+ u32 wlock_mac;
|
||||
+ u32 num_entries;
|
||||
+
|
||||
+ wlock_mac = er32(FWSM) & E1000_FWSM_WLOCK_MAC_MASK;
|
||||
+ wlock_mac >>= E1000_FWSM_WLOCK_MAC_SHIFT;
|
||||
+
|
||||
+ switch (wlock_mac) {
|
||||
+ case 0:
|
||||
+ /* All SHRA[0..10] and RAR[0] available */
|
||||
+ num_entries = hw->mac.rar_entry_count;
|
||||
+ break;
|
||||
+ case 1:
|
||||
+ /* Only RAR[0] available */
|
||||
+ num_entries = 1;
|
||||
+ break;
|
||||
+ default:
|
||||
+ /* SHRA[0..(wlock_mac - 1)] available + RAR[0] */
|
||||
+ num_entries = wlock_mac + 1;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return num_entries;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1734,7 +1773,7 @@ out:
|
||||
* contain the MAC address. SHRA[0-10] are the shared receive address
|
||||
* registers that are shared between the Host and manageability engine (ME).
|
||||
**/
|
||||
-static void e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index)
|
||||
+static int e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index)
|
||||
{
|
||||
u32 rar_low, rar_high;
|
||||
u32 wlock_mac;
|
||||
@@ -1756,7 +1795,7 @@ static void e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index)
|
||||
e1e_flush();
|
||||
ew32(RAH(index), rar_high);
|
||||
e1e_flush();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* The manageability engine (ME) can lock certain SHRAR registers that
|
||||
@@ -1788,12 +1827,13 @@ static void e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index)
|
||||
/* verify the register updates */
|
||||
if ((er32(SHRAL_PCH_LPT(index - 1)) == rar_low) &&
|
||||
(er32(SHRAH_PCH_LPT(index - 1)) == rar_high))
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
e_dbg("Failed to write receive address at index %d\n", index);
|
||||
+ return -E1000_ERR_CONFIG;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4977,6 +5017,7 @@ static const struct e1000_mac_operations ich8_mac_ops = {
|
||||
/* id_led_init dependent on mac type */
|
||||
.config_collision_dist = e1000e_config_collision_dist_generic,
|
||||
.rar_set = e1000e_rar_set_generic,
|
||||
+ .rar_get_count = e1000e_rar_get_count_generic,
|
||||
};
|
||||
|
||||
static const struct e1000_phy_operations ich8_phy_ops = {
|
||||
diff --git a/drivers/net/ethernet/intel/e1000e/mac.c b/drivers/net/ethernet/intel/e1000e/mac.c
|
||||
index baa0a46..8c386f3a 100644
|
||||
--- a/drivers/net/ethernet/intel/e1000e/mac.c
|
||||
+++ b/drivers/net/ethernet/intel/e1000e/mac.c
|
||||
@@ -211,6 +211,11 @@ s32 e1000_check_alt_mac_addr_generic(struct e1000_hw *hw)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+u32 e1000e_rar_get_count_generic(struct e1000_hw *hw)
|
||||
+{
|
||||
+ return hw->mac.rar_entry_count;
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* e1000e_rar_set_generic - Set receive address register
|
||||
* @hw: pointer to the HW structure
|
||||
@@ -220,7 +225,7 @@ s32 e1000_check_alt_mac_addr_generic(struct e1000_hw *hw)
|
||||
* Sets the receive address array register at index to the address passed
|
||||
* in by addr.
|
||||
**/
|
||||
-void e1000e_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index)
|
||||
+int e1000e_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index)
|
||||
{
|
||||
u32 rar_low, rar_high;
|
||||
|
||||
@@ -244,6 +249,8 @@ void e1000e_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index)
|
||||
e1e_flush();
|
||||
ew32(RAH(index), rar_high);
|
||||
e1e_flush();
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/drivers/net/ethernet/intel/e1000e/mac.h b/drivers/net/ethernet/intel/e1000e/mac.h
|
||||
index 4e81c28..0513d90 100644
|
||||
--- a/drivers/net/ethernet/intel/e1000e/mac.h
|
||||
+++ b/drivers/net/ethernet/intel/e1000e/mac.h
|
||||
@@ -61,7 +61,8 @@ void e1000e_update_adaptive(struct e1000_hw *hw);
|
||||
void e1000_write_vfta_generic(struct e1000_hw *hw, u32 offset, u32 value);
|
||||
|
||||
void e1000_set_lan_id_multi_port_pcie(struct e1000_hw *hw);
|
||||
-void e1000e_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index);
|
||||
+u32 e1000e_rar_get_count_generic(struct e1000_hw *hw);
|
||||
+int e1000e_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index);
|
||||
void e1000e_config_collision_dist_generic(struct e1000_hw *hw);
|
||||
|
||||
#endif
|
||||
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
|
||||
index e4207ef..6084e6b 100644
|
||||
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
|
||||
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
|
||||
@@ -3311,9 +3311,11 @@ static int e1000e_write_uc_addr_list(struct net_device *netdev)
|
||||
{
|
||||
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||
struct e1000_hw *hw = &adapter->hw;
|
||||
- unsigned int rar_entries = hw->mac.rar_entry_count;
|
||||
+ unsigned int rar_entries;
|
||||
int count = 0;
|
||||
|
||||
+ rar_entries = hw->mac.ops.rar_get_count(hw);
|
||||
+
|
||||
/* save a rar entry for our hardware address */
|
||||
rar_entries--;
|
||||
|
||||
@@ -3332,9 +3334,13 @@ static int e1000e_write_uc_addr_list(struct net_device *netdev)
|
||||
* combining
|
||||
*/
|
||||
netdev_for_each_uc_addr(ha, netdev) {
|
||||
+ int rval;
|
||||
+
|
||||
if (!rar_entries)
|
||||
break;
|
||||
- hw->mac.ops.rar_set(hw, ha->addr, rar_entries--);
|
||||
+ rval = hw->mac.ops.rar_set(hw, ha->addr, rar_entries--);
|
||||
+ if (rval < 0)
|
||||
+ return -ENOMEM;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
--
|
||||
cgit v0.10.1
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
Bugzilla: 1064516
|
||||
Upstream-status: 3.15
|
||||
|
||||
From 96dee024ca4799d6d21588951240035c21ba1c67 Mon Sep 17 00:00:00 2001
|
||||
From: David Ertman <davidx.m.ertman@intel.com>
|
||||
Date: Wed, 5 Mar 2014 07:50:46 +0000
|
||||
Subject: [PATCH] e1000e: Fix SHRA register access for 82579
|
||||
|
||||
Previous commit c3a0dce35af0 fixed an overrun for the RAR on i218 devices.
|
||||
This commit also attempted to homogenize the RAR/SHRA access for all parts
|
||||
accessed by the e1000e driver. This change introduced an error for
|
||||
assigning MAC addresses to guest OS's for 82579 devices.
|
||||
|
||||
Only RAR[0] is accessible to the driver for 82579 parts, and additional
|
||||
addresses must be placed into the SHRA[L|H] registers. The rar_entry_count
|
||||
was changed in the previous commit to an inaccurate value that accounted
|
||||
for all RAR and SHRA registers, not just the ones usable by the driver.
|
||||
|
||||
This patch fixes the count to the correct value and adjusts the
|
||||
e1000_rar_set_pch2lan() function to user the correct index.
|
||||
|
||||
Cc: John Greene <jogreene@redhat.com>
|
||||
Signed-off-by: Dave Ertman <davidx.m.ertman@intel.com>
|
||||
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
|
||||
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
|
||||
---
|
||||
drivers/net/ethernet/intel/e1000e/ich8lan.c | 2 +-
|
||||
drivers/net/ethernet/intel/e1000e/ich8lan.h | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c
|
||||
index 18984519a18d..9866f264f55e 100644
|
||||
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
|
||||
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
|
||||
@@ -1675,7 +1675,7 @@ static void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index)
|
||||
/* RAR[1-6] are owned by manageability. Skip those and program the
|
||||
* next address into the SHRA register array.
|
||||
*/
|
||||
- if (index < (u32)(hw->mac.rar_entry_count - 6)) {
|
||||
+ if (index < (u32)(hw->mac.rar_entry_count)) {
|
||||
s32 ret_val;
|
||||
|
||||
ret_val = e1000_acquire_swflag_ich8lan(hw);
|
||||
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.h b/drivers/net/ethernet/intel/e1000e/ich8lan.h
|
||||
index 553f05ec0278..bead50f9187b 100644
|
||||
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.h
|
||||
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.h
|
||||
@@ -101,7 +101,7 @@
|
||||
#define PCIE_ICH8_SNOOP_ALL PCIE_NO_SNOOP_ALL
|
||||
|
||||
#define E1000_ICH_RAR_ENTRIES 7
|
||||
-#define E1000_PCH2_RAR_ENTRIES 11 /* RAR[0-6], SHRA[0-3] */
|
||||
+#define E1000_PCH2_RAR_ENTRIES 5 /* RAR[0], SHRA[0-3] */
|
||||
#define E1000_PCH_LPT_RAR_ENTRIES 12 /* RAR[0], SHRA[0-10] */
|
||||
|
||||
#define PHY_PAGE_SHIFT 5
|
||||
--
|
||||
1.9.3
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
Bugzilla: 1103528
|
||||
Upstream-status: Sent for 3.16
|
||||
|
||||
From 3b629bf4b018ece0c7b4d1c03bdc0eb69c884531 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Thu, 5 Jun 2014 11:48:30 +0200
|
||||
Subject: [PATCH] elantech: Deal with clickpads reporting right button events
|
||||
|
||||
At least the Dell Vostro 5470 elantech *clickpad* reports right button
|
||||
clicks when clicked in the right bottom area.
|
||||
|
||||
This is different from how (elantech) clickpads normally operate,
|
||||
normally no matter where the user clicks on the pad the pad always reports
|
||||
a left button event, since there is only 1 hardware button beneath the path.
|
||||
|
||||
It is unknown if this is caused by Dell having put 2 buttons under the pad,
|
||||
one under each bottom corner, or if this is something caused by the specific
|
||||
firmware in this clickpad.
|
||||
|
||||
Since this however still clearly is a real clickpad hardware-wise, we still
|
||||
want to report it as such to userspace, so that things like finger movement
|
||||
in the bottom area can be properly ignored as it should be on clickpads.
|
||||
|
||||
So deal with this weirdness by simply mapping a right click to a left click
|
||||
on elantech clickpads. As an added advantage this is something which we can
|
||||
simply do on all elantech clickpads, so no need to add special quirks for
|
||||
this weird model.
|
||||
|
||||
Reported-by: Elder Marco <eldermarco@gmail.com>
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
drivers/input/mouse/elantech.c | 22 ++++++++++++++++++----
|
||||
1 file changed, 18 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
|
||||
index 4d79821..846926d 100644
|
||||
--- a/drivers/input/mouse/elantech.c
|
||||
+++ b/drivers/input/mouse/elantech.c
|
||||
@@ -473,8 +473,15 @@ static void elantech_report_absolute_v3(struct psmouse *psmouse,
|
||||
input_report_key(dev, BTN_TOOL_FINGER, fingers == 1);
|
||||
input_report_key(dev, BTN_TOOL_DOUBLETAP, fingers == 2);
|
||||
input_report_key(dev, BTN_TOOL_TRIPLETAP, fingers == 3);
|
||||
- input_report_key(dev, BTN_LEFT, packet[0] & 0x01);
|
||||
- input_report_key(dev, BTN_RIGHT, packet[0] & 0x02);
|
||||
+
|
||||
+ /* For clickpads map both buttons to BTN_LEFT */
|
||||
+ if (etd->fw_version & 0x001000) {
|
||||
+ input_report_key(dev, BTN_LEFT, packet[0] & 0x03);
|
||||
+ } else {
|
||||
+ input_report_key(dev, BTN_LEFT, packet[0] & 0x01);
|
||||
+ input_report_key(dev, BTN_RIGHT, packet[0] & 0x02);
|
||||
+ }
|
||||
+
|
||||
input_report_abs(dev, ABS_PRESSURE, pres);
|
||||
input_report_abs(dev, ABS_TOOL_WIDTH, width);
|
||||
|
||||
@@ -484,10 +491,17 @@ static void elantech_report_absolute_v3(struct psmouse *psmouse,
|
||||
static void elantech_input_sync_v4(struct psmouse *psmouse)
|
||||
{
|
||||
struct input_dev *dev = psmouse->dev;
|
||||
+ struct elantech_data *etd = psmouse->private;
|
||||
unsigned char *packet = psmouse->packet;
|
||||
|
||||
- input_report_key(dev, BTN_LEFT, packet[0] & 0x01);
|
||||
- input_report_key(dev, BTN_RIGHT, packet[0] & 0x02);
|
||||
+ /* For clickpads map both buttons to BTN_LEFT */
|
||||
+ if (etd->fw_version & 0x001000) {
|
||||
+ input_report_key(dev, BTN_LEFT, packet[0] & 0x03);
|
||||
+ } else {
|
||||
+ input_report_key(dev, BTN_LEFT, packet[0] & 0x01);
|
||||
+ input_report_key(dev, BTN_RIGHT, packet[0] & 0x02);
|
||||
+ }
|
||||
+
|
||||
input_mt_report_pointer_emulation(dev, true);
|
||||
input_sync(dev);
|
||||
}
|
||||
--
|
||||
2.0.0
|
||||
|
|
@ -1,110 +0,0 @@
|
|||
Bugzilla: 1030802
|
||||
Upstream-status: http://www.mail-archive.com/linux-input@vger.kernel.org/msg07220.html
|
||||
|
||||
From e1c7fa5fbb6688bd464658ff8a93bdf23c442065 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Mon, 9 Dec 2013 15:18:04 +0100
|
||||
Subject: [PATCH v2] elantech: Properly differentiate between clickpads and
|
||||
normal touchpads
|
||||
|
||||
The current assumption in the elantech driver that hw version 3 touchpads are
|
||||
never clickpads and hw version 4 touchpads are always clickpads is wrong.
|
||||
|
||||
There are several bug reports for this, ie:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1030802
|
||||
http://superuser.com/questions/619582/right-elantech-touchpad-button-not-working-in-linux
|
||||
|
||||
I've spend a couple of hours wading through various bugzillas,
|
||||
launchpads and forum posts to create a list of fw-versions and capabilities
|
||||
for different laptop models to find a good method to differentiate between
|
||||
clickpads and versions with separate hardware buttons.
|
||||
|
||||
Which shows that a device being a clickpad is reliable indicated by bit 12
|
||||
being set in the fw_version. I've included the gathered list inside the driver,
|
||||
so that we've this info at hand if we need to revisit this later.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
drivers/input/mouse/elantech.c | 45 +++++++++++++++++++++++++++++++++++++++---
|
||||
1 file changed, 42 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
|
||||
index 597e9b8..ef1cf52 100644
|
||||
--- a/drivers/input/mouse/elantech.c
|
||||
+++ b/drivers/input/mouse/elantech.c
|
||||
@@ -486,6 +486,7 @@ static void elantech_input_sync_v4(struct psmouse *psmouse)
|
||||
unsigned char *packet = psmouse->packet;
|
||||
|
||||
input_report_key(dev, BTN_LEFT, packet[0] & 0x01);
|
||||
+ input_report_key(dev, BTN_RIGHT, packet[0] & 0x02);
|
||||
input_mt_report_pointer_emulation(dev, true);
|
||||
input_sync(dev);
|
||||
}
|
||||
@@ -984,6 +985,44 @@ static int elantech_get_resolution_v4(struct psmouse *psmouse,
|
||||
}
|
||||
|
||||
/*
|
||||
+ * Advertise INPUT_PROP_BUTTONPAD for clickpads. The testing of bit 12 in
|
||||
+ * fw_version for this is based on the following fw_version & caps table:
|
||||
+ *
|
||||
+ * Laptop-model: fw_version: caps: buttons:
|
||||
+ * Acer S3 0x461f00 10, 13, 0e clickpad
|
||||
+ * Acer S7-392 0x581f01 50, 17, 0d clickpad
|
||||
+ * Acer V5-131 0x461f02 01, 16, 0c clickpad
|
||||
+ * Acer V5-551 0x461f00 ? clickpad
|
||||
+ * Asus K53SV 0x450f01 78, 15, 0c 2 hw buttons
|
||||
+ * Asus G46VW 0x460f02 00, 18, 0c 2 hw buttons
|
||||
+ * Asus G750JX 0x360f00 00, 16, 0c 2 hw buttons
|
||||
+ * Asus UX31 0x361f00 20, 15, 0e clickpad
|
||||
+ * Asus UX32VD 0x361f02 00, 15, 0e clickpad
|
||||
+ * Avatar AVIU-145A2 0x361f00 ? clickpad
|
||||
+ * Gigabyte U2442 0x450f01 58, 17, 0c 2 hw buttons
|
||||
+ * Lenovo L430 0x350f02 b9, 15, 0c 2 hw buttons (*)
|
||||
+ * Samsung NF210 0x150b00 78, 14, 0a 2 hw buttons
|
||||
+ * Samsung NP770Z5E 0x575f01 10, 15, 0f clickpad
|
||||
+ * Samsung NP700Z5B 0x361f06 21, 15, 0f clickpad
|
||||
+ * Samsung NP900X3E-A02 0x575f03 ? clickpad
|
||||
+ * Samsung NP-QX410 0x851b00 19, 14, 0c clickpad
|
||||
+ * Samsung RC512 0x450f00 08, 15, 0c 2 hw buttons
|
||||
+ * Samsung RF710 0x450f00 ? 2 hw buttons
|
||||
+ * System76 Pangolin 0x250f01 ? 2 hw buttons
|
||||
+ * (*) + 3 trackpoint buttons
|
||||
+ */
|
||||
+static void elantech_set_buttonpad_prop(struct psmouse *psmouse)
|
||||
+{
|
||||
+ struct input_dev *dev = psmouse->dev;
|
||||
+ struct elantech_data *etd = psmouse->private;
|
||||
+
|
||||
+ if (etd->fw_version & 0x001000) {
|
||||
+ __set_bit(INPUT_PROP_BUTTONPAD, dev->propbit);
|
||||
+ __clear_bit(BTN_RIGHT, dev->keybit);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
* Set the appropriate event bits for the input subsystem
|
||||
*/
|
||||
static int elantech_set_input_params(struct psmouse *psmouse)
|
||||
@@ -1026,6 +1065,8 @@ static int elantech_set_input_params(struct psmouse *psmouse)
|
||||
__set_bit(INPUT_PROP_SEMI_MT, dev->propbit);
|
||||
/* fall through */
|
||||
case 3:
|
||||
+ if (etd->hw_version == 3)
|
||||
+ elantech_set_buttonpad_prop(psmouse);
|
||||
input_set_abs_params(dev, ABS_X, x_min, x_max, 0, 0);
|
||||
input_set_abs_params(dev, ABS_Y, y_min, y_max, 0, 0);
|
||||
if (etd->reports_pressure) {
|
||||
@@ -1047,9 +1088,7 @@ static int elantech_set_input_params(struct psmouse *psmouse)
|
||||
*/
|
||||
psmouse_warn(psmouse, "couldn't query resolution data.\n");
|
||||
}
|
||||
- /* v4 is clickpad, with only one button. */
|
||||
- __set_bit(INPUT_PROP_BUTTONPAD, dev->propbit);
|
||||
- __clear_bit(BTN_RIGHT, dev->keybit);
|
||||
+ elantech_set_buttonpad_prop(psmouse);
|
||||
__set_bit(BTN_TOOL_QUADTAP, dev->keybit);
|
||||
/* For X to recognize me as touchpad. */
|
||||
input_set_abs_params(dev, ABS_X, x_min, x_max, 0, 0);
|
||||
--
|
||||
1.8.4.2
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
Bugzilla: 696821
|
||||
Upstream-status: Sent http://marc.info/?l=linux-kernel&m=139835974112096&w=2
|
||||
|
||||
On 64-bit systems, O_LARGEFILE is automatically added to flags inside
|
||||
the open() syscall (also openat(), blkdev_open(), etc).
|
||||
Userspace therefore defines O_LARGEFILE to be 0 - you can use it,
|
||||
but it's a no-op. Everything should be O_LARGEFILE by default.
|
||||
|
||||
But: when fanotify does create_fd() it uses dentry_open(), which skips
|
||||
all that. And userspace can't set O_LARGEFILE in fanotify_init() because
|
||||
it's defined to 0. So if fanotify gets an event regarding a large file,
|
||||
the read() will just fail with -EOVERFLOW.
|
||||
|
||||
This patch adds O_LARGEFILE to fanotify_init()'s event_f_flags on 64-bit
|
||||
systems, using the same test as open()/openat()/etc.
|
||||
|
||||
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=696821
|
||||
|
||||
Acked-by: Eric Paris <eparis@redhat.com>
|
||||
Signed-off-by: Will Woods <wwoods@redhat.com>
|
||||
|
||||
--- linux-3.14.1-200.fc20.x86_64/fs/notify/fanotify/fanotify_user.c.orig 2014-04-23 18:15:29.347644932 -0400
|
||||
+++ linux-3.14.1-200.fc20.x86_64/fs/notify/fanotify/fanotify_user.c 2014-04-23 18:17:44.249438484 -0400
|
||||
@@ -742,6 +742,8 @@
|
||||
oevent->path.mnt = NULL;
|
||||
oevent->path.dentry = NULL;
|
||||
|
||||
+ if (force_o_largefile())
|
||||
+ event_f_flags |= O_LARGEFILE;
|
||||
group->fanotify_data.f_flags = event_f_flags;
|
||||
#ifdef CONFIG_FANOTIFY_ACCESS_PERMISSIONS
|
||||
oevent->response = 0;
|
|
@ -0,0 +1,38 @@
|
|||
Bugzilla: 1096195
|
||||
Upstream-status: 3.15 and queued for stable
|
||||
|
||||
From 2145e15e0557a01b9195d1c7199a1b92cb9be81f Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Daley <mattd@bugfuzz.com>
|
||||
Date: Mon, 28 Apr 2014 19:05:21 +1200
|
||||
Subject: floppy: don't write kernel-only members to FDRAWCMD ioctl output
|
||||
|
||||
From: Matthew Daley <mattd@bugfuzz.com>
|
||||
|
||||
commit 2145e15e0557a01b9195d1c7199a1b92cb9be81f upstream.
|
||||
|
||||
Do not leak kernel-only floppy_raw_cmd structure members to userspace.
|
||||
This includes the linked-list pointer and the pointer to the allocated
|
||||
DMA space.
|
||||
|
||||
Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
|
||||
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
---
|
||||
drivers/block/floppy.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/block/floppy.c
|
||||
+++ b/drivers/block/floppy.c
|
||||
@@ -3053,7 +3053,10 @@ static int raw_cmd_copyout(int cmd, void
|
||||
int ret;
|
||||
|
||||
while (ptr) {
|
||||
- ret = copy_to_user(param, ptr, sizeof(*ptr));
|
||||
+ struct floppy_raw_cmd cmd = *ptr;
|
||||
+ cmd.next = NULL;
|
||||
+ cmd.kernel_data = NULL;
|
||||
+ ret = copy_to_user(param, &cmd, sizeof(cmd));
|
||||
if (ret)
|
||||
return -EFAULT;
|
||||
param += sizeof(struct floppy_raw_cmd);
|
|
@ -0,0 +1,48 @@
|
|||
Bugzilla: 1096195
|
||||
Upstream-status: 3.15 and queued for stable
|
||||
|
||||
From ef87dbe7614341c2e7bfe8d32fcb7028cc97442c Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Daley <mattd@bugfuzz.com>
|
||||
Date: Mon, 28 Apr 2014 19:05:20 +1200
|
||||
Subject: floppy: ignore kernel-only members in FDRAWCMD ioctl input
|
||||
|
||||
From: Matthew Daley <mattd@bugfuzz.com>
|
||||
|
||||
commit ef87dbe7614341c2e7bfe8d32fcb7028cc97442c upstream.
|
||||
|
||||
Always clear out these floppy_raw_cmd struct members after copying the
|
||||
entire structure from userspace so that the in-kernel version is always
|
||||
valid and never left in an interdeterminate state.
|
||||
|
||||
Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
|
||||
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
---
|
||||
drivers/block/floppy.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/block/floppy.c
|
||||
+++ b/drivers/block/floppy.c
|
||||
@@ -3107,10 +3107,11 @@ loop:
|
||||
return -ENOMEM;
|
||||
*rcmd = ptr;
|
||||
ret = copy_from_user(ptr, param, sizeof(*ptr));
|
||||
- if (ret)
|
||||
- return -EFAULT;
|
||||
ptr->next = NULL;
|
||||
ptr->buffer_length = 0;
|
||||
+ ptr->kernel_data = NULL;
|
||||
+ if (ret)
|
||||
+ return -EFAULT;
|
||||
param += sizeof(struct floppy_raw_cmd);
|
||||
if (ptr->cmd_count > 33)
|
||||
/* the command may now also take up the space
|
||||
@@ -3126,7 +3127,6 @@ loop:
|
||||
for (i = 0; i < 16; i++)
|
||||
ptr->reply[i] = 0;
|
||||
ptr->resultcode = 0;
|
||||
- ptr->kernel_data = NULL;
|
||||
|
||||
if (ptr->flags & (FD_RAW_READ | FD_RAW_WRITE)) {
|
||||
if (ptr->length <= 0)
|
|
@ -1,12 +0,0 @@
|
|||
diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
|
||||
index 927cbd1..f060f28 100644
|
||||
--- a/fs/proc/proc_devtree.c
|
||||
+++ b/fs/proc/proc_devtree.c
|
||||
@@ -233,6 +233,7 @@ void __init proc_device_tree_init(void)
|
||||
return;
|
||||
root = of_find_node_by_path("/");
|
||||
if (root == NULL) {
|
||||
+ remove_proc_entry("device-tree", NULL);
|
||||
pr_debug("/proc/device-tree: can't find root\n");
|
||||
return;
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
Bugzilla: 1056711
|
||||
Upstream-status: Submitted for 3.15
|
||||
|
||||
This fixes the issue described here:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1056711#c5
|
||||
|
||||
net-next commit 971a351ccbbd2b6eef136a2221da0b80aca50906
|
||||
Author: Jiri Pirko <jiri@resnulli.us>
|
||||
Date: Tue Dec 10 13:56:29 2013 +0100
|
||||
|
||||
ipv6 addrconf: revert /proc/net/if_inet6 ifa_flag format
|
||||
|
||||
Turned out that applications like ifconfig do not handle the change.
|
||||
So revert ifa_flag format back to 2-letter hex value.
|
||||
|
||||
Introduced by:
|
||||
commit 479840ffdbe4242e8a25349218c8e0859223aa35
|
||||
"ipv6 addrconf: extend ifa_flags to u32"
|
||||
|
||||
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
|
||||
|
||||
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
|
||||
index be4dbbd..3c3425e 100644
|
||||
--- a/net/ipv6/addrconf.c
|
||||
+++ b/net/ipv6/addrconf.c
|
||||
@@ -3367,12 +3367,12 @@ static void if6_seq_stop(struct seq_file *seq, void *v)
|
||||
static int if6_seq_show(struct seq_file *seq, void *v)
|
||||
{
|
||||
struct inet6_ifaddr *ifp = (struct inet6_ifaddr *)v;
|
||||
- seq_printf(seq, "%pi6 %02x %02x %02x %03x %8s\n",
|
||||
+ seq_printf(seq, "%pi6 %02x %02x %02x %02x %8s\n",
|
||||
&ifp->addr,
|
||||
ifp->idev->dev->ifindex,
|
||||
ifp->prefix_len,
|
||||
ifp->scope,
|
||||
- ifp->flags,
|
||||
+ (u8) ifp->flags,
|
||||
ifp->idev->dev->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
_______________________________________________
|
||||
kernel mailing list
|
||||
kernel@lists.fedoraproject.org
|
||||
https://admin.fedoraproject.org/mailman/listinfo/kernel
|
|
@ -1,32 +0,0 @@
|
|||
Bugzilla: 1074471
|
||||
Upstream-status: queued for 3.14
|
||||
|
||||
From c88507fbad8055297c1d1e21e599f46960cbee39 Mon Sep 17 00:00:00 2001
|
||||
From: Sabrina Dubroca <sd@queasysnail.net>
|
||||
Date: Thu, 06 Mar 2014 16:51:57 +0000
|
||||
Subject: ipv6: don't set DST_NOCOUNT for remotely added routes
|
||||
|
||||
DST_NOCOUNT should only be used if an authorized user adds routes
|
||||
locally. In case of routes which are added on behalf of router
|
||||
advertisments this flag must not get used as it allows an unlimited
|
||||
number of routes getting added remotely.
|
||||
|
||||
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
|
||||
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
|
||||
index 11dac21..fba54a4 100644
|
||||
--- a/net/ipv6/route.c
|
||||
+++ b/net/ipv6/route.c
|
||||
@@ -1513,7 +1513,7 @@ int ip6_route_add(struct fib6_config *cfg)
|
||||
if (!table)
|
||||
goto out;
|
||||
|
||||
- rt = ip6_dst_alloc(net, NULL, DST_NOCOUNT, table);
|
||||
+ rt = ip6_dst_alloc(net, NULL, (cfg->fc_flags & RTF_ADDRCONF) ? 0 : DST_NOCOUNT, table);
|
||||
|
||||
if (!rt) {
|
||||
err = -ENOMEM;
|
||||
--
|
||||
cgit v0.9.2
|
|
@ -1,753 +0,0 @@
|
|||
This patch is made against 3.13 kernel. So it's suitable for F21 and for F20
|
||||
later on when F20 is rebased to 3.13.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1056711
|
||||
|
||||
NetworkManager depends on IFA_F_NOPREFIXROUTE IFA_F_MANAGETEMPADDR
|
||||
in order to do SLAAC in userspace correctly.
|
||||
|
||||
Split patches available here:
|
||||
|
||||
http://people.redhat.com/jpirko/f21_backport_of_IFA_F_NOPREFIXROUTE_and_IFA_F_MANAGETEMPADDR/
|
||||
|
||||
Jiri Pirko (2):
|
||||
ipv6 addrconf: extend ifa_flags to u32
|
||||
ipv6 addrconf: introduce IFA_F_MANAGETEMPADDR to tell kernel to manage
|
||||
temporary addresses
|
||||
|
||||
Li RongQing (1):
|
||||
ipv6: unneccessary to get address prefix in addrconf_get_prefix_route
|
||||
|
||||
Thomas Haller (2):
|
||||
ipv6 addrconf: add IFA_F_NOPREFIXROUTE flag to suppress creation of
|
||||
IP6 routes
|
||||
ipv6 addrconf: don't cleanup prefix route for IFA_F_NOPREFIXROUTE
|
||||
|
||||
stephen hemminger (1):
|
||||
ipv6: addrconf spelling fixes
|
||||
|
||||
include/net/addrconf.h | 4 +-
|
||||
include/net/if_inet6.h | 2 +-
|
||||
include/uapi/linux/if_addr.h | 6 +
|
||||
net/ipv6/addrconf.c | 409 +++++++++++++++++++++++++------------------
|
||||
4 files changed, 250 insertions(+), 171 deletions(-)
|
||||
|
||||
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
|
||||
|
||||
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
|
||||
index 86505bf..e70278e 100644
|
||||
--- a/include/net/addrconf.h
|
||||
+++ b/include/net/addrconf.h
|
||||
@@ -81,9 +81,9 @@ int ipv6_dev_get_saddr(struct net *net, const struct net_device *dev,
|
||||
const struct in6_addr *daddr, unsigned int srcprefs,
|
||||
struct in6_addr *saddr);
|
||||
int __ipv6_get_lladdr(struct inet6_dev *idev, struct in6_addr *addr,
|
||||
- unsigned char banned_flags);
|
||||
+ u32 banned_flags);
|
||||
int ipv6_get_lladdr(struct net_device *dev, struct in6_addr *addr,
|
||||
- unsigned char banned_flags);
|
||||
+ u32 banned_flags);
|
||||
int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2);
|
||||
void addrconf_join_solict(struct net_device *dev, const struct in6_addr *addr);
|
||||
void addrconf_leave_solict(struct inet6_dev *idev, const struct in6_addr *addr);
|
||||
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h
|
||||
index 65bb130..9650a3f 100644
|
||||
--- a/include/net/if_inet6.h
|
||||
+++ b/include/net/if_inet6.h
|
||||
@@ -50,8 +50,8 @@ struct inet6_ifaddr {
|
||||
|
||||
int state;
|
||||
|
||||
+ __u32 flags;
|
||||
__u8 dad_probes;
|
||||
- __u8 flags;
|
||||
|
||||
__u16 scope;
|
||||
|
||||
diff --git a/include/uapi/linux/if_addr.h b/include/uapi/linux/if_addr.h
|
||||
index 23357ab..dea10a8 100644
|
||||
--- a/include/uapi/linux/if_addr.h
|
||||
+++ b/include/uapi/linux/if_addr.h
|
||||
@@ -18,6 +18,9 @@ struct ifaddrmsg {
|
||||
* It makes no difference for normally configured broadcast interfaces,
|
||||
* but for point-to-point IFA_ADDRESS is DESTINATION address,
|
||||
* local address is supplied in IFA_LOCAL attribute.
|
||||
+ *
|
||||
+ * IFA_FLAGS is a u32 attribute that extends the u8 field ifa_flags.
|
||||
+ * If present, the value from struct ifaddrmsg will be ignored.
|
||||
*/
|
||||
enum {
|
||||
IFA_UNSPEC,
|
||||
@@ -28,6 +31,7 @@ enum {
|
||||
IFA_ANYCAST,
|
||||
IFA_CACHEINFO,
|
||||
IFA_MULTICAST,
|
||||
+ IFA_FLAGS,
|
||||
__IFA_MAX,
|
||||
};
|
||||
|
||||
@@ -44,6 +48,8 @@ enum {
|
||||
#define IFA_F_DEPRECATED 0x20
|
||||
#define IFA_F_TENTATIVE 0x40
|
||||
#define IFA_F_PERMANENT 0x80
|
||||
+#define IFA_F_MANAGETEMPADDR 0x100
|
||||
+#define IFA_F_NOPREFIXROUTE 0x200
|
||||
|
||||
struct ifa_cacheinfo {
|
||||
__u32 ifa_prefered;
|
||||
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
|
||||
index 4b6b720..3c4e25d 100644
|
||||
--- a/net/ipv6/addrconf.c
|
||||
+++ b/net/ipv6/addrconf.c
|
||||
@@ -891,15 +891,95 @@ out:
|
||||
goto out2;
|
||||
}
|
||||
|
||||
+enum cleanup_prefix_rt_t {
|
||||
+ CLEANUP_PREFIX_RT_NOP, /* no cleanup action for prefix route */
|
||||
+ CLEANUP_PREFIX_RT_DEL, /* delete the prefix route */
|
||||
+ CLEANUP_PREFIX_RT_EXPIRE, /* update the lifetime of the prefix route */
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * Check, whether the prefix for ifp would still need a prefix route
|
||||
+ * after deleting ifp. The function returns one of the CLEANUP_PREFIX_RT_*
|
||||
+ * constants.
|
||||
+ *
|
||||
+ * 1) we don't purge prefix if address was not permanent.
|
||||
+ * prefix is managed by its own lifetime.
|
||||
+ * 2) we also don't purge, if the address was IFA_F_NOPREFIXROUTE.
|
||||
+ * 3) if there are no addresses, delete prefix.
|
||||
+ * 4) if there are still other permanent address(es),
|
||||
+ * corresponding prefix is still permanent.
|
||||
+ * 5) if there are still other addresses with IFA_F_NOPREFIXROUTE,
|
||||
+ * don't purge the prefix, assume user space is managing it.
|
||||
+ * 6) otherwise, update prefix lifetime to the
|
||||
+ * longest valid lifetime among the corresponding
|
||||
+ * addresses on the device.
|
||||
+ * Note: subsequent RA will update lifetime.
|
||||
+ **/
|
||||
+static enum cleanup_prefix_rt_t
|
||||
+check_cleanup_prefix_route(struct inet6_ifaddr *ifp, unsigned long *expires)
|
||||
+{
|
||||
+ struct inet6_ifaddr *ifa;
|
||||
+ struct inet6_dev *idev = ifp->idev;
|
||||
+ unsigned long lifetime;
|
||||
+ enum cleanup_prefix_rt_t action = CLEANUP_PREFIX_RT_DEL;
|
||||
+
|
||||
+ *expires = jiffies;
|
||||
+
|
||||
+ list_for_each_entry(ifa, &idev->addr_list, if_list) {
|
||||
+ if (ifa == ifp)
|
||||
+ continue;
|
||||
+ if (!ipv6_prefix_equal(&ifa->addr, &ifp->addr,
|
||||
+ ifp->prefix_len))
|
||||
+ continue;
|
||||
+ if (ifa->flags & (IFA_F_PERMANENT | IFA_F_NOPREFIXROUTE))
|
||||
+ return CLEANUP_PREFIX_RT_NOP;
|
||||
+
|
||||
+ action = CLEANUP_PREFIX_RT_EXPIRE;
|
||||
+
|
||||
+ spin_lock(&ifa->lock);
|
||||
+
|
||||
+ lifetime = addrconf_timeout_fixup(ifa->valid_lft, HZ);
|
||||
+ /*
|
||||
+ * Note: Because this address is
|
||||
+ * not permanent, lifetime <
|
||||
+ * LONG_MAX / HZ here.
|
||||
+ */
|
||||
+ if (time_before(*expires, ifa->tstamp + lifetime * HZ))
|
||||
+ *expires = ifa->tstamp + lifetime * HZ;
|
||||
+ spin_unlock(&ifa->lock);
|
||||
+ }
|
||||
+
|
||||
+ return action;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+cleanup_prefix_route(struct inet6_ifaddr *ifp, unsigned long expires, bool del_rt)
|
||||
+{
|
||||
+ struct rt6_info *rt;
|
||||
+
|
||||
+ rt = addrconf_get_prefix_route(&ifp->addr,
|
||||
+ ifp->prefix_len,
|
||||
+ ifp->idev->dev,
|
||||
+ 0, RTF_GATEWAY | RTF_DEFAULT);
|
||||
+ if (rt) {
|
||||
+ if (del_rt)
|
||||
+ ip6_del_rt(rt);
|
||||
+ else {
|
||||
+ if (!(rt->rt6i_flags & RTF_EXPIRES))
|
||||
+ rt6_set_expires(rt, expires);
|
||||
+ ip6_rt_put(rt);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
/* This function wants to get referenced ifp and releases it before return */
|
||||
|
||||
static void ipv6_del_addr(struct inet6_ifaddr *ifp)
|
||||
{
|
||||
- struct inet6_ifaddr *ifa, *ifn;
|
||||
- struct inet6_dev *idev = ifp->idev;
|
||||
int state;
|
||||
- int deleted = 0, onlink = 0;
|
||||
- unsigned long expires = jiffies;
|
||||
+ enum cleanup_prefix_rt_t action = CLEANUP_PREFIX_RT_NOP;
|
||||
+ unsigned long expires;
|
||||
|
||||
spin_lock_bh(&ifp->state_lock);
|
||||
state = ifp->state;
|
||||
@@ -913,7 +993,7 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
|
||||
hlist_del_init_rcu(&ifp->addr_lst);
|
||||
spin_unlock_bh(&addrconf_hash_lock);
|
||||
|
||||
- write_lock_bh(&idev->lock);
|
||||
+ write_lock_bh(&ifp->idev->lock);
|
||||
|
||||
if (ifp->flags&IFA_F_TEMPORARY) {
|
||||
list_del(&ifp->tmp_list);
|
||||
@@ -924,45 +1004,13 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
|
||||
__in6_ifa_put(ifp);
|
||||
}
|
||||
|
||||
- list_for_each_entry_safe(ifa, ifn, &idev->addr_list, if_list) {
|
||||
- if (ifa == ifp) {
|
||||
- list_del_init(&ifp->if_list);
|
||||
- __in6_ifa_put(ifp);
|
||||
+ if (ifp->flags & IFA_F_PERMANENT && !(ifp->flags & IFA_F_NOPREFIXROUTE))
|
||||
+ action = check_cleanup_prefix_route(ifp, &expires);
|
||||
|
||||
- if (!(ifp->flags & IFA_F_PERMANENT) || onlink > 0)
|
||||
- break;
|
||||
- deleted = 1;
|
||||
- continue;
|
||||
- } else if (ifp->flags & IFA_F_PERMANENT) {
|
||||
- if (ipv6_prefix_equal(&ifa->addr, &ifp->addr,
|
||||
- ifp->prefix_len)) {
|
||||
- if (ifa->flags & IFA_F_PERMANENT) {
|
||||
- onlink = 1;
|
||||
- if (deleted)
|
||||
- break;
|
||||
- } else {
|
||||
- unsigned long lifetime;
|
||||
-
|
||||
- if (!onlink)
|
||||
- onlink = -1;
|
||||
-
|
||||
- spin_lock(&ifa->lock);
|
||||
-
|
||||
- lifetime = addrconf_timeout_fixup(ifa->valid_lft, HZ);
|
||||
- /*
|
||||
- * Note: Because this address is
|
||||
- * not permanent, lifetime <
|
||||
- * LONG_MAX / HZ here.
|
||||
- */
|
||||
- if (time_before(expires,
|
||||
- ifa->tstamp + lifetime * HZ))
|
||||
- expires = ifa->tstamp + lifetime * HZ;
|
||||
- spin_unlock(&ifa->lock);
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- write_unlock_bh(&idev->lock);
|
||||
+ list_del_init(&ifp->if_list);
|
||||
+ __in6_ifa_put(ifp);
|
||||
+
|
||||
+ write_unlock_bh(&ifp->idev->lock);
|
||||
|
||||
addrconf_del_dad_timer(ifp);
|
||||
|
||||
@@ -970,41 +1018,9 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
|
||||
|
||||
inet6addr_notifier_call_chain(NETDEV_DOWN, ifp);
|
||||
|
||||
- /*
|
||||
- * Purge or update corresponding prefix
|
||||
- *
|
||||
- * 1) we don't purge prefix here if address was not permanent.
|
||||
- * prefix is managed by its own lifetime.
|
||||
- * 2) if there're no addresses, delete prefix.
|
||||
- * 3) if there're still other permanent address(es),
|
||||
- * corresponding prefix is still permanent.
|
||||
- * 4) otherwise, update prefix lifetime to the
|
||||
- * longest valid lifetime among the corresponding
|
||||
- * addresses on the device.
|
||||
- * Note: subsequent RA will update lifetime.
|
||||
- *
|
||||
- * --yoshfuji
|
||||
- */
|
||||
- if ((ifp->flags & IFA_F_PERMANENT) && onlink < 1) {
|
||||
- struct in6_addr prefix;
|
||||
- struct rt6_info *rt;
|
||||
-
|
||||
- ipv6_addr_prefix(&prefix, &ifp->addr, ifp->prefix_len);
|
||||
-
|
||||
- rt = addrconf_get_prefix_route(&prefix,
|
||||
- ifp->prefix_len,
|
||||
- ifp->idev->dev,
|
||||
- 0, RTF_GATEWAY | RTF_DEFAULT);
|
||||
-
|
||||
- if (rt) {
|
||||
- if (onlink == 0) {
|
||||
- ip6_del_rt(rt);
|
||||
- rt = NULL;
|
||||
- } else if (!(rt->rt6i_flags & RTF_EXPIRES)) {
|
||||
- rt6_set_expires(rt, expires);
|
||||
- }
|
||||
- }
|
||||
- ip6_rt_put(rt);
|
||||
+ if (action != CLEANUP_PREFIX_RT_NOP) {
|
||||
+ cleanup_prefix_route(ifp, expires,
|
||||
+ action == CLEANUP_PREFIX_RT_DEL);
|
||||
}
|
||||
|
||||
/* clean up prefsrc entries */
|
||||
@@ -1024,7 +1040,7 @@ static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp, struct inet6_ifaddr *i
|
||||
u32 addr_flags;
|
||||
unsigned long now = jiffies;
|
||||
|
||||
- write_lock(&idev->lock);
|
||||
+ write_lock_bh(&idev->lock);
|
||||
if (ift) {
|
||||
spin_lock_bh(&ift->lock);
|
||||
memcpy(&addr.s6_addr[8], &ift->addr.s6_addr[8], 8);
|
||||
@@ -1036,7 +1052,7 @@ static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp, struct inet6_ifaddr *i
|
||||
retry:
|
||||
in6_dev_hold(idev);
|
||||
if (idev->cnf.use_tempaddr <= 0) {
|
||||
- write_unlock(&idev->lock);
|
||||
+ write_unlock_bh(&idev->lock);
|
||||
pr_info("%s: use_tempaddr is disabled\n", __func__);
|
||||
in6_dev_put(idev);
|
||||
ret = -1;
|
||||
@@ -1046,7 +1062,7 @@ retry:
|
||||
if (ifp->regen_count++ >= idev->cnf.regen_max_retry) {
|
||||
idev->cnf.use_tempaddr = -1; /*XXX*/
|
||||
spin_unlock_bh(&ifp->lock);
|
||||
- write_unlock(&idev->lock);
|
||||
+ write_unlock_bh(&idev->lock);
|
||||
pr_warn("%s: regeneration time exceeded - disabled temporary address support\n",
|
||||
__func__);
|
||||
in6_dev_put(idev);
|
||||
@@ -1072,7 +1088,7 @@ retry:
|
||||
regen_advance = idev->cnf.regen_max_retry *
|
||||
idev->cnf.dad_transmits *
|
||||
idev->nd_parms->retrans_time / HZ;
|
||||
- write_unlock(&idev->lock);
|
||||
+ write_unlock_bh(&idev->lock);
|
||||
|
||||
/* A temporary address is created only if this calculated Preferred
|
||||
* Lifetime is greater than REGEN_ADVANCE time units. In particular,
|
||||
@@ -1099,7 +1115,7 @@ retry:
|
||||
in6_dev_put(idev);
|
||||
pr_info("%s: retry temporary address regeneration\n", __func__);
|
||||
tmpaddr = &addr;
|
||||
- write_lock(&idev->lock);
|
||||
+ write_lock_bh(&idev->lock);
|
||||
goto retry;
|
||||
}
|
||||
|
||||
@@ -1200,7 +1216,7 @@ static int ipv6_get_saddr_eval(struct net *net,
|
||||
* | d is scope of the destination.
|
||||
* B-d | \
|
||||
* | \ <- smaller scope is better if
|
||||
- * B-15 | \ if scope is enough for destinaion.
|
||||
+ * B-15 | \ if scope is enough for destination.
|
||||
* | ret = B - scope (-1 <= scope >= d <= 15).
|
||||
* d-C-1 | /
|
||||
* |/ <- greater is better
|
||||
@@ -1407,7 +1423,7 @@ try_nextdev:
|
||||
EXPORT_SYMBOL(ipv6_dev_get_saddr);
|
||||
|
||||
int __ipv6_get_lladdr(struct inet6_dev *idev, struct in6_addr *addr,
|
||||
- unsigned char banned_flags)
|
||||
+ u32 banned_flags)
|
||||
{
|
||||
struct inet6_ifaddr *ifp;
|
||||
int err = -EADDRNOTAVAIL;
|
||||
@@ -1424,7 +1440,7 @@ int __ipv6_get_lladdr(struct inet6_dev *idev, struct in6_addr *addr,
|
||||
}
|
||||
|
||||
int ipv6_get_lladdr(struct net_device *dev, struct in6_addr *addr,
|
||||
- unsigned char banned_flags)
|
||||
+ u32 banned_flags)
|
||||
{
|
||||
struct inet6_dev *idev;
|
||||
int err = -EADDRNOTAVAIL;
|
||||
@@ -2016,6 +2032,73 @@ static struct inet6_dev *addrconf_add_dev(struct net_device *dev)
|
||||
return idev;
|
||||
}
|
||||
|
||||
+static void manage_tempaddrs(struct inet6_dev *idev,
|
||||
+ struct inet6_ifaddr *ifp,
|
||||
+ __u32 valid_lft, __u32 prefered_lft,
|
||||
+ bool create, unsigned long now)
|
||||
+{
|
||||
+ u32 flags;
|
||||
+ struct inet6_ifaddr *ift;
|
||||
+
|
||||
+ read_lock_bh(&idev->lock);
|
||||
+ /* update all temporary addresses in the list */
|
||||
+ list_for_each_entry(ift, &idev->tempaddr_list, tmp_list) {
|
||||
+ int age, max_valid, max_prefered;
|
||||
+
|
||||
+ if (ifp != ift->ifpub)
|
||||
+ continue;
|
||||
+
|
||||
+ /* RFC 4941 section 3.3:
|
||||
+ * If a received option will extend the lifetime of a public
|
||||
+ * address, the lifetimes of temporary addresses should
|
||||
+ * be extended, subject to the overall constraint that no
|
||||
+ * temporary addresses should ever remain "valid" or "preferred"
|
||||
+ * for a time longer than (TEMP_VALID_LIFETIME) or
|
||||
+ * (TEMP_PREFERRED_LIFETIME - DESYNC_FACTOR), respectively.
|
||||
+ */
|
||||
+ age = (now - ift->cstamp) / HZ;
|
||||
+ max_valid = idev->cnf.temp_valid_lft - age;
|
||||
+ if (max_valid < 0)
|
||||
+ max_valid = 0;
|
||||
+
|
||||
+ max_prefered = idev->cnf.temp_prefered_lft -
|
||||
+ idev->cnf.max_desync_factor - age;
|
||||
+ if (max_prefered < 0)
|
||||
+ max_prefered = 0;
|
||||
+
|
||||
+ if (valid_lft > max_valid)
|
||||
+ valid_lft = max_valid;
|
||||
+
|
||||
+ if (prefered_lft > max_prefered)
|
||||
+ prefered_lft = max_prefered;
|
||||
+
|
||||
+ spin_lock(&ift->lock);
|
||||
+ flags = ift->flags;
|
||||
+ ift->valid_lft = valid_lft;
|
||||
+ ift->prefered_lft = prefered_lft;
|
||||
+ ift->tstamp = now;
|
||||
+ if (prefered_lft > 0)
|
||||
+ ift->flags &= ~IFA_F_DEPRECATED;
|
||||
+
|
||||
+ spin_unlock(&ift->lock);
|
||||
+ if (!(flags&IFA_F_TENTATIVE))
|
||||
+ ipv6_ifa_notify(0, ift);
|
||||
+ }
|
||||
+
|
||||
+ if ((create || list_empty(&idev->tempaddr_list)) &&
|
||||
+ idev->cnf.use_tempaddr > 0) {
|
||||
+ /* When a new public address is created as described
|
||||
+ * in [ADDRCONF], also create a new temporary address.
|
||||
+ * Also create a temporary address if it's enabled but
|
||||
+ * no temporary address currently exists.
|
||||
+ */
|
||||
+ read_unlock_bh(&idev->lock);
|
||||
+ ipv6_create_tempaddr(ifp, NULL);
|
||||
+ } else {
|
||||
+ read_unlock_bh(&idev->lock);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len, bool sllao)
|
||||
{
|
||||
struct prefix_info *pinfo;
|
||||
@@ -2170,6 +2253,7 @@ ok:
|
||||
return;
|
||||
}
|
||||
|
||||
+ ifp->flags |= IFA_F_MANAGETEMPADDR;
|
||||
update_lft = 0;
|
||||
create = 1;
|
||||
ifp->cstamp = jiffies;
|
||||
@@ -2178,9 +2262,8 @@ ok:
|
||||
}
|
||||
|
||||
if (ifp) {
|
||||
- int flags;
|
||||
+ u32 flags;
|
||||
unsigned long now;
|
||||
- struct inet6_ifaddr *ift;
|
||||
u32 stored_lft;
|
||||
|
||||
/* update lifetime (RFC2462 5.5.3 e) */
|
||||
@@ -2221,70 +2304,8 @@ ok:
|
||||
} else
|
||||
spin_unlock(&ifp->lock);
|
||||
|
||||
- read_lock_bh(&in6_dev->lock);
|
||||
- /* update all temporary addresses in the list */
|
||||
- list_for_each_entry(ift, &in6_dev->tempaddr_list,
|
||||
- tmp_list) {
|
||||
- int age, max_valid, max_prefered;
|
||||
-
|
||||
- if (ifp != ift->ifpub)
|
||||
- continue;
|
||||
-
|
||||
- /*
|
||||
- * RFC 4941 section 3.3:
|
||||
- * If a received option will extend the lifetime
|
||||
- * of a public address, the lifetimes of
|
||||
- * temporary addresses should be extended,
|
||||
- * subject to the overall constraint that no
|
||||
- * temporary addresses should ever remain
|
||||
- * "valid" or "preferred" for a time longer than
|
||||
- * (TEMP_VALID_LIFETIME) or
|
||||
- * (TEMP_PREFERRED_LIFETIME - DESYNC_FACTOR),
|
||||
- * respectively.
|
||||
- */
|
||||
- age = (now - ift->cstamp) / HZ;
|
||||
- max_valid = in6_dev->cnf.temp_valid_lft - age;
|
||||
- if (max_valid < 0)
|
||||
- max_valid = 0;
|
||||
-
|
||||
- max_prefered = in6_dev->cnf.temp_prefered_lft -
|
||||
- in6_dev->cnf.max_desync_factor -
|
||||
- age;
|
||||
- if (max_prefered < 0)
|
||||
- max_prefered = 0;
|
||||
-
|
||||
- if (valid_lft > max_valid)
|
||||
- valid_lft = max_valid;
|
||||
-
|
||||
- if (prefered_lft > max_prefered)
|
||||
- prefered_lft = max_prefered;
|
||||
-
|
||||
- spin_lock(&ift->lock);
|
||||
- flags = ift->flags;
|
||||
- ift->valid_lft = valid_lft;
|
||||
- ift->prefered_lft = prefered_lft;
|
||||
- ift->tstamp = now;
|
||||
- if (prefered_lft > 0)
|
||||
- ift->flags &= ~IFA_F_DEPRECATED;
|
||||
-
|
||||
- spin_unlock(&ift->lock);
|
||||
- if (!(flags&IFA_F_TENTATIVE))
|
||||
- ipv6_ifa_notify(0, ift);
|
||||
- }
|
||||
-
|
||||
- if ((create || list_empty(&in6_dev->tempaddr_list)) && in6_dev->cnf.use_tempaddr > 0) {
|
||||
- /*
|
||||
- * When a new public address is created as
|
||||
- * described in [ADDRCONF], also create a new
|
||||
- * temporary address. Also create a temporary
|
||||
- * address if it's enabled but no temporary
|
||||
- * address currently exists.
|
||||
- */
|
||||
- read_unlock_bh(&in6_dev->lock);
|
||||
- ipv6_create_tempaddr(ifp, NULL);
|
||||
- } else {
|
||||
- read_unlock_bh(&in6_dev->lock);
|
||||
- }
|
||||
+ manage_tempaddrs(in6_dev, ifp, valid_lft, prefered_lft,
|
||||
+ create, now);
|
||||
|
||||
in6_ifa_put(ifp);
|
||||
addrconf_verify(0);
|
||||
@@ -2363,10 +2384,11 @@ err_exit:
|
||||
/*
|
||||
* Manual configuration of address on an interface
|
||||
*/
|
||||
-static int inet6_addr_add(struct net *net, int ifindex, const struct in6_addr *pfx,
|
||||
+static int inet6_addr_add(struct net *net, int ifindex,
|
||||
+ const struct in6_addr *pfx,
|
||||
const struct in6_addr *peer_pfx,
|
||||
- unsigned int plen, __u8 ifa_flags, __u32 prefered_lft,
|
||||
- __u32 valid_lft)
|
||||
+ unsigned int plen, __u32 ifa_flags,
|
||||
+ __u32 prefered_lft, __u32 valid_lft)
|
||||
{
|
||||
struct inet6_ifaddr *ifp;
|
||||
struct inet6_dev *idev;
|
||||
@@ -2385,6 +2407,9 @@ static int inet6_addr_add(struct net *net, int ifindex, const struct in6_addr *p
|
||||
if (!valid_lft || prefered_lft > valid_lft)
|
||||
return -EINVAL;
|
||||
|
||||
+ if (ifa_flags & IFA_F_MANAGETEMPADDR && plen != 64)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
dev = __dev_get_by_index(net, ifindex);
|
||||
if (!dev)
|
||||
return -ENODEV;
|
||||
@@ -2417,14 +2442,20 @@ static int inet6_addr_add(struct net *net, int ifindex, const struct in6_addr *p
|
||||
valid_lft, prefered_lft);
|
||||
|
||||
if (!IS_ERR(ifp)) {
|
||||
- addrconf_prefix_route(&ifp->addr, ifp->prefix_len, dev,
|
||||
- expires, flags);
|
||||
+ if (!(ifa_flags & IFA_F_NOPREFIXROUTE)) {
|
||||
+ addrconf_prefix_route(&ifp->addr, ifp->prefix_len, dev,
|
||||
+ expires, flags);
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
* Note that section 3.1 of RFC 4429 indicates
|
||||
* that the Optimistic flag should not be set for
|
||||
* manually configured addresses
|
||||
*/
|
||||
addrconf_dad_start(ifp);
|
||||
+ if (ifa_flags & IFA_F_MANAGETEMPADDR)
|
||||
+ manage_tempaddrs(idev, ifp, valid_lft, prefered_lft,
|
||||
+ true, jiffies);
|
||||
in6_ifa_put(ifp);
|
||||
addrconf_verify(0);
|
||||
return 0;
|
||||
@@ -2857,7 +2888,7 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
|
||||
}
|
||||
|
||||
/*
|
||||
- * MTU falled under IPV6_MIN_MTU.
|
||||
+ * if MTU under IPV6_MIN_MTU.
|
||||
* Stop IPv6 on this interface.
|
||||
*/
|
||||
|
||||
@@ -3366,7 +3397,7 @@ static void if6_seq_stop(struct seq_file *seq, void *v)
|
||||
static int if6_seq_show(struct seq_file *seq, void *v)
|
||||
{
|
||||
struct inet6_ifaddr *ifp = (struct inet6_ifaddr *)v;
|
||||
- seq_printf(seq, "%pi6 %02x %02x %02x %02x %8s\n",
|
||||
+ seq_printf(seq, "%pi6 %02x %02x %02x %03x %8s\n",
|
||||
&ifp->addr,
|
||||
ifp->idev->dev->ifindex,
|
||||
ifp->prefix_len,
|
||||
@@ -3593,6 +3624,7 @@ static const struct nla_policy ifa_ipv6_policy[IFA_MAX+1] = {
|
||||
[IFA_ADDRESS] = { .len = sizeof(struct in6_addr) },
|
||||
[IFA_LOCAL] = { .len = sizeof(struct in6_addr) },
|
||||
[IFA_CACHEINFO] = { .len = sizeof(struct ifa_cacheinfo) },
|
||||
+ [IFA_FLAGS] = { .len = sizeof(u32) },
|
||||
};
|
||||
|
||||
static int
|
||||
@@ -3616,16 +3648,22 @@ inet6_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
return inet6_addr_del(net, ifm->ifa_index, pfx, ifm->ifa_prefixlen);
|
||||
}
|
||||
|
||||
-static int inet6_addr_modify(struct inet6_ifaddr *ifp, u8 ifa_flags,
|
||||
+static int inet6_addr_modify(struct inet6_ifaddr *ifp, u32 ifa_flags,
|
||||
u32 prefered_lft, u32 valid_lft)
|
||||
{
|
||||
u32 flags;
|
||||
clock_t expires;
|
||||
unsigned long timeout;
|
||||
+ bool was_managetempaddr;
|
||||
+ bool had_prefixroute;
|
||||
|
||||
if (!valid_lft || (prefered_lft > valid_lft))
|
||||
return -EINVAL;
|
||||
|
||||
+ if (ifa_flags & IFA_F_MANAGETEMPADDR &&
|
||||
+ (ifp->flags & IFA_F_TEMPORARY || ifp->prefix_len != 64))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
timeout = addrconf_timeout_fixup(valid_lft, HZ);
|
||||
if (addrconf_finite_timeout(timeout)) {
|
||||
expires = jiffies_to_clock_t(timeout * HZ);
|
||||
@@ -3645,7 +3683,13 @@ static int inet6_addr_modify(struct inet6_ifaddr *ifp, u8 ifa_flags,
|
||||
}
|
||||
|
||||
spin_lock_bh(&ifp->lock);
|
||||
- ifp->flags = (ifp->flags & ~(IFA_F_DEPRECATED | IFA_F_PERMANENT | IFA_F_NODAD | IFA_F_HOMEADDRESS)) | ifa_flags;
|
||||
+ was_managetempaddr = ifp->flags & IFA_F_MANAGETEMPADDR;
|
||||
+ had_prefixroute = ifp->flags & IFA_F_PERMANENT &&
|
||||
+ !(ifp->flags & IFA_F_NOPREFIXROUTE);
|
||||
+ ifp->flags &= ~(IFA_F_DEPRECATED | IFA_F_PERMANENT | IFA_F_NODAD |
|
||||
+ IFA_F_HOMEADDRESS | IFA_F_MANAGETEMPADDR |
|
||||
+ IFA_F_NOPREFIXROUTE);
|
||||
+ ifp->flags |= ifa_flags;
|
||||
ifp->tstamp = jiffies;
|
||||
ifp->valid_lft = valid_lft;
|
||||
ifp->prefered_lft = prefered_lft;
|
||||
@@ -3654,8 +3698,30 @@ static int inet6_addr_modify(struct inet6_ifaddr *ifp, u8 ifa_flags,
|
||||
if (!(ifp->flags&IFA_F_TENTATIVE))
|
||||
ipv6_ifa_notify(0, ifp);
|
||||
|
||||
- addrconf_prefix_route(&ifp->addr, ifp->prefix_len, ifp->idev->dev,
|
||||
- expires, flags);
|
||||
+ if (!(ifa_flags & IFA_F_NOPREFIXROUTE)) {
|
||||
+ addrconf_prefix_route(&ifp->addr, ifp->prefix_len, ifp->idev->dev,
|
||||
+ expires, flags);
|
||||
+ } else if (had_prefixroute) {
|
||||
+ enum cleanup_prefix_rt_t action;
|
||||
+ unsigned long rt_expires;
|
||||
+
|
||||
+ write_lock_bh(&ifp->idev->lock);
|
||||
+ action = check_cleanup_prefix_route(ifp, &rt_expires);
|
||||
+ write_unlock_bh(&ifp->idev->lock);
|
||||
+
|
||||
+ if (action != CLEANUP_PREFIX_RT_NOP) {
|
||||
+ cleanup_prefix_route(ifp, rt_expires,
|
||||
+ action == CLEANUP_PREFIX_RT_DEL);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (was_managetempaddr || ifp->flags & IFA_F_MANAGETEMPADDR) {
|
||||
+ if (was_managetempaddr && !(ifp->flags & IFA_F_MANAGETEMPADDR))
|
||||
+ valid_lft = prefered_lft = 0;
|
||||
+ manage_tempaddrs(ifp->idev, ifp, valid_lft, prefered_lft,
|
||||
+ !was_managetempaddr, jiffies);
|
||||
+ }
|
||||
+
|
||||
addrconf_verify(0);
|
||||
|
||||
return 0;
|
||||
@@ -3671,7 +3737,7 @@ inet6_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
struct inet6_ifaddr *ifa;
|
||||
struct net_device *dev;
|
||||
u32 valid_lft = INFINITY_LIFE_TIME, preferred_lft = INFINITY_LIFE_TIME;
|
||||
- u8 ifa_flags;
|
||||
+ u32 ifa_flags;
|
||||
int err;
|
||||
|
||||
err = nlmsg_parse(nlh, sizeof(*ifm), tb, IFA_MAX, ifa_ipv6_policy);
|
||||
@@ -3698,14 +3764,17 @@ inet6_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
if (dev == NULL)
|
||||
return -ENODEV;
|
||||
|
||||
+ ifa_flags = tb[IFA_FLAGS] ? nla_get_u32(tb[IFA_FLAGS]) : ifm->ifa_flags;
|
||||
+
|
||||
/* We ignore other flags so far. */
|
||||
- ifa_flags = ifm->ifa_flags & (IFA_F_NODAD | IFA_F_HOMEADDRESS);
|
||||
+ ifa_flags &= IFA_F_NODAD | IFA_F_HOMEADDRESS | IFA_F_MANAGETEMPADDR |
|
||||
+ IFA_F_NOPREFIXROUTE;
|
||||
|
||||
ifa = ipv6_get_ifaddr(net, pfx, dev, 1);
|
||||
if (ifa == NULL) {
|
||||
/*
|
||||
* It would be best to check for !NLM_F_CREATE here but
|
||||
- * userspace alreay relies on not having to provide this.
|
||||
+ * userspace already relies on not having to provide this.
|
||||
*/
|
||||
return inet6_addr_add(net, ifm->ifa_index, pfx, peer_pfx,
|
||||
ifm->ifa_prefixlen, ifa_flags,
|
||||
@@ -3723,7 +3792,7 @@ inet6_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
return err;
|
||||
}
|
||||
|
||||
-static void put_ifaddrmsg(struct nlmsghdr *nlh, u8 prefixlen, u8 flags,
|
||||
+static void put_ifaddrmsg(struct nlmsghdr *nlh, u8 prefixlen, u32 flags,
|
||||
u8 scope, int ifindex)
|
||||
{
|
||||
struct ifaddrmsg *ifm;
|
||||
@@ -3766,7 +3835,8 @@ static inline int inet6_ifaddr_msgsize(void)
|
||||
return NLMSG_ALIGN(sizeof(struct ifaddrmsg))
|
||||
+ nla_total_size(16) /* IFA_LOCAL */
|
||||
+ nla_total_size(16) /* IFA_ADDRESS */
|
||||
- + nla_total_size(sizeof(struct ifa_cacheinfo));
|
||||
+ + nla_total_size(sizeof(struct ifa_cacheinfo))
|
||||
+ + nla_total_size(4) /* IFA_FLAGS */;
|
||||
}
|
||||
|
||||
static int inet6_fill_ifaddr(struct sk_buff *skb, struct inet6_ifaddr *ifa,
|
||||
@@ -3815,6 +3885,9 @@ static int inet6_fill_ifaddr(struct sk_buff *skb, struct inet6_ifaddr *ifa,
|
||||
if (put_cacheinfo(skb, ifa->cstamp, ifa->tstamp, preferred, valid) < 0)
|
||||
goto error;
|
||||
|
||||
+ if (nla_put_u32(skb, IFA_FLAGS, ifa->flags) < 0)
|
||||
+ goto error;
|
||||
+
|
||||
return nlmsg_end(skb, nlh);
|
||||
|
||||
error:
|
||||
_______________________________________________
|
||||
kernel mailing list
|
||||
kernel@lists.fedoraproject.org
|
||||
https://admin.fedoraproject.org/mailman/listinfo/kernel
|
|
@ -1,39 +0,0 @@
|
|||
Bugzilla: 1065663
|
||||
Upstream-status: 3.14
|
||||
|
||||
From ec6f678c74dbdb06a6a775bbb00f1d26c17c404b Mon Sep 17 00:00:00 2001
|
||||
From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
||||
Date: Tue, 18 Feb 2014 10:30:18 +0200
|
||||
Subject: [PATCH] iwlwifi: dvm: clear IWL_STA_UCODE_INPROGRESS when assoc fails
|
||||
|
||||
We set IWL_STA_UCODE_INPROGRESS flag when we add a station
|
||||
and clear it when we send the LQ command for it. But the LQ
|
||||
command is sent only when the association succeeds.
|
||||
If the association doesn't succeed, we would leave this flag
|
||||
set and that wouldn't indicate the station entry as vacant.
|
||||
|
||||
This probably fixes:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1065663
|
||||
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
|
||||
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
||||
---
|
||||
drivers/net/wireless/iwlwifi/dvm/sta.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/net/wireless/iwlwifi/dvm/sta.c b/drivers/net/wireless/iwlwifi/dvm/sta.c
|
||||
index c0d070c..9cdd91c 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/dvm/sta.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/dvm/sta.c
|
||||
@@ -590,6 +590,7 @@ void iwl_deactivate_station(struct iwl_priv *priv, const u8 sta_id,
|
||||
sizeof(priv->tid_data[sta_id][tid]));
|
||||
|
||||
priv->stations[sta_id].used &= ~IWL_STA_DRIVER_ACTIVE;
|
||||
+ priv->stations[sta_id].used &= ~IWL_STA_UCODE_INPROGRESS;
|
||||
|
||||
priv->num_stations--;
|
||||
|
||||
--
|
||||
1.8.5.3
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
diff -up ./drivers/net/ethernet/jme.c.orig ./drivers/net/ethernet/jme.c
|
||||
--- ./drivers/net/ethernet/jme.c.orig 2014-03-30 23:40:15.000000000 -0400
|
||||
+++ ./drivers/net/ethernet/jme.c 2014-05-08 12:16:52.701746091 -0400
|
||||
@@ -1988,7 +1988,7 @@ jme_alloc_txdesc(struct jme_adapter *jme
|
||||
return idx;
|
||||
}
|
||||
|
||||
-static void
|
||||
+static int
|
||||
jme_fill_tx_map(struct pci_dev *pdev,
|
||||
struct txdesc *txdesc,
|
||||
struct jme_buffer_info *txbi,
|
||||
@@ -2005,6 +2005,9 @@ jme_fill_tx_map(struct pci_dev *pdev,
|
||||
len,
|
||||
PCI_DMA_TODEVICE);
|
||||
|
||||
+ if (unlikely(pci_dma_mapping_error(pdev, dmaaddr)))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
pci_dma_sync_single_for_device(pdev,
|
||||
dmaaddr,
|
||||
len,
|
||||
@@ -2021,9 +2024,30 @@ jme_fill_tx_map(struct pci_dev *pdev,
|
||||
|
||||
txbi->mapping = dmaaddr;
|
||||
txbi->len = len;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
-static void
|
||||
+static void jme_drop_tx_map(struct jme_adapter *jme, int startidx, int endidx)
|
||||
+{
|
||||
+ struct jme_ring *txring = &(jme->txring[0]);
|
||||
+ struct jme_buffer_info *txbi = txring->bufinf, *ctxbi;
|
||||
+ int mask = jme->tx_ring_mask;
|
||||
+ int j;
|
||||
+
|
||||
+ for (j = startidx ; j < endidx ; ++j) {
|
||||
+ ctxbi = txbi + ((startidx + j + 2) & (mask));
|
||||
+ pci_unmap_page(jme->pdev,
|
||||
+ ctxbi->mapping,
|
||||
+ ctxbi->len,
|
||||
+ PCI_DMA_TODEVICE);
|
||||
+
|
||||
+ ctxbi->mapping = 0;
|
||||
+ ctxbi->len = 0;
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
jme_map_tx_skb(struct jme_adapter *jme, struct sk_buff *skb, int idx)
|
||||
{
|
||||
struct jme_ring *txring = &(jme->txring[0]);
|
||||
@@ -2034,25 +2058,37 @@ jme_map_tx_skb(struct jme_adapter *jme,
|
||||
int mask = jme->tx_ring_mask;
|
||||
const struct skb_frag_struct *frag;
|
||||
u32 len;
|
||||
+ int ret = 0;
|
||||
|
||||
for (i = 0 ; i < nr_frags ; ++i) {
|
||||
frag = &skb_shinfo(skb)->frags[i];
|
||||
ctxdesc = txdesc + ((idx + i + 2) & (mask));
|
||||
ctxbi = txbi + ((idx + i + 2) & (mask));
|
||||
|
||||
- jme_fill_tx_map(jme->pdev, ctxdesc, ctxbi,
|
||||
+ ret = jme_fill_tx_map(jme->pdev, ctxdesc, ctxbi,
|
||||
skb_frag_page(frag),
|
||||
frag->page_offset, skb_frag_size(frag), hidma);
|
||||
+ if (ret) {
|
||||
+ jme_drop_tx_map(jme, idx, idx+i);
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
len = skb_is_nonlinear(skb) ? skb_headlen(skb) : skb->len;
|
||||
ctxdesc = txdesc + ((idx + 1) & (mask));
|
||||
ctxbi = txbi + ((idx + 1) & (mask));
|
||||
- jme_fill_tx_map(jme->pdev, ctxdesc, ctxbi, virt_to_page(skb->data),
|
||||
+ ret = jme_fill_tx_map(jme->pdev, ctxdesc, ctxbi, virt_to_page(skb->data),
|
||||
offset_in_page(skb->data), len, hidma);
|
||||
+ if (ret)
|
||||
+ jme_drop_tx_map(jme, idx, idx+i);
|
||||
+
|
||||
+out:
|
||||
+ return ret;
|
||||
|
||||
}
|
||||
|
||||
+
|
||||
static int
|
||||
jme_expand_header(struct jme_adapter *jme, struct sk_buff *skb)
|
||||
{
|
||||
@@ -2144,6 +2180,7 @@ jme_fill_tx_desc(struct jme_adapter *jme
|
||||
struct txdesc *txdesc;
|
||||
struct jme_buffer_info *txbi;
|
||||
u8 flags;
|
||||
+ int ret = 0;
|
||||
|
||||
txdesc = (struct txdesc *)txring->desc + idx;
|
||||
txbi = txring->bufinf + idx;
|
||||
@@ -2168,7 +2205,10 @@ jme_fill_tx_desc(struct jme_adapter *jme
|
||||
if (jme_tx_tso(skb, &txdesc->desc1.mss, &flags))
|
||||
jme_tx_csum(jme, skb, &flags);
|
||||
jme_tx_vlan(skb, &txdesc->desc1.vlan, &flags);
|
||||
- jme_map_tx_skb(jme, skb, idx);
|
||||
+ ret = jme_map_tx_skb(jme, skb, idx);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
txdesc->desc1.flags = flags;
|
||||
/*
|
||||
* Set tx buffer info after telling NIC to send
|
||||
@@ -2240,7 +2280,8 @@ jme_start_xmit(struct sk_buff *skb, stru
|
||||
return NETDEV_TX_BUSY;
|
||||
}
|
||||
|
||||
- jme_fill_tx_desc(jme, skb, idx);
|
||||
+ if (jme_fill_tx_desc(jme, skb, idx))
|
||||
+ return NETDEV_TX_BUSY;
|
||||
|
||||
jwrite32(jme, JME_TXCS, jme->reg_txcs |
|
||||
TXCS_SELECT_QUEUE0 |
|
410
kernel.spec
410
kernel.spec
|
@ -68,13 +68,13 @@ Summary: The Linux kernel
|
|||
# base_sublevel is the kernel version we're starting with and patching
|
||||
# on top of -- for example, 3.1-rc7-git1 starts with a 3.0 base,
|
||||
# which yields a base_sublevel of 0.
|
||||
%define base_sublevel 13
|
||||
%define base_sublevel 14
|
||||
|
||||
## If this is a released 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
|
||||
|
@ -669,8 +669,6 @@ Patch1826: drm-i915-hush-check-crtc-state.patch
|
|||
# NFSv4
|
||||
|
||||
# patches headed upstream
|
||||
Patch10000: fs-proc-devtree-remove_proc_entry.patch
|
||||
|
||||
Patch12016: disable-i8042-check-on-apple-mac.patch
|
||||
|
||||
Patch14000: hibernate-freeze-filesystems.patch
|
||||
|
@ -693,15 +691,14 @@ Patch21010: arm-omap-load-tfp410.patch
|
|||
# ARM tegra
|
||||
Patch21020: arm-tegra-usb-no-reset-linux33.patch
|
||||
|
||||
# Add panel support for tegra paz00
|
||||
# Backported from linux-next scheduled for 3.15
|
||||
Patch21021: arm-tegra-paz00-panel-dts.patch
|
||||
|
||||
# ARM i.MX6
|
||||
# http://www.spinics.net/lists/devicetree/msg08276.html
|
||||
Patch21025: arm-imx6-utilite.patch
|
||||
|
||||
# am33xx (BeagleBone)
|
||||
# https://github.com/beagleboard/kernel
|
||||
# Pulled primarily from the above git repo and should be landing upstream
|
||||
Patch21031: arm-am33xx-bblack.patch
|
||||
|
||||
#rhbz 754518
|
||||
Patch21235: scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch
|
||||
|
||||
|
@ -715,99 +712,72 @@ Patch22000: weird-root-dentry-name-debug.patch
|
|||
|
||||
Patch25047: drm-radeon-Disable-writeback-by-default-on-ppc.patch
|
||||
|
||||
#rhbz 993744
|
||||
Patch25128: dm-cache-policy-mq_fix-large-scale-table-allocation-bug.patch
|
||||
|
||||
# Fix 15sec NFS mount delay
|
||||
Patch25152: sunrpc-create-a-new-dummy-pipe-for-gssd-to-hold-open.patch
|
||||
Patch25153: sunrpc-replace-gssd_running-with-more-reliable-check.patch
|
||||
Patch25154: nfs-check-gssd-running-before-krb5i-auth.patch
|
||||
#rhbz 1037793
|
||||
Patch25166: sunrpc-add-an-info-file-for-the-dummy-gssd-pipe.patch
|
||||
Patch25167: rpc_pipe-remove-the-clntXX-dir-if-creating-the-pipe-fails.patch
|
||||
Patch25168: rpc_pipe-fix-cleanup-of-dummy-gssd-directory-when-notification-fails.patch
|
||||
|
||||
#rhbz 1030802
|
||||
Patch25171: elantech-Properly-differentiate-between-clickpads-an.patch
|
||||
|
||||
#rhbz 924916
|
||||
Patch25179: KVM-MMU-handle-invalid-root_hpa-at-__direct_map.patch
|
||||
|
||||
#rhbz 1047892
|
||||
Patch25180: KVM-VMX-fix-use-after-free-of-vmx-loaded_vmcs.patch
|
||||
|
||||
#rhbz 1003167 1046238
|
||||
Patch25181: 0001-Input-wacom-make-sure-touch_max-is-set-for-touch-dev.patch
|
||||
Patch25182: 0002-Input-wacom-add-support-for-three-new-Intuos-devices.patch
|
||||
Patch25183: 0003-Input-wacom-add-reporting-of-SW_MUTE_DEVICE-events.patch
|
||||
|
||||
#rhbz 953211
|
||||
Patch25184: Input-ALPS-add-support-for-Dolphin-devices.patch
|
||||
|
||||
#rhbz 950630
|
||||
Patch25187: xhci-fix-resume-issues-on-renesas-chips-in-samsung-laptops.patch
|
||||
|
||||
#rhbz 1045755
|
||||
Patch25195: cgroup-fixes.patch
|
||||
|
||||
#rhbz 1064430 1056711
|
||||
Patch25196: ipv6-introduce-IFA_F_NOPREFIXROUTE-and-IFA_F_MANAGETEMPADDR-flags.patch
|
||||
Patch25197: ipv6-addrconf-revert-if_inet6ifa_flag-format.patch
|
||||
|
||||
#CVE-2014-0069 rhbz 1064253 1062584
|
||||
Patch25201: cifs-sanity-check-length-of-data-to-send-before-sending.patch
|
||||
|
||||
#rhbz 1068862
|
||||
Patch25002: cifs-mask-off-top-byte-in-get_rfc1002_length.patch
|
||||
|
||||
#rhbz 994438
|
||||
Patch25024: e100-Fix-disabling-already-disabled-device-warning.patch
|
||||
|
||||
#CVE-2014-0102 rhbz 1071396
|
||||
Patch25026: keyring-fix.patch
|
||||
|
||||
#rhbz 1065087
|
||||
Patch25028: tty-Fix-low_latency-BUG.patch
|
||||
|
||||
#rhbz 1066064
|
||||
Patch25029: audit-don-t-generate-loginuid-log-when-audit-disable.patch
|
||||
|
||||
#CVE-2014-0101 rhbz 1072029 1070705
|
||||
Patch25030: net-net-sctp-fix-sctp_sf_do_5_1D_ce-to-verify-if-we-peer-is-AUTH-capable.patch
|
||||
|
||||
#CVE-2014-0100 rhbz 1072026 1070618
|
||||
Patch25031: net-fix-for-a-race-condition-in-the-inet-frag-code.patch
|
||||
|
||||
#rhbz 1027465
|
||||
Patch25032: HID-Bluetooth-hidp-make-sure-input-buffers-are-big-e.patch
|
||||
|
||||
#rhbz 1013466
|
||||
Patch25033: selinux-put-the-mmap-DAC-controls-before-the-MAC-controls.patch
|
||||
|
||||
#rhbz 1071998
|
||||
Patch25034: bug-1071998.patch
|
||||
|
||||
#rhbz 1051748
|
||||
Patch25035: Bluetooth-allocate-static-minor-for-vhci.patch
|
||||
|
||||
#rhbz 1003602
|
||||
Patch25037: ACPI-EC-Clear-stale-EC-events-on-Samsung-systems.patch
|
||||
#rhbz 1074710
|
||||
Patch25061: mm-page_alloc.c-change-mm-debug-routines-back-to-EXP.patch
|
||||
|
||||
#rhbz 1073180
|
||||
Patch25038: Revert-USBNET-ax88179_178a-enable-tso-if-usb-host-supports-sg-dma.patch
|
||||
Patch25039: Revert-xhci-1.0-Limit-arbitrarily-aligned-scatter-gather.patch
|
||||
#rhbz 1048314
|
||||
Patch25062: 0001-HID-rmi-introduce-RMI-driver-for-Synaptics-touchpads.patch
|
||||
|
||||
#rhbz 1065663
|
||||
Patch25040: iwlwifi-dvm-clear-IWL_STA_UCODE_INPROGRESS-when-asso.patch
|
||||
#rhbz 1089583
|
||||
Patch25064: 0001-HID-rmi-do-not-handle-touchscreens-through-hid-rmi.patch
|
||||
|
||||
#CVE-2014-2309 rhbz 1074471 1075064
|
||||
Patch25041: ipv6-dont-set-DST_NOCOUNT-for-remotely-added-routes.patch
|
||||
#rhbz 1090161
|
||||
Patch25072: HID-rmi-do-not-fetch-more-than-16-bytes-in-a-query.patch
|
||||
|
||||
#rhbz 1046495
|
||||
Patch25044: iwlwifi-dvm-take-mutex-when-sending-SYNC-BT-config-command.patch
|
||||
#rhbz 1013466
|
||||
Patch25065: selinux-put-the-mmap-DAC-controls-before-the-MAC-controls.patch
|
||||
|
||||
#CVE-2014-2523 rhbz 1077343 1077350
|
||||
Patch25045: netfilter-nf_conntrack_dccp-fix-skb_header_pointer-A.patch
|
||||
#rhbz 696821
|
||||
Patch25068: fanotify-fix-EOVERFLOW-on-64-bit.patch
|
||||
|
||||
#rhbz 983342 1093120
|
||||
Patch25070: 0001-acpi-video-Add-4-new-models-to-the-use_native_backli.patch
|
||||
|
||||
#rhbz 1060327
|
||||
Patch25071: drm-fix-qxl-mode-flags-backport.patch
|
||||
|
||||
#rhbz 861573
|
||||
Patch25079: 0003-samsung-laptop-Add-broken-acpi-video-quirk-for-NC210.patch
|
||||
|
||||
#CVE-2014-0181 rhbz 1094270 1094265
|
||||
Patch25082: 1-5-netlink-Rename-netlink_capable-netlink_allowed.patch
|
||||
Patch25083: 2-5-net-Move-the-permission-check-in-sock_diag_put_filterinfo-to-packet_diag_dump.patch
|
||||
Patch25084: 3-5-net-Add-variants-of-capable-for-use-on-on-sockets.patch
|
||||
Patch25085: 4-5-net-Add-variants-of-capable-for-use-on-netlink-messages.patch
|
||||
Patch25086: 5-5-net-Use-netlink_ns_capable-to-verify-the-permisions-of-netlink-messages.patch
|
||||
#rhbz 1094265 1097684
|
||||
Patch25094: netlink-Only-check-file-credentials-for-implicit-des.patch
|
||||
|
||||
#rhbz 1082266
|
||||
Patch25087: jme-fix-dma-unmap-error.patch
|
||||
|
||||
#rhbz 1051668
|
||||
Patch25092: Input-elantech-add-support-for-newer-elantech-touchpads.patch
|
||||
|
||||
# CVE-2014-3917 rhbz 1102571 1102715
|
||||
Patch25093: auditsc-audit_krule-mask-accesses-need-bounds-checking.patch
|
||||
|
||||
#rhbz 1099857
|
||||
Patch25095: team-fix-mtu-setting.patch
|
||||
|
||||
#rhbz 1094066
|
||||
Patch25096: drm-i915-set-backlight-duty-cycle-after-backlight-enable-for-gen4.patch
|
||||
|
||||
#rhbz 1064516
|
||||
Patch25097: e1000e-Fix-SHRA-register-access-for-82579.patch
|
||||
Patch25098: e1000e-Failure-to-write-SHRA-turns-on-PROMISC-mode.patch
|
||||
|
||||
#rhbz 1099761
|
||||
Patch25099: NFS-populate-net-in-mount-data-when-remounting.patch
|
||||
|
||||
#rhbz 1106856
|
||||
Patch25100: dm-thin-update-discard_granularity-to-reflect-the-thin-pool-blocksize.patch
|
||||
|
||||
#rhbz 1103528
|
||||
Patch25101: elantech-Deal-with-clickpads-reporting-right-button-.patch
|
||||
|
||||
# END OF PATCH DEFINITIONS
|
||||
|
||||
|
@ -1358,9 +1328,9 @@ ApplyPatch arm-lpae-ax88796.patch
|
|||
ApplyPatch arm-sound-soc-samsung-dma-avoid-another-64bit-division.patch
|
||||
ApplyPatch arm-omap-load-tfp410.patch
|
||||
ApplyPatch arm-tegra-usb-no-reset-linux33.patch
|
||||
ApplyPatch arm-tegra-paz00-panel-dts.patch
|
||||
ApplyPatch arm-imx6-utilite.patch
|
||||
|
||||
ApplyPatch arm-am33xx-bblack.patch
|
||||
|
||||
#
|
||||
# bugfixes to drivers and filesystems
|
||||
|
@ -1425,8 +1395,6 @@ ApplyPatch crash-driver.patch
|
|||
|
||||
# crypto/
|
||||
|
||||
# keys
|
||||
|
||||
# secure boot
|
||||
ApplyPatch secure-modules.patch
|
||||
ApplyPatch modsign-uefi.patch
|
||||
|
@ -1445,8 +1413,6 @@ ApplyPatch drm-i915-hush-check-crtc-state.patch
|
|||
# Radeon DRM
|
||||
|
||||
# Patches headed upstream
|
||||
ApplyPatch fs-proc-devtree-remove_proc_entry.patch
|
||||
|
||||
ApplyPatch disable-i8042-check-on-apple-mac.patch
|
||||
|
||||
# FIXME: REBASE
|
||||
|
@ -1470,99 +1436,70 @@ ApplyPatch ath9k_rx_dma_stop_check.patch
|
|||
|
||||
ApplyPatch drm-radeon-Disable-writeback-by-default-on-ppc.patch
|
||||
|
||||
#rhbz 993744
|
||||
ApplyPatch dm-cache-policy-mq_fix-large-scale-table-allocation-bug.patch
|
||||
#rhbz 1051748
|
||||
ApplyPatch Bluetooth-allocate-static-minor-for-vhci.patch
|
||||
|
||||
# Fix 15sec NFS mount delay
|
||||
ApplyPatch sunrpc-create-a-new-dummy-pipe-for-gssd-to-hold-open.patch
|
||||
ApplyPatch sunrpc-replace-gssd_running-with-more-reliable-check.patch
|
||||
ApplyPatch nfs-check-gssd-running-before-krb5i-auth.patch
|
||||
#rhbz 1037793
|
||||
ApplyPatch rpc_pipe-remove-the-clntXX-dir-if-creating-the-pipe-fails.patch
|
||||
ApplyPatch sunrpc-add-an-info-file-for-the-dummy-gssd-pipe.patch
|
||||
ApplyPatch rpc_pipe-fix-cleanup-of-dummy-gssd-directory-when-notification-fails.patch
|
||||
#rhbz 1048314
|
||||
ApplyPatch 0001-HID-rmi-introduce-RMI-driver-for-Synaptics-touchpads.patch
|
||||
#rhbz 1089583
|
||||
ApplyPatch 0001-HID-rmi-do-not-handle-touchscreens-through-hid-rmi.patch
|
||||
#rhbz 1090161
|
||||
ApplyPatch HID-rmi-do-not-fetch-more-than-16-bytes-in-a-query.patch
|
||||
|
||||
#rhbz 1030802
|
||||
ApplyPatch elantech-Properly-differentiate-between-clickpads-an.patch
|
||||
|
||||
#rhbz 924916
|
||||
ApplyPatch KVM-MMU-handle-invalid-root_hpa-at-__direct_map.patch
|
||||
|
||||
#rhbz 1047892
|
||||
ApplyPatch KVM-VMX-fix-use-after-free-of-vmx-loaded_vmcs.patch
|
||||
|
||||
#rhbz 1003167 1046238
|
||||
ApplyPatch 0001-Input-wacom-make-sure-touch_max-is-set-for-touch-dev.patch
|
||||
ApplyPatch 0002-Input-wacom-add-support-for-three-new-Intuos-devices.patch
|
||||
ApplyPatch 0003-Input-wacom-add-reporting-of-SW_MUTE_DEVICE-events.patch
|
||||
|
||||
#rhbz 953211
|
||||
ApplyPatch Input-ALPS-add-support-for-Dolphin-devices.patch
|
||||
|
||||
#rhbz 950630
|
||||
ApplyPatch xhci-fix-resume-issues-on-renesas-chips-in-samsung-laptops.patch
|
||||
|
||||
#rhbz 1045755
|
||||
ApplyPatch cgroup-fixes.patch
|
||||
|
||||
#rhbz 1064430 1056711
|
||||
ApplyPatch ipv6-introduce-IFA_F_NOPREFIXROUTE-and-IFA_F_MANAGETEMPADDR-flags.patch
|
||||
ApplyPatch ipv6-addrconf-revert-if_inet6ifa_flag-format.patch
|
||||
|
||||
#CVE-2014-0069 rhbz 1064253 1062584
|
||||
ApplyPatch cifs-sanity-check-length-of-data-to-send-before-sending.patch
|
||||
|
||||
#rhbz 1068862
|
||||
ApplyPatch cifs-mask-off-top-byte-in-get_rfc1002_length.patch
|
||||
|
||||
#rhbz 994438
|
||||
ApplyPatch e100-Fix-disabling-already-disabled-device-warning.patch
|
||||
|
||||
#CVE-2014-0102 rhbz 1071396
|
||||
ApplyPatch keyring-fix.patch
|
||||
|
||||
#rhbz 1065087
|
||||
ApplyPatch tty-Fix-low_latency-BUG.patch
|
||||
|
||||
#rhbz 1066064
|
||||
ApplyPatch audit-don-t-generate-loginuid-log-when-audit-disable.patch
|
||||
|
||||
#CVE-2014-0101 rhbz 1072029 1070705
|
||||
ApplyPatch net-net-sctp-fix-sctp_sf_do_5_1D_ce-to-verify-if-we-peer-is-AUTH-capable.patch
|
||||
|
||||
#CVE-2014-0100 rhbz 1072026 1070618
|
||||
ApplyPatch net-fix-for-a-race-condition-in-the-inet-frag-code.patch
|
||||
|
||||
#rhbz 1027465
|
||||
ApplyPatch HID-Bluetooth-hidp-make-sure-input-buffers-are-big-e.patch
|
||||
#rhbz 1074710
|
||||
ApplyPatch mm-page_alloc.c-change-mm-debug-routines-back-to-EXP.patch
|
||||
|
||||
#rhbz 1013466
|
||||
ApplyPatch selinux-put-the-mmap-DAC-controls-before-the-MAC-controls.patch
|
||||
|
||||
#rhbz 1071998
|
||||
ApplyPatch bug-1071998.patch
|
||||
#rhbz 696821
|
||||
ApplyPatch fanotify-fix-EOVERFLOW-on-64-bit.patch
|
||||
|
||||
#rhbz 1051748
|
||||
ApplyPatch Bluetooth-allocate-static-minor-for-vhci.patch
|
||||
#rhbz 983342 1093120
|
||||
ApplyPatch 0001-acpi-video-Add-4-new-models-to-the-use_native_backli.patch
|
||||
|
||||
#rhbz 1003602
|
||||
ApplyPatch ACPI-EC-Clear-stale-EC-events-on-Samsung-systems.patch
|
||||
#rhbz 1060327
|
||||
ApplyPatch drm-fix-qxl-mode-flags-backport.patch
|
||||
|
||||
#rhbz 1073180
|
||||
ApplyPatch Revert-USBNET-ax88179_178a-enable-tso-if-usb-host-supports-sg-dma.patch
|
||||
ApplyPatch Revert-xhci-1.0-Limit-arbitrarily-aligned-scatter-gather.patch
|
||||
#rhbz 861573
|
||||
ApplyPatch 0003-samsung-laptop-Add-broken-acpi-video-quirk-for-NC210.patch
|
||||
|
||||
#rhbz 1065663
|
||||
ApplyPatch iwlwifi-dvm-clear-IWL_STA_UCODE_INPROGRESS-when-asso.patch
|
||||
#CVE-2014-0181 rhbz 1094270 1094265
|
||||
ApplyPatch 1-5-netlink-Rename-netlink_capable-netlink_allowed.patch
|
||||
ApplyPatch 2-5-net-Move-the-permission-check-in-sock_diag_put_filterinfo-to-packet_diag_dump.patch
|
||||
ApplyPatch 3-5-net-Add-variants-of-capable-for-use-on-on-sockets.patch
|
||||
ApplyPatch 4-5-net-Add-variants-of-capable-for-use-on-netlink-messages.patch
|
||||
ApplyPatch 5-5-net-Use-netlink_ns_capable-to-verify-the-permisions-of-netlink-messages.patch
|
||||
#rhbz 1094265 1097684
|
||||
ApplyPatch netlink-Only-check-file-credentials-for-implicit-des.patch
|
||||
|
||||
#CVE-2014-2309 rhbz 1074471 1075064
|
||||
ApplyPatch ipv6-dont-set-DST_NOCOUNT-for-remotely-added-routes.patch
|
||||
#rhbz 1082266
|
||||
ApplyPatch jme-fix-dma-unmap-error.patch
|
||||
|
||||
#rhbz 1046495
|
||||
ApplyPatch iwlwifi-dvm-take-mutex-when-sending-SYNC-BT-config-command.patch
|
||||
#rhbz 1051668
|
||||
ApplyPatch Input-elantech-add-support-for-newer-elantech-touchpads.patch
|
||||
|
||||
#CVE-2014-2523 rhbz 1077343 1077350
|
||||
ApplyPatch netfilter-nf_conntrack_dccp-fix-skb_header_pointer-A.patch
|
||||
# CVE-2014-3917 rhbz 1102571 1102715
|
||||
ApplyPatch auditsc-audit_krule-mask-accesses-need-bounds-checking.patch
|
||||
|
||||
#rhbz 1099857
|
||||
ApplyPatch team-fix-mtu-setting.patch
|
||||
|
||||
#rhbz 1094066
|
||||
ApplyPatch drm-i915-set-backlight-duty-cycle-after-backlight-enable-for-gen4.patch
|
||||
|
||||
#rhbz 1064516
|
||||
ApplyPatch e1000e-Fix-SHRA-register-access-for-82579.patch
|
||||
ApplyPatch e1000e-Failure-to-write-SHRA-turns-on-PROMISC-mode.patch
|
||||
|
||||
#rhbz 1099761
|
||||
ApplyPatch NFS-populate-net-in-mount-data-when-remounting.patch
|
||||
|
||||
#rhbz 1106856
|
||||
ApplyPatch dm-thin-update-discard_granularity-to-reflect-the-thin-pool-blocksize.patch
|
||||
|
||||
#rhbz 1103528
|
||||
ApplyPatch elantech-Deal-with-clickpads-reporting-right-button-.patch
|
||||
|
||||
# END OF PATCH APPLICATIONS
|
||||
|
||||
|
@ -2073,7 +2010,7 @@ find $RPM_BUILD_ROOT/usr/include \
|
|||
|
||||
%if %{with_perf}
|
||||
# perf tool binary and supporting scripts/binaries
|
||||
%{perf_make} DESTDIR=$RPM_BUILD_ROOT install
|
||||
%{perf_make} DESTDIR=$RPM_BUILD_ROOT install-bin
|
||||
# remove the 'trace' symlink.
|
||||
rm -f %{buildroot}%{_bindir}/trace
|
||||
|
||||
|
@ -2081,7 +2018,7 @@ rm -f %{buildroot}%{_bindir}/trace
|
|||
%{perf_make} DESTDIR=$RPM_BUILD_ROOT install-python_ext
|
||||
|
||||
# perf man pages (note: implicit rpm magic compresses them later)
|
||||
%{perf_make} DESTDIR=$RPM_BUILD_ROOT install-man || %{doc_build_fail}
|
||||
%{perf_make} DESTDIR=$RPM_BUILD_ROOT try-install-man || %{doc_build_fail}
|
||||
%endif
|
||||
|
||||
%if %{with_tools}
|
||||
|
@ -2376,6 +2313,117 @@ fi
|
|||
# and build.
|
||||
|
||||
%changelog
|
||||
* Wed Jun 11 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.14.7-100
|
||||
- Fix elantech right click on Dell vostro 5470 (rhbz 1103528)
|
||||
- Fix fstrim on dm-thin volume data (rhbz 1106856)
|
||||
- Fix NFS NULL pointer deref with ipv6 (rhbz 1099761)
|
||||
- Fix promisc mode on certain e1000e cards (rhbz 1064516)
|
||||
- Fix i915 backlight issue on gen4 (rhbz 1094066)
|
||||
- Linux v3.14.7
|
||||
|
||||
* Sat Jun 07 2014 Justin M. Forbes <jforbes@fedoraproject.org> - 3.14.6-100
|
||||
- Linux v3.14.6
|
||||
|
||||
* Fri Jun 06 2014 Josh Boyer <jwboyer@fedoraproject.org>
|
||||
- CVE-2014-3153 futex: pi futexes requeue issue (rhbz 1103626 1105609)
|
||||
- CVE-2014-3940 missing check during hugepage migration (rhbz 1104097 1105042)
|
||||
|
||||
* Tue Jun 03 2014 Josh Boyer <jwboyer@fedoraproject.org>
|
||||
- Add fix for team MTU settings from Jiri Pirko (rhbz 1099857)
|
||||
- Backport fix for issues with Quagga introduced by CVE fixes (rhbz 1097684)
|
||||
|
||||
* Mon Jun 02 2014 Justin M. Forbes <jforbes@fedoraproject.org> - 3.14.5-100
|
||||
- Linux v3.14.5
|
||||
|
||||
* Thu May 29 2014 Josh Boyer <jwboyer@fedoraproject.org>
|
||||
- CVE-2014-3917 DoS with syscall auditing (rhbz 1102571 1102715)
|
||||
|
||||
* Tue May 20 2014 Josh Boyer <jwboyer@fedoraproject.org>
|
||||
- Backport patch to add new elantech touchpad support (rhbz 1051668)
|
||||
|
||||
* Wed May 14 2014 Hans de Goede <hdegoede@redhat.com>
|
||||
- Add synaptics min/max quirk patch for the ThinkPad W540 (rhbz 1096436)
|
||||
|
||||
* Tue May 13 2014 Justin M. Forbes <jforbes@fedoraproject.org> - 3.14.4-100
|
||||
- Linux v3.14.4
|
||||
|
||||
* Mon May 12 2014 Josh Boyer <jwboyer@fedoraproject.org>
|
||||
- CVE-2014-3144/CVE-2014-3145 filter: prevent nla from peeking beyond eom (rhbz 1096775, 1096784)
|
||||
|
||||
* Fri May 09 2014 Josh Boyer <jwboyer@fedoraproject.org>
|
||||
- CVE-2014-1738 CVE-2014-1737 floppy: priv esclation (rhbz 1094299 1096195)
|
||||
|
||||
* Thu May 08 2014 Neil Horman <nhorman@redhat.com> - 3.14.3-101
|
||||
- Fix dma unmap error in jme driver (rhbz 1082266)
|
||||
|
||||
* Thu May 08 2014 Justin M. Forbes <jforbes@fedoraproject.org> - 3.14.3-100
|
||||
- Linux v3.14.3
|
||||
|
||||
* Sat May 03 2014 Josh Boyer <jwboyer@fedoraproject.org>
|
||||
- Add patch to fix HID rmi driver from Benjamin Tissoires (rhbz 1090161)
|
||||
|
||||
* Wed Apr 30 2014 Josh Boyer <jwboyer@fedoraproject.org>
|
||||
- CVE-2014-3122: mm: fix locking DoS issue (rhbz 1093084 1093076)
|
||||
- Enable CONFIG_MEMORY_HOTPLUG (rhbz 1092948)
|
||||
|
||||
* Fri Apr 25 2014 Hans de Goede <hdegoede@redhat.com>
|
||||
- Add synaptics min-max quirk for ThinkPad Edge E431 (rhbz#1089689)
|
||||
|
||||
* Wed Apr 23 2014 Justin M. Forbes <jforbes@fedoraproject.org> - 3.13.11-100
|
||||
- Linux v3.13.11
|
||||
|
||||
* Tue Apr 22 2014 Josh Boyer <jwboyer@fedoraproject.org>
|
||||
- Add patch to fix Synaptics touchscreens and HID rmi driver (rhbz 1089583)
|
||||
|
||||
* Mon Apr 21 2014 Josh Boyer <jwboyer@fedoraproject.org>
|
||||
- Fix Brainboxes Express Cards (rhbz 1071914)
|
||||
|
||||
* Thu Apr 17 2014 Hans de Goede <hdegoede@redhat.com>
|
||||
- Update min/max quirk patch to add a quirk for the ThinkPad L540 (rhbz1088588)
|
||||
|
||||
* Mon Apr 14 2014 Justin M. Forbes <jforbes@fedoraproject.org> - 3.13.10-100
|
||||
- Linux v3.13.10
|
||||
|
||||
* Mon Apr 14 2014 Hans de Goede <hdegoede@redhat.com>
|
||||
- Add min/max quirks for various new Thinkpad touchpads (rhbz 1085582 1085697)
|
||||
|
||||
* Mon Apr 14 2014 Josh Boyer <jwboyer@fedoraproject.org>
|
||||
- CVE-2014-2851 net ipv4 ping refcount issue in ping_init_sock (rhbz 1086730 1087420)
|
||||
|
||||
* Thu Apr 10 2014 Josh Boyer <jwboyer@fedoraproject.org>
|
||||
- Backported HID RMI driver for Haswell Dell XPS machines from Benjamin Tissoires (rhbz 1048314)
|
||||
|
||||
* Wed Apr 09 2014 Josh Boyer <jwboyer@fedoraproject.org>
|
||||
- CVE-2014-0155 KVM: BUG caused by invalid guest ioapic redirect table (rhbz 1081589 1085016)
|
||||
- Add patch to fix SELinux lables on /proc files (rhbz 1084829)
|
||||
- Add patch to fix S3 in KVM guests (rhbz 1074235)
|
||||
|
||||
* Thu Apr 03 2014 Justin M. Forbes <jforbes@fedoraproject.org> - 3.13.9-100
|
||||
- Linux v3.13.9
|
||||
|
||||
* Tue Apr 01 2014 Josh Boyer <jwboyer@fedoraproject.org>
|
||||
- CVE-2014-2678 net: rds: deref of NULL dev in rds_iw_laddr_check (rhbz 1083274 1083280)
|
||||
|
||||
* Mon Mar 31 2014 Justin M. Forbes <jforbes@fedoraproject.org> - 3.13.8-100
|
||||
- Linux v3.13.8
|
||||
|
||||
* Mon Mar 31 2014 Hans de Goede <hdegoede@redhat.com>
|
||||
- Fix clicks getting lost with cypress_ps2 touchpads with recent
|
||||
xorg-x11-drv-synaptics versions (bfdo#76341)
|
||||
|
||||
* Fri Mar 28 2014 Josh Boyer <jwboyer@fedoraproject.org>
|
||||
- CVE-2014-2580 xen: netback crash trying to disable due to malformed packet (rhbz 1080084 1080086)
|
||||
- CVE-2014-0077 vhost-net: insufficent big packet handling in handle_rx (rhbz 1064440 1081504)
|
||||
- CVE-2014-0055 vhost-net: insufficent error handling in get_rx_bufs (rhbz 1062577 1081503)
|
||||
- CVE-2014-2568 net: potential info leak when ubuf backed skbs are zero copied (rhbz 1079012 1079013)
|
||||
|
||||
* Mon Mar 24 2014 Justin M. Forbes <jforbes@fedoraproject.org> - 3.13.7-100
|
||||
- Linux v3.13.7
|
||||
|
||||
* Thu Mar 20 2014 Josh Boyer <jwboyer@fedoraproject.org>
|
||||
- CVE-2014-0131: skbuff: use-after-free during segmentation with zerocopy (rhbz 1074589 1079006)
|
||||
- Fix readahead semantics on pipes and sockets (rhbz 1078894)
|
||||
|
||||
* Mon Mar 17 2014 Josh Boyer <jwboyer@fedoraproject.org>
|
||||
- CVE-2014-2523 netfilter: nf_conntrack_dccp: incorrect skb_header_pointer API usages (rhbz 1077343 1077350)
|
||||
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
@@ -, +, @@
|
||||
---
|
||||
--- a/security/keys/keyring.c
|
||||
+++ a/security/keys/keyring.c
|
||||
@@ -1000,7 +1000,11 @@ static int keyring_detect_cycle_iterator(const void *object,
|
||||
|
||||
kenter("{%d}", key->serial);
|
||||
|
||||
- BUG_ON(key != ctx->match_data);
|
||||
+ /* We might get a keyring with matching index-key that is nonetheless a
|
||||
+ * different keyring. */
|
||||
+ if (key != ctx->match_data)
|
||||
+ return 0;
|
||||
+
|
||||
ctx->result = ERR_PTR(-EDEADLK);
|
||||
return 1;
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
Bugzilla: 1074235
|
||||
Upstream-status: 3.15 and CC'd to stable
|
||||
|
||||
From e39435ce68bb4685288f78b1a7e24311f7ef939f Mon Sep 17 00:00:00 2001
|
||||
From: Jens Axboe <axboe@fb.com>
|
||||
Date: Tue, 8 Apr 2014 16:04:12 -0700
|
||||
Subject: [PATCH] lib/percpu_counter.c: fix bad percpu counter state during
|
||||
suspend
|
||||
|
||||
I got a bug report yesterday from Laszlo Ersek in which he states that
|
||||
his kvm instance fails to suspend. Laszlo bisected it down to this
|
||||
commit 1cf7e9c68fe8 ("virtio_blk: blk-mq support") where virtio-blk is
|
||||
converted to use the blk-mq infrastructure.
|
||||
|
||||
After digging a bit, it became clear that the issue was with the queue
|
||||
drain. blk-mq tracks queue usage in a percpu counter, which is
|
||||
incremented on request alloc and decremented when the request is freed.
|
||||
The initial hunt was for an inconsistency in blk-mq, but everything
|
||||
seemed fine. In fact, the counter only returned crazy values when
|
||||
suspend was in progress.
|
||||
|
||||
When a CPU is unplugged, the percpu counters merges that CPU state with
|
||||
the general state. blk-mq takes care to register a hotcpu notifier with
|
||||
the appropriate priority, so we know it runs after the percpu counter
|
||||
notifier. However, the percpu counter notifier only merges the state
|
||||
when the CPU is fully gone. This leaves a state transition where the
|
||||
CPU going away is no longer in the online mask, yet it still holds
|
||||
private values. This means that in this state, percpu_counter_sum()
|
||||
returns invalid results, and the suspend then hangs waiting for
|
||||
abs(dead-cpu-value) requests to complete which of course will never
|
||||
happen.
|
||||
|
||||
Fix this by clearing the state earlier, so we never have a case where
|
||||
the CPU isn't in online mask but still holds private state. This bug
|
||||
has been there since forever, I guess we don't have a lot of users where
|
||||
percpu counters needs to be reliable during the suspend cycle.
|
||||
|
||||
Signed-off-by: Jens Axboe <axboe@fb.com>
|
||||
Reported-by: Laszlo Ersek <lersek@redhat.com>
|
||||
Tested-by: Laszlo Ersek <lersek@redhat.com>
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
---
|
||||
lib/percpu_counter.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/percpu_counter.c b/lib/percpu_counter.c
|
||||
index 8280a5dd1727..7dd33577b905 100644
|
||||
--- a/lib/percpu_counter.c
|
||||
+++ b/lib/percpu_counter.c
|
||||
@@ -169,7 +169,7 @@ static int percpu_counter_hotcpu_callback(struct notifier_block *nb,
|
||||
struct percpu_counter *fbc;
|
||||
|
||||
compute_batch_value();
|
||||
- if (action != CPU_DEAD)
|
||||
+ if (action != CPU_DEAD && action != CPU_DEAD_FROZEN)
|
||||
return NOTIFY_OK;
|
||||
|
||||
cpu = (unsigned long)hcpu;
|
||||
--
|
||||
1.8.5.3
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
Bugzilla: 1082586
|
||||
Upstream-status: 3.15 and sent for stable
|
||||
|
||||
From f1c6bb2cb8b81013e8979806f8e15e3d53efb96d Mon Sep 17 00:00:00 2001
|
||||
From: Jeff Layton <jlayton@redhat.com>
|
||||
Date: Tue, 15 Apr 2014 06:17:49 -0400
|
||||
Subject: [PATCH] locks: allow __break_lease to sleep even when break_time is 0
|
||||
|
||||
A fl->fl_break_time of 0 has a special meaning to the lease break code
|
||||
that basically means "never break the lease". knfsd uses this to ensure
|
||||
that leases don't disappear out from under it.
|
||||
|
||||
Unfortunately, the code in __break_lease can end up passing this value
|
||||
to wait_event_interruptible as a timeout, which prevents it from going
|
||||
to sleep at all. This makes __break_lease to spin in a tight loop and
|
||||
causes soft lockups.
|
||||
|
||||
Fix this by ensuring that we pass a minimum value of 1 as a timeout
|
||||
instead.
|
||||
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Cc: J. Bruce Fields <bfields@fieldses.org>
|
||||
Reported-by: Terry Barnaby <terry1@beam.ltd.uk>
|
||||
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
||||
---
|
||||
fs/locks.c | 7 +++----
|
||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/fs/locks.c b/fs/locks.c
|
||||
index 13fc7a6d380a..b380f5543614 100644
|
||||
--- a/fs/locks.c
|
||||
+++ b/fs/locks.c
|
||||
@@ -1391,11 +1391,10 @@ int __break_lease(struct inode *inode, unsigned int mode, unsigned int type)
|
||||
|
||||
restart:
|
||||
break_time = flock->fl_break_time;
|
||||
- if (break_time != 0) {
|
||||
+ if (break_time != 0)
|
||||
break_time -= jiffies;
|
||||
- if (break_time == 0)
|
||||
- break_time++;
|
||||
- }
|
||||
+ if (break_time == 0)
|
||||
+ break_time++;
|
||||
locks_insert_block(flock, new_fl);
|
||||
spin_unlock(&inode->i_lock);
|
||||
error = wait_event_interruptible_timeout(new_fl->fl_wait,
|
||||
--
|
||||
1.9.0
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
Bugzilla: 1074710
|
||||
Upstream-status: 3.15
|
||||
|
||||
From ed12d845b5f528cc0846023862b9c448a36122ec Mon Sep 17 00:00:00 2001
|
||||
From: John Hubbard <jhubbard@nvidia.com>
|
||||
Date: Mon, 7 Apr 2014 15:37:59 -0700
|
||||
Subject: [PATCH] mm/page_alloc.c: change mm debug routines back to
|
||||
EXPORT_SYMBOL
|
||||
|
||||
A new dump_page() routine was recently added, and marked
|
||||
EXPORT_SYMBOL_GPL. dump_page() was also added to the VM_BUG_ON_PAGE()
|
||||
macro, and so the end result is that non-GPL code can no longer call
|
||||
get_page() and a few other routines.
|
||||
|
||||
This only happens if the kernel was compiled with CONFIG_DEBUG_VM.
|
||||
|
||||
Change dump_page() to be EXPORT_SYMBOL.
|
||||
|
||||
Longer explanation:
|
||||
|
||||
Prior to commit 309381feaee5 ("mm: dump page when hitting a VM_BUG_ON
|
||||
using VM_BUG_ON_PAGE") , it was possible to build MIT-licensed (non-GPL)
|
||||
drivers on Fedora. Fedora is semi-unique, in that it sets
|
||||
CONFIG_VM_DEBUG.
|
||||
|
||||
Because Fedora sets CONFIG_VM_DEBUG, they end up pulling in dump_page(),
|
||||
via VM_BUG_ON_PAGE, via get_page(). As one of the authors of NVIDIA's
|
||||
new, open source, "UVM-Lite" kernel module, I originally choose to use
|
||||
the kernel's get_page() routine from within nvidia_uvm_page_cache.c,
|
||||
because get_page() has always seemed to be very clearly intended for use
|
||||
by non-GPL, driver code.
|
||||
|
||||
So I'm hoping that making get_page() widely accessible again will not be
|
||||
too controversial. We did check with Fedora first, and they responded
|
||||
(https://bugzilla.redhat.com/show_bug.cgi?id=1074710#c3) that we should
|
||||
try to get upstream changed, before asking Fedora to change. Their
|
||||
reasoning seems beneficial to Linux: leaving CONFIG_DEBUG_VM set allows
|
||||
Fedora to help catch mm bugs.
|
||||
|
||||
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
|
||||
Cc: Sasha Levin <sasha.levin@oracle.com>
|
||||
Cc: Josh Boyer <jwboyer@redhat.com>
|
||||
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
---
|
||||
mm/page_alloc.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
|
||||
index 48427a7cfb45..5dba2933c9c0 100644
|
||||
--- a/mm/page_alloc.c
|
||||
+++ b/mm/page_alloc.c
|
||||
@@ -6568,4 +6568,4 @@ void dump_page(struct page *page, const char *reason)
|
||||
{
|
||||
dump_page_badflags(page, reason, 0);
|
||||
}
|
||||
-EXPORT_SYMBOL_GPL(dump_page);
|
||||
+EXPORT_SYMBOL(dump_page);
|
||||
--
|
||||
1.9.0
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
Bugzilla: 1093084
|
||||
Upstream-status: 3.15 and stable CC'd
|
||||
|
||||
From 85cc8301cbedcf3049ce15de6f3c2b9e935d0d76 Mon Sep 17 00:00:00 2001
|
||||
From: Vlastimil Babka <vbabka@suse.cz>
|
||||
Date: Mon, 7 Apr 2014 15:37:50 -0700
|
||||
Subject: [PATCH] mm: try_to_unmap_cluster() should lock_page() before mlocking
|
||||
|
||||
A BUG_ON(!PageLocked) was triggered in mlock_vma_page() by Sasha Levin
|
||||
fuzzing with trinity. The call site try_to_unmap_cluster() does not lock
|
||||
the pages other than its check_page parameter (which is already locked).
|
||||
|
||||
The BUG_ON in mlock_vma_page() is not documented and its purpose is
|
||||
somewhat unclear, but apparently it serializes against page migration,
|
||||
which could otherwise fail to transfer the PG_mlocked flag. This would
|
||||
not be fatal, as the page would be eventually encountered again, but
|
||||
NR_MLOCK accounting would become distorted nevertheless. This patch adds
|
||||
a comment to the BUG_ON in mlock_vma_page() and munlock_vma_page() to that
|
||||
effect.
|
||||
|
||||
The call site try_to_unmap_cluster() is fixed so that for page !=
|
||||
check_page, trylock_page() is attempted (to avoid possible deadlocks as we
|
||||
already have check_page locked) and mlock_vma_page() is performed only
|
||||
upon success. If the page lock cannot be obtained, the page is left
|
||||
without PG_mlocked, which is again not a problem in the whole unevictable
|
||||
memory design.
|
||||
|
||||
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
|
||||
Signed-off-by: Bob Liu <bob.liu@oracle.com>
|
||||
Reported-by: Sasha Levin <sasha.levin@oracle.com>
|
||||
Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com>
|
||||
Cc: Michel Lespinasse <walken@google.com>
|
||||
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
|
||||
Acked-by: Rik van Riel <riel@redhat.com>
|
||||
Cc: David Rientjes <rientjes@google.com>
|
||||
Cc: Mel Gorman <mgorman@suse.de>
|
||||
Cc: Hugh Dickins <hughd@google.com>
|
||||
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
---
|
||||
mm/mlock.c | 2 ++
|
||||
mm/rmap.c | 14 ++++++++++++--
|
||||
2 files changed, 14 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/mm/mlock.c b/mm/mlock.c
|
||||
index 192e6eebe4f2..1b12dfad0794 100644
|
||||
--- a/mm/mlock.c
|
||||
+++ b/mm/mlock.c
|
||||
@@ -79,6 +79,7 @@ void clear_page_mlock(struct page *page)
|
||||
*/
|
||||
void mlock_vma_page(struct page *page)
|
||||
{
|
||||
+ /* Serialize with page migration */
|
||||
BUG_ON(!PageLocked(page));
|
||||
|
||||
if (!TestSetPageMlocked(page)) {
|
||||
@@ -153,6 +154,7 @@ unsigned int munlock_vma_page(struct page *page)
|
||||
{
|
||||
unsigned int nr_pages;
|
||||
|
||||
+ /* For try_to_munlock() and to serialize with page migration */
|
||||
BUG_ON(!PageLocked(page));
|
||||
|
||||
if (TestClearPageMlocked(page)) {
|
||||
diff --git a/mm/rmap.c b/mm/rmap.c
|
||||
index 068522d8502a..b99c74271fec 100644
|
||||
--- a/mm/rmap.c
|
||||
+++ b/mm/rmap.c
|
||||
@@ -1389,9 +1389,19 @@ static int try_to_unmap_cluster(unsigned long cursor, unsigned int *mapcount,
|
||||
BUG_ON(!page || PageAnon(page));
|
||||
|
||||
if (locked_vma) {
|
||||
- mlock_vma_page(page); /* no-op if already mlocked */
|
||||
- if (page == check_page)
|
||||
+ if (page == check_page) {
|
||||
+ /* we know we have check_page locked */
|
||||
+ mlock_vma_page(page);
|
||||
ret = SWAP_MLOCK;
|
||||
+ } else if (trylock_page(page)) {
|
||||
+ /*
|
||||
+ * If we can lock the page, perform mlock.
|
||||
+ * Otherwise leave the page alone, it will be
|
||||
+ * eventually encountered again later.
|
||||
+ */
|
||||
+ mlock_vma_page(page);
|
||||
+ unlock_page(page);
|
||||
+ }
|
||||
continue; /* don't unmap */
|
||||
}
|
||||
|
||||
--
|
||||
1.9.0
|
||||
|
|
@ -283,9 +283,9 @@ index 0ff5407..ba76e57 100644
|
|||
+ are used by the module signature checking to reject loading of modules
|
||||
+ signed with a blacklisted key.
|
||||
+
|
||||
menuconfig MODULES
|
||||
bool "Enable loadable module support"
|
||||
option modules
|
||||
config PROFILING
|
||||
bool "Profiling support"
|
||||
help
|
||||
diff --git a/kernel/module_signing.c b/kernel/module_signing.c
|
||||
index 0b6b870..0a29b40 100644
|
||||
--- a/kernel/module_signing.c
|
||||
|
|
|
@ -0,0 +1,86 @@
|
|||
Bugzilla: 1094240
|
||||
Upstream-status: 3.15 and CC'd to stable
|
||||
|
||||
From 4291086b1f081b869c6d79e5b7441633dc3ace00 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hurley <peter@hurleysoftware.com>
|
||||
Date: Sat, 3 May 2014 14:04:59 +0200
|
||||
Subject: [PATCH] n_tty: Fix n_tty_write crash when echoing in raw mode
|
||||
|
||||
The tty atomic_write_lock does not provide an exclusion guarantee for
|
||||
the tty driver if the termios settings are LECHO & !OPOST. And since
|
||||
it is unexpected and not allowed to call TTY buffer helpers like
|
||||
tty_insert_flip_string concurrently, this may lead to crashes when
|
||||
concurrect writers call pty_write. In that case the following two
|
||||
writers:
|
||||
* the ECHOing from a workqueue and
|
||||
* pty_write from the process
|
||||
race and can overflow the corresponding TTY buffer like follows.
|
||||
|
||||
If we look into tty_insert_flip_string_fixed_flag, there is:
|
||||
int space = __tty_buffer_request_room(port, goal, flags);
|
||||
struct tty_buffer *tb = port->buf.tail;
|
||||
...
|
||||
memcpy(char_buf_ptr(tb, tb->used), chars, space);
|
||||
...
|
||||
tb->used += space;
|
||||
|
||||
so the race of the two can result in something like this:
|
||||
A B
|
||||
__tty_buffer_request_room
|
||||
__tty_buffer_request_room
|
||||
memcpy(buf(tb->used), ...)
|
||||
tb->used += space;
|
||||
memcpy(buf(tb->used), ...) ->BOOM
|
||||
|
||||
B's memcpy is past the tty_buffer due to the previous A's tb->used
|
||||
increment.
|
||||
|
||||
Since the N_TTY line discipline input processing can output
|
||||
concurrently with a tty write, obtain the N_TTY ldisc output_lock to
|
||||
serialize echo output with normal tty writes. This ensures the tty
|
||||
buffer helper tty_insert_flip_string is not called concurrently and
|
||||
everything is fine.
|
||||
|
||||
Note that this is nicely reproducible by an ordinary user using
|
||||
forkpty and some setup around that (raw termios + ECHO). And it is
|
||||
present in kernels at least after commit
|
||||
d945cb9cce20ac7143c2de8d88b187f62db99bdc (pty: Rework the pty layer to
|
||||
use the normal buffering logic) in 2.6.31-rc3.
|
||||
|
||||
js: add more info to the commit log
|
||||
js: switch to bool
|
||||
js: lock unconditionally
|
||||
js: lock only the tty->ops->write call
|
||||
|
||||
References: CVE-2014-0196
|
||||
Reported-and-tested-by: Jiri Slaby <jslaby@suse.cz>
|
||||
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
|
||||
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
|
||||
Cc: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
drivers/tty/n_tty.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
|
||||
index 41fe8a047d37..fe9d129c8735 100644
|
||||
--- a/drivers/tty/n_tty.c
|
||||
+++ b/drivers/tty/n_tty.c
|
||||
@@ -2353,8 +2353,12 @@ static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
|
||||
if (tty->ops->flush_chars)
|
||||
tty->ops->flush_chars(tty);
|
||||
} else {
|
||||
+ struct n_tty_data *ldata = tty->disc_data;
|
||||
+
|
||||
while (nr > 0) {
|
||||
+ mutex_lock(&ldata->output_lock);
|
||||
c = tty->ops->write(tty, b, nr);
|
||||
+ mutex_unlock(&ldata->output_lock);
|
||||
if (c < 0) {
|
||||
retval = c;
|
||||
goto break_out;
|
||||
--
|
||||
1.9.0
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
Bugzilla: 1070618
|
||||
Upstream-status: submitted http://patchwork.ozlabs.org/patch/325844/
|
||||
|
||||
diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c
|
||||
index bb075fc9a14f..322dcebfc588 100644
|
||||
--- a/net/ipv4/inet_fragment.c
|
||||
+++ b/net/ipv4/inet_fragment.c
|
||||
@@ -278,9 +278,10 @@ static struct inet_frag_queue *inet_frag_intern(struct netns_frags *nf,
|
||||
|
||||
atomic_inc(&qp->refcnt);
|
||||
hlist_add_head(&qp->list, &hb->chain);
|
||||
+ inet_frag_lru_add(nf, qp);
|
||||
spin_unlock(&hb->chain_lock);
|
||||
read_unlock(&f->lock);
|
||||
- inet_frag_lru_add(nf, qp);
|
||||
+
|
||||
return qp;
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
Bugzilla: 1072029
|
||||
Upstream-status: Submitted http://patchwork.ozlabs.org/patch/325898/
|
||||
|
||||
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
|
||||
index 591b44d..ae65b6b 100644
|
||||
--- a/net/sctp/sm_statefuns.c
|
||||
+++ b/net/sctp/sm_statefuns.c
|
||||
@@ -758,6 +758,13 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(struct net *net,
|
||||
struct sctp_chunk auth;
|
||||
sctp_ierror_t ret;
|
||||
|
||||
+ /* Make sure that we and the peer are AUTH capable */
|
||||
+ if (!net->sctp.auth_enable || !new_asoc->peer.auth_capable) {
|
||||
+ kfree_skb(chunk->auth_chunk);
|
||||
+ sctp_association_free(new_asoc);
|
||||
+ return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands);
|
||||
+ }
|
||||
+
|
||||
/* set-up our fake chunk so that we can process it */
|
||||
auth.skb = chunk->auth_chunk;
|
||||
auth.asoc = chunk->asoc;
|
|
@ -1,65 +0,0 @@
|
|||
Bugzilla: 1077350
|
||||
Upstream-status: 3.14-rc1
|
||||
|
||||
From b22f5126a24b3b2f15448c3f2a254fc10cbc2b92 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Borkmann <dborkman@redhat.com>
|
||||
Date: Mon, 6 Jan 2014 00:57:54 +0100
|
||||
Subject: [PATCH] netfilter: nf_conntrack_dccp: fix skb_header_pointer API
|
||||
usages
|
||||
|
||||
Some occurences in the netfilter tree use skb_header_pointer() in
|
||||
the following way ...
|
||||
|
||||
struct dccp_hdr _dh, *dh;
|
||||
...
|
||||
skb_header_pointer(skb, dataoff, sizeof(_dh), &dh);
|
||||
|
||||
... where dh itself is a pointer that is being passed as the copy
|
||||
buffer. Instead, we need to use &_dh as the forth argument so that
|
||||
we're copying the data into an actual buffer that sits on the stack.
|
||||
|
||||
Currently, we probably could overwrite memory on the stack (e.g.
|
||||
with a possibly mal-formed DCCP packet), but unintentionally, as
|
||||
we only want the buffer to be placed into _dh variable.
|
||||
|
||||
Fixes: 2bc780499aa3 ("[NETFILTER]: nf_conntrack: add DCCP protocol support")
|
||||
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
||||
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
||||
---
|
||||
net/netfilter/nf_conntrack_proto_dccp.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/net/netfilter/nf_conntrack_proto_dccp.c b/net/netfilter/nf_conntrack_proto_dccp.c
|
||||
index 3841268..cb372f9 100644
|
||||
--- a/net/netfilter/nf_conntrack_proto_dccp.c
|
||||
+++ b/net/netfilter/nf_conntrack_proto_dccp.c
|
||||
@@ -428,7 +428,7 @@ static bool dccp_new(struct nf_conn *ct, const struct sk_buff *skb,
|
||||
const char *msg;
|
||||
u_int8_t state;
|
||||
|
||||
- dh = skb_header_pointer(skb, dataoff, sizeof(_dh), &dh);
|
||||
+ dh = skb_header_pointer(skb, dataoff, sizeof(_dh), &_dh);
|
||||
BUG_ON(dh == NULL);
|
||||
|
||||
state = dccp_state_table[CT_DCCP_ROLE_CLIENT][dh->dccph_type][CT_DCCP_NONE];
|
||||
@@ -486,7 +486,7 @@ static int dccp_packet(struct nf_conn *ct, const struct sk_buff *skb,
|
||||
u_int8_t type, old_state, new_state;
|
||||
enum ct_dccp_roles role;
|
||||
|
||||
- dh = skb_header_pointer(skb, dataoff, sizeof(_dh), &dh);
|
||||
+ dh = skb_header_pointer(skb, dataoff, sizeof(_dh), &_dh);
|
||||
BUG_ON(dh == NULL);
|
||||
type = dh->dccph_type;
|
||||
|
||||
@@ -577,7 +577,7 @@ static int dccp_error(struct net *net, struct nf_conn *tmpl,
|
||||
unsigned int cscov;
|
||||
const char *msg;
|
||||
|
||||
- dh = skb_header_pointer(skb, dataoff, sizeof(_dh), &dh);
|
||||
+ dh = skb_header_pointer(skb, dataoff, sizeof(_dh), &_dh);
|
||||
if (dh == NULL) {
|
||||
msg = "nf_ct_dccp: short packet ";
|
||||
goto out_invalid;
|
||||
--
|
||||
1.8.5.3
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
Bugzilla: 1097684 1094265
|
||||
Upstream-status: 3.15
|
||||
|
||||
From 2d7a85f4b06e9c27ff629f07a524c48074f07f81 Mon Sep 17 00:00:00 2001
|
||||
From: "Eric W. Biederman" <ebiederm@xmission.com>
|
||||
Date: Fri, 30 May 2014 11:04:00 -0700
|
||||
Subject: [PATCH] netlink: Only check file credentials for implicit
|
||||
destinations
|
||||
|
||||
It was possible to get a setuid root or setcap executable to write to
|
||||
it's stdout or stderr (which has been set made a netlink socket) and
|
||||
inadvertently reconfigure the networking stack.
|
||||
|
||||
To prevent this we check that both the creator of the socket and
|
||||
the currentl applications has permission to reconfigure the network
|
||||
stack.
|
||||
|
||||
Unfortunately this breaks Zebra which always uses sendto/sendmsg
|
||||
and creates it's socket without any privileges.
|
||||
|
||||
To keep Zebra working don't bother checking if the creator of the
|
||||
socket has privilege when a destination address is specified. Instead
|
||||
rely exclusively on the privileges of the sender of the socket.
|
||||
|
||||
Note from Andy: This is exactly Eric's code except for some comment
|
||||
clarifications and formatting fixes. Neither I nor, I think, anyone
|
||||
else is thrilled with this approach, but I'm hesitant to wait on a
|
||||
better fix since 3.15 is almost here.
|
||||
|
||||
Note to stable maintainers: This is a mess. An earlier series of
|
||||
patches in 3.15 fix a rather serious security issue (CVE-2014-0181),
|
||||
but they did so in a way that breaks Zebra. The offending series
|
||||
includes:
|
||||
|
||||
commit aa4cf9452f469f16cea8c96283b641b4576d4a7b
|
||||
Author: Eric W. Biederman <ebiederm@xmission.com>
|
||||
Date: Wed Apr 23 14:28:03 2014 -0700
|
||||
|
||||
net: Add variants of capable for use on netlink messages
|
||||
|
||||
If a given kernel version is missing that series of fixes, it's
|
||||
probably worth backporting it and this patch. if that series is
|
||||
present, then this fix is critical if you care about Zebra.
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
|
||||
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
include/linux/netlink.h | 7 ++++---
|
||||
net/netlink/af_netlink.c | 7 ++++++-
|
||||
2 files changed, 10 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
|
||||
index f64b017..034cda7 100644
|
||||
--- a/include/linux/netlink.h
|
||||
+++ b/include/linux/netlink.h
|
||||
@@ -16,9 +16,10 @@ static inline struct nlmsghdr *nlmsg_hdr(const struct sk_buff *skb)
|
||||
}
|
||||
|
||||
enum netlink_skb_flags {
|
||||
- NETLINK_SKB_MMAPED = 0x1, /* Packet data is mmaped */
|
||||
- NETLINK_SKB_TX = 0x2, /* Packet was sent by userspace */
|
||||
- NETLINK_SKB_DELIVERED = 0x4, /* Packet was delivered */
|
||||
+ NETLINK_SKB_MMAPED = 0x1, /* Packet data is mmaped */
|
||||
+ NETLINK_SKB_TX = 0x2, /* Packet was sent by userspace */
|
||||
+ NETLINK_SKB_DELIVERED = 0x4, /* Packet was delivered */
|
||||
+ NETLINK_SKB_DST = 0x8, /* Dst set in sendto or sendmsg */
|
||||
};
|
||||
|
||||
struct netlink_skb_parms {
|
||||
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
|
||||
index 81dca96..f22757a 100644
|
||||
--- a/net/netlink/af_netlink.c
|
||||
+++ b/net/netlink/af_netlink.c
|
||||
@@ -1373,7 +1373,9 @@ retry:
|
||||
bool __netlink_ns_capable(const struct netlink_skb_parms *nsp,
|
||||
struct user_namespace *user_ns, int cap)
|
||||
{
|
||||
- return sk_ns_capable(nsp->sk, user_ns, cap);
|
||||
+ return ((nsp->flags & NETLINK_SKB_DST) ||
|
||||
+ file_ns_capable(nsp->sk->sk_socket->file, user_ns, cap)) &&
|
||||
+ ns_capable(user_ns, cap);
|
||||
}
|
||||
EXPORT_SYMBOL(__netlink_ns_capable);
|
||||
|
||||
@@ -2293,6 +2295,7 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
|
||||
struct sk_buff *skb;
|
||||
int err;
|
||||
struct scm_cookie scm;
|
||||
+ u32 netlink_skb_flags = 0;
|
||||
|
||||
if (msg->msg_flags&MSG_OOB)
|
||||
return -EOPNOTSUPP;
|
||||
@@ -2314,6 +2317,7 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
|
||||
if ((dst_group || dst_portid) &&
|
||||
!netlink_allowed(sock, NL_CFG_F_NONROOT_SEND))
|
||||
goto out;
|
||||
+ netlink_skb_flags |= NETLINK_SKB_DST;
|
||||
} else {
|
||||
dst_portid = nlk->dst_portid;
|
||||
dst_group = nlk->dst_group;
|
||||
@@ -2343,6 +2347,7 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
|
||||
NETLINK_CB(skb).portid = nlk->portid;
|
||||
NETLINK_CB(skb).dst_group = dst_group;
|
||||
NETLINK_CB(skb).creds = siocb->scm->creds;
|
||||
+ NETLINK_CB(skb).flags = netlink_skb_flags;
|
||||
|
||||
err = -EFAULT;
|
||||
if (memcpy_fromiovec(skb_put(skb, len), msg->msg_iov, len)) {
|
||||
--
|
||||
1.9.3
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
Bugzilla: N/A
|
||||
Upstream-status: sent for 3.14
|
||||
|
||||
From 6aa23d76a7b549521a03b63b6d5b7880ea87eab7 Mon Sep 17 00:00:00 2001
|
||||
From: Jeff Layton <jlayton@redhat.com>
|
||||
Date: Thu, 14 Nov 2013 07:25:19 -0500
|
||||
Subject: [PATCH] nfs: check if gssd is running before attempting to use krb5i
|
||||
auth in SETCLIENTID call
|
||||
|
||||
Currently, the client will attempt to use krb5i in the SETCLIENTID call
|
||||
even if rpc.gssd isn't running. When that fails, it'll then fall back to
|
||||
RPC_AUTH_UNIX. This introduced a delay when mounting if rpc.gssd isn't
|
||||
running, and causes warning messages to pop up in the ring buffer.
|
||||
|
||||
Check to see if rpc.gssd is running before even attempting to use krb5i
|
||||
auth, and just silently skip trying to do so if it isn't. In the event
|
||||
that the admin is actually trying to mount with krb5*, it will still
|
||||
fail at a later stage of the mount attempt.
|
||||
|
||||
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
||||
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
|
||||
---
|
||||
fs/nfs/nfs4client.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
|
||||
index b4a160a..c1b7a80 100644
|
||||
--- a/fs/nfs/nfs4client.c
|
||||
+++ b/fs/nfs/nfs4client.c
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <linux/sunrpc/auth.h>
|
||||
#include <linux/sunrpc/xprt.h>
|
||||
#include <linux/sunrpc/bc_xprt.h>
|
||||
+#include <linux/sunrpc/rpc_pipe_fs.h>
|
||||
#include "internal.h"
|
||||
#include "callback.h"
|
||||
#include "delegation.h"
|
||||
@@ -370,7 +371,11 @@ struct nfs_client *nfs4_init_client(struct nfs_client *clp,
|
||||
__set_bit(NFS_CS_INFINITE_SLOTS, &clp->cl_flags);
|
||||
__set_bit(NFS_CS_DISCRTRY, &clp->cl_flags);
|
||||
__set_bit(NFS_CS_NO_RETRANS_TIMEOUT, &clp->cl_flags);
|
||||
- error = nfs_create_rpc_client(clp, timeparms, RPC_AUTH_GSS_KRB5I);
|
||||
+
|
||||
+ error = -EINVAL;
|
||||
+ if (gssd_running(clp->cl_net))
|
||||
+ error = nfs_create_rpc_client(clp, timeparms,
|
||||
+ RPC_AUTH_GSS_KRB5I);
|
||||
if (error == -EINVAL)
|
||||
error = nfs_create_rpc_client(clp, timeparms, RPC_AUTH_UNIX);
|
||||
if (error < 0)
|
||||
--
|
||||
1.8.2.1
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
Bugzilla: 1037793
|
||||
Upstream-status: submitted for 3.14
|
||||
|
||||
Currently, it could leak dentry references in some cases. Make sure
|
||||
we clean up properly.
|
||||
|
||||
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
||||
---
|
||||
net/sunrpc/rpc_pipe.c | 14 +++++++++++++-
|
||||
1 file changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
|
||||
index 5d973b2..b185548 100644
|
||||
--- a/net/sunrpc/rpc_pipe.c
|
||||
+++ b/net/sunrpc/rpc_pipe.c
|
||||
@@ -1369,6 +1369,18 @@ out:
|
||||
return pipe_dentry;
|
||||
}
|
||||
|
||||
+static void
|
||||
+rpc_gssd_dummy_depopulate(struct dentry *pipe_dentry)
|
||||
+{
|
||||
+ struct dentry *clnt_dir = pipe_dentry->d_parent;
|
||||
+ struct dentry *gssd_dir = clnt_dir->d_parent;
|
||||
+
|
||||
+ __rpc_rmpipe(clnt_dir->d_inode, pipe_dentry);
|
||||
+ __rpc_depopulate(clnt_dir, gssd_dummy_info_file, 0, 1);
|
||||
+ __rpc_depopulate(gssd_dir, gssd_dummy_clnt_dir, 0, 1);
|
||||
+ dput(pipe_dentry);
|
||||
+}
|
||||
+
|
||||
static int
|
||||
rpc_fill_super(struct super_block *sb, void *data, int silent)
|
||||
{
|
||||
@@ -1412,7 +1424,7 @@ rpc_fill_super(struct super_block *sb, void *data, int silent)
|
||||
return 0;
|
||||
|
||||
err_depopulate:
|
||||
- dput(gssd_dentry);
|
||||
+ rpc_gssd_dummy_depopulate(gssd_dentry);
|
||||
blocking_notifier_call_chain(&rpc_pipefs_notifier_list,
|
||||
RPC_PIPEFS_UMOUNT,
|
||||
sb);
|
||||
--
|
||||
1.8.4.2
|
||||
|
||||
--
|
||||
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
|
||||
the body of a message to majordomo@vger.kernel.org
|
||||
More majordomo info at http://vger.kernel.org/majordomo-info.html
|
|
@ -1,32 +0,0 @@
|
|||
Bugzilla: 1037793
|
||||
Upstream-status: submitted for 3.14
|
||||
|
||||
In the event that we create the gssd/clntXX dir, but the pipe creation
|
||||
subsequently fails, then we should remove the clntXX dir before
|
||||
returning.
|
||||
|
||||
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
||||
---
|
||||
net/sunrpc/rpc_pipe.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
|
||||
index 5cd7ad1..0b74c61 100644
|
||||
--- a/net/sunrpc/rpc_pipe.c
|
||||
+++ b/net/sunrpc/rpc_pipe.c
|
||||
@@ -1313,6 +1313,8 @@ rpc_gssd_dummy_populate(struct dentry *root, struct rpc_pipe *pipe_data)
|
||||
}
|
||||
|
||||
pipe_dentry = rpc_mkpipe_dentry(clnt_dentry, "gssd", NULL, pipe_data);
|
||||
+ if (IS_ERR(pipe_dentry))
|
||||
+ __rpc_depopulate(gssd_dentry, gssd_dummy_clnt_dir, 0, 1);
|
||||
out:
|
||||
dput(clnt_dentry);
|
||||
dput(gssd_dentry);
|
||||
--
|
||||
1.8.4.2
|
||||
|
||||
--
|
||||
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
|
||||
the body of a message to majordomo@vger.kernel.org
|
||||
More majordomo info at http://vger.kernel.org/majordomo-info.html
|
|
@ -1,7 +1,7 @@
|
|||
Bugzilla: N/A
|
||||
Upstream-status: Fedora mustard. Replaced by securelevels, but that was nak'd
|
||||
|
||||
From 0fc411ee00c81b8a18b1417d31f2736fad155d89 Mon Sep 17 00:00:00 2001
|
||||
From f212a4d8b8638a3e15e4cd76874d4fab60726752 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
Date: Fri, 9 Aug 2013 17:58:15 -0400
|
||||
Subject: [PATCH 01/14] Add secure_modules() call
|
||||
|
@ -17,10 +17,10 @@ Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
|
|||
2 files changed, 17 insertions(+)
|
||||
|
||||
diff --git a/include/linux/module.h b/include/linux/module.h
|
||||
index 05f2447..de97e77 100644
|
||||
index 15cd6b1..30702eb 100644
|
||||
--- a/include/linux/module.h
|
||||
+++ b/include/linux/module.h
|
||||
@@ -515,6 +515,8 @@ int unregister_module_notifier(struct notifier_block * nb);
|
||||
@@ -512,6 +512,8 @@ int unregister_module_notifier(struct notifier_block * nb);
|
||||
|
||||
extern void print_modules(void);
|
||||
|
||||
|
@ -29,7 +29,7 @@ index 05f2447..de97e77 100644
|
|||
#else /* !CONFIG_MODULES... */
|
||||
|
||||
/* Given an address, look for it in the exception tables. */
|
||||
@@ -625,6 +627,11 @@ static inline int unregister_module_notifier(struct notifier_block * nb)
|
||||
@@ -622,6 +624,11 @@ static inline int unregister_module_notifier(struct notifier_block * nb)
|
||||
static inline void print_modules(void)
|
||||
{
|
||||
}
|
||||
|
@ -42,10 +42,10 @@ index 05f2447..de97e77 100644
|
|||
|
||||
#ifdef CONFIG_SYSFS
|
||||
diff --git a/kernel/module.c b/kernel/module.c
|
||||
index dc58274..81206c1 100644
|
||||
index f5a3b1e..644c33e 100644
|
||||
--- a/kernel/module.c
|
||||
+++ b/kernel/module.c
|
||||
@@ -3860,3 +3860,13 @@ void module_layout(struct module *mod,
|
||||
@@ -3831,3 +3831,13 @@ void module_layout(struct module *mod,
|
||||
}
|
||||
EXPORT_SYMBOL(module_layout);
|
||||
#endif
|
||||
|
@ -60,10 +60,10 @@ index dc58274..81206c1 100644
|
|||
+}
|
||||
+EXPORT_SYMBOL(secure_modules);
|
||||
--
|
||||
1.8.3.1
|
||||
1.8.4.2
|
||||
|
||||
|
||||
From b94942e55b519e70366e970cea3665c464d1b7da Mon Sep 17 00:00:00 2001
|
||||
From 394a8259d0b457495dddda8704821ec9e56ea44a Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
Date: Thu, 8 Mar 2012 10:10:38 -0500
|
||||
Subject: [PATCH 02/14] PCI: Lock down BAR access when module security is
|
||||
|
@ -83,7 +83,7 @@ Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
|
|||
3 files changed, 19 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
|
||||
index d8eb880..a851ad6 100644
|
||||
index c91e6c1..447742e 100644
|
||||
--- a/drivers/pci/pci-sysfs.c
|
||||
+++ b/drivers/pci/pci-sysfs.c
|
||||
@@ -29,6 +29,7 @@
|
||||
|
@ -94,7 +94,7 @@ index d8eb880..a851ad6 100644
|
|||
#include "pci.h"
|
||||
|
||||
static int sysfs_initialized; /* = 0 */
|
||||
@@ -644,6 +645,9 @@ pci_write_config(struct file* filp, struct kobject *kobj,
|
||||
@@ -668,6 +669,9 @@ pci_write_config(struct file* filp, struct kobject *kobj,
|
||||
loff_t init_off = off;
|
||||
u8 *data = (u8*) buf;
|
||||
|
||||
|
@ -104,7 +104,7 @@ index d8eb880..a851ad6 100644
|
|||
if (off > dev->cfg_size)
|
||||
return 0;
|
||||
if (off + count > dev->cfg_size) {
|
||||
@@ -950,6 +954,9 @@ pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr,
|
||||
@@ -974,6 +978,9 @@ pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr,
|
||||
resource_size_t start, end;
|
||||
int i;
|
||||
|
||||
|
@ -114,7 +114,7 @@ index d8eb880..a851ad6 100644
|
|||
for (i = 0; i < PCI_ROM_RESOURCE; i++)
|
||||
if (res == &pdev->resource[i])
|
||||
break;
|
||||
@@ -1057,6 +1064,9 @@ pci_write_resource_io(struct file *filp, struct kobject *kobj,
|
||||
@@ -1081,6 +1088,9 @@ pci_write_resource_io(struct file *filp, struct kobject *kobj,
|
||||
struct bin_attribute *attr, char *buf,
|
||||
loff_t off, size_t count)
|
||||
{
|
||||
|
@ -125,7 +125,7 @@ index d8eb880..a851ad6 100644
|
|||
}
|
||||
|
||||
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
|
||||
index cdc7836..e3d498b 100644
|
||||
index 46d1378..294fe7b 100644
|
||||
--- a/drivers/pci/proc.c
|
||||
+++ b/drivers/pci/proc.c
|
||||
@@ -117,6 +117,9 @@ proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, lof
|
||||
|
@ -158,7 +158,7 @@ index cdc7836..e3d498b 100644
|
|||
|
||||
/* Make sure the caller is mapping a real resource for this device */
|
||||
diff --git a/drivers/pci/syscall.c b/drivers/pci/syscall.c
|
||||
index e1c1ec5..bffbf71 100644
|
||||
index 24750a1..fa57896 100644
|
||||
--- a/drivers/pci/syscall.c
|
||||
+++ b/drivers/pci/syscall.c
|
||||
@@ -10,6 +10,7 @@
|
||||
|
@ -179,10 +179,10 @@ index e1c1ec5..bffbf71 100644
|
|||
|
||||
dev = pci_get_bus_and_slot(bus, dfn);
|
||||
--
|
||||
1.8.3.1
|
||||
1.8.4.2
|
||||
|
||||
|
||||
From 36f34509fe52cc49e1b1f6815a3f235040f64a03 Mon Sep 17 00:00:00 2001
|
||||
From 69532e626cece8a43c2528246e0421488b468102 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
Date: Thu, 8 Mar 2012 10:35:59 -0500
|
||||
Subject: [PATCH 03/14] x86: Lock down IO port access when module security is
|
||||
|
@ -252,10 +252,10 @@ index f895a8c..1af8664 100644
|
|||
return -EFAULT;
|
||||
while (count-- > 0 && i < 65536) {
|
||||
--
|
||||
1.8.3.1
|
||||
1.8.4.2
|
||||
|
||||
|
||||
From 67d9800dcf60467e076587b0aac67bcdc516cfe2 Mon Sep 17 00:00:00 2001
|
||||
From 8771ff55273e964d707b174dd0dbe433783c0254 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
Date: Fri, 9 Mar 2012 08:39:37 -0500
|
||||
Subject: [PATCH 04/14] ACPI: Limit access to custom_method
|
||||
|
@ -284,10 +284,10 @@ index 12b62f2..50647b3 100644
|
|||
/* parse the table header to get the table length */
|
||||
if (count <= sizeof(struct acpi_table_header))
|
||||
--
|
||||
1.8.3.1
|
||||
1.8.4.2
|
||||
|
||||
|
||||
From bdf3761573167c20c72b151c1088b24fd24869ac Mon Sep 17 00:00:00 2001
|
||||
From 7d3e3db90e1b4cf33ba4a46624ae4a68f787e5fc Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
Date: Fri, 9 Mar 2012 08:46:50 -0500
|
||||
Subject: [PATCH 05/14] asus-wmi: Restrict debugfs interface when module
|
||||
|
@ -339,10 +339,10 @@ index 19c313b..db18ef66 100644
|
|||
1, asus->debug.method_id,
|
||||
&input, &output);
|
||||
--
|
||||
1.8.3.1
|
||||
1.8.4.2
|
||||
|
||||
|
||||
From 65d88af5a2c6bb6d01da17819d8ba782bd208837 Mon Sep 17 00:00:00 2001
|
||||
From 98ebe083d75333e269730fe374cca42ac7f08a07 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
Date: Fri, 9 Mar 2012 09:28:15 -0500
|
||||
Subject: [PATCH 06/14] Restrict /dev/mem and /dev/kmem when module loading is
|
||||
|
@ -382,10 +382,10 @@ index 1af8664..61406c8 100644
|
|||
unsigned long to_write = min_t(unsigned long, count,
|
||||
(unsigned long)high_memory - p);
|
||||
--
|
||||
1.8.3.1
|
||||
1.8.4.2
|
||||
|
||||
|
||||
From 4aa42b7fa5d7f79eb1d179e728ffa561fd9cf354 Mon Sep 17 00:00:00 2001
|
||||
From 71353d491c70b303a07b4e79c896e729a4f74978 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Boyer <jwboyer@redhat.com>
|
||||
Date: Mon, 25 Jun 2012 19:57:30 -0400
|
||||
Subject: [PATCH 07/14] acpi: Ignore acpi_rsdp kernel parameter when module
|
||||
|
@ -401,7 +401,7 @@ Signed-off-by: Josh Boyer <jwboyer@redhat.com>
|
|||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
|
||||
index e5f416c..9311c00 100644
|
||||
index 54a20ff..d21d269 100644
|
||||
--- a/drivers/acpi/osl.c
|
||||
+++ b/drivers/acpi/osl.c
|
||||
@@ -45,6 +45,7 @@
|
||||
|
@ -412,7 +412,7 @@ index e5f416c..9311c00 100644
|
|||
|
||||
#include <asm/io.h>
|
||||
#include <asm/uaccess.h>
|
||||
@@ -249,7 +250,7 @@ early_param("acpi_rsdp", setup_acpi_rsdp);
|
||||
@@ -248,7 +249,7 @@ early_param("acpi_rsdp", setup_acpi_rsdp);
|
||||
acpi_physical_address __init acpi_os_get_root_pointer(void)
|
||||
{
|
||||
#ifdef CONFIG_KEXEC
|
||||
|
@ -422,10 +422,10 @@ index e5f416c..9311c00 100644
|
|||
#endif
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
1.8.4.2
|
||||
|
||||
|
||||
From c9e62c2ce588d98a774a3853e56d95e48b9df98c Mon Sep 17 00:00:00 2001
|
||||
From e0a6b0dd91460123d71784d531b9df26449940ae Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
Date: Fri, 9 Aug 2013 03:33:56 -0400
|
||||
Subject: [PATCH 08/14] kexec: Disable at runtime if the kernel enforces module
|
||||
|
@ -441,7 +441,7 @@ Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
|
|||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/kernel/kexec.c b/kernel/kexec.c
|
||||
index 2a74f30..13601e3 100644
|
||||
index 9c97016..8ad0d38 100644
|
||||
--- a/kernel/kexec.c
|
||||
+++ b/kernel/kexec.c
|
||||
@@ -32,6 +32,7 @@
|
||||
|
@ -452,7 +452,7 @@ index 2a74f30..13601e3 100644
|
|||
|
||||
#include <asm/page.h>
|
||||
#include <asm/uaccess.h>
|
||||
@@ -943,6 +944,13 @@ SYSCALL_DEFINE4(kexec_load, unsigned long, entry, unsigned long, nr_segments,
|
||||
@@ -946,6 +947,13 @@ SYSCALL_DEFINE4(kexec_load, unsigned long, entry, unsigned long, nr_segments,
|
||||
return -EPERM;
|
||||
|
||||
/*
|
||||
|
@ -467,10 +467,10 @@ index 2a74f30..13601e3 100644
|
|||
* This leaves us room for future extensions.
|
||||
*/
|
||||
--
|
||||
1.8.3.1
|
||||
1.8.4.2
|
||||
|
||||
|
||||
From d0e3cb2c13dc9634849ddacf75b6f0d94147516a Mon Sep 17 00:00:00 2001
|
||||
From c340630e68e5ed4d731d60d05ef9e2ae27080b66 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
Date: Tue, 3 Sep 2013 11:23:29 -0400
|
||||
Subject: [PATCH 09/14] uswsusp: Disable when module loading is restricted
|
||||
|
@ -485,7 +485,7 @@ Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
|
|||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/kernel/power/user.c b/kernel/power/user.c
|
||||
index 957f061..e570609d 100644
|
||||
index 98d3575..efe99de 100644
|
||||
--- a/kernel/power/user.c
|
||||
+++ b/kernel/power/user.c
|
||||
@@ -24,6 +24,7 @@
|
||||
|
@ -507,10 +507,10 @@ index 957f061..e570609d 100644
|
|||
|
||||
if (!atomic_add_unless(&snapshot_device_available, -1, 0)) {
|
||||
--
|
||||
1.8.3.1
|
||||
1.8.4.2
|
||||
|
||||
|
||||
From b238417ed3c5a0b21bbfcac84f6c70011b8977c0 Mon Sep 17 00:00:00 2001
|
||||
From 273deda4ddec360ce67ac256b8cbdabdc5e8c51d Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
Date: Fri, 8 Feb 2013 11:12:13 -0800
|
||||
Subject: [PATCH 10/14] x86: Restrict MSR access when module loading is
|
||||
|
@ -552,10 +552,10 @@ index 05266b5..e2bd647 100644
|
|||
err = -EFAULT;
|
||||
break;
|
||||
--
|
||||
1.8.3.1
|
||||
1.8.4.2
|
||||
|
||||
|
||||
From c3a9afb3b580b4f721d245fc5d13e378b99b9cd8 Mon Sep 17 00:00:00 2001
|
||||
From 089166c0d42f1b82988aad4f23607deb6ee531e7 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
Date: Fri, 9 Aug 2013 18:36:30 -0400
|
||||
Subject: [PATCH 11/14] Add option to automatically enforce module signatures
|
||||
|
@ -591,10 +591,10 @@ index 199f453..ec38acf 100644
|
|||
290/040 ALL edd_mbr_sig_buffer EDD MBR signatures
|
||||
2D0/A00 ALL e820_map E820 memory map table
|
||||
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
|
||||
index 725e157..fe212ef 100644
|
||||
index 5216e28..2a147a3 100644
|
||||
--- a/arch/x86/Kconfig
|
||||
+++ b/arch/x86/Kconfig
|
||||
@@ -1604,6 +1604,16 @@ config EFI_STUB
|
||||
@@ -1582,6 +1582,16 @@ config EFI_STUB
|
||||
|
||||
See Documentation/efi-stub.txt for more information.
|
||||
|
||||
|
@ -673,10 +673,10 @@ index a7677ba..4e172e9 100644
|
|||
|
||||
setup_efi_pci(boot_params);
|
||||
diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h
|
||||
index 9c3733c..a7ba210 100644
|
||||
index 225b098..90dbfb7 100644
|
||||
--- a/arch/x86/include/uapi/asm/bootparam.h
|
||||
+++ b/arch/x86/include/uapi/asm/bootparam.h
|
||||
@@ -131,7 +131,8 @@ struct boot_params {
|
||||
@@ -133,7 +133,8 @@ struct boot_params {
|
||||
__u8 eddbuf_entries; /* 0x1e9 */
|
||||
__u8 edd_mbr_sig_buf_entries; /* 0x1ea */
|
||||
__u8 kbd_status; /* 0x1eb */
|
||||
|
@ -687,10 +687,10 @@ index 9c3733c..a7ba210 100644
|
|||
* The sentinel is set to a nonzero value (0xff) in header.S.
|
||||
*
|
||||
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
|
||||
index 918d489..fe429c1 100644
|
||||
index 182b3f9..ab6cc9e 100644
|
||||
--- a/arch/x86/kernel/setup.c
|
||||
+++ b/arch/x86/kernel/setup.c
|
||||
@@ -1127,6 +1127,12 @@ void __init setup_arch(char **cmdline_p)
|
||||
@@ -1129,6 +1129,12 @@ void __init setup_arch(char **cmdline_p)
|
||||
|
||||
io_delay_init();
|
||||
|
||||
|
@ -704,7 +704,7 @@ index 918d489..fe429c1 100644
|
|||
* Parse the ACPI tables for possible boot-time SMP configuration.
|
||||
*/
|
||||
diff --git a/include/linux/module.h b/include/linux/module.h
|
||||
index de97e77..d69fe19 100644
|
||||
index 30702eb..3eb0f52 100644
|
||||
--- a/include/linux/module.h
|
||||
+++ b/include/linux/module.h
|
||||
@@ -190,6 +190,12 @@ const struct exception_table_entry *search_exception_tables(unsigned long add);
|
||||
|
@ -721,10 +721,10 @@ index de97e77..d69fe19 100644
|
|||
|
||||
extern int modules_disabled; /* for sysctl */
|
||||
diff --git a/kernel/module.c b/kernel/module.c
|
||||
index 81206c1..e1428f0 100644
|
||||
index 644c33e..92b73b1 100644
|
||||
--- a/kernel/module.c
|
||||
+++ b/kernel/module.c
|
||||
@@ -3861,6 +3861,13 @@ void module_layout(struct module *mod,
|
||||
@@ -3832,6 +3832,13 @@ void module_layout(struct module *mod,
|
||||
EXPORT_SYMBOL(module_layout);
|
||||
#endif
|
||||
|
||||
|
@ -739,10 +739,10 @@ index 81206c1..e1428f0 100644
|
|||
{
|
||||
#ifdef CONFIG_MODULE_SIG
|
||||
--
|
||||
1.8.3.1
|
||||
1.8.4.2
|
||||
|
||||
|
||||
From 27a1aa77c7fbaaae8c6a776190a38dcbf3c3d6d2 Mon Sep 17 00:00:00 2001
|
||||
From e9ad6bd405fa01b7dd52d8c75b9dc91ae52e131d Mon Sep 17 00:00:00 2001
|
||||
From: Josh Boyer <jwboyer@redhat.com>
|
||||
Date: Tue, 5 Feb 2013 19:25:05 -0500
|
||||
Subject: [PATCH 12/14] efi: Disable secure boot if shim is in insecure mode
|
||||
|
@ -798,10 +798,10 @@ index 4e172e9..4905f4d 100644
|
|||
}
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
1.8.4.2
|
||||
|
||||
|
||||
From 2a445ca2c187da4497ef5f68f111574fd2b0d419 Mon Sep 17 00:00:00 2001
|
||||
From f9f355d5e58c1503bb7c03d92c9e89267e0f46ad Mon Sep 17 00:00:00 2001
|
||||
From: Josh Boyer <jwboyer@fedoraproject.org>
|
||||
Date: Tue, 27 Aug 2013 13:28:43 -0400
|
||||
Subject: [PATCH 13/14] efi: Make EFI_SECURE_BOOT_SIG_ENFORCE depend on EFI
|
||||
|
@ -815,10 +815,10 @@ Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
|
|||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
|
||||
index fe212ef..bf83fd3 100644
|
||||
index 2a147a3..9e644d5 100644
|
||||
--- a/arch/x86/Kconfig
|
||||
+++ b/arch/x86/Kconfig
|
||||
@@ -1605,7 +1605,8 @@ config EFI_STUB
|
||||
@@ -1583,7 +1583,8 @@ config EFI_STUB
|
||||
See Documentation/efi-stub.txt for more information.
|
||||
|
||||
config EFI_SECURE_BOOT_SIG_ENFORCE
|
||||
|
@ -829,10 +829,10 @@ index fe212ef..bf83fd3 100644
|
|||
---help---
|
||||
UEFI Secure Boot provides a mechanism for ensuring that the
|
||||
--
|
||||
1.8.3.1
|
||||
1.8.4.2
|
||||
|
||||
|
||||
From b1c533cc1d1ca7a03497cc4f2e1b029bde95633c Mon Sep 17 00:00:00 2001
|
||||
From a30576a9db583213474b74360c5869e8882e6ed7 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Boyer <jwboyer@fedoraproject.org>
|
||||
Date: Tue, 27 Aug 2013 13:33:03 -0400
|
||||
Subject: [PATCH 14/14] efi: Add EFI_SECURE_BOOT bit
|
||||
|
@ -847,10 +847,10 @@ Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
|
|||
2 files changed, 3 insertions(+)
|
||||
|
||||
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
|
||||
index fe429c1..469fbf0 100644
|
||||
index ab6cc9e..99933cd 100644
|
||||
--- a/arch/x86/kernel/setup.c
|
||||
+++ b/arch/x86/kernel/setup.c
|
||||
@@ -1129,7 +1129,9 @@ void __init setup_arch(char **cmdline_p)
|
||||
@@ -1131,7 +1131,9 @@ void __init setup_arch(char **cmdline_p)
|
||||
|
||||
#ifdef CONFIG_EFI_SECURE_BOOT_SIG_ENFORCE
|
||||
if (boot_params.secure_boot) {
|
||||
|
@ -861,17 +861,17 @@ index fe429c1..469fbf0 100644
|
|||
#endif
|
||||
|
||||
diff --git a/include/linux/efi.h b/include/linux/efi.h
|
||||
index bc5687d..b010a2e 100644
|
||||
index 0a819e7..0c1d367 100644
|
||||
--- a/include/linux/efi.h
|
||||
+++ b/include/linux/efi.h
|
||||
@@ -653,6 +653,7 @@ extern int __init efi_setup_pcdp_console(char *);
|
||||
#define EFI_RUNTIME_SERVICES 3 /* Can we use runtime services? */
|
||||
@@ -657,6 +657,7 @@ extern int __init efi_setup_pcdp_console(char *);
|
||||
#define EFI_MEMMAP 4 /* Can we use EFI memory map? */
|
||||
#define EFI_64BIT 5 /* Is the firmware 64-bit? */
|
||||
+#define EFI_SECURE_BOOT 6 /* Are we in Secure Boot mode? */
|
||||
#define EFI_ARCH_1 6 /* First arch-specific bit */
|
||||
+#define EFI_SECURE_BOOT 7 /* Are we in Secure Boot mode? */
|
||||
|
||||
#ifdef CONFIG_EFI
|
||||
# ifdef CONFIG_X86
|
||||
--
|
||||
1.8.3.1
|
||||
1.8.4.2
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Bugzilla: 1013466
|
||||
Upstream-status: queued for 3.14/3.15? http://marc.info/?l=selinux&m=139351174702148&w=2
|
||||
Upstream-status: 3.15 (commit 98883bfd9d603a2760f6d53eccfaa3ae2c053e72)
|
||||
|
||||
It turns out that doing the SELinux MAC checks for mmap() before the
|
||||
DAC checks was causing users and the SELinux policy folks headaches
|
||||
|
|
4
sources
4
sources
|
@ -1,2 +1,2 @@
|
|||
0ecbaf65c00374eb4a826c2f9f37606f linux-3.13.tar.xz
|
||||
a9b131a589a176b4c437b8ca4557b85e patch-3.13.6.xz
|
||||
b621207b3f6ecbb67db18b13258f8ea8 linux-3.14.tar.xz
|
||||
3088ac6bc93231bad74bd2ef476b936f patch-3.14.7.xz
|
||||
|
|
|
@ -1,96 +0,0 @@
|
|||
Bugzilla: 1037793
|
||||
Upstream-status: submitted for 3.14
|
||||
|
||||
rpc.gssd expects to see an "info" file in each clntXX dir. Since adding
|
||||
the dummy gssd pipe, users that run rpc.gssd see a lot of these messages
|
||||
spamming the logs:
|
||||
|
||||
rpc.gssd[508]: ERROR: can't open /var/lib/nfs/rpc_pipefs/gssd/clntXX/info: No such file or directory
|
||||
rpc.gssd[508]: ERROR: failed to read service info
|
||||
|
||||
Add a dummy gssd/clntXX/info file to help silence these messages.
|
||||
|
||||
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
||||
---
|
||||
net/sunrpc/rpc_pipe.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 49 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
|
||||
index 0b74c61..5d973b2 100644
|
||||
--- a/net/sunrpc/rpc_pipe.c
|
||||
+++ b/net/sunrpc/rpc_pipe.c
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <linux/fsnotify.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/rcupdate.h>
|
||||
+#include <linux/utsname.h>
|
||||
|
||||
#include <asm/ioctls.h>
|
||||
#include <linux/poll.h>
|
||||
@@ -1275,6 +1276,44 @@ static const struct rpc_pipe_ops gssd_dummy_pipe_ops = {
|
||||
.downcall = dummy_downcall,
|
||||
};
|
||||
|
||||
+/*
|
||||
+ * Here we present a bogus "info" file to keep rpc.gssd happy. We don't expect
|
||||
+ * that it will ever use this info to handle an upcall, but rpc.gssd expects
|
||||
+ * that this file will be there and have a certain format.
|
||||
+ */
|
||||
+static int
|
||||
+rpc_show_dummy_info(struct seq_file *m, void *v)
|
||||
+{
|
||||
+ seq_printf(m, "RPC server: %s\n", utsname()->nodename);
|
||||
+ seq_printf(m, "service: foo (1) version 0\n");
|
||||
+ seq_printf(m, "address: 127.0.0.1\n");
|
||||
+ seq_printf(m, "protocol: tcp\n");
|
||||
+ seq_printf(m, "port: 0\n");
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+rpc_dummy_info_open(struct inode *inode, struct file *file)
|
||||
+{
|
||||
+ return single_open(file, rpc_show_dummy_info, NULL);
|
||||
+}
|
||||
+
|
||||
+static const struct file_operations rpc_dummy_info_operations = {
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .open = rpc_dummy_info_open,
|
||||
+ .read = seq_read,
|
||||
+ .llseek = seq_lseek,
|
||||
+ .release = single_release,
|
||||
+};
|
||||
+
|
||||
+static const struct rpc_filelist gssd_dummy_info_file[] = {
|
||||
+ [0] = {
|
||||
+ .name = "info",
|
||||
+ .i_fop = &rpc_dummy_info_operations,
|
||||
+ .mode = S_IFREG | S_IRUSR,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
/**
|
||||
* rpc_gssd_dummy_populate - create a dummy gssd pipe
|
||||
* @root: root of the rpc_pipefs filesystem
|
||||
@@ -1312,9 +1351,18 @@ rpc_gssd_dummy_populate(struct dentry *root, struct rpc_pipe *pipe_data)
|
||||
goto out;
|
||||
}
|
||||
|
||||
+ ret = rpc_populate(clnt_dentry, gssd_dummy_info_file, 0, 1, NULL);
|
||||
+ if (ret) {
|
||||
+ __rpc_depopulate(gssd_dentry, gssd_dummy_clnt_dir, 0, 1);
|
||||
+ pipe_dentry = ERR_PTR(ret);
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
pipe_dentry = rpc_mkpipe_dentry(clnt_dentry, "gssd", NULL, pipe_data);
|
||||
- if (IS_ERR(pipe_dentry))
|
||||
+ if (IS_ERR(pipe_dentry)) {
|
||||
+ __rpc_depopulate(clnt_dentry, gssd_dummy_info_file, 0, 1);
|
||||
__rpc_depopulate(gssd_dentry, gssd_dummy_clnt_dir, 0, 1);
|
||||
+ }
|
||||
out:
|
||||
dput(clnt_dentry);
|
||||
dput(gssd_dentry);
|
||||
--
|
||||
1.8.4.2
|
|
@ -1,233 +0,0 @@
|
|||
Bugzilla: N/A
|
||||
Upstream-status: queued in NFS git tree (for 3.13/3.14?)
|
||||
|
||||
rpc.gssd will naturally hold open any pipe named */clnt*/gssd that shows
|
||||
up under rpc_pipefs. That behavior gives us a reliable mechanism to tell
|
||||
whether it's actually running or not.
|
||||
|
||||
Create a new toplevel "gssd" directory in rpc_pipefs when it's mounted.
|
||||
Under that directory create another directory called "clntXX", and then
|
||||
within that a pipe called "gssd".
|
||||
|
||||
We'll never send an upcall along that pipe, and any downcall written to
|
||||
it will just return -EINVAL.
|
||||
|
||||
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
||||
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
|
||||
---
|
||||
include/linux/sunrpc/rpc_pipe_fs.h | 3 +-
|
||||
net/sunrpc/netns.h | 1 +
|
||||
net/sunrpc/rpc_pipe.c | 93 ++++++++++++++++++++++++++++++++++-
|
||||
net/sunrpc/sunrpc_syms.c | 8 +++-
|
||||
4 files changed, 100 insertions(+), 5 deletions(-)
|
||||
|
||||
diff -up linux-3.11.9-200.fc19.x86_64/include/linux/sunrpc/rpc_pipe_fs.h.orig linux-3.11.9-200.fc19.x86_64/include/linux/sunrpc/rpc_pipe_fs.h
|
||||
--- linux-3.11.9-200.fc19.x86_64/include/linux/sunrpc/rpc_pipe_fs.h.orig 2013-09-02 16:46:10.000000000 -0400
|
||||
+++ linux-3.11.9-200.fc19.x86_64/include/linux/sunrpc/rpc_pipe_fs.h 2013-11-21 10:11:17.893026000 -0500
|
||||
@@ -64,7 +64,8 @@ enum {
|
||||
|
||||
extern struct dentry *rpc_d_lookup_sb(const struct super_block *sb,
|
||||
const unsigned char *dir_name);
|
||||
-extern void rpc_pipefs_init_net(struct net *net);
|
||||
+extern int rpc_pipefs_init_net(struct net *net);
|
||||
+extern void rpc_pipefs_exit_net(struct net *net);
|
||||
extern struct super_block *rpc_get_sb_net(const struct net *net);
|
||||
extern void rpc_put_sb_net(const struct net *net);
|
||||
|
||||
diff -up linux-3.11.9-200.fc19.x86_64/net/sunrpc/netns.h.orig linux-3.11.9-200.fc19.x86_64/net/sunrpc/netns.h
|
||||
--- linux-3.11.9-200.fc19.x86_64/net/sunrpc/netns.h.orig 2013-09-02 16:46:10.000000000 -0400
|
||||
+++ linux-3.11.9-200.fc19.x86_64/net/sunrpc/netns.h 2013-11-21 10:11:17.897029000 -0500
|
||||
@@ -14,6 +14,7 @@ struct sunrpc_net {
|
||||
struct cache_detail *rsi_cache;
|
||||
|
||||
struct super_block *pipefs_sb;
|
||||
+ struct rpc_pipe *gssd_dummy;
|
||||
struct mutex pipefs_sb_lock;
|
||||
|
||||
struct list_head all_clients;
|
||||
diff -up linux-3.11.9-200.fc19.x86_64/net/sunrpc/rpc_pipe.c.orig linux-3.11.9-200.fc19.x86_64/net/sunrpc/rpc_pipe.c
|
||||
--- linux-3.11.9-200.fc19.x86_64/net/sunrpc/rpc_pipe.c.orig 2013-09-02 16:46:10.000000000 -0400
|
||||
+++ linux-3.11.9-200.fc19.x86_64/net/sunrpc/rpc_pipe.c 2013-11-21 10:11:17.903026000 -0500
|
||||
@@ -38,7 +38,7 @@
|
||||
#define NET_NAME(net) ((net == &init_net) ? " (init_net)" : "")
|
||||
|
||||
static struct file_system_type rpc_pipe_fs_type;
|
||||
-
|
||||
+static const struct rpc_pipe_ops gssd_dummy_pipe_ops;
|
||||
|
||||
static struct kmem_cache *rpc_inode_cachep __read_mostly;
|
||||
|
||||
@@ -1019,6 +1019,7 @@ enum {
|
||||
RPCAUTH_nfsd4_cb,
|
||||
RPCAUTH_cache,
|
||||
RPCAUTH_nfsd,
|
||||
+ RPCAUTH_gssd,
|
||||
RPCAUTH_RootEOF
|
||||
};
|
||||
|
||||
@@ -1055,6 +1056,10 @@ static const struct rpc_filelist files[]
|
||||
.name = "nfsd",
|
||||
.mode = S_IFDIR | S_IRUGO | S_IXUGO,
|
||||
},
|
||||
+ [RPCAUTH_gssd] = {
|
||||
+ .name = "gssd",
|
||||
+ .mode = S_IFDIR | S_IRUGO | S_IXUGO,
|
||||
+ },
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -1068,13 +1073,25 @@ struct dentry *rpc_d_lookup_sb(const str
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rpc_d_lookup_sb);
|
||||
|
||||
-void rpc_pipefs_init_net(struct net *net)
|
||||
+int rpc_pipefs_init_net(struct net *net)
|
||||
{
|
||||
struct sunrpc_net *sn = net_generic(net, sunrpc_net_id);
|
||||
|
||||
+ sn->gssd_dummy = rpc_mkpipe_data(&gssd_dummy_pipe_ops, 0);
|
||||
+ if (IS_ERR(sn->gssd_dummy))
|
||||
+ return PTR_ERR(sn->gssd_dummy);
|
||||
+
|
||||
mutex_init(&sn->pipefs_sb_lock);
|
||||
sn->gssd_running = 1;
|
||||
sn->pipe_version = -1;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+void rpc_pipefs_exit_net(struct net *net)
|
||||
+{
|
||||
+ struct sunrpc_net *sn = net_generic(net, sunrpc_net_id);
|
||||
+
|
||||
+ rpc_destroy_pipe_data(sn->gssd_dummy);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1104,11 +1121,73 @@ void rpc_put_sb_net(const struct net *ne
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rpc_put_sb_net);
|
||||
|
||||
+static const struct rpc_filelist gssd_dummy_clnt_dir[] = {
|
||||
+ [0] = {
|
||||
+ .name = "clntXX",
|
||||
+ .mode = S_IFDIR | S_IRUGO | S_IXUGO,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static ssize_t
|
||||
+dummy_downcall(struct file *filp, const char __user *src, size_t len)
|
||||
+{
|
||||
+ return -EINVAL;
|
||||
+}
|
||||
+
|
||||
+static const struct rpc_pipe_ops gssd_dummy_pipe_ops = {
|
||||
+ .upcall = rpc_pipe_generic_upcall,
|
||||
+ .downcall = dummy_downcall,
|
||||
+};
|
||||
+
|
||||
+/**
|
||||
+ * rpc_gssd_dummy_populate - create a dummy gssd pipe
|
||||
+ * @root: root of the rpc_pipefs filesystem
|
||||
+ * @pipe_data: pipe data created when netns is initialized
|
||||
+ *
|
||||
+ * Create a dummy set of directories and a pipe that gssd can hold open to
|
||||
+ * indicate that it is up and running.
|
||||
+ */
|
||||
+static struct dentry *
|
||||
+rpc_gssd_dummy_populate(struct dentry *root, struct rpc_pipe *pipe_data)
|
||||
+{
|
||||
+ int ret = 0;
|
||||
+ struct dentry *gssd_dentry;
|
||||
+ struct dentry *clnt_dentry = NULL;
|
||||
+ struct dentry *pipe_dentry = NULL;
|
||||
+ struct qstr q = QSTR_INIT(files[RPCAUTH_gssd].name,
|
||||
+ strlen(files[RPCAUTH_gssd].name));
|
||||
+
|
||||
+ /* We should never get this far if "gssd" doesn't exist */
|
||||
+ gssd_dentry = d_hash_and_lookup(root, &q);
|
||||
+ if (!gssd_dentry)
|
||||
+ return ERR_PTR(-ENOENT);
|
||||
+
|
||||
+ ret = rpc_populate(gssd_dentry, gssd_dummy_clnt_dir, 0, 1, NULL);
|
||||
+ if (ret) {
|
||||
+ pipe_dentry = ERR_PTR(ret);
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ q.name = gssd_dummy_clnt_dir[0].name;
|
||||
+ q.len = strlen(gssd_dummy_clnt_dir[0].name);
|
||||
+ clnt_dentry = d_hash_and_lookup(gssd_dentry, &q);
|
||||
+ if (!clnt_dentry) {
|
||||
+ pipe_dentry = ERR_PTR(-ENOENT);
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ pipe_dentry = rpc_mkpipe_dentry(clnt_dentry, "gssd", NULL, pipe_data);
|
||||
+out:
|
||||
+ dput(clnt_dentry);
|
||||
+ dput(gssd_dentry);
|
||||
+ return pipe_dentry;
|
||||
+}
|
||||
+
|
||||
static int
|
||||
rpc_fill_super(struct super_block *sb, void *data, int silent)
|
||||
{
|
||||
struct inode *inode;
|
||||
- struct dentry *root;
|
||||
+ struct dentry *root, *gssd_dentry;
|
||||
struct net *net = data;
|
||||
struct sunrpc_net *sn = net_generic(net, sunrpc_net_id);
|
||||
int err;
|
||||
@@ -1126,6 +1205,13 @@ rpc_fill_super(struct super_block *sb, v
|
||||
return -ENOMEM;
|
||||
if (rpc_populate(root, files, RPCAUTH_lockd, RPCAUTH_RootEOF, NULL))
|
||||
return -ENOMEM;
|
||||
+
|
||||
+ gssd_dentry = rpc_gssd_dummy_populate(root, sn->gssd_dummy);
|
||||
+ if (IS_ERR(gssd_dentry)) {
|
||||
+ __rpc_depopulate(root, files, RPCAUTH_lockd, RPCAUTH_RootEOF);
|
||||
+ return PTR_ERR(gssd_dentry);
|
||||
+ }
|
||||
+
|
||||
dprintk("RPC: sending pipefs MOUNT notification for net %p%s\n",
|
||||
net, NET_NAME(net));
|
||||
mutex_lock(&sn->pipefs_sb_lock);
|
||||
@@ -1140,6 +1226,7 @@ rpc_fill_super(struct super_block *sb, v
|
||||
return 0;
|
||||
|
||||
err_depopulate:
|
||||
+ dput(gssd_dentry);
|
||||
blocking_notifier_call_chain(&rpc_pipefs_notifier_list,
|
||||
RPC_PIPEFS_UMOUNT,
|
||||
sb);
|
||||
diff -up linux-3.11.9-200.fc19.x86_64/net/sunrpc/sunrpc_syms.c.orig linux-3.11.9-200.fc19.x86_64/net/sunrpc/sunrpc_syms.c
|
||||
--- linux-3.11.9-200.fc19.x86_64/net/sunrpc/sunrpc_syms.c.orig 2013-09-02 16:46:10.000000000 -0400
|
||||
+++ linux-3.11.9-200.fc19.x86_64/net/sunrpc/sunrpc_syms.c 2013-11-21 10:11:17.908026000 -0500
|
||||
@@ -44,12 +44,17 @@ static __net_init int sunrpc_init_net(st
|
||||
if (err)
|
||||
goto err_unixgid;
|
||||
|
||||
- rpc_pipefs_init_net(net);
|
||||
+ err = rpc_pipefs_init_net(net);
|
||||
+ if (err)
|
||||
+ goto err_pipefs;
|
||||
+
|
||||
INIT_LIST_HEAD(&sn->all_clients);
|
||||
spin_lock_init(&sn->rpc_client_lock);
|
||||
spin_lock_init(&sn->rpcb_clnt_lock);
|
||||
return 0;
|
||||
|
||||
+err_pipefs:
|
||||
+ unix_gid_cache_destroy(net);
|
||||
err_unixgid:
|
||||
ip_map_cache_destroy(net);
|
||||
err_ipmap:
|
||||
@@ -60,6 +65,7 @@ err_proc:
|
||||
|
||||
static __net_exit void sunrpc_exit_net(struct net *net)
|
||||
{
|
||||
+ rpc_pipefs_exit_net(net);
|
||||
unix_gid_cache_destroy(net);
|
||||
ip_map_cache_destroy(net);
|
||||
rpc_proc_exit(net);
|
||||
|
|
@ -1,139 +0,0 @@
|
|||
Bugzilla: N/A
|
||||
Upstream-status: queued in NFS git tree (for 3.13/3.14?)
|
||||
|
||||
Now that we have a more reliable method to tell if gssd is running, we
|
||||
can replace the sn->gssd_running flag with a function that will query to
|
||||
see if it's up and running.
|
||||
|
||||
There's also no need to attempt an upcall that we know will fail, so
|
||||
just return -EACCES if gssd isn't running. Finally, fix the warn_gss()
|
||||
message not to claim that that the upcall timed out since we don't
|
||||
necesarily perform one now when gssd isn't running, and remove the
|
||||
extraneous newline from the message.
|
||||
|
||||
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
||||
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
|
||||
---
|
||||
Fixed up to apply to 3.12.1 by Josh Boyer <jwboyer@fedoraproject.org>
|
||||
|
||||
include/linux/sunrpc/rpc_pipe_fs.h | 2 ++
|
||||
net/sunrpc/auth_gss/auth_gss.c | 17 +++++++----------
|
||||
net/sunrpc/netns.h | 2 --
|
||||
net/sunrpc/rpc_pipe.c | 14 ++++++++++----
|
||||
4 files changed, 19 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/include/linux/sunrpc/rpc_pipe_fs.h b/include/linux/sunrpc/rpc_pipe_fs.h
|
||||
index 85f1342..7f490be 100644
|
||||
--- a/include/linux/sunrpc/rpc_pipe_fs.h
|
||||
+++ b/include/linux/sunrpc/rpc_pipe_fs.h
|
||||
@@ -131,5 +131,7 @@ extern int rpc_unlink(struct dentry *);
|
||||
extern int register_rpc_pipefs(void);
|
||||
extern void unregister_rpc_pipefs(void);
|
||||
|
||||
+extern bool gssd_running(struct net *net);
|
||||
+
|
||||
#endif
|
||||
#endif
|
||||
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
|
||||
index 0846566..1ada878 100644
|
||||
--- a/net/sunrpc/auth_gss/auth_gss.c
|
||||
+++ b/net/sunrpc/auth_gss/auth_gss.c
|
||||
@@ -517,8 +517,7 @@ static void warn_gssd(void)
|
||||
unsigned long now = jiffies;
|
||||
|
||||
if (time_after(now, ratelimit)) {
|
||||
- printk(KERN_WARNING "RPC: AUTH_GSS upcall timed out.\n"
|
||||
- "Please check user daemon is running.\n");
|
||||
+ pr_warn("RPC: AUTH_GSS upcall failed. Please check user daemon is running.\n");
|
||||
ratelimit = now + 15*HZ;
|
||||
}
|
||||
}
|
||||
@@ -581,7 +580,6 @@ gss_create_upcall(struct gss_auth *gss_auth, struct gss_cred *gss_cred)
|
||||
struct rpc_pipe *pipe;
|
||||
struct rpc_cred *cred = &gss_cred->gc_base;
|
||||
struct gss_upcall_msg *gss_msg;
|
||||
- unsigned long timeout;
|
||||
DEFINE_WAIT(wait);
|
||||
int err;
|
||||
|
||||
@@ -589,17 +587,16 @@ gss_create_upcall(struct gss_auth *gss_auth, struct gss_cred *gss_cred)
|
||||
__func__, from_kuid(&init_user_ns, cred->cr_uid));
|
||||
retry:
|
||||
err = 0;
|
||||
- /* Default timeout is 15s unless we know that gssd is not running */
|
||||
- timeout = 15 * HZ;
|
||||
- if (!sn->gssd_running)
|
||||
- timeout = HZ >> 2;
|
||||
+ /* if gssd is down, just skip upcalling altogether */
|
||||
+ if (!gssd_running(net)) {
|
||||
+ warn_gssd();
|
||||
+ return -EACCES;
|
||||
+ }
|
||||
gss_msg = gss_setup_upcall(gss_auth, cred);
|
||||
if (PTR_ERR(gss_msg) == -EAGAIN) {
|
||||
err = wait_event_interruptible_timeout(pipe_version_waitqueue,
|
||||
- sn->pipe_version >= 0, timeout);
|
||||
+ sn->pipe_version >= 0, 15 * HZ);
|
||||
if (sn->pipe_version < 0) {
|
||||
- if (err == 0)
|
||||
- sn->gssd_running = 0;
|
||||
warn_gssd();
|
||||
err = -EACCES;
|
||||
}
|
||||
diff --git a/net/sunrpc/netns.h b/net/sunrpc/netns.h
|
||||
index 8a8e841..94e506f 100644
|
||||
--- a/net/sunrpc/netns.h
|
||||
+++ b/net/sunrpc/netns.h
|
||||
@@ -33,8 +33,6 @@ struct sunrpc_net {
|
||||
int pipe_version;
|
||||
atomic_t pipe_users;
|
||||
struct proc_dir_entry *use_gssp_proc;
|
||||
-
|
||||
- unsigned int gssd_running;
|
||||
};
|
||||
|
||||
extern int sunrpc_net_id;
|
||||
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
|
||||
index 40aef18..ad444f3 100644
|
||||
--- a/net/sunrpc/rpc_pipe.c
|
||||
+++ b/net/sunrpc/rpc_pipe.c
|
||||
@@ -216,14 +216,11 @@ rpc_destroy_inode(struct inode *inode)
|
||||
static int
|
||||
rpc_pipe_open(struct inode *inode, struct file *filp)
|
||||
{
|
||||
- struct net *net = inode->i_sb->s_fs_info;
|
||||
- struct sunrpc_net *sn = net_generic(net, sunrpc_net_id);
|
||||
struct rpc_pipe *pipe;
|
||||
int first_open;
|
||||
int res = -ENXIO;
|
||||
|
||||
mutex_lock(&inode->i_mutex);
|
||||
- sn->gssd_running = 1;
|
||||
pipe = RPC_I(inode)->pipe;
|
||||
if (pipe == NULL)
|
||||
goto out;
|
||||
@@ -1231,7 +1228,6 @@ int rpc_pipefs_init_net(struct net *net)
|
||||
return PTR_ERR(sn->gssd_dummy);
|
||||
|
||||
mutex_init(&sn->pipefs_sb_lock);
|
||||
- sn->gssd_running = 1;
|
||||
sn->pipe_version = -1;
|
||||
return 0;
|
||||
}
|
||||
@@ -1385,6 +1381,16 @@ err_depopulate:
|
||||
return err;
|
||||
}
|
||||
|
||||
+bool
|
||||
+gssd_running(struct net *net)
|
||||
+{
|
||||
+ struct sunrpc_net *sn = net_generic(net, sunrpc_net_id);
|
||||
+ struct rpc_pipe *pipe = sn->gssd_dummy;
|
||||
+
|
||||
+ return pipe->nreaders || pipe->nwriters;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(gssd_running);
|
||||
+
|
||||
static struct dentry *
|
||||
rpc_mount(struct file_system_type *fs_type,
|
||||
int flags, const char *dev_name, void *data)
|
|
@ -1,20 +1,23 @@
|
|||
From 71aac34ed679daa0bf772051eb40412b5bd95da3 Mon Sep 17 00:00:00 2001
|
||||
Bugzilla: N/A
|
||||
Upstream-status: Fedora mustard
|
||||
|
||||
From 29c1f71a2d0845a71ea2ebd2fb33542373dc52dd Mon Sep 17 00:00:00 2001
|
||||
From: Kyle McMartin <kyle@redhat.com>
|
||||
Date: Fri, 30 Aug 2013 09:28:51 -0400
|
||||
Subject: [PATCH] Add sysrq option to disable secure boot mode
|
||||
|
||||
---
|
||||
arch/x86/kernel/setup.c | 35 +++++++++++++++++++++++++++++++++++
|
||||
arch/x86/kernel/setup.c | 36 ++++++++++++++++++++++++++++++++++++
|
||||
drivers/input/misc/uinput.c | 1 +
|
||||
drivers/tty/sysrq.c | 19 +++++++++++++------
|
||||
include/linux/input.h | 5 +++++
|
||||
include/linux/sysrq.h | 8 +++++++-
|
||||
kernel/debug/kdb/kdb_main.c | 2 +-
|
||||
kernel/module.c | 4 ++--
|
||||
7 files changed, 64 insertions(+), 10 deletions(-)
|
||||
7 files changed, 65 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
|
||||
index 08dc16e..6971f8e 100644
|
||||
index c773add..92c480c 100644
|
||||
--- a/arch/x86/kernel/setup.c
|
||||
+++ b/arch/x86/kernel/setup.c
|
||||
@@ -70,6 +70,11 @@
|
||||
|
@ -29,11 +32,10 @@ index 08dc16e..6971f8e 100644
|
|||
#include <video/edid.h>
|
||||
|
||||
#include <asm/mtrr.h>
|
||||
@@ -1253,3 +1258,33 @@ void __init i386_reserve_resources(void)
|
||||
}
|
||||
@@ -1275,6 +1280,37 @@ void __init i386_reserve_resources(void)
|
||||
|
||||
#endif /* CONFIG_X86_32 */
|
||||
+
|
||||
|
||||
+#ifdef CONFIG_MAGIC_SYSRQ
|
||||
+#ifdef CONFIG_MODULE_SIG
|
||||
+extern bool sig_enforce;
|
||||
|
@ -63,8 +65,13 @@ index 08dc16e..6971f8e 100644
|
|||
+}
|
||||
+late_initcall(secure_boot_sysrq);
|
||||
+#endif /*CONFIG_MAGIC_SYSRQ*/
|
||||
+
|
||||
+
|
||||
static struct notifier_block kernel_offset_notifier = {
|
||||
.notifier_call = dump_kernel_offset
|
||||
};
|
||||
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
|
||||
index a0a4bba..3327cc3 100644
|
||||
index 7728359..a3e8ba8 100644
|
||||
--- a/drivers/input/misc/uinput.c
|
||||
+++ b/drivers/input/misc/uinput.c
|
||||
@@ -351,6 +351,7 @@ static int uinput_allocate_device(struct uinput_device *udev)
|
||||
|
@ -76,10 +83,10 @@ index a0a4bba..3327cc3 100644
|
|||
input_set_drvdata(udev->dev, udev);
|
||||
|
||||
diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
|
||||
index d5cc3ac..05b33f5 100644
|
||||
index ce396ec..aee594a 100644
|
||||
--- a/drivers/tty/sysrq.c
|
||||
+++ b/drivers/tty/sysrq.c
|
||||
@@ -461,6 +461,7 @@ static struct sysrq_key_op *sysrq_key_table[36] = {
|
||||
@@ -462,6 +462,7 @@ static struct sysrq_key_op *sysrq_key_table[36] = {
|
||||
&sysrq_showstate_blocked_op, /* w */
|
||||
/* x: May be registered on ppc/powerpc for xmon */
|
||||
/* x: May be registered on sparc64 for global PMU dump */
|
||||
|
@ -87,7 +94,7 @@ index d5cc3ac..05b33f5 100644
|
|||
NULL, /* x */
|
||||
/* y: May be registered on sparc64 for global register dump */
|
||||
NULL, /* y */
|
||||
@@ -504,7 +505,7 @@ static void __sysrq_put_key_op(int key, struct sysrq_key_op *op_p)
|
||||
@@ -505,7 +506,7 @@ static void __sysrq_put_key_op(int key, struct sysrq_key_op *op_p)
|
||||
sysrq_key_table[i] = op_p;
|
||||
}
|
||||
|
||||
|
@ -96,7 +103,7 @@ index d5cc3ac..05b33f5 100644
|
|||
{
|
||||
struct sysrq_key_op *op_p;
|
||||
int orig_log_level;
|
||||
@@ -524,11 +525,15 @@ void __handle_sysrq(int key, bool check_mask)
|
||||
@@ -525,11 +526,15 @@ void __handle_sysrq(int key, bool check_mask)
|
||||
|
||||
op_p = __sysrq_get_key_op(key);
|
||||
if (op_p) {
|
||||
|
@ -113,7 +120,7 @@ index d5cc3ac..05b33f5 100644
|
|||
printk("%s\n", op_p->action_msg);
|
||||
console_loglevel = orig_log_level;
|
||||
op_p->handler(key);
|
||||
@@ -559,7 +564,7 @@ void __handle_sysrq(int key, bool check_mask)
|
||||
@@ -560,7 +565,7 @@ void __handle_sysrq(int key, bool check_mask)
|
||||
void handle_sysrq(int key)
|
||||
{
|
||||
if (sysrq_on())
|
||||
|
@ -122,7 +129,7 @@ index d5cc3ac..05b33f5 100644
|
|||
}
|
||||
EXPORT_SYMBOL(handle_sysrq);
|
||||
|
||||
@@ -639,7 +644,7 @@ static void sysrq_do_reset(unsigned long _state)
|
||||
@@ -640,7 +645,7 @@ static void sysrq_do_reset(unsigned long _state)
|
||||
static void sysrq_handle_reset_request(struct sysrq_state *state)
|
||||
{
|
||||
if (state->reset_requested)
|
||||
|
@ -131,7 +138,7 @@ index d5cc3ac..05b33f5 100644
|
|||
|
||||
if (sysrq_reset_downtime_ms)
|
||||
mod_timer(&state->keyreset_timer,
|
||||
@@ -756,8 +761,10 @@ static bool sysrq_handle_keypress(struct sysrq_state *sysrq,
|
||||
@@ -791,8 +796,10 @@ static bool sysrq_handle_keypress(struct sysrq_state *sysrq,
|
||||
|
||||
default:
|
||||
if (sysrq->active && value && value != 2) {
|
||||
|
@ -143,7 +150,7 @@ index d5cc3ac..05b33f5 100644
|
|||
}
|
||||
break;
|
||||
}
|
||||
@@ -1038,7 +1045,7 @@ static ssize_t write_sysrq_trigger(struct file *file, const char __user *buf,
|
||||
@@ -1080,7 +1087,7 @@ static ssize_t write_sysrq_trigger(struct file *file, const char __user *buf,
|
||||
|
||||
if (get_user(c, buf))
|
||||
return -EFAULT;
|
||||
|
@ -183,10 +190,10 @@ index 82ce323..9e534f2 100644
|
|||
* Verify that we are in sync with input_device_id mod_devicetable.h #defines
|
||||
*/
|
||||
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h
|
||||
index 7faf933..87ae634 100644
|
||||
index 387fa7d..4b07e30 100644
|
||||
--- a/include/linux/sysrq.h
|
||||
+++ b/include/linux/sysrq.h
|
||||
@@ -31,6 +31,8 @@
|
||||
@@ -28,6 +28,8 @@
|
||||
#define SYSRQ_ENABLE_BOOT 0x0080
|
||||
#define SYSRQ_ENABLE_RTNICE 0x0100
|
||||
|
||||
|
@ -195,7 +202,7 @@ index 7faf933..87ae634 100644
|
|||
struct sysrq_key_op {
|
||||
void (*handler)(int);
|
||||
char *help_msg;
|
||||
@@ -45,8 +47,12 @@ struct sysrq_key_op {
|
||||
@@ -42,8 +44,12 @@ struct sysrq_key_op {
|
||||
* are available -- else NULL's).
|
||||
*/
|
||||
|
||||
|
@ -210,10 +217,10 @@ index 7faf933..87ae634 100644
|
|||
int unregister_sysrq_key(int key, struct sysrq_key_op *op);
|
||||
struct sysrq_key_op *__sysrq_get_key_op(int key);
|
||||
diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c
|
||||
index 00eb8f7..54fbbcc 100644
|
||||
index 0b097c8..18b400d 100644
|
||||
--- a/kernel/debug/kdb/kdb_main.c
|
||||
+++ b/kernel/debug/kdb/kdb_main.c
|
||||
@@ -1921,7 +1921,7 @@ static int kdb_sr(int argc, const char **argv)
|
||||
@@ -1924,7 +1924,7 @@ static int kdb_sr(int argc, const char **argv)
|
||||
if (argc != 1)
|
||||
return KDB_ARGCOUNT;
|
||||
kdb_trap_printk++;
|
||||
|
@ -223,7 +230,7 @@ index 00eb8f7..54fbbcc 100644
|
|||
|
||||
return 0;
|
||||
diff --git a/kernel/module.c b/kernel/module.c
|
||||
index bc7c987..5e4e2c2 100644
|
||||
index 92b73b1..a44fb2a 100644
|
||||
--- a/kernel/module.c
|
||||
+++ b/kernel/module.c
|
||||
@@ -109,9 +109,9 @@ struct list_head *kdb_modules = &modules; /* kdb needs the list of modules */
|
||||
|
@ -239,5 +246,5 @@ index bc7c987..5e4e2c2 100644
|
|||
static int param_set_bool_enable_only(const char *val,
|
||||
const struct kernel_param *kp)
|
||||
--
|
||||
1.8.3.1
|
||||
1.8.4.2
|
||||
|
||||
|
|
|
@ -0,0 +1,78 @@
|
|||
Bugzilla: 1099857
|
||||
Upstream-status: 3.15 and CC'd for stable
|
||||
|
||||
From 9d0d68faea6962d62dd501cd6e71ce5cc8ed262b Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Pirko <jiri@resnulli.us>
|
||||
Date: Thu, 29 May 2014 20:46:17 +0200
|
||||
Subject: [PATCH] team: fix mtu setting
|
||||
|
||||
Now it is not possible to set mtu to team device which has a port
|
||||
enslaved to it. The reason is that when team_change_mtu() calls
|
||||
dev_set_mtu() for port device, notificator for NETDEV_PRECHANGEMTU
|
||||
event is called and team_device_event() returns NOTIFY_BAD forbidding
|
||||
the change. So fix this by returning NOTIFY_DONE here in case team is
|
||||
changing mtu in team_change_mtu().
|
||||
|
||||
Introduced-by: 3d249d4c "net: introduce ethernet teaming device"
|
||||
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
|
||||
Acked-by: Flavio Leitner <fbl@redhat.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/team/team.c | 7 ++++++-
|
||||
include/linux/if_team.h | 1 +
|
||||
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
|
||||
index 767fe61..ce4989b 100644
|
||||
--- a/drivers/net/team/team.c
|
||||
+++ b/drivers/net/team/team.c
|
||||
@@ -1724,6 +1724,7 @@ static int team_change_mtu(struct net_device *dev, int new_mtu)
|
||||
* to traverse list in reverse under rcu_read_lock
|
||||
*/
|
||||
mutex_lock(&team->lock);
|
||||
+ team->port_mtu_change_allowed = true;
|
||||
list_for_each_entry(port, &team->port_list, list) {
|
||||
err = dev_set_mtu(port->dev, new_mtu);
|
||||
if (err) {
|
||||
@@ -1732,6 +1733,7 @@ static int team_change_mtu(struct net_device *dev, int new_mtu)
|
||||
goto unwind;
|
||||
}
|
||||
}
|
||||
+ team->port_mtu_change_allowed = false;
|
||||
mutex_unlock(&team->lock);
|
||||
|
||||
dev->mtu = new_mtu;
|
||||
@@ -1741,6 +1743,7 @@ static int team_change_mtu(struct net_device *dev, int new_mtu)
|
||||
unwind:
|
||||
list_for_each_entry_continue_reverse(port, &team->port_list, list)
|
||||
dev_set_mtu(port->dev, dev->mtu);
|
||||
+ team->port_mtu_change_allowed = false;
|
||||
mutex_unlock(&team->lock);
|
||||
|
||||
return err;
|
||||
@@ -2851,7 +2854,9 @@ static int team_device_event(struct notifier_block *unused,
|
||||
break;
|
||||
case NETDEV_PRECHANGEMTU:
|
||||
/* Forbid to change mtu of underlaying device */
|
||||
- return NOTIFY_BAD;
|
||||
+ if (!port->team->port_mtu_change_allowed)
|
||||
+ return NOTIFY_BAD;
|
||||
+ break;
|
||||
case NETDEV_PRE_TYPE_CHANGE:
|
||||
/* Forbid to change type of underlaying device */
|
||||
return NOTIFY_BAD;
|
||||
diff --git a/include/linux/if_team.h b/include/linux/if_team.h
|
||||
index a899dc2..a6aa970 100644
|
||||
--- a/include/linux/if_team.h
|
||||
+++ b/include/linux/if_team.h
|
||||
@@ -194,6 +194,7 @@ struct team {
|
||||
bool user_carrier_enabled;
|
||||
bool queue_override_enabled;
|
||||
struct list_head *qom_lists; /* array of queue override mapping lists */
|
||||
+ bool port_mtu_change_allowed;
|
||||
struct {
|
||||
unsigned int count;
|
||||
unsigned int interval; /* in ms */
|
||||
--
|
||||
1.9.3
|
||||
|
|
@ -1,158 +0,0 @@
|
|||
Bugzilla: 1065087
|
||||
Upstream-status: 3.14
|
||||
|
||||
From a9c3f68f3cd8d55f809fbdb0c138ed061ea1bd25 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hurley <peter@hurleysoftware.com>
|
||||
Date: Sat, 22 Feb 2014 12:31:21 +0000
|
||||
Subject: tty: Fix low_latency BUG
|
||||
|
||||
The user-settable knob, low_latency, has been the source of
|
||||
several BUG reports which stem from flush_to_ldisc() running
|
||||
in interrupt context. Since 3.12, which added several sleeping
|
||||
locks (termios_rwsem and buf->lock) to the input processing path,
|
||||
the frequency of these BUG reports has increased.
|
||||
|
||||
Note that changes in 3.12 did not introduce this regression;
|
||||
sleeping locks were first added to the input processing path
|
||||
with the removal of the BKL from N_TTY in commit
|
||||
a88a69c91256418c5907c2f1f8a0ec0a36f9e6cc,
|
||||
'n_tty: Fix loss of echoed characters and remove bkl from n_tty'
|
||||
and later in commit 38db89799bdf11625a831c5af33938dcb11908b6,
|
||||
'tty: throttling race fix'. Since those changes, executing
|
||||
flush_to_ldisc() in interrupt_context (ie, low_latency set), is unsafe.
|
||||
|
||||
However, since most devices do not validate if the low_latency
|
||||
setting is appropriate for the context (process or interrupt) in
|
||||
which they receive data, some reports are due to misconfiguration.
|
||||
Further, serial dma devices for which dma fails, resort to
|
||||
interrupt receiving as a backup without resetting low_latency.
|
||||
|
||||
Historically, low_latency was used to force wake-up the reading
|
||||
process rather than wait for the next scheduler tick. The
|
||||
effect was to trim multiple milliseconds of latency from
|
||||
when the process would receive new data.
|
||||
|
||||
Recent tests [1] have shown that the reading process now receives
|
||||
data with only 10's of microseconds latency without low_latency set.
|
||||
|
||||
Remove the low_latency rx steering from tty_flip_buffer_push();
|
||||
however, leave the knob as an optional hint to drivers that can
|
||||
tune their rx fifos and such like. Cleanup stale code comments
|
||||
regarding low_latency.
|
||||
|
||||
[1] https://lkml.org/lkml/2014/2/20/434
|
||||
|
||||
"Yay.. thats an annoying historical pain in the butt gone."
|
||||
-- Alan Cox
|
||||
|
||||
Reported-by: Beat Bolli <bbolli@ewanet.ch>
|
||||
Reported-by: Pavel Roskin <proski@gnu.org>
|
||||
Acked-by: David Sterba <dsterba@suse.cz>
|
||||
Cc: Grant Edwards <grant.b.edwards@gmail.com>
|
||||
Cc: Stanislaw Gruszka <sgruszka@redhat.com>
|
||||
Cc: Hal Murray <murray+fedora@ip-64-139-1-69.sjc.megapath.net>
|
||||
Cc: <stable@vger.kernel.org> # 3.12.x+
|
||||
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
|
||||
Signed-off-by: Alan Cox <alan@linux.intel.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
diff --git a/drivers/tty/ipwireless/tty.c b/drivers/tty/ipwireless/tty.c
|
||||
index ebd5bff..17ee3bf 100644
|
||||
--- a/drivers/tty/ipwireless/tty.c
|
||||
+++ b/drivers/tty/ipwireless/tty.c
|
||||
@@ -176,9 +176,6 @@ void ipwireless_tty_received(struct ipw_tty *tty, unsigned char *data,
|
||||
": %d chars not inserted to flip buffer!\n",
|
||||
length - work);
|
||||
|
||||
- /*
|
||||
- * This may sleep if ->low_latency is set
|
||||
- */
|
||||
if (work)
|
||||
tty_flip_buffer_push(&tty->port);
|
||||
}
|
||||
diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c
|
||||
index 765125d..8ebd9f8 100644
|
||||
--- a/drivers/tty/tty_buffer.c
|
||||
+++ b/drivers/tty/tty_buffer.c
|
||||
@@ -351,14 +351,11 @@ EXPORT_SYMBOL(tty_insert_flip_string_flags);
|
||||
* Takes any pending buffers and transfers their ownership to the
|
||||
* ldisc side of the queue. It then schedules those characters for
|
||||
* processing by the line discipline.
|
||||
- * Note that this function can only be used when the low_latency flag
|
||||
- * is unset. Otherwise the workqueue won't be flushed.
|
||||
*/
|
||||
|
||||
void tty_schedule_flip(struct tty_port *port)
|
||||
{
|
||||
struct tty_bufhead *buf = &port->buf;
|
||||
- WARN_ON(port->low_latency);
|
||||
|
||||
buf->tail->commit = buf->tail->used;
|
||||
schedule_work(&buf->work);
|
||||
@@ -482,17 +479,15 @@ static void flush_to_ldisc(struct work_struct *work)
|
||||
*/
|
||||
void tty_flush_to_ldisc(struct tty_struct *tty)
|
||||
{
|
||||
- if (!tty->port->low_latency)
|
||||
- flush_work(&tty->port->buf.work);
|
||||
+ flush_work(&tty->port->buf.work);
|
||||
}
|
||||
|
||||
/**
|
||||
* tty_flip_buffer_push - terminal
|
||||
* @port: tty port to push
|
||||
*
|
||||
- * Queue a push of the terminal flip buffers to the line discipline. This
|
||||
- * function must not be called from IRQ context if port->low_latency is
|
||||
- * set.
|
||||
+ * Queue a push of the terminal flip buffers to the line discipline.
|
||||
+ * Can be called from IRQ/atomic context.
|
||||
*
|
||||
* In the event of the queue being busy for flipping the work will be
|
||||
* held off and retried later.
|
||||
@@ -500,14 +495,7 @@ void tty_flush_to_ldisc(struct tty_struct *tty)
|
||||
|
||||
void tty_flip_buffer_push(struct tty_port *port)
|
||||
{
|
||||
- struct tty_bufhead *buf = &port->buf;
|
||||
-
|
||||
- buf->tail->commit = buf->tail->used;
|
||||
-
|
||||
- if (port->low_latency)
|
||||
- flush_to_ldisc(&buf->work);
|
||||
- else
|
||||
- schedule_work(&buf->work);
|
||||
+ tty_schedule_flip(port);
|
||||
}
|
||||
EXPORT_SYMBOL(tty_flip_buffer_push);
|
||||
|
||||
diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c
|
||||
index b369292..ad0aca8 100644
|
||||
--- a/drivers/usb/gadget/u_serial.c
|
||||
+++ b/drivers/usb/gadget/u_serial.c
|
||||
@@ -549,8 +549,8 @@ static void gs_rx_push(unsigned long _port)
|
||||
port->read_started--;
|
||||
}
|
||||
|
||||
- /* Push from tty to ldisc; without low_latency set this is handled by
|
||||
- * a workqueue, so we won't get callbacks and can hold port_lock
|
||||
+ /* Push from tty to ldisc; this is handled by a workqueue,
|
||||
+ * so we won't get callbacks and can hold port_lock
|
||||
*/
|
||||
if (do_push)
|
||||
tty_flip_buffer_push(&port->port);
|
||||
diff --git a/include/linux/tty.h b/include/linux/tty.h
|
||||
index 90b4fdc..b90b5c2 100644
|
||||
--- a/include/linux/tty.h
|
||||
+++ b/include/linux/tty.h
|
||||
@@ -208,7 +208,7 @@ struct tty_port {
|
||||
wait_queue_head_t delta_msr_wait; /* Modem status change */
|
||||
unsigned long flags; /* TTY flags ASY_*/
|
||||
unsigned char console:1, /* port is a console */
|
||||
- low_latency:1; /* direct buffer flush */
|
||||
+ low_latency:1; /* optional: tune for latency */
|
||||
struct mutex mutex; /* Locking */
|
||||
struct mutex buf_mutex; /* Buffer alloc lock */
|
||||
unsigned char *xmit_buf; /* Optional buffer */
|
||||
--
|
||||
cgit v0.9.2
|
|
@ -1,49 +0,0 @@
|
|||
Don Zickus <dzickus@redhat.com> writes:
|
||||
|
||||
Some co-workers of mine bought Samsung laptops that had mostly usb3 ports.
|
||||
Those ports did not resume correctly (the driver would timeout communicating
|
||||
and fail). This led to frustration as suspend/resume is a common use for
|
||||
laptops.
|
||||
|
||||
Poking around, I applied the reset on resume quirk to this chipset and the
|
||||
resume started working. Reloading the xhci_hcd module had been the temporary
|
||||
workaround.
|
||||
|
||||
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
|
||||
Reported-by: Don Zickus <dzickus@redhat.com>
|
||||
Cc: stable # 2.6.37
|
||||
---
|
||||
|
||||
Don, please ask your co-worker to apply this patch and test. Let me
|
||||
know if your other co-worker has a different subsystem device ID in his
|
||||
Samsung laptop, when he gets back from vacation. If so, we'll extend it
|
||||
to all Samsung laptops with that particular Renesas host.
|
||||
|
||||
Sarah Sharp
|
||||
|
||||
drivers/usb/host/xhci-pci.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
|
||||
index e42c318a4404..6c03584ac15f 100644
|
||||
--- a/drivers/usb/host/xhci-pci.c
|
||||
+++ b/drivers/usb/host/xhci-pci.c
|
||||
@@ -142,6 +142,11 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
|
||||
"QUIRK: Resetting on resume");
|
||||
xhci->quirks |= XHCI_TRUST_TX_LENGTH;
|
||||
}
|
||||
+ if (pdev->vendor == PCI_VENDOR_ID_RENESAS &&
|
||||
+ pdev->device == 0x0015 &&
|
||||
+ pdev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG &&
|
||||
+ pdev->subsystem_device == 0xc0cd)
|
||||
+ xhci->quirks |= XHCI_RESET_ON_RESUME;
|
||||
if (pdev->vendor == PCI_VENDOR_ID_VIA)
|
||||
xhci->quirks |= XHCI_RESET_ON_RESUME;
|
||||
}
|
||||
--
|
||||
1.8.5.2
|
||||
|
||||
--
|
||||
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
|
||||
the body of a message to majordomo@vger.kernel.org
|
||||
More majordomo info at http://vger.kernel.org/majordomo-info.html
|
Loading…
Reference in New Issue