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]
Message-ID: <86bbb33e-1e9b-70f9-237c-d0c02537380c@bytedance.com>
Date:   Tue, 15 Feb 2022 20:23:13 +0800
From:   Chengming Zhou <zhouchengming@...edance.com>
To:     Tejun Heo <tj@...nel.org>, Peter Zijlstra <peterz@...radead.org>
Cc:     arbn@...dex-team.com, mingo@...hat.com,
        linux-kernel@...r.kernel.org, Minye Zhu <zhuminye@...edance.com>
Subject: Re: [Phishing Risk] [External] Re: [PATCH] sched/cpuacct: fix charge
 percpu cpuusage

On 2022/2/15 2:57 上午, Tejun Heo wrote:
> On Mon, Feb 14, 2022 at 11:09:01AM +0100, Peter Zijlstra wrote:
>> --- a/kernel/sched/cpuacct.c
>> +++ b/kernel/sched/cpuacct.c
>> @@ -334,15 +334,13 @@ static struct cftype files[] = {
>>   */
>>  void cpuacct_charge(struct task_struct *tsk, u64 cputime)
>>  {
>> -	struct cpuacct *ca;
>>  	unsigned int cpu = task_cpu(tsk);
>> +	struct cpuacct *ca;
>>  
>> -	rcu_read_lock();
>> +	lockdep_assert_rq_held(cpu_rq(cpu));
>>  
>>  	for (ca = task_ca(tsk); ca; ca = parent_ca(ca))
>>  		*per_cpu_ptr(ca->cpuusage, cpu) += cputime;
>> -
>> -	rcu_read_unlock();
> 
> And probably expand the same to cgroup_account_cputime[_field]() too.
> 
> Thanks.
> 

Good suggestion, will do.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ