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] [thread-next>] [day] [month] [year] [list]
Message-ID: <30bf8eb7-f039-48cf-3dca-11f99604e12e@suse.cz>
Date:   Wed, 18 Oct 2023 16:11:26 +0200
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Roman Gushchin <roman.gushchin@...ux.dev>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     linux-kernel@...r.kernel.org, cgroups@...r.kernel.org,
        Johannes Weiner <hannes@...xchg.org>,
        Michal Hocko <mhocko@...nel.org>, shakeelb@...gle.com,
        Muchun Song <muchun.song@...ux.dev>,
        Dennis Zhou <dennis@...nel.org>,
        David Rientjes <rientjes@...gle.com>,
        Naresh Kamboju <naresh.kamboju@...aro.org>
Subject: Re: [PATCH v3 2/5] mm: kmem: add direct objcg pointer to task_struct

On 10/18/23 11:52, Vlastimil Babka wrote:
>> +
>> +	return objcg;
>> +}
>> +
>>  __always_inline struct obj_cgroup *get_obj_cgroup_from_current(void)
>>  {
>>  	struct mem_cgroup *memcg;
>> @@ -3008,19 +3054,26 @@ __always_inline struct obj_cgroup *get_obj_cgroup_from_current(void)
>>  
>>  	if (in_task()) {
>>  		memcg = current->active_memcg;
>> +		if (unlikely(memcg))
>> +			goto from_memcg;
>>  
>> -		/* Memcg to charge can't be determined. */
>> -		if (likely(!memcg) && (!current->mm || (current->flags & PF_KTHREAD)))
> The checks for current->mm and PF_KTHREAD seem to be gone completely after
> the patch, was that intended and why?

And also they are not present in the new flavor that's current_obj_cgroup().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ