Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36611875rwd; Tue, 11 Jul 2023 03:25:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlF28D2pDjx4nQ11OeuIjPOjyYczukas2/j7ArLTQ65alQAc3lQMz15FcECTgxkkd/cNLhM6 X-Received: by 2002:aa7:c690:0:b0:51d:9110:4b11 with SMTP id n16-20020aa7c690000000b0051d91104b11mr13968963edq.12.1689071145759; Tue, 11 Jul 2023 03:25:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689071145; cv=none; d=google.com; s=arc-20160816; b=fipodJuh9NIGLLq1kENQTfOfrane1KoM81T/NBUXahmVUEozYGzBlEqDtuoSLK2lNg nugrcNItzSF4N49jRqN8n2Egi61jpEUOtqSV63uh0tMi1mmN80hXiKp0VhMWT7a590L4 agjkukV5YMGh1Ws3x9aVt9YPeTY2+xnHRuQrOaS15C5tD34I2qgXwTzTL6QPNZnhxXqY OMkwCGAvVgqJTiFvY0SDy0dTgEgUMZzOUE5gBPMNwdOr9gei5OFjck5YmmcR2Na6iUUW 8fZO5zANTNd9BJ0aLNrBFNEMWzbcwzuUU3AzdcJ7FX85l9QVJzITFPFwMr7PD5ggtZD9 WDZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=ndrpTB8+BW2nsVzC9b3EPrI8jU76zMdu9leJSYbJQV0=; fh=piAWOM8vB7hZhhP0tn8kWw4cTno8ckiD/MBltHQFRdo=; b=EdB26IiSYE27KamjQ2rEXG9t+UNgbI8a8cMXuDNd0D4r3GVogVssI0jTf5hUPuyEKP jEuxIqvVm1eU1Fb4qtIExOSpJZQNhZMDCErERk3Mp0VanTOoNNfpMJ0jKK9Bznwe7cbt 9Fcxnh0v1toDUWM1URNLgcgcp7EAlcpDgK+0IHSZ19mha97gFoZ4F/F+MZbMK8HfYtWt cki/GhPLNJl7QRxOfDVUS9FbbEw+S+vdgrdMzYSmQH1tk8wD+3Z9a1Voc9JUc61Mc18n TGcfTTIADDSJlMg+zKprugIXjjTv0iGVwAo/ndHmI1eKZ9JD0/8ISdtNRGKBd2ZceF+v ZqqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=EjqzrF7d; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=9GpLkrj7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y13-20020a056402134d00b0051e16fa4034si1686750edw.222.2023.07.11.03.25.19; Tue, 11 Jul 2023 03:25:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=EjqzrF7d; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=9GpLkrj7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232278AbjGKJ7L (ORCPT + 99 others); Tue, 11 Jul 2023 05:59:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231218AbjGKJ7D (ORCPT ); Tue, 11 Jul 2023 05:59:03 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 890BD10F9 for ; Tue, 11 Jul 2023 02:57:34 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id F21BD204E5; Tue, 11 Jul 2023 09:57:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1689069452; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ndrpTB8+BW2nsVzC9b3EPrI8jU76zMdu9leJSYbJQV0=; b=EjqzrF7dzWaSqgYHubdacAC7OAN0opHtYL6Gic/sAK5h0MpUDXaasJN+90ETQ4BTmHefVp WURR79+G0fdLTTTaYnLh9Mq3Zy3cUocLtn0lXFicu5J7cZIGofryZS/bBnAhc0shfe+PoW RPLDQ9P+IaCO4M9ImS/u2bOeMr/E79U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1689069452; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ndrpTB8+BW2nsVzC9b3EPrI8jU76zMdu9leJSYbJQV0=; b=9GpLkrj7A61FyiXBpm5p0gjrtxvX0Cs5FWR9baHVxFZYMl8yzih5HTFJY+NeEJ5G3K/1IC KP7Ax+reBTezT2AQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0FF141391C; Tue, 11 Jul 2023 09:57:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id zyMHN4onrWRAaQAAMHmgww (envelope-from ); Tue, 11 Jul 2023 09:57:30 +0000 Message-ID: Date: Tue, 11 Jul 2023 11:57:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v2] mm/slub: refactor freelist to use custom type Content-Language: en-US To: Matteo Rizzo , linux-mm@kvack.org, linux-kernel@vger.kernel.org, cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, roman.gushchin@linux.dev, 42.hyeyoo@gmail.com Cc: jannh@google.com References: <20230704135834.3884421-1-matteorizzo@google.com> From: Vlastimil Babka In-Reply-To: <20230704135834.3884421-1-matteorizzo@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/4/23 15:58, Matteo Rizzo wrote: > From: Jann Horn > > Currently the SLUB code represents encoded freelist entries as "void*". > That's misleading, those things are encoded under > CONFIG_SLAB_FREELIST_HARDENED so that they're not actually dereferencable. > > Give them their own type, and split freelist_ptr() into one function per > direction (one for encoding, one for decoding). > > Signed-off-by: Jann Horn > Co-developed-by: Matteo Rizzo > Signed-off-by: Matteo Rizzo Thanks, merged: https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git/log/?h=slab/for-6.6/cleanup While reviewing this I think more cleanups are possible but I will post them on top as it's better for bisection purposes than folding anyway, and should involve kasan folks.