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: <7c33a6c3-4ded-e0e4-820d-ffc337da9800@suse.cz>
Date:   Fri, 14 Jul 2023 10:01:15 +0200
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Kees Cook <keescook@...omium.org>
Cc:     Christoph Lameter <cl@...ux.com>,
        David Rientjes <rientjes@...gle.com>,
        Pekka Enberg <penberg@...nel.org>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Hyeonggon Yoo <42.hyeyoo@...il.com>,
        Roman Gushchin <roman.gushchin@...ux.dev>, linux-mm@...ck.org,
        patches@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Matteo Rizzo <matteorizzo@...gle.com>,
        Jann Horn <jannh@...gle.com>,
        Andrey Konovalov <andreyknvl@...gle.com>,
        Marco Elver <elver@...gle.com>,
        Alexander Potapenko <glider@...gle.com>,
        kasan-dev@...glegroups.com, linux-hardening@...r.kernel.org
Subject: Re: [PATCH 2/2] mm/slub: remove freelist_dereference()

On 7/13/23 09:44, Vlastimil Babka wrote:
> On 7/11/23 18:21, Kees Cook wrote:
>> On Tue, Jul 11, 2023 at 03:46:25PM +0200, Vlastimil Babka wrote:
>>>  
>>>  #ifndef CONFIG_SLUB_TINY
>>> -- 
>>> 2.41.0
>>> 
>> 
>> I like reducing the complexity here, but I find dropping the "object"
>> reassignment makes this a bit harder to read. What about:
> 
> Alright.
> 
>> 	object = kasan_reset_tag(object);
>> 	unsigned long ptr_addr = (unsigned long)object + s->offset;
>> 	freeptr_t p = *(freeptr_t *)(ptr_addr);
> 
> Are we really so benevolent with declaration-after-statement now? :)

I've left the declarations separate for now so it's similar to
get_freepointer_safe(). Pushed the result to slab/for-6.6/cleanup and
for-next. Thanks for the reviews!

>> 	return freelist_ptr_decode(s, p, ptr_addr);
>> 
>> ?
>> 
>> They're the same result, so either way:
>> 
>> Acked-by: Kees Cook <keescook@...omium.org>
>> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ