aboutsummaryrefslogtreecommitdiffstats
path: root/main/linux-grsec/gcc6.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-07-11 13:04:22 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2016-07-11 16:38:20 +0000
commit36749a96b66db721ba430ea2d960a1874650729d (patch)
tree24063647e4edb7d52b5623d19d50d5d8f1c1d226 /main/linux-grsec/gcc6.patch
parenta1b7cef26254e3f5b14a77245a2ecac4fde38358 (diff)
downloadaports-36749a96b66db721ba430ea2d960a1874650729d.tar.bz2
aports-36749a96b66db721ba430ea2d960a1874650729d.tar.xz
main/linux-grsec: enable brcmfmac driver
used by macbook pro
Diffstat (limited to 'main/linux-grsec/gcc6.patch')
-rw-r--r--main/linux-grsec/gcc6.patch112
1 files changed, 112 insertions, 0 deletions
diff --git a/main/linux-grsec/gcc6.patch b/main/linux-grsec/gcc6.patch
new file mode 100644
index 0000000000..f2bc5adab2
--- /dev/null
+++ b/main/linux-grsec/gcc6.patch
@@ -0,0 +1,112 @@
+diff --git a/grsecurity/gracl.c b/grsecurity/gracl.c
+index 7ad630a..3c66319 100644
+--- a/grsecurity/gracl.c
++++ b/grsecurity/gracl.c
+@@ -196,7 +196,7 @@ static int prepend(char **buffer, int *buflen, const char *str, int namelen)
+
+ static int prepend_name(char **buffer, int *buflen, struct qstr *name)
+ {
+- return prepend(buffer, buflen, name->name, name->len);
++ return prepend(buffer, buflen, (const char *)name->name, name->len);
+ }
+
+ static int prepend_path(const struct path *path, struct path *root,
+@@ -560,7 +560,7 @@ struct name_entry *
+ __lookup_name_entry(const struct gr_policy_state *state, const char *name)
+ {
+ unsigned int len = strlen(name);
+- unsigned int key = full_name_hash(name, len);
++ unsigned int key = full_name_hash((const unsigned char *)name, len);
+ unsigned int index = key % state->name_set.n_size;
+ struct name_entry *match;
+
+@@ -582,7 +582,7 @@ static struct name_entry *
+ lookup_name_entry_create(const char *name)
+ {
+ unsigned int len = strlen(name);
+- unsigned int key = full_name_hash(name, len);
++ unsigned int key = full_name_hash((const unsigned char *)name, len);
+ unsigned int index = key % running_polstate.name_set.n_size;
+ struct name_entry *match;
+
+diff --git a/grsecurity/gracl_policy.c b/grsecurity/gracl_policy.c
+index 0773423..bfcd64a 100644
+--- a/grsecurity/gracl_policy.c
++++ b/grsecurity/gracl_policy.c
+@@ -351,7 +351,7 @@ insert_name_entry(char *name, const u64 inode, const dev_t device, __u8 deleted)
+ struct name_entry **curr, *nentry;
+ struct inodev_entry *ientry;
+ unsigned int len = strlen(name);
+- unsigned int key = full_name_hash(name, len);
++ unsigned int key = full_name_hash((const unsigned char *)name, len);
+ unsigned int index = key % polstate->name_set.n_size;
+
+ curr = &polstate->name_set.n_hash[index];
+@@ -1376,7 +1376,7 @@ lookup_special_role_auth(__u16 mode, const char *rolename, unsigned char **salt,
+ FOR_EACH_ROLE_END(r)
+
+ for (i = 0; i < polstate->num_sprole_pws; i++) {
+- if (!strcmp(rolename, polstate->acl_special_roles[i]->rolename)) {
++ if (!strcmp(rolename, (const char *)polstate->acl_special_roles[i]->rolename)) {
+ *salt = polstate->acl_special_roles[i]->salt;
+ *sum = polstate->acl_special_roles[i]->sum;
+ return 1;
+@@ -1664,11 +1664,11 @@ write_grsec_handler(struct file *file, const char __user * buf, size_t count, lo
+ }
+
+ if (lookup_special_role_auth
+- (gr_usermode->mode, gr_usermode->sp_role, &sprole_salt, &sprole_sum)
++ (gr_usermode->mode, (const char *)gr_usermode->sp_role, &sprole_salt, &sprole_sum)
+ && ((!sprole_salt && !sprole_sum)
+ || !(chkpw(gr_usermode, sprole_salt, sprole_sum)))) {
+ char *p = "";
+- assign_special_role(gr_usermode->sp_role);
++ assign_special_role((const char *)gr_usermode->sp_role);
+ read_lock(&tasklist_lock);
+ if (current->real_parent)
+ p = current->real_parent->role->rolename;
+diff --git a/grsecurity/grsum.c b/grsecurity/grsum.c
+index 4fb2ce6..aef6b92 100644
+--- a/grsecurity/grsum.c
++++ b/grsecurity/grsum.c
+@@ -32,12 +32,12 @@ chkpw(struct gr_arg *entry, unsigned char *salt, unsigned char *sum)
+
+ sg_init_table(sg, 2);
+ sg_set_buf(&sg[0], salt, GR_SALT_LEN);
+- sg_set_buf(&sg[1], entry->pw, strlen(entry->pw));
++ sg_set_buf(&sg[1], entry->pw, strlen((const char *)entry->pw));
+
+ desc.tfm = tfm;
+ desc.flags = 0;
+
+- cryptres = crypto_hash_digest(&desc, sg, GR_SALT_LEN + strlen(entry->pw),
++ cryptres = crypto_hash_digest(&desc, sg, GR_SALT_LEN + strlen((const char *)entry->pw),
+ temp_sum);
+
+ memset(entry->pw, 0, GR_PW_LEN);
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index 25820d8..0491a0f 100644
+--- a/include/linux/sched.h
++++ b/include/linux/sched.h
+@@ -2386,7 +2386,7 @@ extern void sched_clock_init(void);
+ static inline void populate_stack(void)
+ {
+ struct task_struct *curtask = current;
+- int c;
++ int __always_unused c;
+ int *ptr = curtask->stack;
+ int *end = curtask->stack + THREAD_SIZE;
+
+diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
+index a34ab2d..70fffac 100644
+--- a/include/linux/sysfs.h
++++ b/include/linux/sysfs.h
+@@ -517,7 +517,7 @@ static inline void sysfs_notify_dirent(struct kernfs_node *kn)
+ static inline struct kernfs_node *sysfs_get_dirent(struct kernfs_node *parent,
+ const unsigned char *name)
+ {
+- return kernfs_find_and_get(parent, name);
++ return kernfs_find_and_get(parent, (const char *)name);
+ }
+
+ static inline struct kernfs_node *sysfs_get(struct kernfs_node *kn)