Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp131269rbb; Fri, 23 Feb 2024 14:38:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW4jPWFylK0UYGRCGoWLCUbNbROAs5atCmy6x6vsj8U93twJBfsZmAGaFKI3c2DZiGrJ4MonM+W1EK9RszB9fYfYnvY5ouP5H7FUWFhGQ== X-Google-Smtp-Source: AGHT+IHuDzYaT7OSEnxp9fqgQbZc1TGDj2yNsyC0okrVk3Kb+jVfraXf9F6qm9EZXVp+fIt0QzsQ X-Received: by 2002:a17:906:55b:b0:a3e:f929:8148 with SMTP id k27-20020a170906055b00b00a3ef9298148mr638773eja.33.1708727925963; Fri, 23 Feb 2024 14:38:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708727925; cv=pass; d=google.com; s=arc-20160816; b=GLYk3HHMGgeVXDY32DdBB1/EwQA4Q5fkjjLjdNN+zZvjDRpz3QO+Aj6qnKBfdU1+um oDEmTMMCyjaT2szW/VRKvkG8jOZ3N5+zcK2YHErQDnoQPX2STfz+VZ28IAloWzYAW5Dh E4PthF6NVTr6qdu34Jlutreh1bC7t0FQimvcEzvxVCAbLFTnT4fiaYO52tPeaZ6aJWY5 WCJW4QSCz+v87xUFHu07t7a9nEeMqmRuzZaNnWgxHUl9t7Jcny8QxjOjmDq/X74LOqOj TUL93/OlxGfo1r9FiAWVaOXimWVE7vApj4X4NcqadEnXhpnrU/SNsnnuEr9QqmCsZx17 NEzA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=pAKXOqgOGWSmhUPcdC7/ENyJvig0ojHYAsCruIdGP/A=; fh=plo6fliBcflSQIqhDb7FXjHmBrUyAxKyIzsf34SUpgQ=; b=KVFjhes5wJyoDxWAOm5R0rL/o93Y4H56Q5Yt0MEu/55ohI5IHokl5Yg6qkjHg011oe xV4qmB3LTrO1sHYFWHS77wllzRM+4EkbvkFp7PGcwMbUvSBP1akdtGNvNeLGOVmWDWZM uSxI9YTzm8YOoQi7oPtDxi6NN5H2M/h7NEZ3IFwEkNa16Y7NCbJKrQV+xc6l8FMg/euq exlKpH/d38Pe7F17W2rLppHIt/BMHa2peu1b6fRnXdA/InAS9umiNTV3cJMvr0I2iBgV XZtHYBw/U40yX8bJeSTijRlbC+4a+tLz+Ycy2RS+xOH02Ev1KfD4ia81t6WleJHHhWTy eLvw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@paul-moore.com header.s=google header.b=KfEzgTLC; arc=pass (i=1 spf=pass spfdomain=paul-moore.com dkim=pass dkdomain=paul-moore.com dmarc=pass fromdomain=paul-moore.com); spf=pass (google.com: domain of linux-kernel+bounces-79271-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79271-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=paul-moore.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id br5-20020a170906d14500b00a3f2735d247si14431ejb.108.2024.02.23.14.38.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 14:38:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79271-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore.com header.s=google header.b=KfEzgTLC; arc=pass (i=1 spf=pass spfdomain=paul-moore.com dkim=pass dkdomain=paul-moore.com dmarc=pass fromdomain=paul-moore.com); spf=pass (google.com: domain of linux-kernel+bounces-79271-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79271-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=paul-moore.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id AD2221F23C0F for ; Fri, 23 Feb 2024 22:38:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 50AFF145B1B; Fri, 23 Feb 2024 22:38:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b="KfEzgTLC" Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com [209.85.128.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A57B41419B3 for ; Fri, 23 Feb 2024 22:38:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708727918; cv=none; b=qbS4nnyfdCBCDcYQji6bX60lFHr+J5bAmsUX97VHNrFiVK9dixFV1xLKbFFxyCjI/vdn/RBHObqWNppzPaLvINkr2AifdlmSr6TcUvO2HsqCev3+WLIsWuW7MRNX3lDuH3ZXaMUUxWF98IiBoir2XsDuUuScUkM2RiE0cfjeSTQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708727918; c=relaxed/simple; bh=/jCUeu7nXGh0QOtFmPjVbAr9/0g7GWt4C7jvDYh8wWk=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=EpdTUrmseFB6PK3LxjMbHqpaYVn7eDuPWh2oQXhu7K4XNh48EQgn7N2C4YPo5HpOWclQDPl4O/CB7ETiYoM1P2wrymCy0dMzKsvs/NhPiI/ga8mMJDtBKIvq+3qlCCcI5zBWtNMukA98luu/j6f8OHFYy42A/kSMqAr0NaggCXc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com; spf=pass smtp.mailfrom=paul-moore.com; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b=KfEzgTLC; arc=none smtp.client-ip=209.85.128.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=paul-moore.com Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-608841dfcafso9354287b3.2 for ; Fri, 23 Feb 2024 14:38:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1708727915; x=1709332715; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=pAKXOqgOGWSmhUPcdC7/ENyJvig0ojHYAsCruIdGP/A=; b=KfEzgTLCM2FgIhjpB49D78wZJaInQxqs4e+vQrMboltVoLg9Iz4ndyHAhE43Vhh3ue 2XqUw21ZyzwY51v0e6zBSaXi0A22jvYxC4sh6w1ky0a/4epTumlCyR0xQXoTx938vpcV sE1x2Dy1VrmOKAgm7W2G30d3AF/ddiHMASyMlPSGTYXCRuNWcBMAau0L75tmgbja/vT5 7PhxxFZmSwD84xnxEUdL2ksDPXpadu7K7x8UvuLPWnkCM8Sg1+xRdriYxegpMsz1ln0J chmmici8D8it5yN64pVEtxzK6CW6LV8Xc0lVWBp8I83ZuHFMJc94fB3CghzodXzRvyIx PVBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708727915; x=1709332715; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pAKXOqgOGWSmhUPcdC7/ENyJvig0ojHYAsCruIdGP/A=; b=Hvkv/9f6nxzUD3SjyEEhre3h+lOJ3iFok8OfsPcA2vK5w+7/bIgJWRicZCpsXw55y2 zcrPwLfHWycALns+yRy0vI3fv/Gg8zQJz/xZFxveRkC4uVIdUGN/2Ba/dAE00PgMbMMe YqIy4CZ2PWUWhjJ8eU+kwgZgWENwts9kDpFiCAE7L23Ozq5IT2WtgrMAVGE0mrbOu5FU HXa0j58GQENqfKw/8yFsUofSUtyrZSgQXcyzwlviX7gbtS/MAyWSe2dkJ7Wq9PbyveEh HlDtf/llF4iAzrYgWyc4u2Gvi/1+adUvRIdaxBo6sugJP5qaeKuWgNigmgFDRXtf6Myk voow== X-Forwarded-Encrypted: i=1; AJvYcCWshZy6Go/oeei2Nm6xLYh7YryWl9AnUiXOu72ubfoqdalqBcqr3E4c/TvSHN8LtOQUED6OduJDZXuSxjWE1JLqXJ9PSL3dLvf7ipT0 X-Gm-Message-State: AOJu0YypWciXX2o7Ytk3k60hxXSdibN+mW5tWVRa4SIXXGycz8aL55X4 +76gZMFSkNpW6Xwn1qQPNFblitIBZE2n8xH9bl3PFvZ0Uf3YTI0d/ybwhPN2vvC8IXdGwMC/9ie ZRskyWziRWiYeqnLqU6h31MweBqllpH7tEFKh X-Received: by 2002:a25:b126:0:b0:dcc:e9d:4a22 with SMTP id g38-20020a25b126000000b00dcc0e9d4a22mr1343216ybj.12.1708727915706; Fri, 23 Feb 2024 14:38:35 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: In-Reply-To: From: Paul Moore Date: Fri, 23 Feb 2024 17:38:24 -0500 Message-ID: Subject: Re: [PATCH RESEND] cred: Use KMEM_CACHE instead of kmem_cache_create To: Kunwu Chan Cc: axboe@kernel.dk, elena.reshetova@intel.com, chentao@kylinos.cn, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Feb 23, 2024 at 5:16=E2=80=AFAM Kunwu Chan = wrote: > > From: Kunwu Chan > > commit 0a31bd5f2bbb ("KMEM_CACHE(): simplify slab cache creation") > introduces a new macro. > Use the new KMEM_CACHE() macro instead of direct kmem_cache_create > to simplify the creation of SLAB caches. > > Signed-off-by: Kunwu Chan > --- > > Notes: > I'am Kunwu.Chan, the problem(https://lore.kernel.org/all/CAHC9VhTJXfP= ztz2W_V6sp41PJW8dzvZH0YdnRXd7tUZOF1Q09Q@mail.gmail.com/) may be caused by m= y email server. > I change the email and send it to myself, the raw email seems ok. > So i resend it. > > kernel/cred.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Thanks, that worked much better. As the prior patch sat for weeks without any objections I've gone ahead and merged this via the lsm/dev tree; if anyone has any objections please let me know before the upcoming merge window. > diff --git a/kernel/cred.c b/kernel/cred.c > index c033a201c808..02a96e9d9cfd 100644 > --- a/kernel/cred.c > +++ b/kernel/cred.c > @@ -606,8 +606,8 @@ int set_cred_ucounts(struct cred *new) > void __init cred_init(void) > { > /* allocate a slab in which we can store credentials */ > - cred_jar =3D kmem_cache_create("cred_jar", sizeof(struct cred), 0= , > - SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_ACCOUNT, NULL)= ; > + cred_jar =3D KMEM_CACHE(cred, > + SLAB_HWCACHE_ALIGN | SLAB_PANIC | SLAB_AC= COUNT); > } > > /** > -- > 2.39.2 --=20 paul-moore.com