Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1548119rda; Mon, 23 Oct 2023 16:41:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGY6c2USBTp9douFPZGC7+Iet+D9aSMaOs1i03Te3wdzQTGVelAGLkNUS1pkIv9t9M7WEku X-Received: by 2002:a05:6358:cb06:b0:168:d4c3:343c with SMTP id gr6-20020a056358cb0600b00168d4c3343cmr5941299rwb.4.1698104511732; Mon, 23 Oct 2023 16:41:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698104511; cv=none; d=google.com; s=arc-20160816; b=PuvTunh0nsWinL1XNd/S5fnmOFoGLl7dpx6PT9oQ848Vlz1kkLpXjKTdXn+ZwOwgeq 5LCQC01btcW3C7hYu4vXzEDf66E+TvjCjcjWdEgFsuuPL/+cWVk+JPSWn5Oi/aWsL8Oj CX9ArkhrLvqjtj8Hsw9ImCx2e2X8FK1Rtft7lwxcAhRQaR91pPfGwPoYzXH8KEV03lQY elWmaKGtfnutTYUIOVqEt71ca31Wi4lC1vdAlXdYa7ut2ztPX/7BJ7Gh0yMvWIkUHk1u IF7YoSZNnakUz+pkD2oLglgisGHvSfocnofcTTo8BHcmpteHFW/8wY7y33yC0dCJ9tZw 9JjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=j7FVUJkCTJZmDebRwT+dehweCjUOAjdNji6l4GnsWBs=; fh=HHIfOUrbYBzlpf7O9okqJauZx+9qNUHyx741ErqP5OI=; b=GUsxSIeBUlENORRzZejlk5bcl9t9IJpA7WqphDjv0kdS7Y/vTgub1bJDbEq7d6w9h8 MX4cnmGJxgLOtewiHJwvpw974KeqfvHLnyhw5OfWJ3drhE/4i8WT2AVy5peyvAms9SJA bj6Ru+NGXEjgTR5x0lkDYkDd0Us6QQweswxQH5VcpcISwoNUqm8j0WpL/Pn1MsTSxeZH qcAcGGxPgQtc3AWdRStBsX4fBZ234OYHE+1pWJRib0ibGuSXvXsHTcBdNAju43Ki9+UK mk+Mog9ZV0QQ1e5tva8hyxrQt6JOfA9MJxae+qBvMT8O0i5Hxg7mlPT7OnsBsHq5znEk bPcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=brAceV1j; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id ch1-20020a056a0208c100b005b4ef9f02desi7015775pgb.796.2023.10.23.16.41.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 16:41:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=brAceV1j; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 4F96F8065EC4; Mon, 23 Oct 2023 16:41:45 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231732AbjJWXlo (ORCPT + 52 others); Mon, 23 Oct 2023 19:41:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231952AbjJWXlf (ORCPT ); Mon, 23 Oct 2023 19:41:35 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 430BB173B; Mon, 23 Oct 2023 16:41:06 -0700 (PDT) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39NMOBLW023733; Mon, 23 Oct 2023 23:40:56 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=j7FVUJkCTJZmDebRwT+dehweCjUOAjdNji6l4GnsWBs=; b=brAceV1jasEnCZMlO88OAGAE6lmAwNH6WI1nNWOkE2ZhhJs2QLPIB9qdl5zOEbXsNr/s hUTHy+QWbkfgYY+sIb662LY+dWdSqEYE7ESScv1zhiJ5q59ug0PbD5b7tU5vDbFXrM7h 46Av9r7FSgjC8nFFlLWDXXyTK6Mj8iTdEX/02EjUKvVWN7P84N1S5jYtN2OZ32iD1dfb Ae4f+3wMInLJT/Q2SFjLMGOPO9ka031g+dRJR7w4O6z8lQ4JuzBj14A4MjcBUOJCywhl PuoFCRlJvWf6qYgQPkteDnLwYdwXs/yZ7oYcwLALClGkO45f+z6hqiaLFgbWFDnEwZU3 /w== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3twxa0ghns-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Oct 2023 23:40:56 +0000 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 39NNetaK006422 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Oct 2023 23:40:55 GMT Received: from [10.48.243.236] (10.49.16.6) 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.39; Mon, 23 Oct 2023 16:40:55 -0700 Message-ID: <2f407e7c-9bc7-4915-a043-5a7cec2cb2b1@quicinc.com> Date: Mon, 23 Oct 2023 16:40:54 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] ath10k: replace deprecated strncpy with strtomem_pad Content-Language: en-US To: Kees Cook CC: Justin Stitt , Kalle Valo , , , , References: <20231013-strncpy-drivers-net-wireless-ath-ath10k-mac-c-v1-1-24e40201afa3@google.com> <1cfc7c64-439c-437e-af82-7fce1202242d@quicinc.com> <202310181626.C5BE0C21F@keescook> From: Jeff Johnson In-Reply-To: <202310181626.C5BE0C21F@keescook> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) 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-GUID: izofka88cARvIfp8FMQHlje-5qAtYmxL X-Proofpoint-ORIG-GUID: izofka88cARvIfp8FMQHlje-5qAtYmxL X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-23_21,2023-10-19_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 malwarescore=0 mlxscore=0 phishscore=0 mlxlogscore=477 impostorscore=0 clxscore=1015 bulkscore=0 adultscore=0 spamscore=0 priorityscore=1501 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310170001 definitions=main-2310230208 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 23 Oct 2023 16:41:45 -0700 (PDT) On 10/18/2023 4:35 PM, Kees Cook wrote: > On Fri, Oct 13, 2023 at 05:58:03PM -0700, Jeff Johnson wrote: >>> Let's also mark ath10k_vif.u.ap.ssid as __nonstring. >> >> what criteria is used to determine whether or not to use __nonstring? >> doesn't the use of u8 vs char already communicate that distinction? >> just want to know what other u8 arrays might require this. >> FWIW the documentation referenced by the __nonstring macro explicitly refers >> to "type array of char, signed char, or unsigned char" > > The use of __nonstring is for byte arrays that are _not_ expected to be > %NUL terminated. Unfortunately "char" vs "u8" isn't distinguished by the > compiler. All byte arrays are treated as C strings unless __nonstring is > used. So is the plan to annotate every single binary blob array in the kernel as __nonstring? I suspect those outnumber string arrays.