Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5542870rdb; Wed, 13 Dec 2023 11:36:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IGXgNuPiagqCkej7GDKA6l0aDcsS3S/T2FNnZV9R73HaGY5TlmY82aPjEJdVdTkwHygq2xC X-Received: by 2002:a50:cc08:0:b0:54c:f947:6347 with SMTP id m8-20020a50cc08000000b0054cf9476347mr4989704edi.71.1702496196704; Wed, 13 Dec 2023 11:36:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702496196; cv=none; d=google.com; s=arc-20160816; b=qZ5XlxsueJ/+PEIDlmVIBqyf87/VRCntWbf2y8UCTEZ5qY6ZWHCiIk+iekxG+ZXK+a JqvfjvpkhbNTSlJkr0IFOKiJNEM5mu8o7YjMI3VQrpb1BMvxUo6S3rKq7hcM3T71S2p/ xZpnMGIMpesswf7tIuGRY4mlI4xI3CjkPyTAsT3Q1rF5KcfUV+onEnhM+UMQwF5v+EJI U5OSFonQMU0SxByKdtGutzxGjyEd+2B62dLRE6f2mci1HZhlDt3UBrqwMSqdJgVEhd5o HuC0M6Vdxw88hT2XVQiJMn+QQqGOigSEafFZW81CNOv50oFnknijcmMlqV95IVGNz4ui sLHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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=e10Quh6ypHocogNDj3DfFg/zcaIVq5u4rHnANYa2BMw=; fh=DzRwWXCZw4CiEisw/Ft5ALq3xhLyLeyV6ESyOArzxa8=; b=IvnzYuiRvWuD0zNrZRpXlajdVgQZPemgO7bM7b/GeO3hcC6EEdRy34NshQNv+gZQYp LieR/OQCgSgLjBDNp2h+WNUYpysFDRDWsqpt6J9IiLrO4tia9/Lwf8a8YXDQ5ymoowF1 gxAR5Eu9WLbx+g0NYUXLcTZFHO/eD4bNVd72ZXGSUdb6s8CEkvYbKt3YNSfOkhXejdy+ CI+7ClSBAcufaVHLhV55SsQEtpZMNu3JUK4YDM+oCLoTR8awu14yrl1lHOMwBZ2BHz3g q3Gh82PvKldusSbUOzocpsmRc//Ng3eCq/TAWeCaCgFam1bHh8k3fzN8jh2yYaUcZjaa ateA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=g+78Cxxk; spf=pass (google.com: domain of linux-wireless+bounces-762-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-762-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id z19-20020a056402275300b00552346b02f5si413485edd.501.2023.12.13.11.36.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 11:36:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-762-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=@quicinc.com header.s=qcppdkim1 header.b=g+78Cxxk; spf=pass (google.com: domain of linux-wireless+bounces-762-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-762-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.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 6787A1F20FE7 for ; Wed, 13 Dec 2023 19:36:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 92B3768265; Wed, 13 Dec 2023 19:36:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="g+78Cxxk" X-Original-To: linux-wireless@vger.kernel.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0F0B9C; Wed, 13 Dec 2023 11:36:29 -0800 (PST) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BDFU2FI010333; Wed, 13 Dec 2023 19:36:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=e10Quh6ypHocogNDj3DfFg/zcaIVq5u4rHnANYa2BMw=; b=g+ 78CxxkeX9aR2uTKkPX4FgP6zvmIuUCTt68g2hfvg4SfK1hK9lPsiQk0jSZYpBJPW 02hndBm6IeNopLbiPTBFxd0Yn+ZA9NRyBjDRZAdzgyeRd8dAMFPUz9JgHqpdKige qY655OPAPuLoiHJ7lEupsI/mKEiLPWjOdzw4LHVbXKLg4q8sz+fNjdvlpdD6pitk 9wki0m8DqCFbUeNpurTdaRKzy/Sz4oJRZPGWBF0zkivT+PMD/lKcy+cJr+CIZXoZ dBnHGLab1lrRipSv67V2viPRHOshRITA6Wcd+8bDorv8YHtce2itReiJjQJAlXWg x6hHJJam2BQt7V4VKCWg== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uy5tvj121-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Dec 2023 19:36:10 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3BDJa9VT029811 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Dec 2023 19:36:09 GMT Received: from [10.110.106.103] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 13 Dec 2023 11:36:09 -0800 Message-ID: Date: Wed, 13 Dec 2023 11:36:08 -0800 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 6/6] wifi: ath10k: remove duplicate memset() in 10.4 TDLS peer update Content-Language: en-US To: Kees Cook CC: Kalle Valo , "Gustavo A. R. Silva" , , , References: <20231213-wmi_host_mem_chunks_flexarray-v1-0-92922d92fa2c@quicinc.com> <20231213-wmi_host_mem_chunks_flexarray-v1-6-92922d92fa2c@quicinc.com> <202312131113.4C01D1DD5A@keescook> From: Jeff Johnson In-Reply-To: <202312131113.4C01D1DD5A@keescook> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: M2IxbTZn4GckO0QFKlvmZIGyxCcH9-HB X-Proofpoint-GUID: M2IxbTZn4GckO0QFKlvmZIGyxCcH9-HB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_01,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 phishscore=0 priorityscore=1501 impostorscore=0 mlxscore=0 clxscore=1015 mlxlogscore=557 bulkscore=0 spamscore=0 adultscore=0 lowpriorityscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312130139 On 12/13/2023 11:16 AM, Kees Cook wrote: > On Wed, Dec 13, 2023 at 09:06:44AM -0800, Jeff Johnson wrote: >> In [1] it was identified that in ath10k_wmi_10_4_gen_tdls_peer_update() >> the memset(skb->data, 0, sizeof(*cmd)) is unnecessary since function >> ath10k_wmi_alloc_skb() already zeroes skb->data, so remove it. > > Is .gen_tdls_peer_update only ever called after a fresh allocation? It > wasn't obvious to me as I tried to follow the call paths. Is there harm > in leaving this? The only harm is a slight increase in code size and cpu cycles. However note the skb allocation is done within ath10k_wmi_10_4_gen_tdls_peer_update() itself, just before the code being removed: skb = ath10k_wmi_alloc_skb(ar, len); if (!skb) return ERR_PTR(-ENOMEM); And in ath10k_wmi_alloc_skb() we have: memset(skb->data, 0, round_len); So the memset() being removed is always redundant. /jeff