[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180907210906.691343839@linuxfoundation.org>
Date: Fri, 7 Sep 2018 23:08:18 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Ram Pai <linuxram@...ibm.com>,
Michael Ellerman <mpe@...erman.id.au>
Subject: [PATCH 4.18 032/145] powerpc/pkeys: Save the pkey registers before fork
4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ram Pai <linuxram@...ibm.com>
commit c76662e825f507b98938dc3bb141c4505bd4968c upstream.
When a thread forks the contents of AMR, IAMR, UAMOR registers in the
newly forked thread are not inherited.
Save the registers before forking, for content of those
registers to be automatically copied into the new thread.
Fixes: cf43d3b26452 ("powerpc: Enable pkey subsystem")
Cc: stable@...r.kernel.org # v4.16+
Signed-off-by: Ram Pai <linuxram@...ibm.com>
Signed-off-by: Michael Ellerman <mpe@...erman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
arch/powerpc/kernel/process.c | 1 +
1 file changed, 1 insertion(+)
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -583,6 +583,7 @@ static void save_all(struct task_struct
__giveup_spe(tsk);
msr_check_and_clear(msr_all_available);
+ thread_pkey_regs_save(&tsk->thread);
}
void flush_all_to_thread(struct task_struct *tsk)
Powered by blists - more mailing lists