rpms/kernel/F-11 powerpc-tif_abi_pending-bit-removal.patch, NONE, 1.1.2.1 git-linus.diff, 1.17, 1.17.16.1 kernel.spec, 1.1784.2.15, 1.1784.2.16
Chuck Ebbert
cebbert at fedoraproject.org
Thu Feb 4 15:22:13 UTC 2010
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29789
Modified Files:
Tag: private-fedora-11-2_6_30
git-linus.diff kernel.spec
Added Files:
Tag: private-fedora-11-2_6_30
powerpc-tif_abi_pending-bit-removal.patch
Log Message:
Add ppc part of the CVE-2010-0307 fix.
powerpc-tif_abi_pending-bit-removal.patch:
include/asm/elf.h | 8 ++------
include/asm/thread_info.h | 2 --
kernel/process.c | 12 ------------
3 files changed, 2 insertions(+), 20 deletions(-)
--- NEW FILE powerpc-tif_abi_pending-bit-removal.patch ---
From: Andreas Schwab <schwab at linux-m68k.org>
Date: Sat, 30 Jan 2010 10:20:59 +0000 (+0000)
Subject: powerpc: TIF_ABI_PENDING bit removal
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=94f28da8409c6059135e89ac64a0839993124155
powerpc: TIF_ABI_PENDING bit removal
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 at linux-m68k.org>
Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h
index 17828ad..c376eda 100644
--- a/arch/powerpc/include/asm/elf.h
+++ b/arch/powerpc/include/asm/elf.h
@@ -235,14 +235,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))); \
diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h
index c8b3292..aa9d383 100644
--- 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 *current_thread_info(void)
#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 *current_thread_info(void)
#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 | \
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index c930ac3..7b816da 100644
--- 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) {
git-linus.diff:
include/asm/elf.h | 8 ++------
include/asm/thread_info.h | 2 --
kernel/process.c | 12 ------------
3 files changed, 2 insertions(+), 20 deletions(-)
Index: git-linus.diff
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/git-linus.diff,v
retrieving revision 1.17
retrieving revision 1.17.16.1
diff -u -p -r1.17 -r1.17.16.1
--- git-linus.diff 3 Mar 2009 21:55:18 -0000 1.17
+++ git-linus.diff 4 Feb 2010 15:22:03 -0000 1.17.16.1
@@ -0,0 +1,78 @@
+From: Andreas Schwab <schwab at linux-m68k.org>
+Date: Sat, 30 Jan 2010 10:20:59 +0000 (+0000)
+Subject: powerpc: TIF_ABI_PENDING bit removal
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=94f28da8409c6059135e89ac64a0839993124155
+
+powerpc: TIF_ABI_PENDING bit removal
+
+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 at linux-m68k.org>
+Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
+---
+
+diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h
+index 17828ad..c376eda 100644
+--- a/arch/powerpc/include/asm/elf.h
++++ b/arch/powerpc/include/asm/elf.h
+@@ -235,14 +235,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))); \
+diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h
+index c8b3292..aa9d383 100644
+--- 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 *current_thread_info(void)
+ #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 *current_thread_info(void)
+ #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 | \
+diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
+index c930ac3..7b816da 100644
+--- 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) {
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/kernel.spec,v
retrieving revision 1.1784.2.15
retrieving revision 1.1784.2.16
diff -u -p -r1.1784.2.15 -r1.1784.2.16
--- kernel.spec 3 Feb 2010 21:14:30 -0000 1.1784.2.15
+++ kernel.spec 4 Feb 2010 15:22:12 -0000 1.1784.2.16
@@ -881,10 +881,12 @@ Patch16516: fnctl-f_modown-should-call-w
# cve-2010-0307
Patch16530: split-flush_old_exec-into-two-functions.patch
+# needed for followon patches
Patch16531: fdpic-respect-pt_gnu_stack-exec-protection-markings-when-creating-nommu-stack.patch
Patch16532: fix-flush_old_exec-setup_new_exec-split.patch
Patch16533: sparc-tif_abi_pending-bit-removal.patch
Patch16534: x86-get-rid-of-the-insane-tif_abi_pending-bit.patch
+Patch16535: powerpc-tif_abi_pending-bit-removal.patch
%endif
@@ -1666,6 +1668,7 @@ ApplyPatch split-flush_old_exec-into-two
ApplyPatch fix-flush_old_exec-setup_new_exec-split.patch
ApplyPatch sparc-tif_abi_pending-bit-removal.patch
ApplyPatch x86-get-rid-of-the-insane-tif_abi_pending-bit.patch
+ApplyPatch powerpc-tif_abi_pending-bit-removal.patch
# END OF PATCH APPLICATIONS
@@ -2255,6 +2258,9 @@ fi
# and build.
%changelog
+* Thu Feb 04 2010 Chuck Ebbert <cebbert at redhat.com> 2.6.30.10-105.2.16
+- Add ppc part of the CVE-2010-0307 fix.
+
* Wed Feb 03 2010 Kyle McMartin <kyle at redhat.com>
- prevent-runtime-conntrack-changes.patch: fix another conntrack issue
identified by jcm.
More information about the scm-commits
mailing list