Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1090744rdg; Fri, 13 Oct 2023 09:55:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHo6wrMmixIfa21IslYrgk3tispc6gkad4UAd4+RtuaKgBGNi8UorgXrzegassInzdf2KVx X-Received: by 2002:a05:6a21:2724:b0:16b:74db:8fde with SMTP id rm36-20020a056a21272400b0016b74db8fdemr19254642pzb.61.1697216102908; Fri, 13 Oct 2023 09:55:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697216102; cv=none; d=google.com; s=arc-20160816; b=IJfOcgFJuAwh5woq0Q5aOjUKm3MVWZCRuinpE3CcfgkVGGGEFO6bMH9/AEgmfsTvjI md7HpGD7vOV8aizF2vV77eAm+TNllT7Gp6Q9VN8h5N1THRMO1hi5eR5xyj0tLKfAeI0Z i55kKlHFG9vTVTJ/XQfTwq8wJfRTmbOODpjwiYwd5TETcmFHaLwy3+NRIe3l/u8v2wcB UyrZNp8BP9fSw/nhZTAuEZSbgHGjzdNAI6k6KE1CsBbiG8MIu97dXfv+VPxYu/X0wWS1 /sYrMFp0xejHb3n/vQgxOKsSozez/pUcOUMbleir2yM0xQg71GPCb6QdTkqZAdrKaQ0t n98w== 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:mime-version:date :dkim-signature:message-id; bh=bFYiULr6F/P0Mtox7L6PbFCpW6iv+F01a/eo96NoyTs=; fh=QoAdmr42s8pIu9AmqvTF+N37SVgArlqmyHWZdcBjMTs=; b=bkMcSjZntn9C/c98D9qqXE0F/Dt8oxRJIER/cshVkclbNpa8YSk2CpNG6m4iuVUXoY Kezoj/KFqWCEk3QT0wSmQeijCgy1N73zKOOEpLH6USDMHN73YrjkRxEa09buLAoEkqYH JGrdw1s/Qo57ed8yTU7V9aFkGfxQbQE/AgYlgw9J7UWqrHTzEbhegwx8Rd8h5QOX8eTg tJbAmSHsk4OESVUgJ9z8ZkqaGt4h9JY4TtBB+mtQ8+LBP95xi75x8KOWxIbpYwsFqmXC muNQHdEUJ6gDjxN9B+qawSmJ0XEdSIRSEGPHE31aKFW0mBznV+ZXRyXZ4G8kMuUkpSNR Mupw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=TUHuLF04; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id c61-20020a17090a494300b0027468369b4fsi408717pjh.177.2023.10.13.09.55.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 09:55:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=TUHuLF04; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id C193D82069E9; Fri, 13 Oct 2023 09:55:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229721AbjJMQys (ORCPT + 99 others); Fri, 13 Oct 2023 12:54:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229518AbjJMQyr (ORCPT ); Fri, 13 Oct 2023 12:54:47 -0400 Received: from out-198.mta1.migadu.com (out-198.mta1.migadu.com [95.215.58.198]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B265AD for ; Fri, 13 Oct 2023 09:54:45 -0700 (PDT) Message-ID: <58ed787f-a3b1-58d3-74a5-3a6e8c4c970a@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1697216082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bFYiULr6F/P0Mtox7L6PbFCpW6iv+F01a/eo96NoyTs=; b=TUHuLF04Jm3hSEVbAw2g19VbmJgt632qjJxcZSSi5yKBZUiHK07SX1NECkqY+moL56vlyJ cIWcNlgp5VmjTwUhVpbPpmwYpykxL1qffWPVUyB5WHxqsNlahLMoF4tn5w+3bz1eoCH18Y NJPxOnXWj4ER5rkSg2XIhT1ogYHo8uY= Date: Fri, 13 Oct 2023 09:54:35 -0700 MIME-Version: 1.0 Subject: Re: linux-next: build warning after merge of the bpf-next tree Content-Language: en-US To: Stephen Rothwell , Daan De Meyer Cc: bpf , Networking , Martin KaFai Lau , Linux Kernel Mailing List , Linux Next Mailing List , Daniel Borkmann , Alexei Starovoitov , Andrii Nakryiko References: <20231013114007.2fb09691@canb.auug.org.au> <20231013163034.73314060@canb.auug.org.au> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Martin KaFai Lau In-Reply-To: <20231013163034.73314060@canb.auug.org.au> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT 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 pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 13 Oct 2023 09:55:00 -0700 (PDT) On 10/12/23 10:30 PM, Stephen Rothwell wrote: > Hi all, > > On Fri, 13 Oct 2023 11:40:07 +1100 Stephen Rothwell wrote: >> >> After merging the bpf-next tree, today's linux-next build (arm >> multi_v7_defconfig) produced this warning: >> >> net/ipv4/af_inet.c: In function 'inet_getname': >> net/ipv4/af_inet.c:791:13: warning: unused variable 'sin_addr_len' [-Wunused-variable] >> 791 | int sin_addr_len = sizeof(*sin); >> | ^~~~~~~~~~~~ >> >> Introduced by commit >> >> fefba7d1ae19 ("bpf: Propagate modified uaddrlen from cgroup sockaddr programs") > > This became a build failure for the i386 defconfig build, so I applied > the following patch: > > From: Stephen Rothwell > Date: Fri, 13 Oct 2023 16:25:08 +1100 > Subject: [PATCH] fix up for "bpf: Propagate modified uaddrlen from cgroup sockaddr programs" > > Signed-off-by: Stephen Rothwell > --- > net/ipv4/af_inet.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c > index 7e27ad37b939..0fcab6b6cb04 100644 > --- a/net/ipv4/af_inet.c > +++ b/net/ipv4/af_inet.c > @@ -788,7 +788,9 @@ int inet_getname(struct socket *sock, struct sockaddr *uaddr, > struct sock *sk = sock->sk; > struct inet_sock *inet = inet_sk(sk); > DECLARE_SOCKADDR(struct sockaddr_in *, sin, uaddr); > +#ifdef CONFIG_CGROUP_BPF > int sin_addr_len = sizeof(*sin); > +#endif Thanks for the report and taking care of it. Daan, something that was missed in ipv4 getname. It should be done similar to inet6_getname() in af_inet6.c such that it "return sin_addr_len;" in this function to avoid the compiler warning here in ipv4.