From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 5EAC435B64D for ; Thu, 2 Apr 2026 17:05:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775149544; cv=none; b=Ejc1Sub4OWDgaCMjRThchnkb9/AgoMaNiTSEMoOThsSQGx93RJTPwsI2CTBxOhMCKejkwuZnypi7dNRzuc36suU5YEG0RKRHhd7HaN0xW3iJ5W6x5xlKF/iGr1cGHuZnh0eQGQ/tWVogllnF0+rNFxmIVe2nvDl9ju0gTS4riLk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775149544; c=relaxed/simple; bh=Zo8OAngOh0P8c1OR78bqc8BgST7jOqfQbaCLKvgsal8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=PGy8kNffJl4PfBXRoarvXvrHPwNjpgDp/mlmqNBwiQTpq5vM9RoKIHLgmfTwFIsmB3WFUtAUHC6LvnPSq2L4ObCwX9ZYHpfpKrD/tE0X4UwkU50OTWreAqQsnKW2bIpQKk4g2DG4c8k5w6p5ZeLwlIx6ia7vZAL9MaAFEam9KJo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WjLk+B+S; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WjLk+B+S" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-486fc4725f0so11710055e9.1 for ; Thu, 02 Apr 2026 10:05:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775149534; x=1775754334; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=IJ96XmrvwmNmdc1Ry2/PJXAWh8krLD6ljIYp6nVbJmg=; b=WjLk+B+SlJ46EL88K6CreuBSgDMyUHEBeWLKd2Bi+PUN/iHaMS6QtCdarA0ZfH+Zrq Srrl1ifH5TtI7OMW3xrj0qN6E4VndG5nokYMSN1eYIZcJ8jkvuPJNdNKGhB3z5O/TrR8 ii9DG3rPWF0mIBkR4PqjXOw5HwYEBlF3zfafHabMyjCSYh3eAasYrx/8+u6SR60lJZPY WKWC5aNcthE83iUpuHi6baRXcT6iBxFfaXSyIayqtSBZlDKLWowZwYcirMS1p/MrgBN4 TlavIYBFG/nTd2AtAp2bHVTvVAFcDB9Yq9AiD/4XLqRpRCp7TqBtHGCVo7QqHxvdZXs7 IgQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775149534; x=1775754334; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IJ96XmrvwmNmdc1Ry2/PJXAWh8krLD6ljIYp6nVbJmg=; b=G2tlTSktKhR9uKr3E4T83lXaYXiZUB84ckRbJV6G4GztePgl7aw0OgdccydyPWr+Yh EFzyM9u17RNkQn2Fv5Y/VECA7apABCvrmL2kbpYFhdniTmta9+vebyoTRQzff/kLo+CQ 4BDWxhkiE+w/OAu0s8tAgZNrMoWD3XIXHxb6ka5KZsEPnB1PG23Rw1Km2wzy8qxOGGsd GO8l705crflZXh+mKYwgbhScXpsZb2Or8xRtAtVjQe0HI5GFWDbWjW+/PlB4yY08RrG2 Rvawx7B32Ghl9gl+Os0pz6peyquHaGqhAevsq93PoIpq4h+pNR4H57wXl01oCq2N6t+8 Y+RA== X-Forwarded-Encrypted: i=1; AJvYcCXlXxLlHyryL9VQr2tMbZsCJ+6JxRUIpEpijNU/GwdRRiA0/4hyJq8YtVMgUwXS9n4uEobEzInB0JsCGEs=@vger.kernel.org X-Gm-Message-State: AOJu0YwDIykgbB4jmnh9s219wQaMTYE7o91WzG3Fr5dnPbmNqST16qgs gQqvJlm1q9tFhkdyZZTx2gtfB9w6jjQCCZldL01AL7vLlCbPzm3S6hmJ X-Gm-Gg: ATEYQzzS3L9O9s/YO8cL5/E83D1DVlF8NjZj4ANF1LvXXThgw+x2mOtIxf8pZ3rQ8q2 RLxmVF7lxAcboApnCG2bpJ8+OysLq43mWKocCwdU7YsQZOS3htpc04lVkzRwtInBzI81X43ybOt 6nxyOjghW93O1w08nG+4+QEG/Q7F054ebvsZdpZI53sVuYAFVQCZiDKE3e0CSU50cL/0fimbsRb z7zfmIiIYMaTvAwM+Ant4VpV7NeFm/+Sy1roriQlyv2q4xr3EkDP/rHQ95E8ORiV1l3oZApP9aR 3YtDAP9eZgiibk9SYm99t+4Z3rvUkoH/5esyh2D3GIQbQlPOjSRdd7v5DWltTlDEsHova672Pwq kILFCdSACDci82L46CZrqTggrb8UlFRYnAuUtlTe6ILxWT7KCAh5Mx4zxn4QJaJYSFW9E1EpIdN C+Pn1f2HZCE4H89A5v8Gw= X-Received: by 2002:a05:600c:3b0a:b0:486:f893:56c6 with SMTP id 5b1f17b1804b1-4888e09ba82mr46503895e9.10.1775149534150; Thu, 02 Apr 2026 10:05:34 -0700 (PDT) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4887e80a63esm265992305e9.3.2026.04.02.10.05.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2026 10:05:33 -0700 (PDT) Date: Thu, 2 Apr 2026 20:05:30 +0300 From: Dan Carpenter To: Marco Elver Cc: oe-kbuild@lists.linux.dev, Vlastimil Babka , Andrew Morton , lkp@intel.com, oe-kbuild-all@lists.linux.dev, Linux Memory Management List , Nathan Chancellor , Nicolas Schier , Dennis Zhou , Tejun Heo , Christoph Lameter , Harry Yoo , Hao Li , David Rientjes , Roman Gushchin , Kees Cook , "Gustavo A. R. Silva" , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Alexander Potapenko , Dmitry Vyukov , Nick Desaulniers , Bill Wendling , Justin Stitt , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, kasan-dev@googlegroups.com Subject: Re: [PATCH v1] slab: support for compiler-assisted type-based slab cache partitioning Message-ID: References: <20260331111240.153913-1-elver@google.com> <202604020400.jEq32K95-lkp@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Apr 02, 2026 at 03:48:20PM +0200, Marco Elver wrote: > On Thu, 2 Apr 2026 at 15:33, Dan Carpenter wrote: > > > > Hi Marco, > > > > kernel test robot noticed the following build warnings: > > > > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > > > url: https://github.com/intel-lab-lkp/linux/commits/Marco-Elver/slab-support-for-compiler-assisted-type-based-slab-cache-partitioning/20260401-035608 > > base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything > > patch link: https://lore.kernel.org/r/20260331111240.153913-1-elver%40google.com > > patch subject: [PATCH v1] slab: support for compiler-assisted type-based slab cache partitioning > > config: um-randconfig-r072-20260401 > > compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 > > smatch: v0.5.0-9004-gb810ac53 > > > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > > the same patch/commit), kindly add following tags > > | Reported-by: kernel test robot > > | Reported-by: Dan Carpenter > > | Closes: https://lore.kernel.org/r/202604020400.jEq32K95-lkp@intel.com/ > > > > New smatch warnings: > > drivers/misc/lkdtm/heap.c:118 lkdtm_READ_AFTER_FREE() warn: potential pointer math issue ('base' is a 32 bit pointer) > > drivers/misc/lkdtm/heap.c:169 lkdtm_KFENCE_READ_AFTER_FREE() warn: potential pointer math issue ('base' is a 32 bit pointer) > > How is this related to the patch I sent? Did the change > force rechecking of all these files and it found latent issues? > Oh, crud. It turns out that for this check Smatch allows integer_array[sizeof()]so long as we know that the index is within bounds. What happened is that your patch renamed the kmalloc() function so Smatch stopped knowing the size of the buffer. For these zero day bot warnings, the emails are automatically generated so I don't have any context outside what's in the email. I saw that Kees wrote the code, but I figured maybe you forwarded it or something. Sorry about that. regards, dan carpenter