Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp279094lqp; Fri, 12 Apr 2024 18:43:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWqePyx28RD6DeNBk+hpD2f4FVS+/a8hm/UvNzCPPvncn7d6a1S4EOFhrUeWpRXz+pudh8PIFtgUJ921cE4vKc7Iu4GrFim5ty1bmiZAA== X-Google-Smtp-Source: AGHT+IEIxMEYV/TbcTR0CzucCwAQApCWHSpqBpBLV3fE2mIJ9NQeoVeArR2514mRwrlbiYai44j4 X-Received: by 2002:ac8:7e92:0:b0:434:bf54:89c0 with SMTP id w18-20020ac87e92000000b00434bf5489c0mr12210192qtj.32.1712972619890; Fri, 12 Apr 2024 18:43:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712972619; cv=pass; d=google.com; s=arc-20160816; b=qRdh3pNN9e1Nq/V36djFJZ/MWTCBi0b7N6AYezvco/KRE1mYGd7Zq2Ks2n/Ra1lPre 3PcCIXunPCEXeAKj7kBy6rUc9orQTp79vvZXrn9Als47aRqgxq44lDq9Chb9eaDaz0hA h80Uhhuo+COubAqSKkr+qRhnYeCG/81PUqxiIK78YJy0VTR5SgAWbu5RJlppYFzqK70D gtMJjpKbjXHvm1NrGrSb8U2KvyPWD+atQG4ni/iXrKMQgUZbHGzuWVedmfNq02XstWps PPGaykOG96/TbxcYBzEAV+n1+QoGjL4ZgxEluyFdSSrVC3/PWKeHs2Qsgi3dr9X/LU7w G1JQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=/QC0RbpAnF0CmmphqMiuPMw/4OlhO5Kr9QCU9mzv/6c=; fh=mIjzXHw5v7A2Erx58fxNJLY3dKis8KZygbiuspmBmUM=; b=yPaVesaY2GCroVmmQUxgCly7jpg17QXPRn6z/SoEKVd5XdbnkgBqQ5YVt0qC/ad+Kv DBCXKjrHI11Eb4qX+NxNXFgH/mpPgVXZ39GzWlEgJRogWoKnUNTW7/e2NYjRYO8yqaGH UWlPlTFlyhEXNjlTTbpF3GfaxQAliTvbJr2AuKqg+dO8+TCqXYSfepiL0EceTrn+1Php FyDH/luTr9t+4ToOAYelA2HwG6dSRWfMts5n9X25t9zHYGtgkpHnvl1Zx9VExkXIuCX9 sZ/5LHYh1iQGuUmFYUyAvTwveVtgOusAO+zS8tFqu5Z3v4c9V5pjnvcWckTkbAjHIcKg PzrQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=A8Ht6pt7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-143498-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143498-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v17-20020a05622a145100b00434e7ea018csi5344060qtx.261.2024.04.12.18.43.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 18:43:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143498-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=A8Ht6pt7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-143498-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143498-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 39B751C2124A for ; Sat, 13 Apr 2024 01:43:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D35F018EA1; Sat, 13 Apr 2024 01:43:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="A8Ht6pt7" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D6AA78F7D; Sat, 13 Apr 2024 01:43:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712972584; cv=none; b=Leaw6cLf8VSNJGCN4Xat1nC+fQgk1otLBwypEppLRvUMFWwiuwouD2L7c+kSfxkJDrdQ8vI/zGb+nZbS92SdqZ+g8B+VR4A2T99weXwx+j3S0VLb/1y+T7ke4R4j0kzSlUx2FaGgjT96W6+XipDIShBDXl/CIoqFCpEi1dNulkc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712972584; c=relaxed/simple; bh=YiZxq4sQxoAgUnQhcX4+ld7ZHlxolEbw1dlFH014/Nc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=oOsa6HUHCLaerENv2yPZ12zeUbuspF8gNzJGH6r+O1RddFZ539vPyOnL2aw2rL8Lp4N8rlBFdRT8JtPB5Z6EFm2mEICID/W3VZwSKZhOhN0gnagt5plTmSR3cttrXiALFItWwm5eCvxpvuAMexwDckGopP0noLdZWRRBnUj9A3U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=A8Ht6pt7; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 6C4DDC3277B; Sat, 13 Apr 2024 01:43:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712972584; bh=YiZxq4sQxoAgUnQhcX4+ld7ZHlxolEbw1dlFH014/Nc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=A8Ht6pt7PAkSnGsGENmdlgTrgU33Lvi6yKiGn7khfSKWOKSH7Uftj1HAXKNvAr99N w4dCU6+UFNQfwz5jwAWGB++NpfK50LNKZF/igJYFlbRkpgfuhWJY2cBvlYagEoQQFM 4KBCV5GbRGdSOCKIzK4m8mepKDVlA+GC/voqWxqcUA5si5Nf7CR4wz2W2B8jcxtLGK JOVa3Ytmtpl6ZUXV2A+Fwpk60pYGeGuAy/kcc8RscGMzxtkK2GX9ykRrvlcM3lTzRU szkKC8bznagx0yEBN7tbTY+CVEN9i3xpYhC4YEP1dyTGjmGj0Uu34rJm+U2Z6apF77 ZoKmHHSR3M6bw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59DB2C04FFE; Sat, 13 Apr 2024 01:43:04 +0000 (UTC) From: Dmitry Safonov via B4 Relay Date: Sat, 13 Apr 2024 02:42:53 +0100 Subject: [PATCH net 2/4] selftests/tcp_ao: Zero-init tcp_ao_info_opt 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="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240413-tcp-ao-selftests-fixes-v1-2-f9c41c96949d@gmail.com> References: <20240413-tcp-ao-selftests-fixes-v1-0-f9c41c96949d@gmail.com> In-Reply-To: <20240413-tcp-ao-selftests-fixes-v1-0-f9c41c96949d@gmail.com> To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Dmitry Safonov <0x7f454c46@gmail.com> X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1712972582; l=1034; i=0x7f454c46@gmail.com; s=20240410; h=from:subject:message-id; bh=3bRkAaWMpwCvEVUHFASSPFH/W2xMsTy4q2ZYGJH/FcI=; b=aZvNsjzortZd28wwafvkCmgyJVPjZQcwxuQ5gPXrPthVSKj60nH6vApYB/+5TgqvtXPLqEBmh5x+ f7RSvRMsBWHk/b46SuYVSBsFsRX6ns0IW2+2X7YvrhZdaTu9iEUE X-Developer-Key: i=0x7f454c46@gmail.com; a=ed25519; pk=cFSWovqtkx0HrT5O9jFCEC/Cef4DY8a2FPeqP4THeZQ= X-Endpoint-Received: by B4 Relay for 0x7f454c46@gmail.com/20240410 with auth_id=152 X-Original-From: Dmitry Safonov <0x7f454c46@gmail.com> Reply-To: 0x7f454c46@gmail.com From: Dmitry Safonov <0x7f454c46@gmail.com> The structure is on the stack and has to be zero-initialized as the kernel checks for: > if (in.reserved != 0 || in.reserved2 != 0) > return -EINVAL; Fixes: b26660531cf6 ("selftests/net: Add test for TCP-AO add setsockopt() command") Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com> --- tools/testing/selftests/net/tcp_ao/setsockopt-closed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/tcp_ao/setsockopt-closed.c b/tools/testing/selftests/net/tcp_ao/setsockopt-closed.c index 452de131fa3a..517930f9721b 100644 --- a/tools/testing/selftests/net/tcp_ao/setsockopt-closed.c +++ b/tools/testing/selftests/net/tcp_ao/setsockopt-closed.c @@ -21,7 +21,7 @@ static void make_listen(int sk) static void test_vefify_ao_info(int sk, struct tcp_ao_info_opt *info, const char *tst) { - struct tcp_ao_info_opt tmp; + struct tcp_ao_info_opt tmp = {}; socklen_t len = sizeof(tmp); if (getsockopt(sk, IPPROTO_TCP, TCP_AO_INFO, &tmp, &len)) -- 2.42.0