diff options
author | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 00:31:33 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 00:53:44 +0200 |
commit | cd3411088f6bb4393d79c50b5f7eef3f11a83435 (patch) | |
tree | e1b44fd7c353d9018f489d03f3dea78bc876b94a /recipes-kernel/linux/files | |
download | meta-enea-daisy-140929.tar.gz |
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'recipes-kernel/linux/files')
81 files changed, 2146 insertions, 0 deletions
diff --git a/recipes-kernel/linux/files/0001-net-fib-fib6_add-fix-potential-NULL-pointer-derefere.patch b/recipes-kernel/linux/files/0001-net-fib-fib6_add-fix-potential-NULL-pointer-derefere.patch new file mode 100644 index 0000000..abd4430 --- /dev/null +++ b/recipes-kernel/linux/files/0001-net-fib-fib6_add-fix-potential-NULL-pointer-derefere.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From c5c56513b779cb082d05f63c606bde9321d395fb Mon Sep 17 00:00:00 2001 | ||
2 | From: Sona Sarmadi <sona.sarmadi@enea.com> | ||
3 | Date: Tue, 22 Apr 2014 13:52:58 +0200 | ||
4 | Subject: [PATCH] net: fib: fib6_add: fix potential NULL pointer dereference | ||
5 | |||
6 | When the kernel is compiled with CONFIG_IPV6_SUBTREES, and we return | ||
7 | with an error in fn = fib6_add_1(), then error codes are encoded into | ||
8 | the return pointer e.g. ERR_PTR(-ENOENT). In such an error case, we | ||
9 | write the error code into err and jump to out, hence enter the if(err) | ||
10 | condition. Now, if CONFIG_IPV6_SUBTREES is enabled, we check for: | ||
11 | if (pn != fn && pn->leaf == rt) | ||
12 | ... | ||
13 | if (pn != fn && !pn->leaf && !(pn->fn_flags & RTN_RTINFO)) | ||
14 | ... | ||
15 | Since pn is NULL and fn is f.e. ERR_PTR(-ENOENT), then pn != fn | ||
16 | evaluates to true and causes a NULL-pointer dereference on further | ||
17 | checks on pn. Fix it, by setting both NULL in error case, so that | ||
18 | pn != fn already evaluates to false and no further dereference | ||
19 | takes place. | ||
20 | |||
21 | This was first correctly implemented in 4a287eba2 ("IPv6 routing, | ||
22 | NLM_F_* flag support: REPLACE and EXCL flags support, warn about | ||
23 | missing CREATE flag"), but the bug got later on introduced by | ||
24 | 188c517a0 ("ipv6: return errno pointers consistently for fib6_add_1()"). | ||
25 | |||
26 | Signed-off-by: Daniel Borkmann <dborkman@redhat.com> | ||
27 | Cc: Lin Ming <mlin@ss.pku.edu.cn> | ||
28 | Cc: Matti Vaittinen <matti.vaittinen@nsn.com> | ||
29 | Cc: Hannes Frederic Sowa <hannes@stressinduktion.org> | ||
30 | Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> | ||
31 | Acked-by: Matti Vaittinen <matti.vaittinen@nsn.com> | ||
32 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
33 | Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> | ||
34 | --- | ||
35 | net/ipv6/ip6_fib.c | 1 + | ||
36 | 1 file changed, 1 insertion(+) | ||
37 | |||
38 | diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c | ||
39 | index 5fc9c7a..45562f6 100644 | ||
40 | --- a/net/ipv6/ip6_fib.c | ||
41 | +++ b/net/ipv6/ip6_fib.c | ||
42 | @@ -828,6 +828,7 @@ int fib6_add(struct fib6_node *root, struct rt6_info *rt, struct nl_info *info) | ||
43 | |||
44 | if (IS_ERR(fn)) { | ||
45 | err = PTR_ERR(fn); | ||
46 | + fn = NULL; | ||
47 | goto out; | ||
48 | } | ||
49 | |||
50 | -- | ||
51 | 1.7.10.4 | ||
52 | |||
diff --git a/recipes-kernel/linux/files/0001-sdhci-fix-Timeout-error-messages.patch b/recipes-kernel/linux/files/0001-sdhci-fix-Timeout-error-messages.patch new file mode 100644 index 0000000..9e42dbd --- /dev/null +++ b/recipes-kernel/linux/files/0001-sdhci-fix-Timeout-error-messages.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 34a06b51a1928ed1692da4fce9f2203dfd306648 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Maxin B. John" <maxin.john@enea.com> | ||
3 | Date: Tue, 22 Apr 2014 07:26:59 +0200 | ||
4 | Subject: [PATCH] sdhci: fix Timeout error messages | ||
5 | |||
6 | If the driver doesn't implement proper card detection, | ||
7 | we shouldn't flood the console with Timeout error messages | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Maxin B. John <maxin.john@enea.com> | ||
12 | --- | ||
13 | drivers/mmc/host/sdhci.c | 9 ++++++--- | ||
14 | 1 file changed, 6 insertions(+), 3 deletions(-) | ||
15 | |||
16 | diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c | ||
17 | index 79db375..c77117c 100644 | ||
18 | --- a/drivers/mmc/host/sdhci.c | ||
19 | +++ b/drivers/mmc/host/sdhci.c | ||
20 | @@ -2149,10 +2149,13 @@ static void sdhci_timeout_timer(unsigned long data) | ||
21 | spin_lock_irqsave(&host->lock, flags); | ||
22 | |||
23 | if (host->mrq) { | ||
24 | - pr_err("%s: Timeout waiting for hardware " | ||
25 | + /* If the driver doesn't implement proper card detection, | ||
26 | + we shouldn't flood the console with Timeout error messages */ | ||
27 | + if (!(host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION)) { | ||
28 | + pr_err("%s: Timeout waiting for hardware " | ||
29 | "interrupt.\n", mmc_hostname(host->mmc)); | ||
30 | - sdhci_dumpregs(host); | ||
31 | - | ||
32 | + sdhci_dumpregs(host); | ||
33 | + } | ||
34 | if (host->data) { | ||
35 | host->data->error = -ETIMEDOUT; | ||
36 | sdhci_finish_data(host); | ||
37 | -- | ||
38 | 1.7.10.4 | ||
39 | |||
diff --git a/recipes-kernel/linux/files/Check_correct_namespace_when_spoofing_pid_over_SCM_RIGHTS.patch b/recipes-kernel/linux/files/Check_correct_namespace_when_spoofing_pid_over_SCM_RIGHTS.patch new file mode 100644 index 0000000..79e52c3 --- /dev/null +++ b/recipes-kernel/linux/files/Check_correct_namespace_when_spoofing_pid_over_SCM_RIGHTS.patch | |||
@@ -0,0 +1,13 @@ | |||
1 | diff --git a/net/core/scm.c b/net/core/scm.c | ||
2 | index 03795d0..b4da80b 100644 | ||
3 | --- a/net/core/scm.c | ||
4 | +++ b/net/core/scm.c | ||
5 | @@ -54,7 +54,7 @@ static __inline__ int scm_check_creds(struct ucred *creds) | ||
6 | return -EINVAL; | ||
7 | |||
8 | if ((creds->pid == task_tgid_vnr(current) || | ||
9 | - ns_capable(current->nsproxy->pid_ns->user_ns, CAP_SYS_ADMIN)) && | ||
10 | + ns_capable(task_active_pid_ns(current)->user_ns, CAP_SYS_ADMIN)) && | ||
11 | ((uid_eq(uid, cred->uid) || uid_eq(uid, cred->euid) || | ||
12 | uid_eq(uid, cred->suid)) || nsown_capable(CAP_SETUID)) && | ||
13 | ((gid_eq(gid, cred->gid) || gid_eq(gid, cred->egid) || | ||
diff --git a/recipes-kernel/linux/files/HID_CVE_patches/0001-HID-validate-HID-report-id-size.patch b/recipes-kernel/linux/files/HID_CVE_patches/0001-HID-validate-HID-report-id-size.patch new file mode 100644 index 0000000..faeace9 --- /dev/null +++ b/recipes-kernel/linux/files/HID_CVE_patches/0001-HID-validate-HID-report-id-size.patch | |||
@@ -0,0 +1,80 @@ | |||
1 | From 43622021d2e2b82ea03d883926605bdd0525e1d1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Kees Cook <keescook@chromium.org> | ||
3 | Date: Wed, 28 Aug 2013 22:29:55 +0200 | ||
4 | Subject: [PATCH] HID: validate HID report id size | ||
5 | |||
6 | The "Report ID" field of a HID report is used to build indexes of | ||
7 | reports. The kernel's index of these is limited to 256 entries, so any | ||
8 | malicious device that sets a Report ID greater than 255 will trigger | ||
9 | memory corruption on the host: | ||
10 | |||
11 | [ 1347.156239] BUG: unable to handle kernel paging request at ffff88094958a878 | ||
12 | [ 1347.156261] IP: [<ffffffff813e4da0>] hid_register_report+0x2a/0x8b | ||
13 | |||
14 | CVE-2013-2888 | ||
15 | |||
16 | Signed-off-by: Kees Cook <keescook@chromium.org> | ||
17 | Cc: stable@kernel.org | ||
18 | Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ||
19 | Signed-off-by: Adrian Dudau <adrian.dudau@enea.com> | ||
20 | --- | ||
21 | drivers/hid/hid-core.c | 10 +++++++--- | ||
22 | include/linux/hid.h | 4 +++- | ||
23 | 2 files changed, 10 insertions(+), 4 deletions(-) | ||
24 | |||
25 | diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c | ||
26 | index 36668d1..5ea7d51 100644 | ||
27 | --- a/drivers/hid/hid-core.c | ||
28 | +++ b/drivers/hid/hid-core.c | ||
29 | @@ -63,6 +63,8 @@ struct hid_report *hid_register_report(struct hid_device *device, unsigned type, | ||
30 | struct hid_report_enum *report_enum = device->report_enum + type; | ||
31 | struct hid_report *report; | ||
32 | |||
33 | + if (id >= HID_MAX_IDS) | ||
34 | + return NULL; | ||
35 | if (report_enum->report_id_hash[id]) | ||
36 | return report_enum->report_id_hash[id]; | ||
37 | |||
38 | @@ -404,8 +406,10 @@ static int hid_parser_global(struct hid_parser *parser, struct hid_item *item) | ||
39 | |||
40 | case HID_GLOBAL_ITEM_TAG_REPORT_ID: | ||
41 | parser->global.report_id = item_udata(item); | ||
42 | - if (parser->global.report_id == 0) { | ||
43 | - hid_err(parser->device, "report_id 0 is invalid\n"); | ||
44 | + if (parser->global.report_id == 0 || | ||
45 | + parser->global.report_id >= HID_MAX_IDS) { | ||
46 | + hid_err(parser->device, "report_id %u is invalid\n", | ||
47 | + parser->global.report_id); | ||
48 | return -1; | ||
49 | } | ||
50 | return 0; | ||
51 | @@ -575,7 +579,7 @@ static void hid_close_report(struct hid_device *device) | ||
52 | for (i = 0; i < HID_REPORT_TYPES; i++) { | ||
53 | struct hid_report_enum *report_enum = device->report_enum + i; | ||
54 | |||
55 | - for (j = 0; j < 256; j++) { | ||
56 | + for (j = 0; j < HID_MAX_IDS; j++) { | ||
57 | struct hid_report *report = report_enum->report_id_hash[j]; | ||
58 | if (report) | ||
59 | hid_free_report(report); | ||
60 | diff --git a/include/linux/hid.h b/include/linux/hid.h | ||
61 | index 0c48991..ff545cc 100644 | ||
62 | --- a/include/linux/hid.h | ||
63 | +++ b/include/linux/hid.h | ||
64 | @@ -393,10 +393,12 @@ struct hid_report { | ||
65 | struct hid_device *device; /* associated device */ | ||
66 | }; | ||
67 | |||
68 | +#define HID_MAX_IDS 256 | ||
69 | + | ||
70 | struct hid_report_enum { | ||
71 | unsigned numbered; | ||
72 | struct list_head report_list; | ||
73 | - struct hid_report *report_id_hash[256]; | ||
74 | + struct hid_report *report_id_hash[HID_MAX_IDS]; | ||
75 | }; | ||
76 | |||
77 | #define HID_REPORT_TYPES 3 | ||
78 | -- | ||
79 | 1.7.9.5 | ||
80 | |||
diff --git a/recipes-kernel/linux/files/HID_CVE_patches/0002-HID-provide-a-helper-for-validating-hid-reports.patch b/recipes-kernel/linux/files/HID_CVE_patches/0002-HID-provide-a-helper-for-validating-hid-reports.patch new file mode 100644 index 0000000..860d710 --- /dev/null +++ b/recipes-kernel/linux/files/HID_CVE_patches/0002-HID-provide-a-helper-for-validating-hid-reports.patch | |||
@@ -0,0 +1,107 @@ | |||
1 | From 331415ff16a12147d57d5c953f3a961b7ede348b Mon Sep 17 00:00:00 2001 | ||
2 | From: Kees Cook <keescook@chromium.org> | ||
3 | Date: Wed, 11 Sep 2013 21:56:50 +0200 | ||
4 | Subject: [PATCH] HID: provide a helper for validating hid reports | ||
5 | |||
6 | Many drivers need to validate the characteristics of their HID report | ||
7 | during initialization to avoid misusing the reports. This adds a common | ||
8 | helper to perform validation of the report exisitng, the field existing, | ||
9 | and the expected number of values within the field. | ||
10 | |||
11 | Signed-off-by: Kees Cook <keescook@chromium.org> | ||
12 | Cc: stable@vger.kernel.org | ||
13 | Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> | ||
14 | Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ||
15 | Signed-off-by: Adrian Dudau <adrian.dudau@enea.com> | ||
16 | --- | ||
17 | drivers/hid/hid-core.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ | ||
18 | include/linux/hid.h | 4 ++++ | ||
19 | 2 files changed, 62 insertions(+) | ||
20 | |||
21 | diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c | ||
22 | index ae88a97..be52c06 100644 | ||
23 | --- a/drivers/hid/hid-core.c | ||
24 | +++ b/drivers/hid/hid-core.c | ||
25 | @@ -801,6 +801,64 @@ int hid_parse_report(struct hid_device *hid, __u8 *start, unsigned size) | ||
26 | } | ||
27 | EXPORT_SYMBOL_GPL(hid_parse_report); | ||
28 | |||
29 | +static const char * const hid_report_names[] = { | ||
30 | + "HID_INPUT_REPORT", | ||
31 | + "HID_OUTPUT_REPORT", | ||
32 | + "HID_FEATURE_REPORT", | ||
33 | +}; | ||
34 | +/** | ||
35 | + * hid_validate_values - validate existing device report's value indexes | ||
36 | + * | ||
37 | + * @device: hid device | ||
38 | + * @type: which report type to examine | ||
39 | + * @id: which report ID to examine (0 for first) | ||
40 | + * @field_index: which report field to examine | ||
41 | + * @report_counts: expected number of values | ||
42 | + * | ||
43 | + * Validate the number of values in a given field of a given report, after | ||
44 | + * parsing. | ||
45 | + */ | ||
46 | +struct hid_report *hid_validate_values(struct hid_device *hid, | ||
47 | + unsigned int type, unsigned int id, | ||
48 | + unsigned int field_index, | ||
49 | + unsigned int report_counts) | ||
50 | +{ | ||
51 | + struct hid_report *report; | ||
52 | + | ||
53 | + if (type > HID_FEATURE_REPORT) { | ||
54 | + hid_err(hid, "invalid HID report type %u\n", type); | ||
55 | + return NULL; | ||
56 | + } | ||
57 | + | ||
58 | + if (id >= HID_MAX_IDS) { | ||
59 | + hid_err(hid, "invalid HID report id %u\n", id); | ||
60 | + return NULL; | ||
61 | + } | ||
62 | + | ||
63 | + /* | ||
64 | + * Explicitly not using hid_get_report() here since it depends on | ||
65 | + * ->numbered being checked, which may not always be the case when | ||
66 | + * drivers go to access report values. | ||
67 | + */ | ||
68 | + report = hid->report_enum[type].report_id_hash[id]; | ||
69 | + if (!report) { | ||
70 | + hid_err(hid, "missing %s %u\n", hid_report_names[type], id); | ||
71 | + return NULL; | ||
72 | + } | ||
73 | + if (report->maxfield <= field_index) { | ||
74 | + hid_err(hid, "not enough fields in %s %u\n", | ||
75 | + hid_report_names[type], id); | ||
76 | + return NULL; | ||
77 | + } | ||
78 | + if (report->field[field_index]->report_count < report_counts) { | ||
79 | + hid_err(hid, "not enough values in %s %u field %u\n", | ||
80 | + hid_report_names[type], id, field_index); | ||
81 | + return NULL; | ||
82 | + } | ||
83 | + return report; | ||
84 | +} | ||
85 | +EXPORT_SYMBOL_GPL(hid_validate_values); | ||
86 | + | ||
87 | /** | ||
88 | * hid_open_report - open a driver-specific device report | ||
89 | * | ||
90 | diff --git a/include/linux/hid.h b/include/linux/hid.h | ||
91 | index ee1ffc5..31b9d29 100644 | ||
92 | --- a/include/linux/hid.h | ||
93 | +++ b/include/linux/hid.h | ||
94 | @@ -756,6 +756,10 @@ u8 *hid_alloc_report_buf(struct hid_report *report, gfp_t flags); | ||
95 | struct hid_device *hid_allocate_device(void); | ||
96 | struct hid_report *hid_register_report(struct hid_device *device, unsigned type, unsigned id); | ||
97 | int hid_parse_report(struct hid_device *hid, __u8 *start, unsigned size); | ||
98 | +struct hid_report *hid_validate_values(struct hid_device *hid, | ||
99 | + unsigned int type, unsigned int id, | ||
100 | + unsigned int field_index, | ||
101 | + unsigned int report_counts); | ||
102 | int hid_open_report(struct hid_device *device); | ||
103 | int hid_check_keys_pressed(struct hid_device *hid); | ||
104 | int hid_connect(struct hid_device *hid, unsigned int connect_mask); | ||
105 | -- | ||
106 | 1.7.9.5 | ||
107 | |||
diff --git a/recipes-kernel/linux/files/HID_CVE_patches/0003-HID-zeroplus-validate-output-report-details.patch b/recipes-kernel/linux/files/HID_CVE_patches/0003-HID-zeroplus-validate-output-report-details.patch new file mode 100644 index 0000000..a2641cf --- /dev/null +++ b/recipes-kernel/linux/files/HID_CVE_patches/0003-HID-zeroplus-validate-output-report-details.patch | |||
@@ -0,0 +1,59 @@ | |||
1 | From 78214e81a1bf43740ce89bb5efda78eac2f8ef83 Mon Sep 17 00:00:00 2001 | ||
2 | From: Kees Cook <keescook@chromium.org> | ||
3 | Date: Wed, 11 Sep 2013 21:56:51 +0200 | ||
4 | Subject: [PATCH] HID: zeroplus: validate output report details | ||
5 | |||
6 | The zeroplus HID driver was not checking the size of allocated values | ||
7 | in fields it used. A HID device could send a malicious output report | ||
8 | that would cause the driver to write beyond the output report allocation | ||
9 | during initialization, causing a heap overflow: | ||
10 | |||
11 | [ 1442.728680] usb 1-1: New USB device found, idVendor=0c12, idProduct=0005 | ||
12 | ... | ||
13 | [ 1466.243173] BUG kmalloc-192 (Tainted: G W ): Redzone overwritten | ||
14 | |||
15 | CVE-2013-2889 | ||
16 | |||
17 | Signed-off-by: Kees Cook <keescook@chromium.org> | ||
18 | Cc: stable@vger.kernel.org | ||
19 | Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> | ||
20 | Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ||
21 | Signed-off-by: Adrian Dudau <adrian.dudau@enea.com> | ||
22 | --- | ||
23 | drivers/hid/hid-zpff.c | 18 +++++------------- | ||
24 | 1 file changed, 5 insertions(+), 13 deletions(-) | ||
25 | |||
26 | diff --git a/drivers/hid/hid-zpff.c b/drivers/hid/hid-zpff.c | ||
27 | index 6ec28a3..a29756c 100644 | ||
28 | --- a/drivers/hid/hid-zpff.c | ||
29 | +++ b/drivers/hid/hid-zpff.c | ||
30 | @@ -68,21 +68,13 @@ static int zpff_init(struct hid_device *hid) | ||
31 | struct hid_report *report; | ||
32 | struct hid_input *hidinput = list_entry(hid->inputs.next, | ||
33 | struct hid_input, list); | ||
34 | - struct list_head *report_list = | ||
35 | - &hid->report_enum[HID_OUTPUT_REPORT].report_list; | ||
36 | struct input_dev *dev = hidinput->input; | ||
37 | - int error; | ||
38 | + int i, error; | ||
39 | |||
40 | - if (list_empty(report_list)) { | ||
41 | - hid_err(hid, "no output report found\n"); | ||
42 | - return -ENODEV; | ||
43 | - } | ||
44 | - | ||
45 | - report = list_entry(report_list->next, struct hid_report, list); | ||
46 | - | ||
47 | - if (report->maxfield < 4) { | ||
48 | - hid_err(hid, "not enough fields in report\n"); | ||
49 | - return -ENODEV; | ||
50 | + for (i = 0; i < 4; i++) { | ||
51 | + report = hid_validate_values(hid, HID_OUTPUT_REPORT, 0, i, 1); | ||
52 | + if (!report) | ||
53 | + return -ENODEV; | ||
54 | } | ||
55 | |||
56 | zpff = kzalloc(sizeof(struct zpff_device), GFP_KERNEL); | ||
57 | -- | ||
58 | 1.7.9.5 | ||
59 | |||
diff --git a/recipes-kernel/linux/files/HID_CVE_patches/0004-HID-sony-validate-HID-output-report-details.patch b/recipes-kernel/linux/files/HID_CVE_patches/0004-HID-sony-validate-HID-output-report-details.patch new file mode 100644 index 0000000..3a4e843 --- /dev/null +++ b/recipes-kernel/linux/files/HID_CVE_patches/0004-HID-sony-validate-HID-output-report-details.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 9446edb9a1740989cf6c20daf7510fb9a23be14a Mon Sep 17 00:00:00 2001 | ||
2 | From: Kees Cook <keescook@chromium.org> | ||
3 | Date: Wed, 11 Sep 2013 21:56:52 +0200 | ||
4 | Subject: [PATCH] HID: sony: validate HID output report details | ||
5 | |||
6 | This driver must validate the availability of the HID output report and | ||
7 | its size before it can write LED states via buzz_set_leds(). This stops | ||
8 | a heap overflow that is possible if a device provides a malicious HID | ||
9 | output report: | ||
10 | |||
11 | [ 108.171280] usb 1-1: New USB device found, idVendor=054c, idProduct=0002 | ||
12 | ... | ||
13 | [ 117.507877] BUG kmalloc-192 (Not tainted): Redzone overwritten | ||
14 | |||
15 | CVE-2013-2890 | ||
16 | |||
17 | Signed-off-by: Kees Cook <keescook@chromium.org> | ||
18 | Cc: stable@vger.kernel.org #3.11 | ||
19 | Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> | ||
20 | Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ||
21 | Signed-off-by: Adrian Dudau <adrian.dudau@enea.com> | ||
22 | --- | ||
23 | drivers/hid/hid-sony.c | 4 ++++ | ||
24 | 1 file changed, 4 insertions(+) | ||
25 | |||
26 | diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c | ||
27 | index 30dbb6b..b18320d 100644 | ||
28 | --- a/drivers/hid/hid-sony.c | ||
29 | +++ b/drivers/hid/hid-sony.c | ||
30 | @@ -537,6 +537,10 @@ static int buzz_init(struct hid_device *hdev) | ||
31 | drv_data = hid_get_drvdata(hdev); | ||
32 | BUG_ON(!(drv_data->quirks & BUZZ_CONTROLLER)); | ||
33 | |||
34 | + /* Validate expected report characteristics. */ | ||
35 | + if (!hid_validate_values(hdev, HID_OUTPUT_REPORT, 0, 0, 7)) | ||
36 | + return -ENODEV; | ||
37 | + | ||
38 | buzz = kzalloc(sizeof(*buzz), GFP_KERNEL); | ||
39 | if (!buzz) { | ||
40 | hid_err(hdev, "Insufficient memory, cannot allocate driver data\n"); | ||
41 | -- | ||
42 | 1.7.9.5 | ||
43 | |||
diff --git a/recipes-kernel/linux/files/HID_CVE_patches/0005-HID-steelseries-validate-output-report-details.patch b/recipes-kernel/linux/files/HID_CVE_patches/0005-HID-steelseries-validate-output-report-details.patch new file mode 100644 index 0000000..e4eadff --- /dev/null +++ b/recipes-kernel/linux/files/HID_CVE_patches/0005-HID-steelseries-validate-output-report-details.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 41df7f6d43723deb7364340b44bc5d94bf717456 Mon Sep 17 00:00:00 2001 | ||
2 | From: Kees Cook <keescook@chromium.org> | ||
3 | Date: Wed, 11 Sep 2013 21:56:53 +0200 | ||
4 | Subject: [PATCH] HID: steelseries: validate output report details | ||
5 | |||
6 | A HID device could send a malicious output report that would cause the | ||
7 | steelseries HID driver to write beyond the output report allocation | ||
8 | during initialization, causing a heap overflow: | ||
9 | |||
10 | [ 167.981534] usb 1-1: New USB device found, idVendor=1038, idProduct=1410 | ||
11 | ... | ||
12 | [ 182.050547] BUG kmalloc-256 (Tainted: G W ): Redzone overwritten | ||
13 | |||
14 | CVE-2013-2891 | ||
15 | |||
16 | Signed-off-by: Kees Cook <keescook@chromium.org> | ||
17 | Cc: stable@vger.kernel.org | ||
18 | Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> | ||
19 | Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ||
20 | Signed-off-by: Adrian Dudau <adrian.dudau@enea.com> | ||
21 | --- | ||
22 | drivers/hid/hid-steelseries.c | 5 +++++ | ||
23 | 1 file changed, 5 insertions(+) | ||
24 | |||
25 | diff --git a/drivers/hid/hid-steelseries.c b/drivers/hid/hid-steelseries.c | ||
26 | index d164911..29f328f 100644 | ||
27 | --- a/drivers/hid/hid-steelseries.c | ||
28 | +++ b/drivers/hid/hid-steelseries.c | ||
29 | @@ -249,6 +249,11 @@ static int steelseries_srws1_probe(struct hid_device *hdev, | ||
30 | goto err_free; | ||
31 | } | ||
32 | |||
33 | + if (!hid_validate_values(hdev, HID_OUTPUT_REPORT, 0, 0, 16)) { | ||
34 | + ret = -ENODEV; | ||
35 | + goto err_free; | ||
36 | + } | ||
37 | + | ||
38 | ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT); | ||
39 | if (ret) { | ||
40 | hid_err(hdev, "hw start failed\n"); | ||
41 | -- | ||
42 | 1.7.9.5 | ||
43 | |||
diff --git a/recipes-kernel/linux/files/HID_CVE_patches/0006-HID-pantherlord-validate-output-report-details.patch b/recipes-kernel/linux/files/HID_CVE_patches/0006-HID-pantherlord-validate-output-report-details.patch new file mode 100644 index 0000000..15cf09b --- /dev/null +++ b/recipes-kernel/linux/files/HID_CVE_patches/0006-HID-pantherlord-validate-output-report-details.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From 412f30105ec6735224535791eed5cdc02888ecb4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Kees Cook <keescook@chromium.org> | ||
3 | Date: Wed, 28 Aug 2013 22:30:49 +0200 | ||
4 | Subject: [PATCH] HID: pantherlord: validate output report details | ||
5 | |||
6 | A HID device could send a malicious output report that would cause the | ||
7 | pantherlord HID driver to write beyond the output report allocation | ||
8 | during initialization, causing a heap overflow: | ||
9 | |||
10 | [ 310.939483] usb 1-1: New USB device found, idVendor=0e8f, idProduct=0003 | ||
11 | ... | ||
12 | [ 315.980774] BUG kmalloc-192 (Tainted: G W ): Redzone overwritten | ||
13 | |||
14 | CVE-2013-2892 | ||
15 | |||
16 | Signed-off-by: Kees Cook <keescook@chromium.org> | ||
17 | Cc: stable@kernel.org | ||
18 | Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ||
19 | Signed-off-by: Adrian Dudau <adrian.dudau@enea.com> | ||
20 | --- | ||
21 | drivers/hid/hid-pl.c | 10 ++++++++-- | ||
22 | 1 file changed, 8 insertions(+), 2 deletions(-) | ||
23 | |||
24 | diff --git a/drivers/hid/hid-pl.c b/drivers/hid/hid-pl.c | ||
25 | index d29112f..2dcd7d9 100644 | ||
26 | --- a/drivers/hid/hid-pl.c | ||
27 | +++ b/drivers/hid/hid-pl.c | ||
28 | @@ -132,8 +132,14 @@ static int plff_init(struct hid_device *hid) | ||
29 | strong = &report->field[0]->value[2]; | ||
30 | weak = &report->field[0]->value[3]; | ||
31 | debug("detected single-field device"); | ||
32 | - } else if (report->maxfield >= 4 && report->field[0]->maxusage == 1 && | ||
33 | - report->field[0]->usage[0].hid == (HID_UP_LED | 0x43)) { | ||
34 | + } else if (report->field[0]->maxusage == 1 && | ||
35 | + report->field[0]->usage[0].hid == | ||
36 | + (HID_UP_LED | 0x43) && | ||
37 | + report->maxfield >= 4 && | ||
38 | + report->field[0]->report_count >= 1 && | ||
39 | + report->field[1]->report_count >= 1 && | ||
40 | + report->field[2]->report_count >= 1 && | ||
41 | + report->field[3]->report_count >= 1) { | ||
42 | report->field[0]->value[0] = 0x00; | ||
43 | report->field[1]->value[0] = 0x00; | ||
44 | strong = &report->field[2]->value[0]; | ||
45 | -- | ||
46 | 1.7.9.5 | ||
47 | |||
diff --git a/recipes-kernel/linux/files/HID_CVE_patches/0007-HID-LG-validate-HID-output-report-details.patch b/recipes-kernel/linux/files/HID_CVE_patches/0007-HID-LG-validate-HID-output-report-details.patch new file mode 100644 index 0000000..9376c42 --- /dev/null +++ b/recipes-kernel/linux/files/HID_CVE_patches/0007-HID-LG-validate-HID-output-report-details.patch | |||
@@ -0,0 +1,195 @@ | |||
1 | From 0fb6bd06e06792469acc15bbe427361b56ada528 Mon Sep 17 00:00:00 2001 | ||
2 | From: Kees Cook <keescook@chromium.org> | ||
3 | Date: Wed, 11 Sep 2013 21:56:54 +0200 | ||
4 | Subject: [PATCH] HID: LG: validate HID output report details | ||
5 | |||
6 | A HID device could send a malicious output report that would cause the | ||
7 | lg, lg3, and lg4 HID drivers to write beyond the output report allocation | ||
8 | during an event, causing a heap overflow: | ||
9 | |||
10 | [ 325.245240] usb 1-1: New USB device found, idVendor=046d, idProduct=c287 | ||
11 | ... | ||
12 | [ 414.518960] BUG kmalloc-4096 (Not tainted): Redzone overwritten | ||
13 | |||
14 | Additionally, while lg2 did correctly validate the report details, it was | ||
15 | cleaned up and shortened. | ||
16 | |||
17 | CVE-2013-2893 | ||
18 | |||
19 | Signed-off-by: Kees Cook <keescook@chromium.org> | ||
20 | Cc: stable@vger.kernel.org | ||
21 | Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> | ||
22 | Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ||
23 | Signed-off-by: Adrian Dudau <adrian.dudau@enea.com> | ||
24 | --- | ||
25 | drivers/hid/hid-lg2ff.c | 19 +++---------------- | ||
26 | drivers/hid/hid-lg3ff.c | 29 ++++++----------------------- | ||
27 | drivers/hid/hid-lg4ff.c | 20 +------------------- | ||
28 | drivers/hid/hid-lgff.c | 17 ++--------------- | ||
29 | 4 files changed, 12 insertions(+), 73 deletions(-) | ||
30 | |||
31 | diff --git a/drivers/hid/hid-lg2ff.c b/drivers/hid/hid-lg2ff.c | ||
32 | index b3cd150..1a42eaa 100644 | ||
33 | --- a/drivers/hid/hid-lg2ff.c | ||
34 | +++ b/drivers/hid/hid-lg2ff.c | ||
35 | @@ -64,26 +64,13 @@ int lg2ff_init(struct hid_device *hid) | ||
36 | struct hid_report *report; | ||
37 | struct hid_input *hidinput = list_entry(hid->inputs.next, | ||
38 | struct hid_input, list); | ||
39 | - struct list_head *report_list = | ||
40 | - &hid->report_enum[HID_OUTPUT_REPORT].report_list; | ||
41 | struct input_dev *dev = hidinput->input; | ||
42 | int error; | ||
43 | |||
44 | - if (list_empty(report_list)) { | ||
45 | - hid_err(hid, "no output report found\n"); | ||
46 | + /* Check that the report looks ok */ | ||
47 | + report = hid_validate_values(hid, HID_OUTPUT_REPORT, 0, 0, 7); | ||
48 | + if (!report) | ||
49 | return -ENODEV; | ||
50 | - } | ||
51 | - | ||
52 | - report = list_entry(report_list->next, struct hid_report, list); | ||
53 | - | ||
54 | - if (report->maxfield < 1) { | ||
55 | - hid_err(hid, "output report is empty\n"); | ||
56 | - return -ENODEV; | ||
57 | - } | ||
58 | - if (report->field[0]->report_count < 7) { | ||
59 | - hid_err(hid, "not enough values in the field\n"); | ||
60 | - return -ENODEV; | ||
61 | - } | ||
62 | |||
63 | lg2ff = kmalloc(sizeof(struct lg2ff_device), GFP_KERNEL); | ||
64 | if (!lg2ff) | ||
65 | diff --git a/drivers/hid/hid-lg3ff.c b/drivers/hid/hid-lg3ff.c | ||
66 | index e52f181..8c2da18 100644 | ||
67 | --- a/drivers/hid/hid-lg3ff.c | ||
68 | +++ b/drivers/hid/hid-lg3ff.c | ||
69 | @@ -66,10 +66,11 @@ static int hid_lg3ff_play(struct input_dev *dev, void *data, | ||
70 | int x, y; | ||
71 | |||
72 | /* | ||
73 | - * Maxusage should always be 63 (maximum fields) | ||
74 | - * likely a better way to ensure this data is clean | ||
75 | + * Available values in the field should always be 63, but we only use up to | ||
76 | + * 35. Instead, clear the entire area, however big it is. | ||
77 | */ | ||
78 | - memset(report->field[0]->value, 0, sizeof(__s32)*report->field[0]->maxusage); | ||
79 | + memset(report->field[0]->value, 0, | ||
80 | + sizeof(__s32) * report->field[0]->report_count); | ||
81 | |||
82 | switch (effect->type) { | ||
83 | case FF_CONSTANT: | ||
84 | @@ -129,32 +130,14 @@ static const signed short ff3_joystick_ac[] = { | ||
85 | int lg3ff_init(struct hid_device *hid) | ||
86 | { | ||
87 | struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list); | ||
88 | - struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list; | ||
89 | struct input_dev *dev = hidinput->input; | ||
90 | - struct hid_report *report; | ||
91 | - struct hid_field *field; | ||
92 | const signed short *ff_bits = ff3_joystick_ac; | ||
93 | int error; | ||
94 | int i; | ||
95 | |||
96 | - /* Find the report to use */ | ||
97 | - if (list_empty(report_list)) { | ||
98 | - hid_err(hid, "No output report found\n"); | ||
99 | - return -1; | ||
100 | - } | ||
101 | - | ||
102 | /* Check that the report looks ok */ | ||
103 | - report = list_entry(report_list->next, struct hid_report, list); | ||
104 | - if (!report) { | ||
105 | - hid_err(hid, "NULL output report\n"); | ||
106 | - return -1; | ||
107 | - } | ||
108 | - | ||
109 | - field = report->field[0]; | ||
110 | - if (!field) { | ||
111 | - hid_err(hid, "NULL field\n"); | ||
112 | - return -1; | ||
113 | - } | ||
114 | + if (!hid_validate_values(hid, HID_OUTPUT_REPORT, 0, 0, 35)) | ||
115 | + return -ENODEV; | ||
116 | |||
117 | /* Assume single fixed device G940 */ | ||
118 | for (i = 0; ff_bits[i] >= 0; i++) | ||
119 | diff --git a/drivers/hid/hid-lg4ff.c b/drivers/hid/hid-lg4ff.c | ||
120 | index 0ddae2a..8782fe1 100644 | ||
121 | --- a/drivers/hid/hid-lg4ff.c | ||
122 | +++ b/drivers/hid/hid-lg4ff.c | ||
123 | @@ -484,34 +484,16 @@ static enum led_brightness lg4ff_led_get_brightness(struct led_classdev *led_cde | ||
124 | int lg4ff_init(struct hid_device *hid) | ||
125 | { | ||
126 | struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list); | ||
127 | - struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list; | ||
128 | struct input_dev *dev = hidinput->input; | ||
129 | - struct hid_report *report; | ||
130 | - struct hid_field *field; | ||
131 | struct lg4ff_device_entry *entry; | ||
132 | struct lg_drv_data *drv_data; | ||
133 | struct usb_device_descriptor *udesc; | ||
134 | int error, i, j; | ||
135 | __u16 bcdDevice, rev_maj, rev_min; | ||
136 | |||
137 | - /* Find the report to use */ | ||
138 | - if (list_empty(report_list)) { | ||
139 | - hid_err(hid, "No output report found\n"); | ||
140 | - return -1; | ||
141 | - } | ||
142 | - | ||
143 | /* Check that the report looks ok */ | ||
144 | - report = list_entry(report_list->next, struct hid_report, list); | ||
145 | - if (!report) { | ||
146 | - hid_err(hid, "NULL output report\n"); | ||
147 | + if (!hid_validate_values(hid, HID_OUTPUT_REPORT, 0, 0, 7)) | ||
148 | return -1; | ||
149 | - } | ||
150 | - | ||
151 | - field = report->field[0]; | ||
152 | - if (!field) { | ||
153 | - hid_err(hid, "NULL field\n"); | ||
154 | - return -1; | ||
155 | - } | ||
156 | |||
157 | /* Check what wheel has been connected */ | ||
158 | for (i = 0; i < ARRAY_SIZE(lg4ff_devices); i++) { | ||
159 | diff --git a/drivers/hid/hid-lgff.c b/drivers/hid/hid-lgff.c | ||
160 | index d7ea8c8..e1394af 100644 | ||
161 | --- a/drivers/hid/hid-lgff.c | ||
162 | +++ b/drivers/hid/hid-lgff.c | ||
163 | @@ -128,27 +128,14 @@ static void hid_lgff_set_autocenter(struct input_dev *dev, u16 magnitude) | ||
164 | int lgff_init(struct hid_device* hid) | ||
165 | { | ||
166 | struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list); | ||
167 | - struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list; | ||
168 | struct input_dev *dev = hidinput->input; | ||
169 | - struct hid_report *report; | ||
170 | - struct hid_field *field; | ||
171 | const signed short *ff_bits = ff_joystick; | ||
172 | int error; | ||
173 | int i; | ||
174 | |||
175 | - /* Find the report to use */ | ||
176 | - if (list_empty(report_list)) { | ||
177 | - hid_err(hid, "No output report found\n"); | ||
178 | - return -1; | ||
179 | - } | ||
180 | - | ||
181 | /* Check that the report looks ok */ | ||
182 | - report = list_entry(report_list->next, struct hid_report, list); | ||
183 | - field = report->field[0]; | ||
184 | - if (!field) { | ||
185 | - hid_err(hid, "NULL field\n"); | ||
186 | - return -1; | ||
187 | - } | ||
188 | + if (!hid_validate_values(hid, HID_OUTPUT_REPORT, 0, 0, 7)) | ||
189 | + return -ENODEV; | ||
190 | |||
191 | for (i = 0; i < ARRAY_SIZE(devices); i++) { | ||
192 | if (dev->id.vendor == devices[i].idVendor && | ||
193 | -- | ||
194 | 1.7.9.5 | ||
195 | |||
diff --git a/recipes-kernel/linux/files/HID_CVE_patches/0008-HID-lenovo-tpkbd-validate-output-report-details.patch b/recipes-kernel/linux/files/HID_CVE_patches/0008-HID-lenovo-tpkbd-validate-output-report-details.patch new file mode 100644 index 0000000..1c53d77 --- /dev/null +++ b/recipes-kernel/linux/files/HID_CVE_patches/0008-HID-lenovo-tpkbd-validate-output-report-details.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From 0a9cd0a80ac559357c6a90d26c55270ed752aa26 Mon Sep 17 00:00:00 2001 | ||
2 | From: Kees Cook <keescook@chromium.org> | ||
3 | Date: Wed, 11 Sep 2013 21:56:55 +0200 | ||
4 | Subject: [PATCH] HID: lenovo-tpkbd: validate output report details | ||
5 | |||
6 | A HID device could send a malicious output report that would cause the | ||
7 | lenovo-tpkbd HID driver to write just beyond the output report allocation | ||
8 | during initialization, causing a heap overflow: | ||
9 | |||
10 | [ 76.109807] usb 1-1: New USB device found, idVendor=17ef, idProduct=6009 | ||
11 | ... | ||
12 | [ 80.462540] BUG kmalloc-192 (Tainted: G W ): Redzone overwritten | ||
13 | |||
14 | CVE-2013-2894 | ||
15 | |||
16 | Signed-off-by: Kees Cook <keescook@chromium.org> | ||
17 | Cc: stable@vger.kernel.org | ||
18 | Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> | ||
19 | Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ||
20 | Signed-off-by: Adrian Dudau <adrian.dudau@enea.com> | ||
21 | --- | ||
22 | drivers/hid/hid-lenovo-tpkbd.c | 10 +++++++++- | ||
23 | 1 file changed, 9 insertions(+), 1 deletion(-) | ||
24 | |||
25 | diff --git a/drivers/hid/hid-lenovo-tpkbd.c b/drivers/hid/hid-lenovo-tpkbd.c | ||
26 | index 07837f5..762d988 100644 | ||
27 | --- a/drivers/hid/hid-lenovo-tpkbd.c | ||
28 | +++ b/drivers/hid/hid-lenovo-tpkbd.c | ||
29 | @@ -339,7 +339,15 @@ static int tpkbd_probe_tp(struct hid_device *hdev) | ||
30 | struct tpkbd_data_pointer *data_pointer; | ||
31 | size_t name_sz = strlen(dev_name(dev)) + 16; | ||
32 | char *name_mute, *name_micmute; | ||
33 | - int ret; | ||
34 | + int i, ret; | ||
35 | + | ||
36 | + /* Validate required reports. */ | ||
37 | + for (i = 0; i < 4; i++) { | ||
38 | + if (!hid_validate_values(hdev, HID_FEATURE_REPORT, 4, i, 1)) | ||
39 | + return -ENODEV; | ||
40 | + } | ||
41 | + if (!hid_validate_values(hdev, HID_OUTPUT_REPORT, 3, 0, 2)) | ||
42 | + return -ENODEV; | ||
43 | |||
44 | if (sysfs_create_group(&hdev->dev.kobj, | ||
45 | &tpkbd_attr_group_pointer)) { | ||
46 | -- | ||
47 | 1.7.9.5 | ||
48 | |||
diff --git a/recipes-kernel/linux/files/HID_CVE_patches/0009-HID-logitech-dj-validate-output-report-details.patch b/recipes-kernel/linux/files/HID_CVE_patches/0009-HID-logitech-dj-validate-output-report-details.patch new file mode 100644 index 0000000..a249c54 --- /dev/null +++ b/recipes-kernel/linux/files/HID_CVE_patches/0009-HID-logitech-dj-validate-output-report-details.patch | |||
@@ -0,0 +1,63 @@ | |||
1 | From 297502abb32e225fb23801fcdb0e4f6f8e17099a Mon Sep 17 00:00:00 2001 | ||
2 | From: Kees Cook <keescook@chromium.org> | ||
3 | Date: Wed, 11 Sep 2013 21:56:56 +0200 | ||
4 | Subject: [PATCH] HID: logitech-dj: validate output report details | ||
5 | |||
6 | A HID device could send a malicious output report that would cause the | ||
7 | logitech-dj HID driver to leak kernel memory contents to the device, or | ||
8 | trigger a NULL dereference during initialization: | ||
9 | |||
10 | [ 304.424553] usb 1-1: New USB device found, idVendor=046d, idProduct=c52b | ||
11 | ... | ||
12 | [ 304.780467] BUG: unable to handle kernel NULL pointer dereference at 0000000000000028 | ||
13 | [ 304.781409] IP: [<ffffffff815d50aa>] logi_dj_recv_send_report.isra.11+0x1a/0x90 | ||
14 | |||
15 | CVE-2013-2895 | ||
16 | |||
17 | Signed-off-by: Kees Cook <keescook@chromium.org> | ||
18 | Cc: stable@vger.kernel.org | ||
19 | Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> | ||
20 | Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ||
21 | Signed-off-by: Adrian Dudau <adrian.dudau@enea.com> | ||
22 | --- | ||
23 | drivers/hid/hid-logitech-dj.c | 10 ++++++++-- | ||
24 | 1 file changed, 8 insertions(+), 2 deletions(-) | ||
25 | |||
26 | diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c | ||
27 | index 7800b14..2e53024 100644 | ||
28 | --- a/drivers/hid/hid-logitech-dj.c | ||
29 | +++ b/drivers/hid/hid-logitech-dj.c | ||
30 | @@ -461,7 +461,7 @@ static int logi_dj_recv_send_report(struct dj_receiver_dev *djrcv_dev, | ||
31 | struct hid_report *report; | ||
32 | struct hid_report_enum *output_report_enum; | ||
33 | u8 *data = (u8 *)(&dj_report->device_index); | ||
34 | - int i; | ||
35 | + unsigned int i; | ||
36 | |||
37 | output_report_enum = &hdev->report_enum[HID_OUTPUT_REPORT]; | ||
38 | report = output_report_enum->report_id_hash[REPORT_ID_DJ_SHORT]; | ||
39 | @@ -471,7 +471,7 @@ static int logi_dj_recv_send_report(struct dj_receiver_dev *djrcv_dev, | ||
40 | return -ENODEV; | ||
41 | } | ||
42 | |||
43 | - for (i = 0; i < report->field[0]->report_count; i++) | ||
44 | + for (i = 0; i < DJREPORT_SHORT_LENGTH - 1; i++) | ||
45 | report->field[0]->value[i] = data[i]; | ||
46 | |||
47 | hid_hw_request(hdev, report, HID_REQ_SET_REPORT); | ||
48 | @@ -791,6 +791,12 @@ static int logi_dj_probe(struct hid_device *hdev, | ||
49 | goto hid_parse_fail; | ||
50 | } | ||
51 | |||
52 | + if (!hid_validate_values(hdev, HID_OUTPUT_REPORT, REPORT_ID_DJ_SHORT, | ||
53 | + 0, DJREPORT_SHORT_LENGTH - 1)) { | ||
54 | + retval = -ENODEV; | ||
55 | + goto hid_parse_fail; | ||
56 | + } | ||
57 | + | ||
58 | /* Starts the usb device and connects to upper interfaces hiddev and | ||
59 | * hidraw */ | ||
60 | retval = hid_hw_start(hdev, HID_CONNECT_DEFAULT); | ||
61 | -- | ||
62 | 1.7.9.5 | ||
63 | |||
diff --git a/recipes-kernel/linux/files/HID_CVE_patches/0010-HID-ntrig-validate-feature-report-details.patch b/recipes-kernel/linux/files/HID_CVE_patches/0010-HID-ntrig-validate-feature-report-details.patch new file mode 100644 index 0000000..b243fc6 --- /dev/null +++ b/recipes-kernel/linux/files/HID_CVE_patches/0010-HID-ntrig-validate-feature-report-details.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 875b4e3763dbc941f15143dd1a18d10bb0be303b Mon Sep 17 00:00:00 2001 | ||
2 | From: Kees Cook <keescook@chromium.org> | ||
3 | Date: Wed, 28 Aug 2013 22:31:28 +0200 | ||
4 | Subject: [PATCH] HID: ntrig: validate feature report details | ||
5 | |||
6 | A HID device could send a malicious feature report that would cause the | ||
7 | ntrig HID driver to trigger a NULL dereference during initialization: | ||
8 | |||
9 | [57383.031190] usb 3-1: New USB device found, idVendor=1b96, idProduct=0001 | ||
10 | ... | ||
11 | [57383.315193] BUG: unable to handle kernel NULL pointer dereference at 0000000000000030 | ||
12 | [57383.315308] IP: [<ffffffffa08102de>] ntrig_probe+0x25e/0x420 [hid_ntrig] | ||
13 | |||
14 | CVE-2013-2896 | ||
15 | |||
16 | Signed-off-by: Kees Cook <keescook@chromium.org> | ||
17 | Cc: stable@kernel.org | ||
18 | Signed-off-by: Rafi Rubin <rafi@seas.upenn.edu> | ||
19 | Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ||
20 | Signed-off-by: Adrian Dudau <adrian.dudau@enea.com> | ||
21 | --- | ||
22 | drivers/hid/hid-ntrig.c | 3 ++- | ||
23 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
24 | |||
25 | diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c | ||
26 | index 98d1fdf..600f207 100644 | ||
27 | --- a/drivers/hid/hid-ntrig.c | ||
28 | +++ b/drivers/hid/hid-ntrig.c | ||
29 | @@ -115,7 +115,8 @@ static inline int ntrig_get_mode(struct hid_device *hdev) | ||
30 | struct hid_report *report = hdev->report_enum[HID_FEATURE_REPORT]. | ||
31 | report_id_hash[0x0d]; | ||
32 | |||
33 | - if (!report) | ||
34 | + if (!report || report->maxfield < 1 || | ||
35 | + report->field[0]->report_count < 1) | ||
36 | return -EINVAL; | ||
37 | |||
38 | hid_hw_request(hdev, report, HID_REQ_GET_REPORT); | ||
39 | -- | ||
40 | 1.7.9.5 | ||
41 | |||
diff --git a/recipes-kernel/linux/files/HID_CVE_patches/0011-HID-multitouch-validate-indexes-details.patch b/recipes-kernel/linux/files/HID_CVE_patches/0011-HID-multitouch-validate-indexes-details.patch new file mode 100644 index 0000000..ff425ec --- /dev/null +++ b/recipes-kernel/linux/files/HID_CVE_patches/0011-HID-multitouch-validate-indexes-details.patch | |||
@@ -0,0 +1,86 @@ | |||
1 | From 8821f5dc187bdf16cfb32ef5aa8c3035273fa79a Mon Sep 17 00:00:00 2001 | ||
2 | From: Benjamin Tissoires <benjamin.tissoires@redhat.com> | ||
3 | Date: Wed, 11 Sep 2013 21:56:58 +0200 | ||
4 | Subject: [PATCH] HID: multitouch: validate indexes details | ||
5 | |||
6 | When working on report indexes, always validate that they are in bounds. | ||
7 | Without this, a HID device could report a malicious feature report that | ||
8 | could trick the driver into a heap overflow: | ||
9 | |||
10 | [ 634.885003] usb 1-1: New USB device found, idVendor=0596, idProduct=0500 | ||
11 | ... | ||
12 | [ 676.469629] BUG kmalloc-192 (Tainted: G W ): Redzone overwritten | ||
13 | |||
14 | Note that we need to change the indexes from s8 to s16 as they can | ||
15 | be between -1 and 255. | ||
16 | |||
17 | CVE-2013-2897 | ||
18 | |||
19 | Cc: stable@vger.kernel.org | ||
20 | Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> | ||
21 | Acked-by: Kees Cook <keescook@chromium.org> | ||
22 | Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ||
23 | Signed-off-by: Adrian Dudau <adrian.dudau@enea.com> | ||
24 | --- | ||
25 | drivers/hid/hid-multitouch.c | 26 ++++++++++++++------------ | ||
26 | 1 file changed, 14 insertions(+), 12 deletions(-) | ||
27 | |||
28 | diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c | ||
29 | index ac28f08..5e5fe1b 100644 | ||
30 | --- a/drivers/hid/hid-multitouch.c | ||
31 | +++ b/drivers/hid/hid-multitouch.c | ||
32 | @@ -101,9 +101,9 @@ struct mt_device { | ||
33 | unsigned last_slot_field; /* the last field of a slot */ | ||
34 | unsigned mt_report_id; /* the report ID of the multitouch device */ | ||
35 | unsigned pen_report_id; /* the report ID of the pen device */ | ||
36 | - __s8 inputmode; /* InputMode HID feature, -1 if non-existent */ | ||
37 | - __s8 inputmode_index; /* InputMode HID feature index in the report */ | ||
38 | - __s8 maxcontact_report_id; /* Maximum Contact Number HID feature, | ||
39 | + __s16 inputmode; /* InputMode HID feature, -1 if non-existent */ | ||
40 | + __s16 inputmode_index; /* InputMode HID feature index in the report */ | ||
41 | + __s16 maxcontact_report_id; /* Maximum Contact Number HID feature, | ||
42 | -1 if non-existent */ | ||
43 | __u8 num_received; /* how many contacts we received */ | ||
44 | __u8 num_expected; /* expected last contact index */ | ||
45 | @@ -312,20 +312,18 @@ static void mt_feature_mapping(struct hid_device *hdev, | ||
46 | struct hid_field *field, struct hid_usage *usage) | ||
47 | { | ||
48 | struct mt_device *td = hid_get_drvdata(hdev); | ||
49 | - int i; | ||
50 | |||
51 | switch (usage->hid) { | ||
52 | case HID_DG_INPUTMODE: | ||
53 | - td->inputmode = field->report->id; | ||
54 | - td->inputmode_index = 0; /* has to be updated below */ | ||
55 | - | ||
56 | - for (i=0; i < field->maxusage; i++) { | ||
57 | - if (field->usage[i].hid == usage->hid) { | ||
58 | - td->inputmode_index = i; | ||
59 | - break; | ||
60 | - } | ||
61 | + /* Ignore if value index is out of bounds. */ | ||
62 | + if (usage->usage_index >= field->report_count) { | ||
63 | + dev_err(&hdev->dev, "HID_DG_INPUTMODE out of range\n"); | ||
64 | + break; | ||
65 | } | ||
66 | |||
67 | + td->inputmode = field->report->id; | ||
68 | + td->inputmode_index = usage->usage_index; | ||
69 | + | ||
70 | break; | ||
71 | case HID_DG_CONTACTMAX: | ||
72 | td->maxcontact_report_id = field->report->id; | ||
73 | @@ -511,6 +509,10 @@ static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi, | ||
74 | mt_store_field(usage, td, hi); | ||
75 | return 1; | ||
76 | case HID_DG_CONTACTCOUNT: | ||
77 | + /* Ignore if indexes are out of bounds. */ | ||
78 | + if (field->index >= field->report->maxfield || | ||
79 | + usage->usage_index >= field->report_count) | ||
80 | + return 1; | ||
81 | td->cc_index = field->index; | ||
82 | td->cc_value_index = usage->usage_index; | ||
83 | return 1; | ||
84 | -- | ||
85 | 1.7.9.5 | ||
86 | |||
diff --git a/recipes-kernel/linux/files/HID_CVE_patches/0012-HID-sensor-hub-validate-feature-report-details.patch b/recipes-kernel/linux/files/HID_CVE_patches/0012-HID-sensor-hub-validate-feature-report-details.patch new file mode 100644 index 0000000..745fa9e --- /dev/null +++ b/recipes-kernel/linux/files/HID_CVE_patches/0012-HID-sensor-hub-validate-feature-report-details.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From 9e8910257397372633e74b333ef891f20c800ee4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Kees Cook <keescook@chromium.org> | ||
3 | Date: Wed, 28 Aug 2013 22:31:44 +0200 | ||
4 | Subject: [PATCH] HID: sensor-hub: validate feature report details | ||
5 | |||
6 | A HID device could send a malicious feature report that would cause the | ||
7 | sensor-hub HID driver to read past the end of heap allocation, leaking | ||
8 | kernel memory contents to the caller. | ||
9 | |||
10 | CVE-2013-2898 | ||
11 | |||
12 | Signed-off-by: Kees Cook <keescook@chromium.org> | ||
13 | Cc: stable@kernel.org | ||
14 | Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> | ||
15 | Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ||
16 | Signed-off-by: Adrian Dudau <adrian.dudau@enea.com> | ||
17 | --- | ||
18 | drivers/hid/hid-sensor-hub.c | 3 ++- | ||
19 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c | ||
22 | index ffc80cf..6fca30e 100644 | ||
23 | --- a/drivers/hid/hid-sensor-hub.c | ||
24 | +++ b/drivers/hid/hid-sensor-hub.c | ||
25 | @@ -221,7 +221,8 @@ int sensor_hub_get_feature(struct hid_sensor_hub_device *hsdev, u32 report_id, | ||
26 | |||
27 | mutex_lock(&data->mutex); | ||
28 | report = sensor_hub_report(report_id, hsdev->hdev, HID_FEATURE_REPORT); | ||
29 | - if (!report || (field_index >= report->maxfield)) { | ||
30 | + if (!report || (field_index >= report->maxfield) || | ||
31 | + report->field[field_index]->report_count < 1) { | ||
32 | ret = -EINVAL; | ||
33 | goto done_proc; | ||
34 | } | ||
35 | -- | ||
36 | 1.7.9.5 | ||
37 | |||
diff --git a/recipes-kernel/linux/files/HID_CVE_patches/0013-HID-picolcd_core-validate-output-report-details.patch b/recipes-kernel/linux/files/HID_CVE_patches/0013-HID-picolcd_core-validate-output-report-details.patch new file mode 100644 index 0000000..7abf193 --- /dev/null +++ b/recipes-kernel/linux/files/HID_CVE_patches/0013-HID-picolcd_core-validate-output-report-details.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | From 1e87a2456b0227ca4ab881e19a11bb99d164e792 Mon Sep 17 00:00:00 2001 | ||
2 | From: Kees Cook <keescook@chromium.org> | ||
3 | Date: Wed, 28 Aug 2013 22:31:52 +0200 | ||
4 | Subject: [PATCH] HID: picolcd_core: validate output report details | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | A HID device could send a malicious output report that would cause the | ||
10 | picolcd HID driver to trigger a NULL dereference during attr file writing. | ||
11 | |||
12 | [jkosina@suse.cz: changed | ||
13 | |||
14 | report->maxfield < 1 | ||
15 | |||
16 | to | ||
17 | |||
18 | report->maxfield != 1 | ||
19 | |||
20 | as suggested by Bruno]. | ||
21 | |||
22 | CVE-2013-2899 | ||
23 | |||
24 | Signed-off-by: Kees Cook <keescook@chromium.org> | ||
25 | Cc: stable@kernel.org | ||
26 | Reviewed-by: Bruno Prémont <bonbons@linux-vserver.org> | ||
27 | Acked-by: Bruno Prémont <bonbons@linux-vserver.org> | ||
28 | Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ||
29 | Signed-off-by: Adrian Dudau <adrian.dudau@enea.com> | ||
30 | --- | ||
31 | drivers/hid/hid-picolcd_core.c | 2 +- | ||
32 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
33 | |||
34 | diff --git a/drivers/hid/hid-picolcd_core.c b/drivers/hid/hid-picolcd_core.c | ||
35 | index b48092d..acbb0210 100644 | ||
36 | --- a/drivers/hid/hid-picolcd_core.c | ||
37 | +++ b/drivers/hid/hid-picolcd_core.c | ||
38 | @@ -290,7 +290,7 @@ static ssize_t picolcd_operation_mode_store(struct device *dev, | ||
39 | buf += 10; | ||
40 | cnt -= 10; | ||
41 | } | ||
42 | - if (!report) | ||
43 | + if (!report || report->maxfield != 1) | ||
44 | return -EINVAL; | ||
45 | |||
46 | while (cnt > 0 && (buf[cnt-1] == '\n' || buf[cnt-1] == '\r')) | ||
47 | -- | ||
48 | 1.7.9.5 | ||
49 | |||
diff --git a/recipes-kernel/linux/files/HID_CVE_patches/0014-HID-check-for-NULL-field-when-setting-values.patch b/recipes-kernel/linux/files/HID_CVE_patches/0014-HID-check-for-NULL-field-when-setting-values.patch new file mode 100644 index 0000000..f75e653 --- /dev/null +++ b/recipes-kernel/linux/files/HID_CVE_patches/0014-HID-check-for-NULL-field-when-setting-values.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From be67b68d52fa28b9b721c47bb42068f0c1214855 Mon Sep 17 00:00:00 2001 | ||
2 | From: Kees Cook <keescook@chromium.org> | ||
3 | Date: Wed, 28 Aug 2013 22:32:01 +0200 | ||
4 | Subject: [PATCH] HID: check for NULL field when setting values | ||
5 | |||
6 | Defensively check that the field to be worked on is not NULL. | ||
7 | |||
8 | Signed-off-by: Kees Cook <keescook@chromium.org> | ||
9 | Cc: stable@kernel.org | ||
10 | Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ||
11 | Signed-off-by: Adrian Dudau <adrian.dudau@enea.com> | ||
12 | --- | ||
13 | drivers/hid/hid-core.c | 7 ++++++- | ||
14 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c | ||
17 | index ebf5781..dcd60eb 100644 | ||
18 | --- a/drivers/hid/hid-core.c | ||
19 | +++ b/drivers/hid/hid-core.c | ||
20 | @@ -1169,7 +1169,12 @@ EXPORT_SYMBOL_GPL(hid_alloc_report_buf); | ||
21 | |||
22 | int hid_set_field(struct hid_field *field, unsigned offset, __s32 value) | ||
23 | { | ||
24 | - unsigned size = field->report_size; | ||
25 | + unsigned size; | ||
26 | + | ||
27 | + if (!field) | ||
28 | + return -1; | ||
29 | + | ||
30 | + size = field->report_size; | ||
31 | |||
32 | hid_dump_input(field->report->device, field->usage + offset, value); | ||
33 | |||
34 | -- | ||
35 | 1.7.9.5 | ||
36 | |||
diff --git a/recipes-kernel/linux/files/add-no-error-array-bounds.patch b/recipes-kernel/linux/files/add-no-error-array-bounds.patch new file mode 100644 index 0000000..57b3974 --- /dev/null +++ b/recipes-kernel/linux/files/add-no-error-array-bounds.patch | |||
@@ -0,0 +1,13 @@ | |||
1 | Index: git/Makefile | ||
2 | =================================================================== | ||
3 | --- git.orig/Makefile | ||
4 | +++ git/Makefile | ||
5 | @@ -558,7 +558,7 @@ endif # $(dot-config) | ||
6 | # Defaults to vmlinux, but the arch makefile usually adds further targets | ||
7 | all: vmlinux | ||
8 | |||
9 | -KBUILD_CFLAGS += -Wno-unused-but-set-variable | ||
10 | +KBUILD_CFLAGS += -Wno-unused-but-set-variable -Wno-error=array-bounds | ||
11 | |||
12 | ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE | ||
13 | KBUILD_CFLAGS += -Os | ||
diff --git a/recipes-kernel/linux/files/add-no-error-uninitialized.patch b/recipes-kernel/linux/files/add-no-error-uninitialized.patch new file mode 100644 index 0000000..a70b089 --- /dev/null +++ b/recipes-kernel/linux/files/add-no-error-uninitialized.patch | |||
@@ -0,0 +1,69 @@ | |||
1 | diff --git a/Makefile b/Makefile | ||
2 | index 183eff3..88fd9c1 100644 | ||
3 | --- a/Makefile | ||
4 | +++ b/Makefile | ||
5 | @@ -370,6 +370,7 @@ LINUXINCLUDE := \ | ||
6 | KBUILD_CPPFLAGS := -D__KERNEL__ | ||
7 | |||
8 | KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ | ||
9 | + -Wno-error=uninitialized \ | ||
10 | -fno-strict-aliasing -fno-common \ | ||
11 | -Werror-implicit-function-declaration \ | ||
12 | -Wno-format-security \ | ||
13 | diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile | ||
14 | index 0624909..5d13d66 100644 | ||
15 | --- a/arch/powerpc/Makefile | ||
16 | +++ b/arch/powerpc/Makefile | ||
17 | @@ -17,6 +17,7 @@ HAS_BIARCH := $(call cc-option-yn, -m32) | ||
18 | # Set default 32 bits cross compilers for vdso and boot wrapper | ||
19 | CROSS32_COMPILE ?= | ||
20 | |||
21 | +KBUILD_CFLAGS += -Wno-error=uninitialized | ||
22 | CROSS32CC := $(CROSS32_COMPILE)gcc | ||
23 | CROSS32AR := $(CROSS32_COMPILE)ar | ||
24 | |||
25 | @@ -67,7 +68,6 @@ LDFLAGS_vmlinux-y := -Bstatic | ||
26 | LDFLAGS_vmlinux-$(CONFIG_RELOCATABLE) := -pie | ||
27 | LDFLAGS_vmlinux := $(LDFLAGS_vmlinux-y) | ||
28 | |||
29 | -LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) | ||
30 | |||
31 | ifeq ($(CONFIG_PPC64),y) | ||
32 | ifeq ($(call cc-option-yn,-mcmodel=medium),y) | ||
33 | @@ -176,7 +176,6 @@ core-$(CONFIG_PERF_EVENTS) += arch/powerpc/perf/ | ||
34 | |||
35 | drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/ | ||
36 | |||
37 | -libs-y += $(LIBGCC) | ||
38 | |||
39 | # Default to zImage, override when needed | ||
40 | all: zImage | ||
41 | diff --git a/arch/powerpc/perf/Makefile b/arch/powerpc/perf/Makefile | ||
42 | index 06dd8d5..8bf06fd 100644 | ||
43 | --- a/arch/powerpc/perf/Makefile | ||
44 | +++ b/arch/powerpc/perf/Makefile | ||
45 | @@ -1,4 +1,4 @@ | ||
46 | -subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror | ||
47 | +subdir-ccflags-$(CONFIG_PPC_WERROR) := -Wno-error=uninitialized | ||
48 | |||
49 | obj-$(CONFIG_PERF_EVENTS) += callchain.o | ||
50 | |||
51 | diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile | ||
52 | index fa63186..d592e84 100644 | ||
53 | --- a/arch/powerpc/sysdev/Makefile | ||
54 | +++ b/arch/powerpc/sysdev/Makefile | ||
55 | @@ -1,4 +1,4 @@ | ||
56 | -subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror | ||
57 | +subdir-ccflags-$(CONFIG_PPC_WERROR) := -Wno-error=uninitialized | ||
58 | |||
59 | ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC) | ||
60 | |||
61 | @@ -67,8 +67,6 @@ endif | ||
62 | |||
63 | obj-$(CONFIG_PPC_SCOM) += scom.o | ||
64 | |||
65 | -subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror | ||
66 | - | ||
67 | obj-$(CONFIG_PPC_XICS) += xics/ | ||
68 | |||
69 | obj-$(CONFIG_GE_FPGA) += ge/ | ||
diff --git a/recipes-kernel/linux/files/add-no-unused-but-set-variable.patch b/recipes-kernel/linux/files/add-no-unused-but-set-variable.patch new file mode 100644 index 0000000..5133529 --- /dev/null +++ b/recipes-kernel/linux/files/add-no-unused-but-set-variable.patch | |||
@@ -0,0 +1,13 @@ | |||
1 | diff --git a/Makefile b/Makefile | ||
2 | index e821f72..cb2fcba 100644 | ||
3 | --- a/Makefile | ||
4 | +++ b/Makefile | ||
5 | @@ -526,6 +526,8 @@ endif # $(dot-config) | ||
6 | # Defaults vmlinux but it is usually overridden in the arch makefile | ||
7 | all: vmlinux | ||
8 | |||
9 | +KBUILD_CFLAGS += -Wno-unused-but-set-variable | ||
10 | + | ||
11 | ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE | ||
12 | KBUILD_CFLAGS += -Os | ||
13 | else | ||
diff --git a/recipes-kernel/linux/files/arm_arch_timer-Keystone-2-architected-timer-frequenc.patch b/recipes-kernel/linux/files/arm_arch_timer-Keystone-2-architected-timer-frequenc.patch new file mode 100644 index 0000000..49bf07b --- /dev/null +++ b/recipes-kernel/linux/files/arm_arch_timer-Keystone-2-architected-timer-frequenc.patch | |||
@@ -0,0 +1,55 @@ | |||
1 | From e2d575410329f42542972b7276fbb1c2c7f48334 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Sixten=20Sj=C3=B6str=C3=B6m=20Thames?= | ||
3 | <Sixten.Sjoestroem.Thames@enea.com> | ||
4 | Date: Mon, 12 May 2014 21:18:47 +0200 | ||
5 | Subject: [PATCH] arm_arch_timer: Keystone 2 architected timer frequency fix | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | The arch timer frequency register returns incorrect values on early | ||
11 | versions of the Keystone 2 evm silicon. The frequency register always | ||
12 | returns 1000 MHz on bad silicon. This temporary fix solves that. | ||
13 | |||
14 | Signed-off-by: Sixten Sjöström Thames <Sixten.Sjoestroem.Thames@enea.com> | ||
15 | --- | ||
16 | drivers/clocksource/arm_arch_timer.c | 16 ++++++++++++++++ | ||
17 | 1 file changed, 16 insertions(+) | ||
18 | |||
19 | diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c | ||
20 | index a2b2541..321aba1 100644 | ||
21 | --- a/drivers/clocksource/arm_arch_timer.c | ||
22 | +++ b/drivers/clocksource/arm_arch_timer.c | ||
23 | @@ -23,6 +23,8 @@ | ||
24 | |||
25 | #include <clocksource/arm_arch_timer.h> | ||
26 | |||
27 | +#define K2_PG1_AT_FREQ 133120000UL | ||
28 | + | ||
29 | static u32 arch_timer_rate; | ||
30 | |||
31 | enum ppi_nr { | ||
32 | @@ -165,6 +167,20 @@ static int arch_timer_available(void) | ||
33 | if (arch_timer_rate == 0) { | ||
34 | freq = arch_timer_get_cntfrq(); | ||
35 | |||
36 | + /* The Keystone 2 EVM PG1.0 silicon has a malfunctional | ||
37 | + * Architected timer. The timer frequency register allways | ||
38 | + * incorrectly returns 1000 MHz. This is a temorary fix for | ||
39 | + * internal Enea Linux testing so that the same kernel can | ||
40 | + * be used on targets with both PG1.0 and PG1.1 silicon. | ||
41 | + * Another solution is to have different DTBs with hard | ||
42 | + * coded frequencies.*/ | ||
43 | + if (freq == 1000000000) { | ||
44 | + pr_warn("Keystone 2 EVM specific arch timer fix\n"); | ||
45 | + pr_warn("Set architected timer frequency to %u\n", | ||
46 | + K2_PG1_AT_FREQ); | ||
47 | + freq = K2_PG1_AT_FREQ; | ||
48 | + } | ||
49 | + | ||
50 | /* Check the timer frequency. */ | ||
51 | if (freq == 0) { | ||
52 | pr_warn("Architected timer frequency not available\n"); | ||
53 | -- | ||
54 | 1.7.10.4 | ||
55 | |||
diff --git a/recipes-kernel/linux/files/b4860-hard_irq_disable-bug.patch b/recipes-kernel/linux/files/b4860-hard_irq_disable-bug.patch new file mode 100644 index 0000000..b8ef705 --- /dev/null +++ b/recipes-kernel/linux/files/b4860-hard_irq_disable-bug.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | linux-qoriq-sdk: Repair a kernel compile issue due to a sintax error. | ||
2 | |||
3 | The define __hard_irq_disable() was done using ";" character | ||
4 | into the comment so the if structure did not recognized the | ||
5 | "else" branch. | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Alexandru Vaduva <alexandru.vaduva@enea.com> | ||
10 | |||
11 | diff -ruN a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c | ||
12 | --- a/arch/powerpc/kernel/irq.c 2014-01-30 12:56:20.470918180 +0100 | ||
13 | +++ b/arch/powerpc/kernel/irq.c 2014-01-30 12:57:25.228109187 +0100 | ||
14 | @@ -227,8 +227,9 @@ | ||
15 | * common cases that we'll ignore for now), so we skip the | ||
16 | * (expensive) mtmsrd. | ||
17 | */ | ||
18 | - if (unlikely(irq_happened != PACA_IRQ_HARD_DIS)) | ||
19 | + if (unlikely(irq_happened != PACA_IRQ_HARD_DIS)) { | ||
20 | __hard_irq_disable(); | ||
21 | + } | ||
22 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
23 | else { | ||
24 | /* | ||
diff --git a/recipes-kernel/linux/files/cfg/00001-embedded.cfg b/recipes-kernel/linux/files/cfg/00001-embedded.cfg new file mode 100644 index 0000000..2f0e6bf --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00001-embedded.cfg | |||
@@ -0,0 +1 @@ | |||
CONFIG_EMBEDDED=y | |||
diff --git a/recipes-kernel/linux/files/cfg/00002-root_nfs.cfg b/recipes-kernel/linux/files/cfg/00002-root_nfs.cfg new file mode 100644 index 0000000..f8d8748 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00002-root_nfs.cfg | |||
@@ -0,0 +1,7 @@ | |||
1 | CONFIG_NETWORK_FILESYSTEMS=y | ||
2 | CONFIG_NFS_USE_KERNEL_DNS=y | ||
3 | CONFIG_ROOT_NFS=y | ||
4 | CONFIG_NFS_FS=y | ||
5 | CONFIG_NFS_V3=y | ||
6 | CONFIG_NFS_V4=y | ||
7 | CONFIG_NFSD=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00003-fuse.cfg b/recipes-kernel/linux/files/cfg/00003-fuse.cfg new file mode 100644 index 0000000..43e95f2 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00003-fuse.cfg | |||
@@ -0,0 +1 @@ | |||
CONFIG_FUSE_FS=y | |||
diff --git a/recipes-kernel/linux/files/cfg/00004-systemtap.cfg b/recipes-kernel/linux/files/cfg/00004-systemtap.cfg new file mode 100644 index 0000000..88c278c --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00004-systemtap.cfg | |||
@@ -0,0 +1,6 @@ | |||
1 | CONFIG_DEBUG_INFO=y | ||
2 | CONFIG_KPROBES=y | ||
3 | CONFIG_RELAY=y | ||
4 | CONFIG_DEBUG_FS=y | ||
5 | CONFIG_MODULES=y | ||
6 | CONFIG_MODULE_UNLOAD=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00005-pramfs.cfg b/recipes-kernel/linux/files/cfg/00005-pramfs.cfg new file mode 100644 index 0000000..21aabc1 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00005-pramfs.cfg | |||
@@ -0,0 +1,4 @@ | |||
1 | CONFIG_MISC_FILESYSTEMS=y | ||
2 | CONFIG_PRAMFS=y | ||
3 | CONFIG_PRAMFS_XATTR=y | ||
4 | CONFIG_PRAMFS_TEST_MODULE=m | ||
diff --git a/recipes-kernel/linux/files/cfg/00006-with_modules.cfg b/recipes-kernel/linux/files/cfg/00006-with_modules.cfg new file mode 100644 index 0000000..f4b3ae2 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00006-with_modules.cfg | |||
@@ -0,0 +1,5 @@ | |||
1 | CONFIG_MODULES=y | ||
2 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
3 | CONFIG_MODULE_UNLOAD=y | ||
4 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
5 | CONFIG_MODVERSIONS=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00007-oprofile.cfg b/recipes-kernel/linux/files/cfg/00007-oprofile.cfg new file mode 100644 index 0000000..959e94b --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00007-oprofile.cfg | |||
@@ -0,0 +1,4 @@ | |||
1 | CONFIG_PROFILING=y | ||
2 | CONFIG_OPROFILE=m | ||
3 | CONFIG_PROFILE_ALL_BRANCHES=y | ||
4 | CONFIG_OPROFILE_NMI_TIMER=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00008-uio_m.cfg b/recipes-kernel/linux/files/cfg/00008-uio_m.cfg new file mode 100644 index 0000000..d82eee4 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00008-uio_m.cfg | |||
@@ -0,0 +1,3 @@ | |||
1 | CONFIG_UIO=m | ||
2 | CONFIG_UIO_PDRV=m | ||
3 | CONFIG_UIO_PDRV_GENIRQ=m | ||
diff --git a/recipes-kernel/linux/files/cfg/00009-e500mc_debug.cfg b/recipes-kernel/linux/files/cfg/00009-e500mc_debug.cfg new file mode 100644 index 0000000..eaddbaf --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00009-e500mc_debug.cfg | |||
@@ -0,0 +1,6 @@ | |||
1 | CONFIG_FSL_EMB_PERFMON=y | ||
2 | CONFIG_FSL_EMB_PERF_EVENT=y | ||
3 | CONFIG_FSL_EMB_PERF_EVENT_E500=y | ||
4 | |||
5 | CONFIG_PPC_OF=y | ||
6 | CONFIG_PPC_UDBG_16550=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00010-pramfs-bsc913x.cfg b/recipes-kernel/linux/files/cfg/00010-pramfs-bsc913x.cfg new file mode 100644 index 0000000..1476224 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00010-pramfs-bsc913x.cfg | |||
@@ -0,0 +1,5 @@ | |||
1 | CONFIG_MISC_FILESYSTEMS=y | ||
2 | CONFIG_PRAMFS=y | ||
3 | CONFIG_PRAMFS_TEST=y | ||
4 | CONFIG_TEST_MODULE=m | ||
5 | |||
diff --git a/recipes-kernel/linux/files/cfg/00012-preempt.cfg b/recipes-kernel/linux/files/cfg/00012-preempt.cfg new file mode 100644 index 0000000..43fd0bd --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00012-preempt.cfg | |||
@@ -0,0 +1,9 @@ | |||
1 | CONFIG_GENERIC_LOCKBREAK=y | ||
2 | CONFIG_TREE_PREEMPT_RCU=y | ||
3 | CONFIG_PREEMPT_RCU=y | ||
4 | CONFIG_UNINLINE_SPIN_UNLOCK=y | ||
5 | CONFIG_PREEMPT=y | ||
6 | CONFIG_PREEMPT__LL=y | ||
7 | CONFIG_PREEMPT_COUNT=y | ||
8 | CONFIG_DEBUG_PREEMPT=y | ||
9 | CONFIG_RCU_CPU_STALL_VERBOSE=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00013-localversion.cfg b/recipes-kernel/linux/files/cfg/00013-localversion.cfg new file mode 100644 index 0000000..71481b4 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00013-localversion.cfg | |||
@@ -0,0 +1,2 @@ | |||
1 | CONFIG_LOCALVERSION_AUTO=n | ||
2 | CONFIG_DEFAULT_HOSTNAME="(none)" | ||
diff --git a/recipes-kernel/linux/files/cfg/00014-kgdb.cfg b/recipes-kernel/linux/files/cfg/00014-kgdb.cfg new file mode 100644 index 0000000..f23cfe3 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00014-kgdb.cfg | |||
@@ -0,0 +1,9 @@ | |||
1 | #depends | ||
2 | CONFIG_DEBUG_KERNEL=y | ||
3 | CONFIG_EXPERIMENTAL=y | ||
4 | |||
5 | #configs | ||
6 | CONFIG_KGDB=y | ||
7 | CONFIG_KGDB_SERIAL_CONSOLE=y | ||
8 | CONFIG_KGDB_KDB=y | ||
9 | CONFIG_MAGIC_SYSRQ=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00015-uio.cfg b/recipes-kernel/linux/files/cfg/00015-uio.cfg new file mode 100644 index 0000000..b26593e --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00015-uio.cfg | |||
@@ -0,0 +1,3 @@ | |||
1 | CONFIG_UIO=y | ||
2 | CONFIG_UIO_PDRV=y | ||
3 | CONFIG_UIO_PDRV_GENIRQ=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00016-largefilessupport.cfg b/recipes-kernel/linux/files/cfg/00016-largefilessupport.cfg new file mode 100644 index 0000000..b3fae70 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00016-largefilessupport.cfg | |||
@@ -0,0 +1 @@ | |||
CONFIG_LBDAF=y | |||
diff --git a/recipes-kernel/linux/files/cfg/00017-preempt_keystone.cfg b/recipes-kernel/linux/files/cfg/00017-preempt_keystone.cfg new file mode 100644 index 0000000..89aea43 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00017-preempt_keystone.cfg | |||
@@ -0,0 +1,7 @@ | |||
1 | CONFIG_TREE_PREEMPT_RCU=y | ||
2 | CONFIG_PREEMPT_RCU=y | ||
3 | CONFIG_UNINLINE_SPIN_UNLOCK=y | ||
4 | CONFIG_PREEMPT=y | ||
5 | CONFIG_PREEMPT_COUNT=y | ||
6 | CONFIG_DEBUG_PREEMPT=y | ||
7 | CONFIG_RCU_CPU_STALL_VERBOSE=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00018-rt.cfg b/recipes-kernel/linux/files/cfg/00018-rt.cfg new file mode 100644 index 0000000..a15c930 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00018-rt.cfg | |||
@@ -0,0 +1,3 @@ | |||
1 | CONFIG_PREEMPT_RT_FULL=y | ||
2 | CONFIG_HZ_1000=y | ||
3 | CONFIG_HZ=1000 | ||
diff --git a/recipes-kernel/linux/files/cfg/00019-i2c.cfg b/recipes-kernel/linux/files/cfg/00019-i2c.cfg new file mode 100644 index 0000000..8dbcc3c --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00019-i2c.cfg | |||
@@ -0,0 +1 @@ | |||
CONFIG_I2C_CHARDEV=y | |||
diff --git a/recipes-kernel/linux/files/cfg/00020-debug.cfg b/recipes-kernel/linux/files/cfg/00020-debug.cfg new file mode 100644 index 0000000..e4b87d5 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00020-debug.cfg | |||
@@ -0,0 +1,27 @@ | |||
1 | |||
2 | CONFIG_STACKTRACE_SUPPORT=n | ||
3 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
4 | CONFIG_LOCKDEP_SUPPORT=n | ||
5 | |||
6 | CONFIG_GENERIC_TBSYNC=y | ||
7 | CONFIG_GENERIC_BUG=y | ||
8 | |||
9 | CONFIG_PERF_EVENTS=y | ||
10 | CONFIG_PERF_COUNTERS=y | ||
11 | |||
12 | CONFIG_RCU_TRACE=y | ||
13 | CONFIG_TREE_RCU_TRACE=y | ||
14 | |||
15 | CONFIG_DEBUG_KERNEL=y | ||
16 | |||
17 | CONFIG_EXT2_FS=y | ||
18 | CONFIG_EXT3_FS=y | ||
19 | CONFIG_EXT3_FS_XATTR=y | ||
20 | CONFIG_SYSFS=y | ||
21 | CONFIG_TMPFS=y | ||
22 | CONFIG_DEBUG_FS=y | ||
23 | |||
24 | CONFIG_TRACING_SUPPORT=y | ||
25 | CONFIG_FTRACE=n | ||
26 | CONFIG_FTRACE_SYSCALLS=n | ||
27 | CONFIG_STACK_TRACER=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00021-bootlogd.cfg b/recipes-kernel/linux/files/cfg/00021-bootlogd.cfg new file mode 100644 index 0000000..0d83d11 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00021-bootlogd.cfg | |||
@@ -0,0 +1,2 @@ | |||
1 | CONFIG_LEGACY_PTYS=y | ||
2 | CONFIG_LEGACY_PTY_COUNT=256 | ||
diff --git a/recipes-kernel/linux/files/cfg/00022-mtd_tests.cfg b/recipes-kernel/linux/files/cfg/00022-mtd_tests.cfg new file mode 100644 index 0000000..1477bd7 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00022-mtd_tests.cfg | |||
@@ -0,0 +1 @@ | |||
CONFIG_MTD_TESTS=m | |||
diff --git a/recipes-kernel/linux/files/cfg/00023-ikconfig.cfg b/recipes-kernel/linux/files/cfg/00023-ikconfig.cfg new file mode 100644 index 0000000..9e7666c --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00023-ikconfig.cfg | |||
@@ -0,0 +1,2 @@ | |||
1 | CONFIG_IKCONFIG=y | ||
2 | CONFIG_IKCONFIG_PROC=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00024-preempt_romley-ivb.cfg b/recipes-kernel/linux/files/cfg/00024-preempt_romley-ivb.cfg new file mode 100644 index 0000000..c9b47ac --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00024-preempt_romley-ivb.cfg | |||
@@ -0,0 +1,8 @@ | |||
1 | CONFIG_TREE_PREEMPT_RCU=y | ||
2 | CONFIG_PREEMPT_RCU=y | ||
3 | CONFIG_RCU_STALL_COMMON=y | ||
4 | CONFIG_UNINLINE_SPIN_UNLOCK=y | ||
5 | CONFIG_PREEMPT=y | ||
6 | CONFIG_PREEMPT_COUNT=y | ||
7 | CONFIG_DEBUG_PREEMPT=y | ||
8 | CONFIG_RCU_CPU_STALL_VERBOSE=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00025-powertop.cfg b/recipes-kernel/linux/files/cfg/00025-powertop.cfg new file mode 100644 index 0000000..655c101 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00025-powertop.cfg | |||
@@ -0,0 +1,13 @@ | |||
1 | CONFIG_EXPERT=y | ||
2 | CONFIG_PROC_FS=y | ||
3 | CONFIG_DEBUG_FS=y | ||
4 | CONFIG_NO_HZ=y | ||
5 | CONFIG_HIGH_RES_TIMERS=y | ||
6 | CONFIG_HPET_TIMER=y | ||
7 | CONFIG_CPU_FREQ=y | ||
8 | CONFIG_CPU_FREQ_GOV_ONDEMAND=y | ||
9 | CONFIG_TIMER_STATS=y | ||
10 | CONFIG_PERF_EVENTS=y | ||
11 | CONFIG_TRACEPOINTS=y | ||
12 | CONFIG_TRACING=y | ||
13 | CONFIG_X86_MSR=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00026-ltp.cfg b/recipes-kernel/linux/files/cfg/00026-ltp.cfg new file mode 100644 index 0000000..e36a9c2 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00026-ltp.cfg | |||
@@ -0,0 +1,3 @@ | |||
1 | CONFIG_TUN=y | ||
2 | CONFIG_KSM=y | ||
3 | CONFIG_NUMA=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00027-lttng.cfg b/recipes-kernel/linux/files/cfg/00027-lttng.cfg new file mode 100644 index 0000000..1334194 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00027-lttng.cfg | |||
@@ -0,0 +1,20 @@ | |||
1 | CONFIG_MODULES=y | ||
2 | CONFIG_KALLSYMS=y | ||
3 | CONFIG_HIGH_RES_TIMERS=y | ||
4 | CONFIG_TRACEPOINTS=y | ||
5 | CONFIG_FTRACE=y | ||
6 | CONFIG_PERF_EVENTS=y | ||
7 | CONFIG_EVENT_TRACING=y | ||
8 | CONFIG_KPROBES=y | ||
9 | CONFIG_KRETPROBES=y | ||
10 | CONFIG_FUNCTION_TRACER=y | ||
11 | CONFIG_FUNCTION_GRAPH_TRACER=y | ||
12 | CONFIG_IRQSOFF_TRACER=y | ||
13 | CONFIG_PREEMPT_TRACER=y | ||
14 | CONFIG_SCHED_TRACER=y | ||
15 | CONFIG_NOP_TRACER=y | ||
16 | CONFIG_CONTEXT_SWITCH_TRACER=y | ||
17 | CONFIG_GENERIC_TRACER=y | ||
18 | CONFIG_TRACER_MAX_TRACE=y | ||
19 | CONFIG_TRACER_SNAPSHOT=y | ||
20 | CONFIG_STACK_TRACER=n | ||
diff --git a/recipes-kernel/linux/files/cfg/00028-perf.cfg b/recipes-kernel/linux/files/cfg/00028-perf.cfg new file mode 100644 index 0000000..5fddec0 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00028-perf.cfg | |||
@@ -0,0 +1,2 @@ | |||
1 | CONFIG_CGROUP_PERF=y | ||
2 | CONFIG_PERF_EVENTS=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00029-devtmpfs.cfg b/recipes-kernel/linux/files/cfg/00029-devtmpfs.cfg new file mode 100644 index 0000000..5e9cf98 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00029-devtmpfs.cfg | |||
@@ -0,0 +1,2 @@ | |||
1 | CONFIG_DEVTMPFS=y | ||
2 | CONFIG_DEVTMPFS_MOUNT=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00030-latencytop.cfg b/recipes-kernel/linux/files/cfg/00030-latencytop.cfg new file mode 100644 index 0000000..0a42694 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00030-latencytop.cfg | |||
@@ -0,0 +1 @@ | |||
CONFIG_LATENCYTOP=y | |||
diff --git a/recipes-kernel/linux/files/cfg/00031-igb_drv.cfg b/recipes-kernel/linux/files/cfg/00031-igb_drv.cfg new file mode 100644 index 0000000..3498fd0 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00031-igb_drv.cfg | |||
@@ -0,0 +1,3 @@ | |||
1 | CONFIG_IGB=y | ||
2 | CONFIG_IGB_DCA=y | ||
3 | CONFIG_IGBVF=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00032-dpa.cfg b/recipes-kernel/linux/files/cfg/00032-dpa.cfg new file mode 100644 index 0000000..c873cd5 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00032-dpa.cfg | |||
@@ -0,0 +1 @@ | |||
CONFIG_FSL_FM_MAX_FRAME_SIZE=9600 | |||
diff --git a/recipes-kernel/linux/files/cfg/00033-kprobes.cfg b/recipes-kernel/linux/files/cfg/00033-kprobes.cfg new file mode 100644 index 0000000..e24be27 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00033-kprobes.cfg | |||
@@ -0,0 +1 @@ | |||
CONFIG_KPROBES=y | |||
diff --git a/recipes-kernel/linux/files/cfg/00034-cpusets.cfg b/recipes-kernel/linux/files/cfg/00034-cpusets.cfg new file mode 100644 index 0000000..ec8fad4 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00034-cpusets.cfg | |||
@@ -0,0 +1,3 @@ | |||
1 | CONFIG_CGROUPS=y | ||
2 | CONFIG_CPUSETS=y | ||
3 | CONFIG_CGROUP_PERF=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00035-netfilter.cfg b/recipes-kernel/linux/files/cfg/00035-netfilter.cfg new file mode 100644 index 0000000..2dfdba9 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00035-netfilter.cfg | |||
@@ -0,0 +1,113 @@ | |||
1 | CONFIG_NETFILTER=y | ||
2 | CONFIG_IP_NF_IPTABLES=y | ||
3 | CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y | ||
4 | CONFIG_BRIDGE_NF_EBTABLES=y | ||
5 | CONFIG_IP_VS=y | ||
6 | CONFIG_IP_NF_FILTER=y | ||
7 | CONFIG_IP_NF_TARGET_ULOG=y | ||
8 | CONFIG_IP_NF_IPTABLES=y | ||
9 | # | ||
10 | # Not directly sourced via a kernel type but via an external bb | ||
11 | # | ||
12 | CONFIG_NETFILTER=y | ||
13 | CONFIG_NETFILTER_ADVANCED=y | ||
14 | |||
15 | # | ||
16 | # Core Netfilter Configuration | ||
17 | # | ||
18 | CONFIG_NETFILTER_NETLINK=m | ||
19 | CONFIG_NETFILTER_NETLINK_QUEUE=m | ||
20 | CONFIG_NETFILTER_NETLINK_LOG=m | ||
21 | CONFIG_NF_CONNTRACK=m | ||
22 | CONFIG_NF_CONNTRACK_MARK=y | ||
23 | CONFIG_NF_CT_PROTO_GRE=m | ||
24 | CONFIG_NF_CT_PROTO_SCTP=m | ||
25 | CONFIG_NF_CT_PROTO_UDPLITE=m | ||
26 | CONFIG_NF_CONNTRACK_AMANDA=m | ||
27 | CONFIG_NF_CONNTRACK_FTP=m | ||
28 | CONFIG_NF_CONNTRACK_H323=m | ||
29 | CONFIG_NF_CONNTRACK_IRC=m | ||
30 | CONFIG_NF_CONNTRACK_NETBIOS_NS=m | ||
31 | CONFIG_NF_CONNTRACK_PPTP=m | ||
32 | CONFIG_NF_CONNTRACK_SANE=m | ||
33 | CONFIG_NF_CONNTRACK_SIP=m | ||
34 | CONFIG_NF_CONNTRACK_TFTP=m | ||
35 | CONFIG_NF_CT_NETLINK=m | ||
36 | CONFIG_NETFILTER_XTABLES=m | ||
37 | CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m | ||
38 | CONFIG_NETFILTER_XT_TARGET_CONNMARK=m | ||
39 | CONFIG_NETFILTER_XT_TARGET_DSCP=m | ||
40 | CONFIG_NETFILTER_XT_TARGET_HL=m | ||
41 | CONFIG_NETFILTER_XT_TARGET_MARK=m | ||
42 | CONFIG_NETFILTER_XT_TARGET_NFLOG=m | ||
43 | CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m | ||
44 | CONFIG_NETFILTER_XT_TARGET_NOTRACK=m | ||
45 | CONFIG_NETFILTER_XT_TARGET_TRACE=m | ||
46 | CONFIG_NETFILTER_XT_TARGET_TCPMSS=m | ||
47 | CONFIG_NETFILTER_XT_MATCH_COMMENT=m | ||
48 | CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m | ||
49 | CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m | ||
50 | CONFIG_NETFILTER_XT_MATCH_CONNMARK=m | ||
51 | CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m | ||
52 | CONFIG_NETFILTER_XT_MATCH_DCCP=m | ||
53 | CONFIG_NETFILTER_XT_MATCH_DSCP=m | ||
54 | CONFIG_NETFILTER_XT_MATCH_ESP=m | ||
55 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m | ||
56 | CONFIG_NETFILTER_XT_MATCH_HELPER=m | ||
57 | CONFIG_NETFILTER_XT_MATCH_HL=m | ||
58 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m | ||
59 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m | ||
60 | CONFIG_NETFILTER_XT_MATCH_MAC=m | ||
61 | CONFIG_NETFILTER_XT_MATCH_MARK=m | ||
62 | CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m | ||
63 | CONFIG_NETFILTER_XT_MATCH_POLICY=m | ||
64 | CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m | ||
65 | CONFIG_NETFILTER_XT_MATCH_QUOTA=m | ||
66 | CONFIG_NETFILTER_XT_MATCH_REALM=m | ||
67 | CONFIG_NETFILTER_XT_MATCH_SCTP=m | ||
68 | CONFIG_NETFILTER_XT_MATCH_STATE=m | ||
69 | CONFIG_NETFILTER_XT_MATCH_STATISTIC=m | ||
70 | CONFIG_NETFILTER_XT_MATCH_STRING=m | ||
71 | CONFIG_NETFILTER_XT_MATCH_TCPMSS=m | ||
72 | CONFIG_NETFILTER_XT_MATCH_U32=m | ||
73 | |||
74 | # | ||
75 | # IP: Netfilter Configuration | ||
76 | # | ||
77 | CONFIG_NF_DEFRAG_IPV4=m | ||
78 | CONFIG_NF_CONNTRACK_IPV4=m | ||
79 | CONFIG_NF_CONNTRACK_PROC_COMPAT=y | ||
80 | CONFIG_IP_NF_IPTABLES=m | ||
81 | CONFIG_IP_NF_MATCH_AH=m | ||
82 | CONFIG_IP_NF_MATCH_ECN=m | ||
83 | CONFIG_IP_NF_MATCH_TTL=m | ||
84 | CONFIG_IP_NF_FILTER=m | ||
85 | CONFIG_IP_NF_TARGET_REJECT=m | ||
86 | CONFIG_IP_NF_TARGET_ULOG=m | ||
87 | CONFIG_NF_NAT=m | ||
88 | CONFIG_NF_NAT_NEEDED=y | ||
89 | CONFIG_NF_NAT_IPV4=m | ||
90 | CONFIG_IP_NF_TARGET_MASQUERADE=m | ||
91 | CONFIG_IP_NF_TARGET_NETMAP=m | ||
92 | CONFIG_IP_NF_TARGET_REDIRECT=m | ||
93 | CONFIG_NF_NAT_SNMP_BASIC=m | ||
94 | CONFIG_NF_NAT_PROTO_GRE=m | ||
95 | CONFIG_NF_NAT_PROTO_UDPLITE=m | ||
96 | CONFIG_NF_NAT_PROTO_SCTP=m | ||
97 | CONFIG_NF_NAT_FTP=m | ||
98 | CONFIG_NF_NAT_IRC=m | ||
99 | CONFIG_NF_NAT_TFTP=m | ||
100 | CONFIG_NF_NAT_AMANDA=m | ||
101 | CONFIG_NF_NAT_PPTP=m | ||
102 | CONFIG_NF_NAT_H323=m | ||
103 | CONFIG_NF_NAT_SIP=m | ||
104 | CONFIG_IP_NF_MANGLE=m | ||
105 | CONFIG_IP_NF_TARGET_CLUSTERIP=m | ||
106 | CONFIG_IP_NF_TARGET_ECN=m | ||
107 | CONFIG_IP_NF_TARGET_TTL=m | ||
108 | CONFIG_IP_NF_RAW=m | ||
109 | CONFIG_IP_NF_ARPTABLES=m | ||
110 | CONFIG_IP_NF_ARPFILTER=m | ||
111 | CONFIG_IP_NF_ARP_MANGLE=m | ||
112 | |||
113 | CONFIG_NET_SCHED=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00036-ppc_virt.cfg b/recipes-kernel/linux/files/cfg/00036-ppc_virt.cfg new file mode 100644 index 0000000..e41d2e9 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00036-ppc_virt.cfg | |||
@@ -0,0 +1,5 @@ | |||
1 | CONFIG_VIRTUALIZATION=y | ||
2 | CONFIG_KVM_E500MC=y | ||
3 | CONFIG_BRIDGE=y | ||
4 | CONFIG_TUN=y | ||
5 | CONFIG_PCI_STUB=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00037-ppc_lxc.cfg b/recipes-kernel/linux/files/cfg/00037-ppc_lxc.cfg new file mode 100644 index 0000000..020a91a --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00037-ppc_lxc.cfg | |||
@@ -0,0 +1,30 @@ | |||
1 | CONFIG_MEMCG=y | ||
2 | CONFIG_MEMCG_KMEM=y | ||
3 | CONFIG_CGROUP_DEVICE=y | ||
4 | CONFIG_CPUSETS=y | ||
5 | CONFIG_PROC_PID_CPUSET=y | ||
6 | CONFIG_RESOURCE_COUNTERS=y | ||
7 | CONFIG_CGROUP_MEM_RES_CTLR=y | ||
8 | CONFIG_CGROUP_SCHED=y | ||
9 | CONFIG_FAIR_GROUP_SCHED=y | ||
10 | CONFIG_RT_GROUP_SCHED=y | ||
11 | CONFIG_CHECKPOINT_RESTORE=y | ||
12 | CONFIG_NAMESPACES=y | ||
13 | CONFIG_UTS_NS=y | ||
14 | CONFIG_IPC_NS=y | ||
15 | CONFIG_USER_NS=y | ||
16 | CONFIG_PID_NS=y | ||
17 | CONFIG_NET_NS=y | ||
18 | CONFIG_SECCOMP=y | ||
19 | CONFIG_SECURITY_APPARMOR=y | ||
20 | CONFIG_CGROUPS=y | ||
21 | |||
22 | CONFIG_CLS_CGROUP=m | ||
23 | CONFIG_BLK_CGROUP=m | ||
24 | CONFIG_NETPRIO_CGROUP=m | ||
25 | |||
26 | CONFIG_DEVPTS_MULTIPLE_INSTANCES=y | ||
27 | CONFIG_VETH=y | ||
28 | CONFIG_MACVLAN=y | ||
29 | CONFIG_CGROUP_CPUACCT=y | ||
30 | |||
diff --git a/recipes-kernel/linux/files/cfg/00038-hotplug_cpu.cfg b/recipes-kernel/linux/files/cfg/00038-hotplug_cpu.cfg new file mode 100644 index 0000000..3704a7a --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00038-hotplug_cpu.cfg | |||
@@ -0,0 +1 @@ | |||
CONFIG_HOTPLUG_CPU=y | |||
diff --git a/recipes-kernel/linux/files/cfg/00039-nohz.cfg b/recipes-kernel/linux/files/cfg/00039-nohz.cfg new file mode 100644 index 0000000..4cf684f --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00039-nohz.cfg | |||
@@ -0,0 +1,9 @@ | |||
1 | CONFIG_NO_HZ_COMMON=y | ||
2 | CONFIG_NO_HZ_FULL=y | ||
3 | CONFIG_VIRT_CPU_ACCOUNTING=y | ||
4 | CONFIG_VIRT_CPU_ACCOUNTING_GEN=y | ||
5 | CONFIG_CONTEXT_TRACKING=y | ||
6 | CONFIG_RCU_USER_QS=y | ||
7 | CONFIG_RCU_NOCB_CPU=y | ||
8 | CONFIG_RCU_NOCB_CPU_ALL=y | ||
9 | CONFIG_LOCKUP_DETECTOR=n | ||
diff --git a/recipes-kernel/linux/files/cfg/00040-9p.cfg b/recipes-kernel/linux/files/cfg/00040-9p.cfg new file mode 100644 index 0000000..4b9b161 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00040-9p.cfg | |||
@@ -0,0 +1,5 @@ | |||
1 | CONFIG_NET_9P=y | ||
2 | CONFIG_NET_9P_VIRTIO=y | ||
3 | CONFIG_NET_9P_DEBUG=y | ||
4 | CONFIG_9P_FS=y | ||
5 | CONFIG_9P_FS_POSIX_ACL=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00041-virtio.cfg b/recipes-kernel/linux/files/cfg/00041-virtio.cfg new file mode 100644 index 0000000..41f0dcd --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00041-virtio.cfg | |||
@@ -0,0 +1,8 @@ | |||
1 | CONFIG_VIRTIO_PCI=y | ||
2 | CONFIG_VIRTIO_BALLOON=y | ||
3 | CONFIG_VIRTIO_BLK=y | ||
4 | CONFIG_VIRTIO_NET=y | ||
5 | CONFIG_VIRTIO=y | ||
6 | CONFIG_VIRTIO_RING=y | ||
7 | CONFIG_VIRTIO_MMIO=y | ||
8 | CONFIG_VIRTIO_CONSOLE=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00042-vhost.cfg b/recipes-kernel/linux/files/cfg/00042-vhost.cfg new file mode 100644 index 0000000..87a6004 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00042-vhost.cfg | |||
@@ -0,0 +1,2 @@ | |||
1 | CONFIG_VHOST_NET=y | ||
2 | CONFIG_PCI_MSI=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00043-containers.cfg b/recipes-kernel/linux/files/cfg/00043-containers.cfg new file mode 100644 index 0000000..aac7304 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00043-containers.cfg | |||
@@ -0,0 +1,18 @@ | |||
1 | CONFIG_NAMESPACES=y | ||
2 | CONFIG_UTS_NS=y | ||
3 | CONFIG_IPC_NS=y | ||
4 | CONFIG_USER_NS=y | ||
5 | CONFIG_PID_NS=y | ||
6 | CONFIG_NET_NS=y | ||
7 | CONFIG_CGROUP_FREEZER=y | ||
8 | CONFIG_CGROUP_DEVICE=y | ||
9 | CONFIG_CGROUP_CPUACCT=y | ||
10 | CONFIG_RESOURCE_COUNTERS=y | ||
11 | CONFIG_CGROUP_SCHED=y | ||
12 | CONFIG_BLK_CGROUP=y | ||
13 | CONFIG_CPUSETS=y | ||
14 | CONFIG_MEMCG=y | ||
15 | CONFIG_MEMCG_KMEM=y | ||
16 | CONFIG_VETH=y | ||
17 | CONFIG_MACVLAN=y | ||
18 | CONFIG_DEVPTS_MULTIPLE_INSTANCES=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00044-numa.cfg b/recipes-kernel/linux/files/cfg/00044-numa.cfg new file mode 100644 index 0000000..e480f0c --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00044-numa.cfg | |||
@@ -0,0 +1 @@ | |||
CONFIG_NUMA=y | |||
diff --git a/recipes-kernel/linux/files/cfg/00045-pci-stub.cfg b/recipes-kernel/linux/files/cfg/00045-pci-stub.cfg new file mode 100644 index 0000000..04aec57 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00045-pci-stub.cfg | |||
@@ -0,0 +1 @@ | |||
CONFIG_PCI_STUB=m | |||
diff --git a/recipes-kernel/linux/files/cfg/00046-sata.cfg b/recipes-kernel/linux/files/cfg/00046-sata.cfg new file mode 100644 index 0000000..0a30897 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00046-sata.cfg | |||
@@ -0,0 +1,5 @@ | |||
1 | #enable SATA support | ||
2 | CONFIG_ATA=y | ||
3 | CONFIG_SATA_AHCI=y | ||
4 | CONFIG_SATA_AHCI_PLATFORM=y | ||
5 | CONFIG_SATA_PMP=y | ||
diff --git a/recipes-kernel/linux/files/cfg/00047-bridge.cfg b/recipes-kernel/linux/files/cfg/00047-bridge.cfg new file mode 100644 index 0000000..873cbf3 --- /dev/null +++ b/recipes-kernel/linux/files/cfg/00047-bridge.cfg | |||
@@ -0,0 +1 @@ | |||
CONFIG_BRIDGE=y | |||
diff --git a/recipes-kernel/linux/files/cfg/README b/recipes-kernel/linux/files/cfg/README new file mode 100644 index 0000000..abfff1e --- /dev/null +++ b/recipes-kernel/linux/files/cfg/README | |||
@@ -0,0 +1,9 @@ | |||
1 | In ordert to add a configuration fragment contained in a .cfg file, | ||
2 | please follow these steps: | ||
3 | |||
4 | 1. change to the directory that contains this README file. | ||
5 | 2. copy your fragment file here and make sure your file has a .cfg extension | ||
6 | 4. run the indexcfgs.pl utility from this directory to | ||
7 | index your file. | ||
8 | 5. check for the new name and use it to further reference your renamed | ||
9 | cfg file. | ||
diff --git a/recipes-kernel/linux/files/cfg/indexcfgs.pl b/recipes-kernel/linux/files/cfg/indexcfgs.pl new file mode 100755 index 0000000..96cd78a --- /dev/null +++ b/recipes-kernel/linux/files/cfg/indexcfgs.pl | |||
@@ -0,0 +1,167 @@ | |||
1 | #!/usr/bin/perl -w | ||
2 | #---------------------------------------------------------------------- | ||
3 | # indexcfgs.pl - utility to rename files in the current directory to an | ||
4 | # indexed format so that a unique index number is | ||
5 | # prepended to the current file name. The naming | ||
6 | # template is: | ||
7 | # | ||
8 | # DDDDD-<name-or-short-description.cfg> | ||
9 | # | ||
10 | # Usage: create the *.cfg file you need, with any name and .cfg | ||
11 | # extension. Run this script and it will automatically | ||
12 | # rename your file to the indexed format above. | ||
13 | # | ||
14 | # Author: Daniel BORNAZ <daniel.bornaz@enea.com | ||
15 | # Date: 2014/04/09 | ||
16 | # Version: 1.0 | ||
17 | # | ||
18 | #---------------------------------------------------------------------- | ||
19 | |||
20 | use strict; | ||
21 | use warnings; | ||
22 | use Getopt::Long; | ||
23 | |||
24 | my %args; | ||
25 | my $counter_indexed=0; | ||
26 | my $filetype="*.cfg"; | ||
27 | my $counter_queue=0; | ||
28 | my $max_index=0; | ||
29 | my $dir="./"; | ||
30 | my @files; | ||
31 | my @queue; | ||
32 | my $opt_strip; | ||
33 | my $opt_help; | ||
34 | |||
35 | |||
36 | #-------------------------------------------------------------------- | ||
37 | # strip the index from the file name | ||
38 | # | ||
39 | sub removeindex($){ | ||
40 | my $tmpname=shift; | ||
41 | my $newname; | ||
42 | |||
43 | if($tmpname=~/^\d{5}\-.*cfg/ig){ | ||
44 | $newname=substr($tmpname,6); | ||
45 | system("mv",$tmpname,$newname) == 0 | ||
46 | or die "Cannot rename $tmpname to $newname: $?"; | ||
47 | }else{ | ||
48 | return 0; | ||
49 | } | ||
50 | } | ||
51 | |||
52 | #-------------------------------------------------------------------- | ||
53 | # get the indexed file name, return the index | ||
54 | # | ||
55 | sub decodeindex($){ | ||
56 | my $tmpname=shift; | ||
57 | |||
58 | if($tmpname=~/^\d{5}\-.*cfg/ig){ | ||
59 | return substr($tmpname,0,5); | ||
60 | }else{ | ||
61 | return 0; | ||
62 | } | ||
63 | } | ||
64 | |||
65 | #-------------------------------------------------------------------- | ||
66 | # remove index from cfg files in current directory | ||
67 | # | ||
68 | sub strip_file_names { | ||
69 | print "Start removing index from $filetype files in $dir\n"; | ||
70 | |||
71 | opendir(DIR,$dir) or die $!; | ||
72 | |||
73 | while( my $file=readdir(DIR)){ | ||
74 | # retrieve cfg files (*.cfg) | ||
75 | if($file=~/cfg$/gi){ | ||
76 | removeindex($file); | ||
77 | } | ||
78 | } | ||
79 | |||
80 | closedir(DIR); | ||
81 | } | ||
82 | |||
83 | #-------------------------------------------------------------------- | ||
84 | # index current directory cfg files | ||
85 | # | ||
86 | sub index_file_names { | ||
87 | print "Start indexing $filetype files in $dir\n"; | ||
88 | |||
89 | opendir(DIR,$dir) or die $!; | ||
90 | |||
91 | while( my $file=readdir(DIR)){ | ||
92 | # retrieve cfg files (*.cfg) | ||
93 | if($file=~/cfg$/gi){ | ||
94 | @files=(@files,$file); | ||
95 | } | ||
96 | } | ||
97 | |||
98 | closedir(DIR); | ||
99 | |||
100 | |||
101 | # separate indexed file names from the ones to be processed | ||
102 | foreach my $file (@files){ | ||
103 | if($file=~/^\d{5}\-.*cfg/){ | ||
104 | my $crt_index=0; | ||
105 | |||
106 | $crt_index=decodeindex($file); | ||
107 | |||
108 | if($crt_index > $max_index){ | ||
109 | $max_index=$crt_index; | ||
110 | } | ||
111 | |||
112 | $counter_indexed++; | ||
113 | }else{ | ||
114 | @queue=($file,@queue); | ||
115 | $counter_queue++; | ||
116 | } | ||
117 | } | ||
118 | |||
119 | # set the next index number | ||
120 | $max_index++; | ||
121 | |||
122 | # index the enqueued file names | ||
123 | foreach my $file (@queue){ | ||
124 | my $newname; | ||
125 | |||
126 | $newname=sprintf("%05d-%s",$max_index++,$file); | ||
127 | system("mv",$file,$newname) == 0 | ||
128 | or die "Cannot rename $file to $newname: $?"; | ||
129 | } | ||
130 | |||
131 | printf("$counter_queue files indexed, ". | ||
132 | "$counter_indexed files already indexed. Done.\n"); | ||
133 | } | ||
134 | |||
135 | #-------------------------------------------------------------------- | ||
136 | # display usage help | ||
137 | # | ||
138 | sub print_usage { | ||
139 | print "\n"; | ||
140 | print " ./indexcfgs.pl [--strip]\n"; | ||
141 | print " no params: Index the *.cfg file names in current dir\n"; | ||
142 | print " to DDDDD-<original_file_name.cfg>\n"; | ||
143 | print " --strip: Strips the index from the *.cfg file names ". | ||
144 | "in current dir\n"; | ||
145 | print "\n"; | ||
146 | |||
147 | exit 0; | ||
148 | } | ||
149 | |||
150 | |||
151 | #--- Program starts here -------------------------------------------- | ||
152 | GetOptions(\%args, | ||
153 | "strip" => \$opt_strip, | ||
154 | "help" => \$opt_help, | ||
155 | ); | ||
156 | |||
157 | if(defined($opt_help)){ | ||
158 | print_usage(); | ||
159 | } | ||
160 | |||
161 | if(defined($opt_strip)){ | ||
162 | strip_file_names(); | ||
163 | }else{ | ||
164 | index_file_names(); | ||
165 | } | ||
166 | |||
167 | |||
diff --git a/recipes-kernel/linux/files/disable-cpu-hotplug-prt.patcher b/recipes-kernel/linux/files/disable-cpu-hotplug-prt.patcher new file mode 100644 index 0000000..b344cf7 --- /dev/null +++ b/recipes-kernel/linux/files/disable-cpu-hotplug-prt.patcher | |||
@@ -0,0 +1,56 @@ | |||
1 | diff -Naur a/git.old/.config b/git/.config | ||
2 | --- a/git.old/.config 2014-06-13 14:30:28.864224240 +0200 | ||
3 | +++ b/git/.config 2014-06-13 14:37:58.633342233 +0200 | ||
4 | @@ -280,14 +280,13 @@ | ||
5 | CONFIG_DEFAULT_CFQ=y | ||
6 | # CONFIG_DEFAULT_NOOP is not set | ||
7 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
8 | -CONFIG_FREEZER=y | ||
9 | +# CONFIG_FREEZER is not set | ||
10 | CONFIG_PPC_MSI_BITMAP=y | ||
11 | # CONFIG_PPC_XICS is not set | ||
12 | # CONFIG_PPC_ICP_NATIVE is not set | ||
13 | # CONFIG_PPC_ICP_HV is not set | ||
14 | # CONFIG_PPC_ICS_RTAS is not set | ||
15 | # CONFIG_GE_FPGA is not set | ||
16 | -CONFIG_FSL_CORENET_RCPM=y | ||
17 | |||
18 | # | ||
19 | # Platform support | ||
20 | @@ -413,8 +412,7 @@ | ||
21 | # CONFIG_MATH_EMULATION is not set | ||
22 | CONFIG_IOMMU_HELPER=y | ||
23 | CONFIG_SWIOTLB=y | ||
24 | -CONFIG_HOTPLUG_CPU=y | ||
25 | -CONFIG_ARCH_CPU_PROBE_RELEASE=y | ||
26 | +# CONFIG_HOTPLUG_CPU is not set | ||
27 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
28 | CONFIG_ARCH_HAS_WALK_MEMORY=y | ||
29 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y | ||
30 | @@ -447,17 +445,9 @@ | ||
31 | CONFIG_FORCE_MAX_ZONEORDER=13 | ||
32 | # CONFIG_CMDLINE_BOOL is not set | ||
33 | CONFIG_EXTRA_TARGETS="" | ||
34 | -CONFIG_SUSPEND=y | ||
35 | -CONFIG_SUSPEND_FREEZER=y | ||
36 | +# CONFIG_SUSPEND is not set | ||
37 | # CONFIG_HIBERNATION is not set | ||
38 | -CONFIG_PM_SLEEP=y | ||
39 | -CONFIG_PM_SLEEP_SMP=y | ||
40 | -# CONFIG_PM_AUTOSLEEP is not set | ||
41 | -# CONFIG_PM_WAKELOCKS is not set | ||
42 | # CONFIG_PM_RUNTIME is not set | ||
43 | -CONFIG_PM=y | ||
44 | -# CONFIG_PM_DEBUG is not set | ||
45 | -CONFIG_PM_CLK=y | ||
46 | CONFIG_SECCOMP=y | ||
47 | CONFIG_ISA_DMA_API=y | ||
48 | |||
49 | @@ -1403,7 +1393,6 @@ | ||
50 | CONFIG_VT=y | ||
51 | CONFIG_CONSOLE_TRANSLATIONS=y | ||
52 | CONFIG_VT_CONSOLE=y | ||
53 | -CONFIG_VT_CONSOLE_SLEEP=y | ||
54 | CONFIG_HW_CONSOLE=y | ||
55 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
56 | CONFIG_UNIX98_PTYS=y | ||
diff --git a/recipes-kernel/linux/files/disable-cpu-hotplug.patcher b/recipes-kernel/linux/files/disable-cpu-hotplug.patcher new file mode 100644 index 0000000..bc4c373 --- /dev/null +++ b/recipes-kernel/linux/files/disable-cpu-hotplug.patcher | |||
@@ -0,0 +1,57 @@ | |||
1 | diff --git a/git.old/.config b/git/.config | ||
2 | index 2232296..2aa1771 100644 | ||
3 | --- a/git.old/.config | ||
4 | +++ b/git/.config | ||
5 | @@ -285,14 +285,13 @@ CONFIG_DEFAULT_CFQ=y | ||
6 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
7 | CONFIG_UNINLINE_SPIN_UNLOCK=y | ||
8 | CONFIG_MUTEX_SPIN_ON_OWNER=y | ||
9 | -CONFIG_FREEZER=y | ||
10 | +# CONFIG_FREEZER is not set | ||
11 | CONFIG_PPC_MSI_BITMAP=y | ||
12 | # CONFIG_PPC_XICS is not set | ||
13 | # CONFIG_PPC_ICP_NATIVE is not set | ||
14 | # CONFIG_PPC_ICP_HV is not set | ||
15 | # CONFIG_PPC_ICS_RTAS is not set | ||
16 | # CONFIG_GE_FPGA is not set | ||
17 | -CONFIG_FSL_CORENET_RCPM=y | ||
18 | |||
19 | # | ||
20 | # Platform support | ||
21 | @@ -417,8 +416,7 @@ CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y | ||
22 | # CONFIG_MATH_EMULATION is not set | ||
23 | CONFIG_IOMMU_HELPER=y | ||
24 | CONFIG_SWIOTLB=y | ||
25 | -CONFIG_HOTPLUG_CPU=y | ||
26 | -CONFIG_ARCH_CPU_PROBE_RELEASE=y | ||
27 | +# CONFIG_HOTPLUG_CPU is not set | ||
28 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
29 | CONFIG_ARCH_HAS_WALK_MEMORY=y | ||
30 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y | ||
31 | @@ -451,17 +449,9 @@ CONFIG_PPC_4K_PAGES=y | ||
32 | CONFIG_FORCE_MAX_ZONEORDER=13 | ||
33 | # CONFIG_CMDLINE_BOOL is not set | ||
34 | CONFIG_EXTRA_TARGETS="" | ||
35 | -CONFIG_SUSPEND=y | ||
36 | -CONFIG_SUSPEND_FREEZER=y | ||
37 | +# CONFIG_SUSPEND is not set | ||
38 | # CONFIG_HIBERNATION is not set | ||
39 | -CONFIG_PM_SLEEP=y | ||
40 | -CONFIG_PM_SLEEP_SMP=y | ||
41 | -# CONFIG_PM_AUTOSLEEP is not set | ||
42 | -# CONFIG_PM_WAKELOCKS is not set | ||
43 | # CONFIG_PM_RUNTIME is not set | ||
44 | -CONFIG_PM=y | ||
45 | -# CONFIG_PM_DEBUG is not set | ||
46 | -CONFIG_PM_CLK=y | ||
47 | CONFIG_SECCOMP=y | ||
48 | CONFIG_ISA_DMA_API=y | ||
49 | |||
50 | @@ -1408,7 +1398,6 @@ CONFIG_SERIO_LIBPS2=y | ||
51 | CONFIG_VT=y | ||
52 | CONFIG_CONSOLE_TRANSLATIONS=y | ||
53 | CONFIG_VT_CONSOLE=y | ||
54 | -CONFIG_VT_CONSOLE_SLEEP=y | ||
55 | CONFIG_HW_CONSOLE=y | ||
56 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
57 | CONFIG_UNIX98_PTYS=y | ||
diff --git a/recipes-kernel/linux/files/disable_hw_checksum_offload.patch b/recipes-kernel/linux/files/disable_hw_checksum_offload.patch new file mode 100644 index 0000000..4b318c1 --- /dev/null +++ b/recipes-kernel/linux/files/disable_hw_checksum_offload.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | Temporarily disable HW checksum offload | ||
2 | |||
3 | Signed-off-by: Tudor Florea <tudor.florea@enea.com> | ||
4 | Upstream-Status: Pending | ||
5 | |||
6 | |||
7 | diff --git a/arch/arm/boot/dts/k2hk-evm.dts b/arch/arm/boot/dts/k2hk-evm.dts | ||
8 | index 16cf335..7dc9665 100644 | ||
9 | --- a/arch/arm/boot/dts/k2hk-evm.dts | ||
10 | +++ b/arch/arm/boot/dts/k2hk-evm.dts | ||
11 | @@ -2521,7 +2521,7 @@ | ||
12 | }; | ||
13 | pa: pa@2000000 { | ||
14 | label = "keystone-pa"; | ||
15 | - checksum-offload = <1>; /* 1 - HW offload */ | ||
16 | + checksum-offload = <2>; | ||
17 | txhook-order = <10>; | ||
18 | txhook-softcsum = <40>; | ||
19 | rxhook-order = <10>; | ||
diff --git a/recipes-kernel/linux/files/enea_image.cfg b/recipes-kernel/linux/files/enea_image.cfg new file mode 100644 index 0000000..146eff5 --- /dev/null +++ b/recipes-kernel/linux/files/enea_image.cfg | |||
@@ -0,0 +1 @@ | |||
CONFIG_RELAY=y | |||
diff --git a/recipes-kernel/linux/files/fix_for_CVE-2013-2094.patch b/recipes-kernel/linux/files/fix_for_CVE-2013-2094.patch new file mode 100644 index 0000000..1fbad06 --- /dev/null +++ b/recipes-kernel/linux/files/fix_for_CVE-2013-2094.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From 8176cced706b5e5d15887584150764894e94e02f Mon Sep 17 00:00:00 2001 | ||
2 | From: Tommi Rantala <tt.rantala@gmail.com> | ||
3 | Date: Sat, 13 Apr 2013 19:49:14 +0000 | ||
4 | Subject: perf: Treat attr.config as u64 in perf_swevent_init() | ||
5 | |||
6 | Trinity discovered that we fail to check all 64 bits of | ||
7 | attr.config passed by user space, resulting to out-of-bounds | ||
8 | access of the perf_swevent_enabled array in | ||
9 | sw_perf_event_destroy(). | ||
10 | |||
11 | Introduced in commit b0a873ebb ("perf: Register PMU | ||
12 | implementations"). | ||
13 | |||
14 | Signed-off-by: Tommi Rantala <tt.rantala@gmail.com> | ||
15 | Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> | ||
16 | Cc: davej@redhat.com | ||
17 | Cc: Paul Mackerras <paulus@samba.org> | ||
18 | Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> | ||
19 | Link: http://lkml.kernel.org/r/1365882554-30259-1-git-send-email-tt.rantala@gmail.com | ||
20 | Signed-off-by: Ingo Molnar <mingo@kernel.org> | ||
21 | --- | ||
22 | diff --git a/kernel/events/core.c b/kernel/events/core.c | ||
23 | index 7e0962e..4d3124b 100644 | ||
24 | --- a/kernel/events/core.c | ||
25 | +++ b/kernel/events/core.c | ||
26 | @@ -5331,7 +5331,7 @@ static void sw_perf_event_destroy(struct perf_event *event) | ||
27 | |||
28 | static int perf_swevent_init(struct perf_event *event) | ||
29 | { | ||
30 | - int event_id = event->attr.config; | ||
31 | + u64 event_id = event->attr.config; | ||
32 | |||
33 | if (event->attr.type != PERF_TYPE_SOFTWARE) | ||
34 | return -ENOENT; | ||
35 | -- | ||
36 | cgit v0.9.1 | ||
diff --git a/recipes-kernel/linux/files/merge_config.sh b/recipes-kernel/linux/files/merge_config.sh new file mode 100755 index 0000000..33f18d4 --- /dev/null +++ b/recipes-kernel/linux/files/merge_config.sh | |||
@@ -0,0 +1,142 @@ | |||
1 | #!/bin/sh | ||
2 | # merge_config.sh - Takes a list of config fragment values, and merges | ||
3 | # them one by one. Provides warnings on overridden values, and specified | ||
4 | # values that did not make it to the resulting .config file (due to missed | ||
5 | # dependencies or config symbol removal). | ||
6 | # | ||
7 | # Portions reused from kconf_check and generate_cfg: | ||
8 | # http://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-tools/tree/tools/kconf_check | ||
9 | # http://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-tools/tree/tools/generate_cfg | ||
10 | # | ||
11 | # Copyright (c) 2009-2010 Wind River Systems, Inc. | ||
12 | # Copyright 2011 Linaro | ||
13 | # | ||
14 | # This program is free software; you can redistribute it and/or modify | ||
15 | # it under the terms of the GNU General Public License version 2 as | ||
16 | # published by the Free Software Foundation. | ||
17 | # | ||
18 | # This program is distributed in the hope that it will be useful, | ||
19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
21 | # See the GNU General Public License for more details. | ||
22 | |||
23 | |||
24 | usage() { | ||
25 | echo "Usage: $0 [OPTIONS] [CONFIG [...]]" | ||
26 | echo " -h display this help text" | ||
27 | echo " -m only merge the fragments, do not execute the make command" | ||
28 | echo " -n use allnoconfig instead of alldefconfig" | ||
29 | echo " -x use allmodconfig instead of alldefconfig" | ||
30 | echo " -d debug. Don't cleanup temporary files" | ||
31 | } | ||
32 | |||
33 | MAKE_FLAG=true | ||
34 | ALLTARGET=alldefconfig | ||
35 | |||
36 | # There are two variables that impact where the .config will be dropped, | ||
37 | # O= and KBUILD_OUTPUT=. So we'll respect those variables and use them as | ||
38 | # an output directory as well. These two variables are not propagating | ||
39 | # automatically to the kernel build, so always explicitly setting O= | ||
40 | # and passing it to the kernel build ensures that it is respected. | ||
41 | if [ -n "$KBUILD_OUTPUT" ]; then | ||
42 | O=$KBUILD_OUTPUT | ||
43 | fi | ||
44 | if [ -z "$O" ]; then | ||
45 | O=. | ||
46 | fi | ||
47 | |||
48 | while true; do | ||
49 | case $1 in | ||
50 | "-n") | ||
51 | ALLTARGET=allnoconfig | ||
52 | shift | ||
53 | continue | ||
54 | ;; | ||
55 | "-m") | ||
56 | MAKE_FLAG=false | ||
57 | shift | ||
58 | continue | ||
59 | ;; | ||
60 | "-d") | ||
61 | DEBUG=true | ||
62 | shift | ||
63 | continue | ||
64 | ;; | ||
65 | "-h") | ||
66 | usage | ||
67 | exit | ||
68 | ;; | ||
69 | *) | ||
70 | break | ||
71 | ;; | ||
72 | esac | ||
73 | done | ||
74 | |||
75 | clean_up() { | ||
76 | rm -f $TMP_FILE | ||
77 | exit | ||
78 | } | ||
79 | if [ -z "$DEBUG" ]; then | ||
80 | trap clean_up SIGHUP SIGINT SIGTERM | ||
81 | fi | ||
82 | |||
83 | |||
84 | MERGE_LIST=$* | ||
85 | SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p" | ||
86 | TMP_FILE=$(mktemp $O/.tmp.config.XXXXXXXXXX) | ||
87 | |||
88 | # Merge files, printing warnings on overrided values | ||
89 | for MERGE_FILE in $MERGE_LIST ; do | ||
90 | echo "Merging $MERGE_FILE" | ||
91 | CFG_LIST=$(sed -n "$SED_CONFIG_EXP" $MERGE_FILE) | ||
92 | |||
93 | for CFG in $CFG_LIST ; do | ||
94 | grep -q -w $CFG $TMP_FILE | ||
95 | if [ $? -eq 0 ] ; then | ||
96 | PREV_VAL=$(grep -w $CFG $TMP_FILE) | ||
97 | NEW_VAL=$(grep -w $CFG $MERGE_FILE) | ||
98 | if [ "x$PREV_VAL" != "x$NEW_VAL" ] ; then | ||
99 | echo Value of $CFG is redefined by fragment $MERGE_FILE: | ||
100 | echo Previous value: $PREV_VAL | ||
101 | echo New value: $NEW_VAL | ||
102 | echo | ||
103 | fi | ||
104 | sed -i "/$CFG[ =]/d" $TMP_FILE | ||
105 | fi | ||
106 | done | ||
107 | cat $MERGE_FILE >> $TMP_FILE | ||
108 | done | ||
109 | |||
110 | if [ "$MAKE_FLAG" = "false" ]; then | ||
111 | cp $TMP_FILE $O/.config | ||
112 | echo "#" | ||
113 | echo "# merged configuration written to $O/.config (needs make)" | ||
114 | echo "#" | ||
115 | if [ -z "$DEBUG" ]; then | ||
116 | clean_up | ||
117 | fi | ||
118 | exit | ||
119 | fi | ||
120 | |||
121 | # Use the merged file as the starting point for: | ||
122 | # alldefconfig: Fills in any missing symbols with Kconfig default | ||
123 | # allnoconfig: Fills in any missing symbols with # CONFIG_* is not set | ||
124 | make KCONFIG_ALLCONFIG=$TMP_FILE O=$O $ALLTARGET | ||
125 | |||
126 | |||
127 | # Check all specified config values took (might have missed-dependency issues) | ||
128 | for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do | ||
129 | |||
130 | REQUESTED_VAL=$(sed -n "$SED_CONFIG_EXP" $TMP_FILE | grep -w -e "$CFG") | ||
131 | ACTUAL_VAL=$(sed -n "$SED_CONFIG_EXP" $O/.config | grep -w -e "$CFG") | ||
132 | if [ "x$REQUESTED_VAL" != "x$ACTUAL_VAL" ] ; then | ||
133 | echo "Value requested for $CFG not in final .config" | ||
134 | echo "Requested value: $REQUESTED_VAL" | ||
135 | echo "Actual value: $ACTUAL_VAL" | ||
136 | echo "" | ||
137 | fi | ||
138 | done | ||
139 | |||
140 | if [ -z "$DEBUG" ]; then | ||
141 | clean_up | ||
142 | fi | ||
diff --git a/recipes-kernel/linux/files/powerpc-fsl-booke64-Set-vmemmap_psize-to-4K.patch b/recipes-kernel/linux/files/powerpc-fsl-booke64-Set-vmemmap_psize-to-4K.patch new file mode 100644 index 0000000..5acf97a --- /dev/null +++ b/recipes-kernel/linux/files/powerpc-fsl-booke64-Set-vmemmap_psize-to-4K.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | diff --git a/arch/powerpc/mm/tlb_nohash.c b/arch/powerpc/mm/tlb_nohash.c | ||
2 | index ae3d5b7..92cb18d 100644 | ||
3 | --- a/arch/powerpc/mm/tlb_nohash.c | ||
4 | +++ b/arch/powerpc/mm/tlb_nohash.c | ||
5 | @@ -596,8 +596,13 @@ static void __early_init_mmu(int boot_cpu) | ||
6 | /* XXX This should be decided at runtime based on supported | ||
7 | * page sizes in the TLB, but for now let's assume 16M is | ||
8 | * always there and a good fit (which it probably is) | ||
9 | + * | ||
10 | + * Freescale booke only supports 4K pages in TLB0, so use that. | ||
11 | */ | ||
12 | - mmu_vmemmap_psize = MMU_PAGE_16M; | ||
13 | + if (mmu_has_feature(MMU_FTR_TYPE_FSL_E)) | ||
14 | + mmu_vmemmap_psize = MMU_PAGE_4K; | ||
15 | + else | ||
16 | + mmu_vmemmap_psize = MMU_PAGE_16M; | ||
17 | |||
18 | /* XXX This code only checks for TLB 0 capabilities and doesn't | ||
19 | * check what page size combos are supported by the HW. It | ||
diff --git a/recipes-kernel/linux/files/pramfs-1.2.9-3.0Patched.tar.gz b/recipes-kernel/linux/files/pramfs-1.2.9-3.0Patched.tar.gz new file mode 100644 index 0000000..895b329 --- /dev/null +++ b/recipes-kernel/linux/files/pramfs-1.2.9-3.0Patched.tar.gz | |||
Binary files differ | |||
diff --git a/recipes-kernel/linux/files/pramfs-1.4.2-3.10_patched.tar.gz b/recipes-kernel/linux/files/pramfs-1.4.2-3.10_patched.tar.gz new file mode 100644 index 0000000..0d71064 --- /dev/null +++ b/recipes-kernel/linux/files/pramfs-1.4.2-3.10_patched.tar.gz | |||
Binary files differ | |||
diff --git a/recipes-kernel/linux/files/pramfs-2.6.33-1.1.6.tar.gz b/recipes-kernel/linux/files/pramfs-2.6.33-1.1.6.tar.gz new file mode 100644 index 0000000..f25bdd4 --- /dev/null +++ b/recipes-kernel/linux/files/pramfs-2.6.33-1.1.6.tar.gz | |||
Binary files differ | |||
diff --git a/recipes-kernel/linux/files/setlocalversion.patch b/recipes-kernel/linux/files/setlocalversion.patch new file mode 100644 index 0000000..f0925de --- /dev/null +++ b/recipes-kernel/linux/files/setlocalversion.patch | |||
@@ -0,0 +1,63 @@ | |||
1 | diff -uNr a/Makefile b/Makefile | ||
2 | --- a/Makefile 2012-05-11 10:45:09.669169201 +0200 | ||
3 | +++ b/Makefile 2012-05-11 10:44:57.285708701 +0200 | ||
4 | @@ -949,6 +949,7 @@ | ||
5 | # Store (new) KERNELRELASE string in include/config/kernel.release | ||
6 | include/config/kernel.release: include/config/auto.conf FORCE | ||
7 | $(Q)rm -f $@ | ||
8 | + $(Q)rm -f .scmversion | ||
9 | $(Q)echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" > $@ | ||
10 | |||
11 | |||
12 | @@ -1463,6 +1464,7 @@ | ||
13 | $(PERL) $(src)/scripts/checkstack.pl $(CHECKSTACK_ARCH) | ||
14 | |||
15 | kernelrelease: | ||
16 | + $(Q)rm -f .scmversion | ||
17 | @echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" | ||
18 | |||
19 | kernelversion: | ||
20 | diff -uNr a/scripts/setlocalversion b/scripts/setlocalversion | ||
21 | --- a/scripts/setlocalversion 2012-05-11 10:40:11.926141561 +0200 | ||
22 | +++ b/scripts/setlocalversion 2012-05-11 10:43:04.818608594 +0200 | ||
23 | @@ -49,12 +49,6 @@ | ||
24 | # it, because this version is defined in the top level Makefile. | ||
25 | if [ -z "`git describe --exact-match 2>/dev/null`" ]; then | ||
26 | |||
27 | - # If only the short version is requested, don't bother | ||
28 | - # running further git commands | ||
29 | - if $short; then | ||
30 | - echo "+" | ||
31 | - return | ||
32 | - fi | ||
33 | # If we are past a tagged commit (like | ||
34 | # "v2.6.30-rc5-302-g72357d5"), we pretty print it. | ||
35 | if atag="`git describe 2>/dev/null`"; then | ||
36 | @@ -98,11 +92,6 @@ | ||
37 | fi | ||
38 | fi | ||
39 | |||
40 | - # Are there uncommitted changes? | ||
41 | - # These are represented by + after the changeset id. | ||
42 | - case "$hgid" in | ||
43 | - *+|*+\ *) printf '%s' -dirty ;; | ||
44 | - esac | ||
45 | |||
46 | # All done with mercurial | ||
47 | return | ||
48 | @@ -163,15 +152,6 @@ | ||
49 | if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then | ||
50 | # full scm version string | ||
51 | res="$res$(scm_version)" | ||
52 | -else | ||
53 | - # append a plus sign if the repository is not in a clean | ||
54 | - # annotated or signed tagged state (as git describe only | ||
55 | - # looks at signed or annotated tags - git tag -a/-s) and | ||
56 | - # LOCALVERSION= is not specified | ||
57 | - if test "${LOCALVERSION+set}" != "set"; then | ||
58 | - scm=$(scm_version --short) | ||
59 | - res="$res${scm:++}" | ||
60 | - fi | ||
61 | fi | ||
62 | |||
63 | echo "$res" | ||