From: Christophe Leroy <christophe.leroy@c-s.fr>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
aneesh.kumar@linux.vnet.ibm.com, npiggin@gmail.com
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: [RFC PATCH v3 0/7] powerpc: Switch to CONFIG_THREAD_INFO_IN_TASK
Date: Mon, 1 Oct 2018 12:30:17 +0000 (UTC) [thread overview]
Message-ID: <cover.1538396658.git.christophe.leroy@c-s.fr> (raw)
The purpose of this serie is to activate CONFIG_THREAD_INFO_IN_TASK which
moves the thread_info into task_struct.
Moving thread_info into task_struct has the following advantages:
- It protects thread_info from corruption in the case of stack
overflows.
- Its address is harder to determine if stack addresses are
leaked, making a number of attacks more difficult.
Changes since RFC v2:
- Removed the modification of names in asm-offsets
- Created a rule in arch/powerpc/Makefile to append the offset of current->cpu in CFLAGS
- Modified asm/smp.h to use the offset set in CFLAGS
- Squashed the renaming of THREAD_INFO to TASK_STACK in the preparation patch
- Moved the modification of current_pt_regs in the patch activating CONFIG_THREAD_INFO_IN_TASK
Changes since RFC v1:
- Removed the first patch which was modifying header inclusion order in timer
- Modified some names in asm-offsets to avoid conflicts when including asm-offsets in C files
- Modified asm/smp.h to avoid having to include linux/sched.h (using asm-offsets instead)
- Moved some changes from the activation patch to the preparation patch.
Christophe Leroy (7):
book3s/64: avoid circular header inclusion in mmu-hash.h
powerpc: Prepare for moving thread_info into task_struct
powerpc: Activate CONFIG_THREAD_INFO_IN_TASK
powerpc: regain entire stack space
powerpc: 'current_set' is now a table of task_struct pointers
powerpc/32: Remove CURRENT_THREAD_INFO and rename TI_CPU
powerpc/64: Modify CURRENT_THREAD_INFO()
arch/powerpc/Kconfig | 1 +
arch/powerpc/Makefile | 6 +++
arch/powerpc/include/asm/asm-prototypes.h | 4 +-
arch/powerpc/include/asm/book3s/64/mmu-hash.h | 2 +-
arch/powerpc/include/asm/exception-64s.h | 4 +-
arch/powerpc/include/asm/irq.h | 14 +++---
arch/powerpc/include/asm/livepatch.h | 2 +-
arch/powerpc/include/asm/processor.h | 39 ++-------------
arch/powerpc/include/asm/ptrace.h | 2 +-
arch/powerpc/include/asm/reg.h | 2 +-
arch/powerpc/include/asm/smp.h | 8 +++-
arch/powerpc/include/asm/task_size.h | 42 ++++++++++++++++
arch/powerpc/include/asm/thread_info.h | 17 +------
arch/powerpc/kernel/asm-offsets.c | 8 ++--
arch/powerpc/kernel/entry_32.S | 66 +++++++++-----------------
arch/powerpc/kernel/entry_64.S | 12 ++---
arch/powerpc/kernel/epapr_hcalls.S | 5 +-
arch/powerpc/kernel/exceptions-64e.S | 13 +----
arch/powerpc/kernel/exceptions-64s.S | 2 +-
arch/powerpc/kernel/head_32.S | 14 +++---
arch/powerpc/kernel/head_40x.S | 4 +-
arch/powerpc/kernel/head_44x.S | 8 ++--
arch/powerpc/kernel/head_64.S | 1 +
arch/powerpc/kernel/head_8xx.S | 2 +-
arch/powerpc/kernel/head_booke.h | 12 ++---
arch/powerpc/kernel/head_fsl_booke.S | 16 +++----
arch/powerpc/kernel/idle_6xx.S | 8 ++--
arch/powerpc/kernel/idle_book3e.S | 2 +-
arch/powerpc/kernel/idle_e500.S | 8 ++--
arch/powerpc/kernel/idle_power4.S | 2 +-
arch/powerpc/kernel/irq.c | 66 ++++----------------------
arch/powerpc/kernel/kgdb.c | 28 -----------
arch/powerpc/kernel/machine_kexec_64.c | 6 +--
arch/powerpc/kernel/misc_32.S | 17 +++----
arch/powerpc/kernel/process.c | 15 +++---
arch/powerpc/kernel/setup-common.c | 2 +-
arch/powerpc/kernel/setup_32.c | 15 ++----
arch/powerpc/kernel/setup_64.c | 29 ++---------
arch/powerpc/kernel/smp.c | 16 +++----
arch/powerpc/kernel/trace/ftrace_64_mprofile.S | 6 +--
arch/powerpc/kvm/book3s_hv_hmi.c | 1 +
arch/powerpc/mm/hash_low_32.S | 14 ++----
arch/powerpc/sysdev/6xx-suspend.S | 5 +-
arch/powerpc/xmon/xmon.c | 2 +-
44 files changed, 203 insertions(+), 345 deletions(-)
create mode 100644 arch/powerpc/include/asm/task_size.h
--
2.13.3
next reply other threads:[~2018-10-01 12:30 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-01 12:30 Christophe Leroy [this message]
2018-10-01 12:30 ` [RFC PATCH v3 1/7] book3s/64: avoid circular header inclusion in mmu-hash.h Christophe Leroy
2018-10-03 4:24 ` Nicholas Piggin
2018-10-04 8:20 ` Christophe LEROY
2018-10-04 8:23 ` Aneesh Kumar K.V
2018-10-04 8:32 ` Christophe LEROY
2018-10-01 12:30 ` [RFC PATCH v3 2/7] powerpc: Prepare for moving thread_info into task_struct Christophe Leroy
2018-10-03 5:02 ` Nicholas Piggin
2018-10-03 5:49 ` Christophe LEROY
2018-10-03 5:57 ` Nicholas Piggin
2018-10-04 14:29 ` Christophe LEROY
2018-10-01 12:30 ` [RFC PATCH v3 3/7] powerpc: Activate CONFIG_THREAD_INFO_IN_TASK Christophe Leroy
2018-10-03 5:30 ` Nicholas Piggin
2018-10-03 5:47 ` Christophe LEROY
2018-10-03 5:52 ` Nicholas Piggin
2018-10-03 6:04 ` Christophe LEROY
2018-10-03 6:23 ` Nicholas Piggin
2018-10-01 12:30 ` [RFC PATCH v3 4/7] powerpc: regain entire stack space Christophe Leroy
2018-10-03 5:34 ` Nicholas Piggin
2018-10-03 5:52 ` Christophe LEROY
2018-10-03 6:30 ` Nicholas Piggin
2018-10-03 6:45 ` Christophe LEROY
2018-10-03 7:07 ` Nicholas Piggin
2018-10-03 9:30 ` Christophe LEROY
2018-10-01 12:30 ` [RFC PATCH v3 5/7] powerpc: 'current_set' is now a table of task_struct pointers Christophe Leroy
2018-10-03 5:41 ` Nicholas Piggin
2018-10-03 6:00 ` Christophe LEROY
2018-10-03 6:09 ` Nicholas Piggin
2018-10-01 12:30 ` [RFC PATCH v3 6/7] powerpc/32: Remove CURRENT_THREAD_INFO and rename TI_CPU Christophe Leroy
2018-10-01 12:30 ` [RFC PATCH v3 7/7] powerpc/64: Modify CURRENT_THREAD_INFO() Christophe Leroy
2018-10-03 5:44 ` Nicholas Piggin
2018-10-03 6:01 ` Christophe LEROY
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1538396658.git.christophe.leroy@c-s.fr \
--to=christophe.leroy@c-s.fr \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®