Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp653866lqp; Thu, 21 Mar 2024 11:20:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVRoQOEtt4Hz/5GYAzagskWqFQmduWu99PBEXDIgOGhjy+koFCwbEmtb+kz4rjV3acR+JGyu098oGzuUQEJDegNvAKmHP8jAnEs19dVew== X-Google-Smtp-Source: AGHT+IGFs4DxstkPvccrlAKbdFNANHbsj9qb+9KycDKwpH1r5Y2N5UN7siZpUlVigaYCv66LEOvk X-Received: by 2002:a2e:7e12:0:b0:2d4:94eb:e9fe with SMTP id z18-20020a2e7e12000000b002d494ebe9femr296675ljc.21.1711045219368; Thu, 21 Mar 2024 11:20:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711045219; cv=pass; d=google.com; s=arc-20160816; b=EAr8iuh4TBPblsovQv4w4ydLX0BJzpko6iSO9mtmQMD8ZfQjqlSsZVVcUWmUvWHHUB v8otavdiZ/gyG/scbpCztDMtNLAOJYp1kWLRH7Vtp2JrI7VW2fySTiONdN8qh2MekjUy DRML6z4wWI2ffPwgi4OBfYYpAssRbii0V+RRBkPueQZaFm/lgpqkLcV/IWWlcF4kBhsi YeB1vOR1+VweBd5j5t9np1ms7WzIjUgo3E4+N7UDH6YqIwmmnYEZXHdCAkhzZ3vbSEjm 5FKHjgM7WKJVFA1DDVMB5/tXsggfN3hrVhF64MJlk2aqoalBITAjvW2pTmGy2I0Aiz5w UhTQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=HgrbIRE7VEvNM/7O+kRv8lnP7tFYK9W1rOWWA2jQum4=; fh=XXgZSJ5L2p0C4I76XmzKgynTS4K6CVsASu2T7wh8om0=; b=1FRMww9s6+/D4Qu9TlKO4RqpYYscUipDhUyB9iPYvbgIDX6A/ff/yPw6hn9CRz29IB 8OsNYSFQLjxEHqFqbpaWYcPWoApRhDiNQ1qexxhMm2EUTenoc0aqVZYS70mwtRCf/tVl A1oobgpOJtb5/efOkDaABDrWljTP4WDnvKE0Fykf0mwc3/F1aURLpEv/3ZPQjqmmPCOu OK/YCV54e715rBNl5halOJ3txz+SxLM14I17rzUtceyTcoR57+rYVvOl7RZCu0LoPcqW MxMFgbQR6uBVZKA+yo+7FMrtmP7IfJFDMtSkHZTMSwPJWCxzBFHx8PHGQ25c/BchTNJx fslA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=imqIXKmB; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-110550-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110550-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dr13-20020a170907720d00b00a46eac821bbsi165086ejc.453.2024.03.21.11.20.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 11:20:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-110550-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=imqIXKmB; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-110550-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110550-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de 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 1923A1F23213 for ; Thu, 21 Mar 2024 18:20:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CB9CC133422; Thu, 21 Mar 2024 18:20:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b="imqIXKmB" Received: from mout.web.de (mout.web.de [212.227.15.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB4DF79C8; Thu, 21 Mar 2024 18:20:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.3 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711045206; cv=none; b=E/HIZsC9Z0TcysghIKeQLNSYFKGFLzGB9CPJHvcbisdRIvKk1ei9ZN8ewQzGWXpaNuOUNqcU3iFOClzG2OHTt46dd+izVbU0sVQLGU+uMUVWSpHjU+6We9pk5DyuiTIhhY8k6bC5i2+m8PhQGAlnbrSuSdDU8JBqCOjqIjEpEe4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711045206; c=relaxed/simple; bh=8fW3dhh9hYG5Y1ZObjvWtGoPkBZ9p9ImMfwLnxDrke0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=EHz3w6RixgA1Zm1WKlAEuO89YpPI1mEqTVcDUhMxlKfJdIJmtVno+LGEFSmo6txAUFta/xK9R6+Xks1nipUipPbP45z4bZIR6skbc6VKLYlMLLfXd/CW6fUpUqz5W+4CWMOeaaFik1QQpdKeXohBxnYyc5XgbyZrJaBTv6kZ6wM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de; spf=pass smtp.mailfrom=web.de; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b=imqIXKmB; arc=none smtp.client-ip=212.227.15.3 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=web.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1711045201; x=1711650001; i=markus.elfring@web.de; bh=HgrbIRE7VEvNM/7O+kRv8lnP7tFYK9W1rOWWA2jQum4=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=imqIXKmB46uAN+rH9XXuN6v+H6/1USJchXf21JZZfoDez/vI50B/Krg5G8vJlTRB rqLlISWCkSHkVJ+PtHNFiZqXOLZ+edi2sYwDSr0aH580tKVhR/z/3d0G6EtpztHPI yzmQktctnT6Z2/wceX+H0y7/ILWYKs5t6cHsKQPkb5EA7fwKwbUkYdhWu7SmjslT+ fYFNe1tSNIBH9vLBgiBVV7UAvTG+gVhBhCG7SpPHsUXrNxiIPw/TWz9Z1hfXk7XV2 tujXbiQ3hIGJpoZlDQsyIM3CyOYHKwL78y5jBZEEhXnxL1nx49uH49vfphKQdqo09 IX8NweSGATuKTL8m0A== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.90.95]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1N5lnT-1qi0cQ3Muh-00sdt1; Thu, 21 Mar 2024 19:14:13 +0100 Message-ID: Date: Thu, 21 Mar 2024 19:14:11 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net] ice: Fix freeing uninitialized pointers Content-Language: en-GB To: Andy Shevchenko , Dan Carpenter , kernel-janitors@vger.kernel.org, netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, Maciej Fijalkowski , Przemek Kitszel , Tony Nguyen Cc: LKML , Alexander Lobakin , David Laight , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Jesse Brandeburg , Jiri Pirko , Jonathan Cameron , Julia Lawall , Kees Cook , Lukasz Czapnik , Paolo Abeni , Pucha Himasekhar Reddy References: <77145930-e3df-4e77-a22d-04851cf3a426@moroto.mountain> From: Markus Elfring In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:sgi560zt2vi0QRILaOf8Dno1paTZMF0JEueGv8qFTmpY2UfKHsL 7YAth+4h13SGVefnGT3MdnvQlXK2uzciuQAvypP075NmJwH+S1f5f2BOQ79WNEYzGNYW9gQ yz0royLM51YEA7NL75PeQ8OuPHo/abXi7N/DUbBLsSMqyhUaUrXgvBCO1neaNLoBXEkxfq2 wtnF/rBwxxzKrMKDBHRhg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:vB8mFuwR+dI=;qdq3to6uVb96t9XCtTO/xTNQNBA 3vFin/ZvWWkItGHHjrW/mWM2bguPoLo5sndULVGKvZiQEensFDzpaHrh/upGXHGqoXRC1g3aR N4rqgZWS5CCS8eh1/O4esq+ktaet89gS7lvDZ9mwy5416tk/sredsdR59l0TmmRjoPOEurYAv CdFX2mNx4VZNFTXlS32DFH4sl2xib4YB7IF52pavgztyhC3dvKrB+PE156FP5LwIZth7Ufv4m X0/6RAQiKdW8GYN1XrhBtQ8Zi0Gv0IJAQvyiHkOQHo8Z7h4txtQfLQ78ZUbErNEXPK7t9IVb2 125/sOLjtTnnqWxhFkRuusB/yaWba8cehhn/qJgM3gGoks1JpOWoR4oRZsufZNk/V0hKvKiJ6 T8gKk9BYpmZ2rdD6RL0F2roH/TWpC/d06Hp/juOqx5GQ1RvxIdXdokbRcOmbE1J0lUsPS8e+o 9nexNQ9gvw1kMZfZI2Dl68cus4HkwwnKagrCljYSP1c2wOgbaa2WEf9X6OU6J7ofvwwb9yKgn Xgcdk4twUBx8m5t72T/0CX1Ud0RRYPUwlrT7zg2mjwycLBVx8O5F1bq15hVX0O2HvwovrhDzM jcozV9lFf6WRf2VPsgwXMCgIrNQwAVAgQs4UzeH9MIQrZ6pW2L+f31pWYFnZdHn5ebltufL1C yqF6N3uDqQx0PcBayqL5F4aaGZe6O7m5yDuvBLFeSWz83ObmaYwJ7gxZn+bSc+PqwHXQoKwEH q3NwV6Lgxw8EpowwLl0qPGOZZ4KJFQypcMWNs8F7IyTq0DWlZsXI5RfNFpv9nyoi3sIsEpygf brnjCROtc9T7cwDCoGZcrfM9SRIswXVGWeVjOrFTRGZNM= >> How do you think about to reduce the scope for the affected local varia= ble instead >> with the help of a small script (like the following) for the semantic p= atch language? >> >> @movement@ >> attribute name __free; >> @@ >> -u8 *tx_frame __free(kfree); >> int i; >> ... when any >> if (ice_fltr_add_mac(test_vsi, ...)) >> { ... } >> + >> +{ >> +u8 *tx_frame __free(kfree) =3D NULL; >> if (ice_lbtest_create_frame(pf, &tx_frame, ...)) >> { ... } >> ... when any >> +} >> + >> valid_frames =3D ice_lbtest_receive_frames(...); > > I believe you don't understand what the scope of the above can be. Will the understanding improve for the proposed source code transformation= ? Regards, Markus