From: Michael Ellerman <mpe@ellerman.id.au>
To: Christophe Leroy <christophe.leroy@c-s.fr>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v5 3/9] powerpc: Prepare for moving thread_info into task_struct
Date: Sat, 06 Oct 2018 22:40:29 +1000 [thread overview]
Message-ID: <87tvlzi6yq.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <65eac9f906b12b55010a00b477619f7739c1cac5.1538687075.git.christophe.leroy@c-s.fr>
Christophe Leroy <christophe.leroy@c-s.fr> writes:
> diff --git a/arch/powerpc/include/asm/livepatch.h b/arch/powerpc/include/asm/livepatch.h
> index 47a03b9b528b..818451bf629c 100644
> --- a/arch/powerpc/include/asm/livepatch.h
> +++ b/arch/powerpc/include/asm/livepatch.h
> @@ -49,7 +49,7 @@ static inline void klp_init_thread_info(struct thread_info *ti)
> ti->livepatch_sp = (unsigned long *)(ti + 1) + 1;
We need to do something about this.
Currently the thread_info sits at the low address of the stack, and we
use the space immediately above that as a miniature upward growing stack
for livepatching.
If we keep the livepatch_sp in the thread_info then we need to
initialise it somewhere when the task starts running on a stack. And I
don't know how that works if we end up running on the emergency stack
for example.
So I'm not sure that makes much sense.
Instead we might need to keep the livepatch_sp on the stack page at the
base, where thread_info currently lives.
That obviously sucks because you can still overflow into it and trash
it, but it's no worse than what we have now for livepatching.
Need to think about it some more.
cheers
next prev parent reply other threads:[~2018-10-06 12:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-05 7:32 [PATCH v5 0/9] powerpc: Switch to CONFIG_THREAD_INFO_IN_TASK Christophe Leroy
2018-10-05 7:32 ` [PATCH v5 1/9] book3s/64: avoid circular header inclusion in mmu-hash.h Christophe Leroy
2018-10-05 13:45 ` Christophe LEROY
2018-10-06 12:47 ` Michael Ellerman
2018-10-07 16:43 ` Christophe LEROY
2018-10-05 7:32 ` [PATCH v5 2/9] powerpc: Only use task_struct 'cpu' field on SMP Christophe Leroy
2018-10-05 7:32 ` [PATCH v5 3/9] powerpc: Prepare for moving thread_info into task_struct Christophe Leroy
2018-10-06 12:40 ` Michael Ellerman [this message]
2018-10-07 5:31 ` Christophe Leroy
2018-10-05 7:32 ` [PATCH v5 4/9] powerpc: Activate CONFIG_THREAD_INFO_IN_TASK Christophe Leroy
2018-10-05 7:32 ` [PATCH v5 5/9] powerpc: regain entire stack space Christophe Leroy
2018-10-05 7:32 ` [PATCH v5 6/9] powerpc: 'current_set' is now a table of task_struct pointers Christophe Leroy
2018-10-05 7:32 ` [PATCH v5 7/9] powerpc/32: Remove CURRENT_THREAD_INFO and rename TI_CPU Christophe Leroy
2018-10-05 7:32 ` [PATCH v5 8/9] powerpc/64: Remove CURRENT_THREAD_INFO Christophe Leroy
2018-10-05 7:32 ` [PATCH v5 9/9] powerpc: clean stack pointers naming Christophe Leroy
[not found] ` <87pnwk1yw4.fsf@concordia.ellerman.id.au>
2018-10-08 13:30 ` [PATCH v5 0/9] powerpc: Switch to CONFIG_THREAD_INFO_IN_TASK 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=87tvlzi6yq.fsf@concordia.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=benh@kernel.crashing.org \
--cc=christophe.leroy@c-s.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--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®