Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp216356pxb; Fri, 16 Apr 2021 03:59:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxj+Hk1ZFPtRb5SSjZMVxj2ZCNbzggSnsPzalASRLKLmHwVLCDjTmMKd3Ba8WswVnrVafj5 X-Received: by 2002:a17:90a:2f89:: with SMTP id t9mr9292765pjd.177.1618570790246; Fri, 16 Apr 2021 03:59:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618570790; cv=none; d=google.com; s=arc-20160816; b=LMjuAoEcOmmgDOzoT2qI/0XRCiW6VAVfYF5cw8vZVzhzxd3rubRh32LrBqqD62Q3JF rJ7hj6LYUbFNJYA1yxouYJWZmjQmTsQXpCupqnibmPJ1ijGiHQ+RiOBACWun6+2g24sn sRNlnj2XIYbW9ufKMFC4EQqfOZJvVcc6pREzyeLDsY5FVDLITFKowNXrP6fO3dkn7wK6 82hVa1ogV3YyFFWaZRs14R6CZmyRvfty9u6TMggdIlGAeYPWWolBpkvQVwOhkl4hnTuT LJDItDN/aOuNQaEGARZeQTfbpbcVsogPKU7sH3e2e9+llvmD9Vhd2MJ5Uft2qPgg2gV4 fbmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=YP6jKPEv/+0hYGSwLQUdlk+3akcfRirWTpp0Szl8h9w=; b=ScMCQC/vMhC+1SLH/uHhED7M8cf2lRSBekTcUEXHyAWBPFoSdtLwErHH1ODWHG83uP krh6GXuR1S9bbpMfdIHja9p+FtJIXqx7IgJM+BiUJnfEPrVbYTqAba/Y4maBdiZ9KvtI C8OMJcd8kl5+SrOb6PfIveRTrpLsn9H7Et9TbFKrz+l3T7qphMhfuyZjjv4Oj6/DC92/ BntGM2AWV7ObjLdLGSjTkI+pAjn4nN0X52mAfUPsz+J/rNZh7xRM+asC37PyKB/22Alz 5Tf2+eUSpVZoWyLLiHKW1fFuO5ofiK4DeqVhNWfHPlW9FO4TXOV0DetNMlKGKrW2u0wV 7uuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=dlrfmoa6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a67si6406140pgc.147.2021.04.16.03.59.38; Fri, 16 Apr 2021 03:59:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=dlrfmoa6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240030AbhDPKlc (ORCPT + 99 others); Fri, 16 Apr 2021 06:41:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229502AbhDPKla (ORCPT ); Fri, 16 Apr 2021 06:41:30 -0400 Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F284AC061574; Fri, 16 Apr 2021 03:41:04 -0700 (PDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4FMCRd1BPDz9sVv; Fri, 16 Apr 2021 20:41:01 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1618569661; bh=SeOzQ9Fg9C2zAMuj8cY5McP+aFk25PiM311deR2n+II=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=dlrfmoa66rjbsgjm/6d63tAsvauWz+/zCQSBCnuup3KRzbygxslVoQS9YLGzEmxCp BlmJROc2q2TCvBVUIsPXowKqD3tb+ePzQL27V3dkPyfXbwzb78UU1jdjd137lpsvKm KRliFf+AabCTWYguQlPH0zI4TXJyjldAKamw26SoqGPY25rAGdtoTIaVkio+4Uf4L1 SEAb53oUP9Z4uROoJLiyxDIETXgY4VU69wU0ZSnGCG4nWNO75litn3pAbksUGbd/82 gAnYfZRakpES4+dl5kRnYehiwK32L5HnaGG6PdUlZ0kv9Tk4UjgZL+TxjgXEcebnmo 67fGXanIuuK6g== From: Michael Ellerman To: Tony Ambardar Cc: Benjamin Herrenschmidt , Paul Mackerras , Arnd Bergmann , linux-arch , linuxppc-dev , LKML , bpf , Stable , Rosen Penev Subject: Re: [PATCH v3] powerpc: fix EDEADLOCK redefinition error in uapi/asm/errno.h In-Reply-To: References: <20200917000757.1232850-1-Tony.Ambardar@gmail.com> <20200917135437.1238787-1-Tony.Ambardar@gmail.com> Date: Fri, 16 Apr 2021 20:41:00 +1000 Message-ID: <87r1jaeclf.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tony Ambardar writes: > Hello Michael, > > The latest version of this patch addressed all feedback I'm aware of > when submitted last September, and I've seen no further comments from > reviewers since then. > > Could you please let me know where this stands and if anything further > is needed? Sorry, it's still sitting in my inbox :/ I was going to reply to suggest we split the tools change out. The headers under tools are usually updated by another maintainer, I think it might even be scripted. Anyway I've applied your patch and done that (dropped the change to tools/.../errno.h), which should also mean the stable backport is more likely to work automatically. It will hit mainline in v5.13-rc1 and then be backported to the stable trees. I don't think you actually need the tools version of the header updated to fix your bug? In which case we can probably just wait for it to be updated automatically when the tools headers are sync'ed with the kernel versions. cheers > On Thu, 17 Sept 2020 at 06:54, Tony Ambardar wrote: >> >> A few archs like powerpc have different errno.h values for macros >> EDEADLOCK and EDEADLK. In code including both libc and linux versions of >> errno.h, this can result in multiple definitions of EDEADLOCK in the >> include chain. Definitions to the same value (e.g. seen with mips) do >> not raise warnings, but on powerpc there are redefinitions changing the >> value, which raise warnings and errors (if using "-Werror"). >> >> Guard against these redefinitions to avoid build errors like the following, >> first seen cross-compiling libbpf v5.8.9 for powerpc using GCC 8.4.0 with >> musl 1.1.24: >> >> In file included from ../../arch/powerpc/include/uapi/asm/errno.h:5, >> from ../../include/linux/err.h:8, >> from libbpf.c:29: >> ../../include/uapi/asm-generic/errno.h:40: error: "EDEADLOCK" redefined [-Werror] >> #define EDEADLOCK EDEADLK >> >> In file included from toolchain-powerpc_8540_gcc-8.4.0_musl/include/errno.h:10, >> from libbpf.c:26: >> toolchain-powerpc_8540_gcc-8.4.0_musl/include/bits/errno.h:58: note: this is the location of the previous definition >> #define EDEADLOCK 58 >> >> cc1: all warnings being treated as errors >> >> CC: Stable >> Reported-by: Rosen Penev >> Signed-off-by: Tony Ambardar >> --- >> v1 -> v2: >> * clean up commit description formatting >> >> v2 -> v3: (per Michael Ellerman) >> * drop indeterminate 'Fixes' tags, request stable backports instead >> --- >> arch/powerpc/include/uapi/asm/errno.h | 1 + >> tools/arch/powerpc/include/uapi/asm/errno.h | 1 + >> 2 files changed, 2 insertions(+) >> >> diff --git a/arch/powerpc/include/uapi/asm/errno.h b/arch/powerpc/include/uapi/asm/errno.h >> index cc79856896a1..4ba87de32be0 100644 >> --- a/arch/powerpc/include/uapi/asm/errno.h >> +++ b/arch/powerpc/include/uapi/asm/errno.h >> @@ -2,6 +2,7 @@ >> #ifndef _ASM_POWERPC_ERRNO_H >> #define _ASM_POWERPC_ERRNO_H >> >> +#undef EDEADLOCK >> #include >> >> #undef EDEADLOCK >> diff --git a/tools/arch/powerpc/include/uapi/asm/errno.h b/tools/arch/powerpc/include/uapi/asm/errno.h >> index cc79856896a1..4ba87de32be0 100644 >> --- a/tools/arch/powerpc/include/uapi/asm/errno.h >> +++ b/tools/arch/powerpc/include/uapi/asm/errno.h >> @@ -2,6 +2,7 @@ >> #ifndef _ASM_POWERPC_ERRNO_H >> #define _ASM_POWERPC_ERRNO_H >> >> +#undef EDEADLOCK >> #include >> >> #undef EDEADLOCK >> -- >> 2.25.1 >>