Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp28005189rwd; Tue, 4 Jul 2023 11:07:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlF8UUJOY1LnNUWvKRz/QjonwZDhOGVqxCbn7lZGIVcZAdwvf6+GxWOU6rNqEPiM7WT3Ixw0 X-Received: by 2002:a05:6e02:792:b0:345:f017:2371 with SMTP id q18-20020a056e02079200b00345f0172371mr12292996ils.9.1688494045456; Tue, 04 Jul 2023 11:07:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688494045; cv=none; d=google.com; s=arc-20160816; b=K4CRUn3WcNBFxmPoBJFNn7f0cRVdvQBavDcWj9gr7l6wDNI/1oWgsEl6EfzTknXHo6 p9SzLezLN71rw6hPChY0lwte5HeEynyTUREE4yQES+8qNhq/4u+hlmpyjSBMW5H71BSk 6mf/zzPGlHes+oCRjPpKgs0fJ7n9b7XmMLIXzQ01rt52AP02ZFATo2T7P6e0Rcd2J5oZ Z20sHEjTdksIGTYD7ZHfCaLZWh6+h4331F14ahbPPl5XWWZT5QnjMeFjczeB275wPlxM 4NkwD7I8x65gOiFxcYfl/m6NY6BykzTewxEjtgb6X6hz17PIU3J9yitoV8Ll+N2U3nC6 WTLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=CtDTa/zSYu1BtyXYBgWZdAlFvHTcMeojuniPxpUE6tA=; fh=eI6TZFuNQBYIexXcSGBla50FxvuCoGsXk6jV8wSHCNM=; b=iWnQGm/cjW99s7I4B9xeJWAedk3q/p+/OWx6GBHfQWbMLrL3TgQ9c1LPblfBnLHzXP y1R0dC9+1Uznv0xaMc78obLS4BVUhl3jZRd+rziXamrMeluxEWqFrJnxBbLi9/woc0v8 ee2sgxWe/HHDLzGSos4gSdgKAsfny30Hgv5TT5F9GL4l2HAHo2wKDoEnxM2r9P0+8Mwt knFDrJdzmLuOBnGFiWlLcZkIgsYl3Ddh0lvwfJVAwAjUV5xHD3LqJc0raxbEdJbhnCc4 R+SgEq+SaBH4pfUFfK/rhC3hHQr4GvvnWgWe67+Ompnzul55ejeujwt0rzeX1hx0nteG 9Tbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b="HMkq/TKt"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y30-20020a634b1e000000b0054392750edfsi20762797pga.744.2023.07.04.11.07.07; Tue, 04 Jul 2023 11:07:25 -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=@google.com header.s=20221208 header.b="HMkq/TKt"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230464AbjGDR6M (ORCPT + 99 others); Tue, 4 Jul 2023 13:58:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230195AbjGDR6K (ORCPT ); Tue, 4 Jul 2023 13:58:10 -0400 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E94D10C9 for ; Tue, 4 Jul 2023 10:58:10 -0700 (PDT) Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1b52875b8d9so545725ad.0 for ; Tue, 04 Jul 2023 10:58:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1688493489; x=1691085489; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=CtDTa/zSYu1BtyXYBgWZdAlFvHTcMeojuniPxpUE6tA=; b=HMkq/TKthPMoIlp8Xt1Kp+9IvRlxP2uVxW94fU1Rs1XeFolcrAwGpkhoHBhuROkt2x twdybnJM+tOmScV6iQRFKO8oZj992lBbu6CxZQuUyR+hDvab/6a5DsIxVbBjG2FUnCG/ 29UyYReZ9+xaUpv1bdXU7bM9eCLonxHp8wWgFzm+Vz3PHZ9pMKj1lXwp7KI5kTxO7hoI K2EXoPEIM1nuKW9pAss/7qb9RvajvevvxIBQAFqfNUALVdhY/W9P/lIaG4PlifV4l99l FX0lh+GMpIqKXra2FJt0BIF8lK2qX++XFi+55Q+5sOr0KFmhcrI6HrqsU0bUemx2xTJh x6dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688493489; x=1691085489; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CtDTa/zSYu1BtyXYBgWZdAlFvHTcMeojuniPxpUE6tA=; b=hxtxOGGjkr6Cen8ox/QlAUQYImsFFZL6/WCmKcn539vPdB4QeT0nRW2B+WHQrHbLTp jHDFgED1Nd1TqNTHLLEh+kXZ7CBWfvnIn31exiwDDXZFNXMDiXSsY/ojj1abuzL24vJU S4UP5VBqNXeDx3UZmhklOZHZdl66XNsAIZSDyJEPX+flzlUxC/q3T9fCd0I07NG10zRy 6oPUasUzgVB1Kvo988+J+hSE1rzIbm3mHDSBcZyOby32ZZhBfYzA1xFxQ2KahPIivOAV 2h0m9dKHqWu+LFQGYjKFkfSBeRnVzMLWTCo9yG53HHGAJIc+w2a9+7rbiK1C+j3oIbEq ZPQw== X-Gm-Message-State: ABy/qLbCVjw1pNPOtogOP2fe5ttWShx8XEwOjzqtqtWmz4jnMxGIqANW jKOS1J/E7xltJ1nOfwS6FLP1Bw== X-Received: by 2002:a17:902:fb8e:b0:1b0:cea:2956 with SMTP id lg14-20020a170902fb8e00b001b00cea2956mr1117plb.29.1688493489455; Tue, 04 Jul 2023 10:58:09 -0700 (PDT) Received: from [2620:0:1008:15:17fc:1b56:71df:89b7] ([2620:0:1008:15:17fc:1b56:71df:89b7]) by smtp.gmail.com with ESMTPSA id b4-20020a170902d30400b001b8a7e1b116sm1502829plc.191.2023.07.04.10.58.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jul 2023 10:58:08 -0700 (PDT) Date: Tue, 4 Jul 2023 10:58:08 -0700 (PDT) From: David Rientjes To: Matteo Rizzo cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, vbabka@suse.cz, roman.gushchin@linux.dev, 42.hyeyoo@gmail.com, jannh@google.com Subject: Re: [PATCH v2] mm/slub: refactor freelist to use custom type In-Reply-To: <20230704135834.3884421-1-matteorizzo@google.com> Message-ID: References: <20230704135834.3884421-1-matteorizzo@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 Tue, 4 Jul 2023, 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 Acked-by: David Rientjes