s390: update sampling tag after task pid change
In a multi-threaded program any thread can call execve(). If this is not done by the thread group leader, the de_thread() function replaces the pid of the task that calls execve() with the pid of thread group leader. If the task reaches user space again without going over __switch_to() the sampling tag is still set to the old pid. Define the arch_setup_new_exec function to verify the task pid and udpate the tag with LPP if it has changed. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
此提交包含在:
@@ -29,6 +29,7 @@
|
||||
#include <linux/random.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/init_task.h>
|
||||
#include <asm/cpu_mf.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/processor.h>
|
||||
#include <asm/vtimer.h>
|
||||
@@ -48,6 +49,15 @@ void flush_thread(void)
|
||||
{
|
||||
}
|
||||
|
||||
void arch_setup_new_exec(void)
|
||||
{
|
||||
if (S390_lowcore.current_pid != current->pid) {
|
||||
S390_lowcore.current_pid = current->pid;
|
||||
if (test_facility(40))
|
||||
lpp(&S390_lowcore.lpp);
|
||||
}
|
||||
}
|
||||
|
||||
void arch_release_task_struct(struct task_struct *tsk)
|
||||
{
|
||||
runtime_instr_release(tsk);
|
||||
|
新增問題並參考
封鎖使用者