Add stable release 2.6.32.8
svn path=/dists/trunk/linux-2.6/; revision=15137
This commit is contained in:
parent
d6be1f8092
commit
4ae828b4e7
|
@ -4,14 +4,15 @@ linux-2.6 (2.6.32-8) UNRELEASED; urgency=low
|
|||
* Don't let default compiler flags escape into build.
|
||||
|
||||
[ dann frazier ]
|
||||
* Remove TIF_ABI_PENDING bit from x86, sparc & powerpc, fixing
|
||||
32-bit userland/64-bit kernel breakage (Closes: #568416)
|
||||
* KVM: PIT: control word is write-only (CVE-2010-0309)
|
||||
* connector: Delete buggy notification code. (CVE-2010-0410)
|
||||
|
||||
[ Ben Hutchings ]
|
||||
* Build lgs8gxx driver along with cxusb (Closes: #568414)
|
||||
* Revert incorrect change to powerpc clocksource setup (Closes: #568457)
|
||||
* Add stable release 2.6.32.8:
|
||||
- Remove TIF_ABI_PENDING bit from x86, sparc & powerpc, fixing
|
||||
32-bit userland/64-bit kernel breakage (Closes: #568416)
|
||||
- connector: Delete buggy notification code. (CVE-2010-0410)
|
||||
|
||||
[ Martin Michlmayr ]
|
||||
* Implement power-off for D-Link DNS-323 rev B1 and fix the blinking
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
--- a/kernel/time/clocksource.c
|
||||
+++ b/kernel/time/clocksource.c
|
||||
@@ -466,8 +466,6 @@ void clocksource_touch_watchdog(void)
|
||||
clocksource_resume_watchdog();
|
||||
}
|
||||
|
||||
-#ifdef CONFIG_GENERIC_TIME
|
||||
-
|
||||
/**
|
||||
* clocksource_max_deferment - Returns max time the clocksource can be deferred
|
||||
* @cs: Pointer to clocksource
|
||||
@@ -509,6 +507,8 @@ static u64 clocksource_max_deferment(struct clocksource *cs)
|
||||
return max_nsecs - (max_nsecs >> 5);
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_GENERIC_TIME
|
||||
+
|
||||
/**
|
||||
* clocksource_select - Select the best clocksource available
|
||||
*
|
|
@ -1,326 +0,0 @@
|
|||
From f98bfbd78c37c5946cc53089da32a5f741efdeb7 Mon Sep 17 00:00:00 2001
|
||||
From: Evgeniy Polyakov <zbr@ioremap.net>
|
||||
Date: Tue, 2 Feb 2010 15:58:48 -0800
|
||||
Subject: connector: Delete buggy notification code.
|
||||
|
||||
From: Evgeniy Polyakov <zbr@ioremap.net>
|
||||
|
||||
commit f98bfbd78c37c5946cc53089da32a5f741efdeb7 upstream.
|
||||
|
||||
On Tue, Feb 02, 2010 at 02:57:14PM -0800, Greg KH (gregkh@suse.de) wrote:
|
||||
> > There are at least two ways to fix it: using a big cannon and a small
|
||||
> > one. The former way is to disable notification registration, since it is
|
||||
> > not used by anyone at all. Second way is to check whether calling
|
||||
> > process is root and its destination group is -1 (kind of priveledged
|
||||
> > one) before command is dispatched to workqueue.
|
||||
>
|
||||
> Well if no one is using it, removing it makes the most sense, right?
|
||||
>
|
||||
> No objection from me, care to make up a patch either way for this?
|
||||
|
||||
Getting it is not used, let's drop support for notifications about
|
||||
(un)registered events from connector.
|
||||
Another option was to check credentials on receiving, but we can always
|
||||
restore it without bugs if needed, but genetlink has a wider code base
|
||||
and none complained, that userspace can not get notification when some
|
||||
other clients were (un)registered.
|
||||
|
||||
Kudos for Sebastian Krahmer <krahmer@suse.de>, who found a bug in the
|
||||
code.
|
||||
|
||||
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
|
||||
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
|
||||
---
|
||||
drivers/connector/connector.c | 175 ------------------------------------------
|
||||
include/linux/connector.h | 32 -------
|
||||
2 files changed, 207 deletions(-)
|
||||
|
||||
--- a/drivers/connector/connector.c
|
||||
+++ b/drivers/connector/connector.c
|
||||
@@ -36,17 +36,6 @@ MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Evgeniy Polyakov <zbr@ioremap.net>");
|
||||
MODULE_DESCRIPTION("Generic userspace <-> kernelspace connector.");
|
||||
|
||||
-static u32 cn_idx = CN_IDX_CONNECTOR;
|
||||
-static u32 cn_val = CN_VAL_CONNECTOR;
|
||||
-
|
||||
-module_param(cn_idx, uint, 0);
|
||||
-module_param(cn_val, uint, 0);
|
||||
-MODULE_PARM_DESC(cn_idx, "Connector's main device idx.");
|
||||
-MODULE_PARM_DESC(cn_val, "Connector's main device val.");
|
||||
-
|
||||
-static DEFINE_MUTEX(notify_lock);
|
||||
-static LIST_HEAD(notify_list);
|
||||
-
|
||||
static struct cn_dev cdev;
|
||||
|
||||
static int cn_already_initialized;
|
||||
@@ -210,54 +199,6 @@ static void cn_rx_skb(struct sk_buff *__
|
||||
}
|
||||
|
||||
/*
|
||||
- * Notification routing.
|
||||
- *
|
||||
- * Gets id and checks if there are notification request for it's idx
|
||||
- * and val. If there are such requests notify the listeners with the
|
||||
- * given notify event.
|
||||
- *
|
||||
- */
|
||||
-static void cn_notify(struct cb_id *id, u32 notify_event)
|
||||
-{
|
||||
- struct cn_ctl_entry *ent;
|
||||
-
|
||||
- mutex_lock(¬ify_lock);
|
||||
- list_for_each_entry(ent, ¬ify_list, notify_entry) {
|
||||
- int i;
|
||||
- struct cn_notify_req *req;
|
||||
- struct cn_ctl_msg *ctl = ent->msg;
|
||||
- int idx_found, val_found;
|
||||
-
|
||||
- idx_found = val_found = 0;
|
||||
-
|
||||
- req = (struct cn_notify_req *)ctl->data;
|
||||
- for (i = 0; i < ctl->idx_notify_num; ++i, ++req) {
|
||||
- if (id->idx >= req->first &&
|
||||
- id->idx < req->first + req->range) {
|
||||
- idx_found = 1;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- for (i = 0; i < ctl->val_notify_num; ++i, ++req) {
|
||||
- if (id->val >= req->first &&
|
||||
- id->val < req->first + req->range) {
|
||||
- val_found = 1;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (idx_found && val_found) {
|
||||
- struct cn_msg m = { .ack = notify_event, };
|
||||
-
|
||||
- memcpy(&m.id, id, sizeof(m.id));
|
||||
- cn_netlink_send(&m, ctl->group, GFP_KERNEL);
|
||||
- }
|
||||
- }
|
||||
- mutex_unlock(¬ify_lock);
|
||||
-}
|
||||
-
|
||||
-/*
|
||||
* Callback add routing - adds callback with given ID and name.
|
||||
* If there is registered callback with the same ID it will not be added.
|
||||
*
|
||||
@@ -276,8 +217,6 @@ int cn_add_callback(struct cb_id *id, ch
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
- cn_notify(id, 0);
|
||||
-
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(cn_add_callback);
|
||||
@@ -295,111 +234,9 @@ void cn_del_callback(struct cb_id *id)
|
||||
struct cn_dev *dev = &cdev;
|
||||
|
||||
cn_queue_del_callback(dev->cbdev, id);
|
||||
- cn_notify(id, 1);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(cn_del_callback);
|
||||
|
||||
-/*
|
||||
- * Checks two connector's control messages to be the same.
|
||||
- * Returns 1 if they are the same or if the first one is corrupted.
|
||||
- */
|
||||
-static int cn_ctl_msg_equals(struct cn_ctl_msg *m1, struct cn_ctl_msg *m2)
|
||||
-{
|
||||
- int i;
|
||||
- struct cn_notify_req *req1, *req2;
|
||||
-
|
||||
- if (m1->idx_notify_num != m2->idx_notify_num)
|
||||
- return 0;
|
||||
-
|
||||
- if (m1->val_notify_num != m2->val_notify_num)
|
||||
- return 0;
|
||||
-
|
||||
- if (m1->len != m2->len)
|
||||
- return 0;
|
||||
-
|
||||
- if ((m1->idx_notify_num + m1->val_notify_num) * sizeof(*req1) !=
|
||||
- m1->len)
|
||||
- return 1;
|
||||
-
|
||||
- req1 = (struct cn_notify_req *)m1->data;
|
||||
- req2 = (struct cn_notify_req *)m2->data;
|
||||
-
|
||||
- for (i = 0; i < m1->idx_notify_num; ++i) {
|
||||
- if (req1->first != req2->first || req1->range != req2->range)
|
||||
- return 0;
|
||||
- req1++;
|
||||
- req2++;
|
||||
- }
|
||||
-
|
||||
- for (i = 0; i < m1->val_notify_num; ++i) {
|
||||
- if (req1->first != req2->first || req1->range != req2->range)
|
||||
- return 0;
|
||||
- req1++;
|
||||
- req2++;
|
||||
- }
|
||||
-
|
||||
- return 1;
|
||||
-}
|
||||
-
|
||||
-/*
|
||||
- * Main connector device's callback.
|
||||
- *
|
||||
- * Used for notification of a request's processing.
|
||||
- */
|
||||
-static void cn_callback(struct cn_msg *msg, struct netlink_skb_parms *nsp)
|
||||
-{
|
||||
- struct cn_ctl_msg *ctl;
|
||||
- struct cn_ctl_entry *ent;
|
||||
- u32 size;
|
||||
-
|
||||
- if (msg->len < sizeof(*ctl))
|
||||
- return;
|
||||
-
|
||||
- ctl = (struct cn_ctl_msg *)msg->data;
|
||||
-
|
||||
- size = (sizeof(*ctl) + ((ctl->idx_notify_num +
|
||||
- ctl->val_notify_num) *
|
||||
- sizeof(struct cn_notify_req)));
|
||||
-
|
||||
- if (msg->len != size)
|
||||
- return;
|
||||
-
|
||||
- if (ctl->len + sizeof(*ctl) != msg->len)
|
||||
- return;
|
||||
-
|
||||
- /*
|
||||
- * Remove notification.
|
||||
- */
|
||||
- if (ctl->group == 0) {
|
||||
- struct cn_ctl_entry *n;
|
||||
-
|
||||
- mutex_lock(¬ify_lock);
|
||||
- list_for_each_entry_safe(ent, n, ¬ify_list, notify_entry) {
|
||||
- if (cn_ctl_msg_equals(ent->msg, ctl)) {
|
||||
- list_del(&ent->notify_entry);
|
||||
- kfree(ent);
|
||||
- }
|
||||
- }
|
||||
- mutex_unlock(¬ify_lock);
|
||||
-
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- size += sizeof(*ent);
|
||||
-
|
||||
- ent = kzalloc(size, GFP_KERNEL);
|
||||
- if (!ent)
|
||||
- return;
|
||||
-
|
||||
- ent->msg = (struct cn_ctl_msg *)(ent + 1);
|
||||
-
|
||||
- memcpy(ent->msg, ctl, size - sizeof(*ent));
|
||||
-
|
||||
- mutex_lock(¬ify_lock);
|
||||
- list_add(&ent->notify_entry, ¬ify_list);
|
||||
- mutex_unlock(¬ify_lock);
|
||||
-}
|
||||
-
|
||||
static int cn_proc_show(struct seq_file *m, void *v)
|
||||
{
|
||||
struct cn_queue_dev *dev = cdev.cbdev;
|
||||
@@ -437,11 +274,8 @@ static const struct file_operations cn_f
|
||||
static int __devinit cn_init(void)
|
||||
{
|
||||
struct cn_dev *dev = &cdev;
|
||||
- int err;
|
||||
|
||||
dev->input = cn_rx_skb;
|
||||
- dev->id.idx = cn_idx;
|
||||
- dev->id.val = cn_val;
|
||||
|
||||
dev->nls = netlink_kernel_create(&init_net, NETLINK_CONNECTOR,
|
||||
CN_NETLINK_USERS + 0xf,
|
||||
@@ -457,14 +291,6 @@ static int __devinit cn_init(void)
|
||||
|
||||
cn_already_initialized = 1;
|
||||
|
||||
- err = cn_add_callback(&dev->id, "connector", &cn_callback);
|
||||
- if (err) {
|
||||
- cn_already_initialized = 0;
|
||||
- cn_queue_free_dev(dev->cbdev);
|
||||
- netlink_kernel_release(dev->nls);
|
||||
- return -EINVAL;
|
||||
- }
|
||||
-
|
||||
proc_net_fops_create(&init_net, "connector", S_IRUGO, &cn_file_ops);
|
||||
|
||||
return 0;
|
||||
@@ -478,7 +304,6 @@ static void __devexit cn_fini(void)
|
||||
|
||||
proc_net_remove(&init_net, "connector");
|
||||
|
||||
- cn_del_callback(&dev->id);
|
||||
cn_queue_free_dev(dev->cbdev);
|
||||
netlink_kernel_release(dev->nls);
|
||||
}
|
||||
--- a/include/linux/connector.h
|
||||
+++ b/include/linux/connector.h
|
||||
@@ -24,9 +24,6 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
-#define CN_IDX_CONNECTOR 0xffffffff
|
||||
-#define CN_VAL_CONNECTOR 0xffffffff
|
||||
-
|
||||
/*
|
||||
* Process Events connector unique ids -- used for message routing
|
||||
*/
|
||||
@@ -73,30 +70,6 @@ struct cn_msg {
|
||||
__u8 data[0];
|
||||
};
|
||||
|
||||
-/*
|
||||
- * Notify structure - requests notification about
|
||||
- * registering/unregistering idx/val in range [first, first+range].
|
||||
- */
|
||||
-struct cn_notify_req {
|
||||
- __u32 first;
|
||||
- __u32 range;
|
||||
-};
|
||||
-
|
||||
-/*
|
||||
- * Main notification control message
|
||||
- * *_notify_num - number of appropriate cn_notify_req structures after
|
||||
- * this struct.
|
||||
- * group - notification receiver's idx.
|
||||
- * len - total length of the attached data.
|
||||
- */
|
||||
-struct cn_ctl_msg {
|
||||
- __u32 idx_notify_num;
|
||||
- __u32 val_notify_num;
|
||||
- __u32 group;
|
||||
- __u32 len;
|
||||
- __u8 data[0];
|
||||
-};
|
||||
-
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <asm/atomic.h>
|
||||
@@ -149,11 +122,6 @@ struct cn_callback_entry {
|
||||
u32 seq, group;
|
||||
};
|
||||
|
||||
-struct cn_ctl_entry {
|
||||
- struct list_head notify_entry;
|
||||
- struct cn_ctl_msg *msg;
|
||||
-};
|
||||
-
|
||||
struct cn_dev {
|
||||
struct cb_id id;
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -1,80 +0,0 @@
|
|||
From 94f28da8409c6059135e89ac64a0839993124155 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Schwab <schwab@linux-m68k.org>
|
||||
Date: Sat, 30 Jan 2010 10:20:59 +0000
|
||||
Subject: powerpc: TIF_ABI_PENDING bit removal
|
||||
|
||||
From: Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
commit 94f28da8409c6059135e89ac64a0839993124155 upstream.
|
||||
|
||||
Here are the powerpc bits to remove TIF_ABI_PENDING now that
|
||||
set_personality() is called at the appropriate place in exec.
|
||||
|
||||
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
|
||||
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
|
||||
---
|
||||
arch/powerpc/include/asm/elf.h | 8 ++------
|
||||
arch/powerpc/include/asm/thread_info.h | 2 --
|
||||
arch/powerpc/kernel/process.c | 12 ------------
|
||||
3 files changed, 2 insertions(+), 20 deletions(-)
|
||||
|
||||
--- a/arch/powerpc/include/asm/elf.h
|
||||
+++ b/arch/powerpc/include/asm/elf.h
|
||||
@@ -236,14 +236,10 @@ typedef elf_vrregset_t elf_fpxregset_t;
|
||||
#ifdef __powerpc64__
|
||||
# define SET_PERSONALITY(ex) \
|
||||
do { \
|
||||
- unsigned long new_flags = 0; \
|
||||
if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
|
||||
- new_flags = _TIF_32BIT; \
|
||||
- if ((current_thread_info()->flags & _TIF_32BIT) \
|
||||
- != new_flags) \
|
||||
- set_thread_flag(TIF_ABI_PENDING); \
|
||||
+ set_thread_flag(TIF_32BIT); \
|
||||
else \
|
||||
- clear_thread_flag(TIF_ABI_PENDING); \
|
||||
+ clear_thread_flag(TIF_32BIT); \
|
||||
if (personality(current->personality) != PER_LINUX32) \
|
||||
set_personality(PER_LINUX | \
|
||||
(current->personality & (~PER_MASK))); \
|
||||
--- a/arch/powerpc/include/asm/thread_info.h
|
||||
+++ b/arch/powerpc/include/asm/thread_info.h
|
||||
@@ -111,7 +111,6 @@ static inline struct thread_info *curren
|
||||
#define TIF_NOTIFY_RESUME 13 /* callback before returning to user */
|
||||
#define TIF_FREEZE 14 /* Freezing for suspend */
|
||||
#define TIF_RUNLATCH 15 /* Is the runlatch enabled? */
|
||||
-#define TIF_ABI_PENDING 16 /* 32/64 bit switch needed */
|
||||
|
||||
/* as above, but as bit values */
|
||||
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
|
||||
@@ -129,7 +128,6 @@ static inline struct thread_info *curren
|
||||
#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
|
||||
#define _TIF_FREEZE (1<<TIF_FREEZE)
|
||||
#define _TIF_RUNLATCH (1<<TIF_RUNLATCH)
|
||||
-#define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING)
|
||||
#define _TIF_SYSCALL_T_OR_A (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP)
|
||||
|
||||
#define _TIF_USER_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED | \
|
||||
--- a/arch/powerpc/kernel/process.c
|
||||
+++ b/arch/powerpc/kernel/process.c
|
||||
@@ -554,18 +554,6 @@ void exit_thread(void)
|
||||
|
||||
void flush_thread(void)
|
||||
{
|
||||
-#ifdef CONFIG_PPC64
|
||||
- struct thread_info *t = current_thread_info();
|
||||
-
|
||||
- if (test_ti_thread_flag(t, TIF_ABI_PENDING)) {
|
||||
- clear_ti_thread_flag(t, TIF_ABI_PENDING);
|
||||
- if (test_ti_thread_flag(t, TIF_32BIT))
|
||||
- clear_ti_thread_flag(t, TIF_32BIT);
|
||||
- else
|
||||
- set_ti_thread_flag(t, TIF_32BIT);
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
discard_lazy_cpu_state();
|
||||
|
||||
if (current->thread.dabr) {
|
|
@ -1,86 +0,0 @@
|
|||
From 94673e968cbcce07fa78dac4b0ae05d24b5816e1 Mon Sep 17 00:00:00 2001
|
||||
From: David Miller <davem@davemloft.net>
|
||||
Date: Thu, 28 Jan 2010 21:42:02 -0800
|
||||
Subject: sparc: TIF_ABI_PENDING bit removal
|
||||
|
||||
From: David Miller <davem@davemloft.net>
|
||||
|
||||
commit 94673e968cbcce07fa78dac4b0ae05d24b5816e1 upstream.
|
||||
|
||||
Here are the sparc bits to remove TIF_ABI_PENDING now that
|
||||
set_personality() is called at the appropriate place in exec.
|
||||
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
|
||||
---
|
||||
arch/sparc/include/asm/elf_64.h | 13 +++----------
|
||||
arch/sparc/include/asm/thread_info_64.h | 4 +---
|
||||
arch/sparc/kernel/process_64.c | 8 --------
|
||||
3 files changed, 4 insertions(+), 21 deletions(-)
|
||||
|
||||
--- a/arch/sparc/include/asm/elf_64.h
|
||||
+++ b/arch/sparc/include/asm/elf_64.h
|
||||
@@ -196,17 +196,10 @@ static inline unsigned int sparc64_elf_h
|
||||
#define ELF_PLATFORM (NULL)
|
||||
|
||||
#define SET_PERSONALITY(ex) \
|
||||
-do { unsigned long new_flags = current_thread_info()->flags; \
|
||||
- new_flags &= _TIF_32BIT; \
|
||||
- if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
|
||||
- new_flags |= _TIF_32BIT; \
|
||||
+do { if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
|
||||
+ set_thread_flag(TIF_32BIT); \
|
||||
else \
|
||||
- new_flags &= ~_TIF_32BIT; \
|
||||
- if ((current_thread_info()->flags & _TIF_32BIT) \
|
||||
- != new_flags) \
|
||||
- set_thread_flag(TIF_ABI_PENDING); \
|
||||
- else \
|
||||
- clear_thread_flag(TIF_ABI_PENDING); \
|
||||
+ clear_thread_flag(TIF_32BIT); \
|
||||
/* flush_thread will update pgd cache */ \
|
||||
if (personality(current->personality) != PER_LINUX32) \
|
||||
set_personality(PER_LINUX | \
|
||||
--- a/arch/sparc/include/asm/thread_info_64.h
|
||||
+++ b/arch/sparc/include/asm/thread_info_64.h
|
||||
@@ -227,12 +227,11 @@ register struct thread_info *current_thr
|
||||
/* flag bit 8 is available */
|
||||
#define TIF_SECCOMP 9 /* secure computing */
|
||||
#define TIF_SYSCALL_AUDIT 10 /* syscall auditing active */
|
||||
-/* flag bit 11 is available */
|
||||
/* NOTE: Thread flags >= 12 should be ones we have no interest
|
||||
* in using in assembly, else we can't use the mask as
|
||||
* an immediate value in instructions such as andcc.
|
||||
*/
|
||||
-#define TIF_ABI_PENDING 12
|
||||
+/* flag bit 12 is available */
|
||||
#define TIF_MEMDIE 13
|
||||
#define TIF_POLLING_NRFLAG 14
|
||||
#define TIF_FREEZE 15 /* is freezing for suspend */
|
||||
@@ -246,7 +245,6 @@ register struct thread_info *current_thr
|
||||
#define _TIF_32BIT (1<<TIF_32BIT)
|
||||
#define _TIF_SECCOMP (1<<TIF_SECCOMP)
|
||||
#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)
|
||||
-#define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING)
|
||||
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
|
||||
#define _TIF_FREEZE (1<<TIF_FREEZE)
|
||||
|
||||
--- a/arch/sparc/kernel/process_64.c
|
||||
+++ b/arch/sparc/kernel/process_64.c
|
||||
@@ -365,14 +365,6 @@ void flush_thread(void)
|
||||
struct thread_info *t = current_thread_info();
|
||||
struct mm_struct *mm;
|
||||
|
||||
- if (test_ti_thread_flag(t, TIF_ABI_PENDING)) {
|
||||
- clear_ti_thread_flag(t, TIF_ABI_PENDING);
|
||||
- if (test_ti_thread_flag(t, TIF_32BIT))
|
||||
- clear_ti_thread_flag(t, TIF_32BIT);
|
||||
- else
|
||||
- set_ti_thread_flag(t, TIF_32BIT);
|
||||
- }
|
||||
-
|
||||
mm = t->task->mm;
|
||||
if (mm)
|
||||
tsb_context_switch(mm);
|
|
@ -1,117 +0,0 @@
|
|||
From 05d43ed8a89c159ff641d472f970e3f1baa66318 Mon Sep 17 00:00:00 2001
|
||||
From: H. Peter Anvin <hpa@zytor.com>
|
||||
Date: Thu, 28 Jan 2010 22:14:43 -0800
|
||||
Subject: x86: get rid of the insane TIF_ABI_PENDING bit
|
||||
|
||||
From: H. Peter Anvin <hpa@zytor.com>
|
||||
|
||||
commit 05d43ed8a89c159ff641d472f970e3f1baa66318 upstream.
|
||||
|
||||
Now that the previous commit made it possible to do the personality
|
||||
setting at the point of no return, we do just that for ELF binaries.
|
||||
And suddenly all the reasons for that insane TIF_ABI_PENDING bit go
|
||||
away, and we can just make SET_PERSONALITY() just do the obvious thing
|
||||
for a 32-bit compat process.
|
||||
|
||||
Everything becomes much more straightforward this way.
|
||||
|
||||
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
||||
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
|
||||
---
|
||||
arch/x86/ia32/ia32_aout.c | 1 -
|
||||
arch/x86/include/asm/elf.h | 10 ++--------
|
||||
arch/x86/include/asm/thread_info.h | 2 --
|
||||
arch/x86/kernel/process.c | 12 ------------
|
||||
arch/x86/kernel/process_64.c | 11 +++++++++++
|
||||
5 files changed, 13 insertions(+), 23 deletions(-)
|
||||
|
||||
--- a/arch/x86/ia32/ia32_aout.c
|
||||
+++ b/arch/x86/ia32/ia32_aout.c
|
||||
@@ -311,7 +311,6 @@ static int load_aout_binary(struct linux
|
||||
/* OK, This is the point of no return */
|
||||
set_personality(PER_LINUX);
|
||||
set_thread_flag(TIF_IA32);
|
||||
- clear_thread_flag(TIF_ABI_PENDING);
|
||||
|
||||
setup_new_exec(bprm);
|
||||
|
||||
--- a/arch/x86/include/asm/elf.h
|
||||
+++ b/arch/x86/include/asm/elf.h
|
||||
@@ -197,14 +197,8 @@ do { \
|
||||
set_fs(USER_DS); \
|
||||
} while (0)
|
||||
|
||||
-#define COMPAT_SET_PERSONALITY(ex) \
|
||||
-do { \
|
||||
- if (test_thread_flag(TIF_IA32)) \
|
||||
- clear_thread_flag(TIF_ABI_PENDING); \
|
||||
- else \
|
||||
- set_thread_flag(TIF_ABI_PENDING); \
|
||||
- current->personality |= force_personality32; \
|
||||
-} while (0)
|
||||
+void set_personality_ia32(void);
|
||||
+#define COMPAT_SET_PERSONALITY(ex) set_personality_ia32()
|
||||
|
||||
#define COMPAT_ELF_PLATFORM ("i686")
|
||||
|
||||
--- a/arch/x86/include/asm/thread_info.h
|
||||
+++ b/arch/x86/include/asm/thread_info.h
|
||||
@@ -86,7 +86,6 @@ struct thread_info {
|
||||
#define TIF_NOTSC 16 /* TSC is not accessible in userland */
|
||||
#define TIF_IA32 17 /* 32bit process */
|
||||
#define TIF_FORK 18 /* ret_from_fork */
|
||||
-#define TIF_ABI_PENDING 19
|
||||
#define TIF_MEMDIE 20
|
||||
#define TIF_DEBUG 21 /* uses debug registers */
|
||||
#define TIF_IO_BITMAP 22 /* uses I/O bitmap */
|
||||
@@ -110,7 +109,6 @@ struct thread_info {
|
||||
#define _TIF_NOTSC (1 << TIF_NOTSC)
|
||||
#define _TIF_IA32 (1 << TIF_IA32)
|
||||
#define _TIF_FORK (1 << TIF_FORK)
|
||||
-#define _TIF_ABI_PENDING (1 << TIF_ABI_PENDING)
|
||||
#define _TIF_DEBUG (1 << TIF_DEBUG)
|
||||
#define _TIF_IO_BITMAP (1 << TIF_IO_BITMAP)
|
||||
#define _TIF_FREEZE (1 << TIF_FREEZE)
|
||||
--- a/arch/x86/kernel/process_64.c
|
||||
+++ b/arch/x86/kernel/process_64.c
|
||||
@@ -540,6 +540,17 @@ sys_clone(unsigned long clone_flags, uns
|
||||
return do_fork(clone_flags, newsp, regs, 0, parent_tid, child_tid);
|
||||
}
|
||||
|
||||
+void set_personality_ia32(void)
|
||||
+{
|
||||
+ /* inherit personality from parent */
|
||||
+
|
||||
+ /* Make sure to be in 32bit mode */
|
||||
+ set_thread_flag(TIF_IA32);
|
||||
+
|
||||
+ /* Prepare the first "return" to user space */
|
||||
+ current_thread_info()->status |= TS_COMPAT;
|
||||
+}
|
||||
+
|
||||
unsigned long get_wchan(struct task_struct *p)
|
||||
{
|
||||
unsigned long stack;
|
||||
--- a/arch/x86/kernel/process.c
|
||||
+++ b/arch/x86/kernel/process.c
|
||||
@@ -91,18 +91,6 @@ void flush_thread(void)
|
||||
{
|
||||
struct task_struct *tsk = current;
|
||||
|
||||
-#ifdef CONFIG_X86_64
|
||||
- if (test_tsk_thread_flag(tsk, TIF_ABI_PENDING)) {
|
||||
- clear_tsk_thread_flag(tsk, TIF_ABI_PENDING);
|
||||
- if (test_tsk_thread_flag(tsk, TIF_IA32)) {
|
||||
- clear_tsk_thread_flag(tsk, TIF_IA32);
|
||||
- } else {
|
||||
- set_tsk_thread_flag(tsk, TIF_IA32);
|
||||
- current_thread_info()->status |= TS_COMPAT;
|
||||
- }
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
clear_tsk_thread_flag(tsk, TIF_DEBUG);
|
||||
|
||||
tsk->thread.debugreg0 = 0;
|
|
@ -1,9 +1,10 @@
|
|||
+ bugfix/x86/x86-get-rid-of-the-insane-tif_abi_pending-bit.patch
|
||||
+ bugfix/powerpc/powerpc-tif_abi_pending-bit-removal.patch
|
||||
+ bugfix/sparc/sparc-tif_abi_pending-bit-removal.patch
|
||||
+ bugfix/all/cxusb-select-lgs8gxx.patch
|
||||
- bugfix/all/clocksource-events-Fix-fallout-of-generic-code-changes.patch
|
||||
+ bugfix/all/clocksource-always-define-clocksource_max_deferment.patch
|
||||
+ bugfix/x86/kvm-pit-control-word-is-write-only.patch
|
||||
+ bugfix/all/connector-delete-buggy-notification-code.patch
|
||||
+ features/arm/dns323-rev-b1-poweroff.patch
|
||||
- bugfix/all/Fix-flush_old_exec-setup_new_exec-split.patch
|
||||
- bugfix/all/split-flush_old_exec-into-two-functions.patch
|
||||
- bugfix/all/fdpic-respect-pt_gnu_stack-exec-protection-markings-when-creating-nommu-stack.patch
|
||||
- bugfix/all/clocksource-events-Fix-fallout-of-generic-code-changes.patch
|
||||
- bugfix/all/e1000e-enhance-fragment-detection.patch
|
||||
- bugfix/all/e1000-enhance-fragment-detection.patch
|
||||
+ bugfix/all/stable/2.6.32.8.patch
|
||||
|
|
Loading…
Reference in New Issue