From: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
To: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@ozlabs.org,
Christophe Lombard <clombard@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org,
Philippe Bergheaud <philippe.bergheaud@fr.ibm.com>
Subject: Re: [PATCH 1/2] powerpc: export thread-tidr interfaces
Date: Wed, 17 Jan 2018 07:45:29 +0100 [thread overview]
Message-ID: <eff03efa-0637-c63a-a7ee-320c490cff9d@linux.vnet.ibm.com> (raw)
In-Reply-To: <1516153832-9282-1-git-send-email-sukadev@linux.vnet.ibm.com>
Hi,
> diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
> index 2010e4c..f20c1ad 100644
> --- a/arch/powerpc/kernel/process.c
> +++ b/arch/powerpc/kernel/process.c
> @@ -1560,6 +1560,7 @@ void clear_thread_tidr(struct task_struct *t)
> free_thread_tidr(t->thread.tidr);
> t->thread.tidr = 0;
> }
> +EXPORT_SYMBOL_GPL(clear_thread_tidr);
Isn't it dangerous to export clear_thread_tidr()? Other modules may also
have assigned the TIDR by calling set_thread_tidr(), so clearing it
could potentially break those other modules. My understanding is that
once the TIDR is assigned, there's no safe way to reclaim it other than
the thread exiting. Or we would need some kind of reference counter.
> void arch_release_task_struct(struct task_struct *t)
> {
> @@ -1592,6 +1593,7 @@ int set_thread_tidr(struct task_struct *t)
>
> return 0;
> }
> +EXPORT_SYMBOL_GPL(set_thread_tidr);
FYI, there's a capi patch we hope to merge soon which is also doing this:
http://patchwork.ozlabs.org/patch/858935/
Fred
next prev parent reply other threads:[~2018-01-17 6:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-17 1:50 [PATCH 1/2] powerpc: export thread-tidr interfaces Sukadev Bhattiprolu
2018-01-17 1:50 ` [PATCH 2/2] powerpc: export set_thread_uses_vas() Sukadev Bhattiprolu
2018-01-17 6:45 ` Frederic Barrat [this message]
2018-01-17 17:07 ` [PATCH 1/2] powerpc: export thread-tidr interfaces Sukadev Bhattiprolu
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=eff03efa-0637-c63a-a7ee-320c490cff9d@linux.vnet.ibm.com \
--to=fbarrat@linux.vnet.ibm.com \
--cc=clombard@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=philippe.bergheaud@fr.ibm.com \
--cc=sukadev@linux.vnet.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).