From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (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 67EF23BAD93 for ; Thu, 28 May 2026 10:34:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779964485; cv=none; b=SLMeTP56bOxd+tJMnyNXIMP/KF51mnEDeExfPM9J4ZIkgEtR/VNDY2dqcwF196jMFlh3qTTOJyk3WqSFN4byOkkmG2SBEFiPC9gs2RG7xy0B8hu7o0mWw08Bb+nNbuBsIKBiyMx7+RX5TnnwXGT32WYmfWkcN1GJDoDmpYKgJJY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779964485; c=relaxed/simple; bh=yMbi+VRYca9N5DT77Dw/uUDcNTNea99an/AfQRCFPxA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GfQ5BcZFE9Ks42Wv9mEjYW9HFPmqmESdDokEenxs/aP5QTAiAsWc8uFa/eKbjNU4VOW2JwAe9xZN7Val3tBw/JjQlaZQQXHNiHR6GDVI0PZ6ZRKTKYtHjnITgL04DbMenW/bAUqEfmnvbKYR7sjrcHErEIBVEKiZd1t2PdXmd70= 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=h+gfSx09; arc=none smtp.client-ip=209.85.128.48 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="h+gfSx09" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-48a3e9862f0so66630535e9.1 for ; Thu, 28 May 2026 03:34:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779964479; x=1780569279; 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=q0/0ik1ZG6djP8m8FtNdW64oEnroAPrLw40z7zkPx5Q=; b=h+gfSx098/da1IKgL8vLZfiqtaL1HYYixlbbj+btv5pWfF5DCn0mj7h8p7iLVYN0/2 Z8KGbnwZQH3EeUWEqePNeY2kKtlb2mzE8M6KtFCTcFurYYI+T/QMSY+202jcBX0xMI+S TAzDkc2IfFS6Bsg776sMXLPC7QpySherzkehbX+7nGi5IjOBrQtDaP2cGJRooqlnx/tC N7D8PZLPPLq8v8OCHyBH5tf0xuGtO4NdkV4Q26IIUDWXn+VgnsPhmzQUQ3r4r07U/fkC 228cqKzRJKxcEr2ZTNv/W403pg1rv6vxrd2OvqgOut5GuKzj8cit/cvXTd2f3toSGXqm R2rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779964479; x=1780569279; 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=q0/0ik1ZG6djP8m8FtNdW64oEnroAPrLw40z7zkPx5Q=; b=gH5purBMor2SvMAOv/C0xcTCRt3ut5bvYESRH0b0MAipQXXSQIBervI8U80DjQNx8U wVl/mruGqvVMW9fNA9Wthg9rlRfA12t+IHWf8H25QK9DFUuM0ulEvMPG36yK0YmCsfcU bGCnBZVHQdaB265claPBi8OihZS7iOuhyp/V455uQQdf4/I8k3YgxrPeBrbYLMu2G9YI azVqNTdvZJcQDTHNhXfcVrQhmL7wXHWrJGWOxmksht6bCJjwoj9sb0Yjc6zWZ3Ylka6j ptG1HAyTD22KXQT+zrAmOzKWcE7/1mONp99yY4QPgL1H/XaLHRr/5EuZ//oYSH53Etns CPaA== X-Forwarded-Encrypted: i=1; AFNElJ/OmMNyQOcyFr4KaDKmJDSmUozLb6FF1Lo7iTVmQbpHTnfv1Q6JbCQrCSuWKUfd/X67WmQv/2TgfOIFVwI=@vger.kernel.org X-Gm-Message-State: AOJu0YzHtMY4V2TWwSJJQ+wtIJI8gQ8CP4VhoBPlvbqHq+ZZoXa8uErn GkXsWHtz+X2L+QT/GpiriEVxzgNLsnA5mY3I/5fCxYt1f7tJWlP4i3mSYvut4Aya X-Gm-Gg: Acq92OF/Qb5xu2ygWcfytZndAOL1R1ww39s/gA7UALhvPEJvAT2C2LPKXhrh75dUHsz buAHJCLdt7kOHpONnilnacfxU/B7Fru3QdOv3Frqmj/tyd94jIF5wRZHv2teFzAdI2LXi7v0kC/ ejft+2HntW2/PKW8wtNFINMc41vka5OY+5cIP2QHAmumfzreFg70upwilIrh/0nYMs41o022gIj aTkrtXEEttl6WvrwyLAm5FokJIpLdan5zfLhC7eKj/ntp9pKfm1sLlm/c9v3EB1BX9/JoZZ8dkZ i/26+6tm0a/Der71M4b+vE1k7nA0XuClLVR3dfjM8xVkY1HCI+S5v4OM+/e2GpFr3lq4BV59bt8 lf2GSp9kAq2A43bsQVKafzM5eNIeUO5uSpsJ7E3uT41UaNqUAdv3vMkF2cM7LUwBu/U9V8B5Bc7 k1jvl/3tvC/MWbQNwuepcmUAM2PvVCaF+iQg== X-Received: by 2002:a7b:cc0f:0:b0:490:3838:1548 with SMTP id 5b1f17b1804b1-490947afaf2mr10706165e9.13.1779964479411; Thu, 28 May 2026 03:34:39 -0700 (PDT) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45edb5c44e4sm12324368f8f.36.2026.05.28.03.34.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2026 03:34:38 -0700 (PDT) Date: Thu, 28 May 2026 13:34:34 +0300 From: Dan Carpenter To: Kees Cook Cc: Jonathan Corbet , Greg Kroah-Hartman , Stefano Zacchiroli , Steven Rostedt , Laura Abbott , Julia Lawall , Wenwen Wang , "Gustavo A . R . Silva" , Thorsten Leemhuis , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-hardening@vger.kernel.org, Dawei Feng Subject: Re: [PATCH v3] Documentation/process: Add Researcher Guidelines Message-ID: References: <20220304181418.1692016-1-keescook@chromium.org> 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: <20220304181418.1692016-1-keescook@chromium.org> On Fri, Mar 04, 2022 at 10:14:18AM -0800, Kees Cook wrote: > +For example:: > + > + From: Author > + Subject: [PATCH] drivers/foo_bar: Add missing kfree() > + > + The error path in foo_bar driver does not correctly free the allocated > + struct foo_bar_info. This can happen if the attached foo_bar device > + rejects the initialization packets sent during foo_bar_probe(). This > + would result in a 64 byte slab memory leak once per device attach, > + wasting memory resources over time. > + > + This flaw was found using an experimental static analysis tool we are > + developing, LeakMagic[1], which reported the following warning when > + analyzing the v5.15 kernel release: > + > + path/to/foo_bar.c:187: missing kfree() call? > + > + Add the missing kfree() to the error path. No other references to > + this memory exist outside the probe function, so this is the only > + place it can be freed. > + > + x86_64 and arm64 defconfig builds with CONFIG_FOO_BAR=y using GCC > + 11.2 show no new warnings, and LeakMagic no longer warns about this > + code path. As we don't have a FooBar device to test with, no runtime > + testing was able to be performed. People have started sending commit messages in this exact template and normally I would ask them resend with the meta commentary from this paragraph below the --- cut off line. Do we really want this "Compile tested only" stuff in the permanent git log? regards, dan carpenter > + > + [1] https://url/to/leakmagic/details > + > + Reported-by: Researcher > + Fixes: aaaabbbbccccdddd ("Introduce support for FooBar") > + Signed-off-by: Author > + Reviewed-by: Reviewer > +