lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 9 Sep 2021 17:45:16 +0800
From:   Zhang Qiao <zhangqiao22@...wei.com>
To:     Tejun Heo <tj@...nel.org>
CC:     <linux-kernel@...r.kernel.org>, <juri.lelli@...hat.com>,
        <mingo@...hat.com>, <peterz@...radead.org>,
        <vincent.guittot@...aro.org>
Subject: Re: [PATCH] kernel/sched: Fix sched_fork() access an invalid
 sched_task_group



在 2021/9/9 0:29, Tejun Heo 写道:
> Hello,
> 
> On Wed, Sep 08, 2021 at 07:32:06PM +0800, Zhang Qiao wrote:
>> I will update this patch by following the steps below:
>> 1)rename cgroup_subsys->fork() to cgroup_subsys->post_fork();
>> 2)add cgroup_subsys->fork() and the cpu_cgroup_fork() callback like this:
>>
>> void cpu_cgroup_fork(struct task_struct *task) {
>> ....
>> 	p->sched_task_group = task_group(current);
>> 	__set_task_cpu(p, smp_processor_id());
>> 	if (p->sched_class->task_fork)
>> 		p->sched_class->task_fork(p);
>> ....
>>
>>
>> 3)call cgroup_subsys->fork() after cgroup_can_fork().
>>
>> Do you have any suggestion?
> 
> I'm not following why it needs to shuffle the callbacks. Can't you just
Just to provide a placeholder to call task_fork(). But thought about it,
there are indeed some problems with this modification.

Thanks.

Zhang Qiao

> relocate the fectching of task_group after can_fork?>
> Thanks.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ