From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 825D3C433EF for ; Wed, 1 Dec 2021 19:04:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B3EFB6B007B; Wed, 1 Dec 2021 14:04:38 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AEE9C6B007D; Wed, 1 Dec 2021 14:04:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9B7366B007E; Wed, 1 Dec 2021 14:04:38 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0009.hostedemail.com [216.40.44.9]) by kanga.kvack.org (Postfix) with ESMTP id 8AE706B007B for ; Wed, 1 Dec 2021 14:04:38 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 4FD05805AC for ; Wed, 1 Dec 2021 19:04:28 +0000 (UTC) X-FDA: 78870151416.12.D4936A7 Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by imf24.hostedemail.com (Postfix) with ESMTP id 71FD5B00009D for ; Wed, 1 Dec 2021 19:04:27 +0000 (UTC) Received: by mail-pj1-f51.google.com with SMTP id fv9-20020a17090b0e8900b001a6a5ab1392so2474341pjb.1 for ; Wed, 01 Dec 2021 11:04:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=7Tf41EDVklcHjoVJH2bJZx09qWT8e2ZOrmXZk1vPBcw=; b=Lz3r8wmwEYFcNsJ3s8aUqTVYKCeup8K784xFhF8aj4SSJWkxl82PhkX+fvAhi5ZC35 ZcrXFzzvtkqLii06p+oU2KL4dEXy3lz/tymYFXaEWfKmHCYP1+WxA4uUZQ0N7XOCbYkf ETq6DxuMPeg0Yn9AGcOED/Ri37H/t2GOlaKsg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=7Tf41EDVklcHjoVJH2bJZx09qWT8e2ZOrmXZk1vPBcw=; b=WXnBKE9EabIPmgjchQJIFjiCKV8CXTMJtCh1pEL+I6+qIVu3mEbcM05rIu0CQoR6rJ xlAEvWkeSnJTdNTFFEKa5RUD2A8dsdtpjj/arzD9m07jIJEfGIv6jwhd0Cg0bLzL5pFl dcmODmG3nCC/Eio+Lbqsq6uCnCdAvcYnWTlnfyBIIb0wk9LoWXquj79SloUiH26fzlvJ FuaOcpIcwkqS7ewSM0PHbAWfkr7Xh00GjznyT8UB0ZZyljcHby1M0UtICkTsNc2vmAnX 5EVzwHwHcxICnWsi2fWSnQqkGVoD4IaSoeFDo44XIeyVVXgWwtN0N7jN/BsjNU415pGH adNg== X-Gm-Message-State: AOAM532VElEG8nk3/larTTk6DiZoDQMdFFvcDb3zZSPkavKjErKJxaYL vmMzOItN8OarPdBy1eYUL8qZ7g== X-Google-Smtp-Source: ABdhPJzyQALX0ue/ROXvyT8pRDYJXc8SnppHpn3XNEbsEVMux8u7MHN276hIxPFTo/+TE3CAGd7ATg== X-Received: by 2002:a17:902:c20d:b0:142:21e:b1e8 with SMTP id 13-20020a170902c20d00b00142021eb1e8mr9628260pll.27.1638385466670; Wed, 01 Dec 2021 11:04:26 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id oa17sm69545pjb.37.2021.12.01.11.04.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 11:04:26 -0800 (PST) Date: Wed, 1 Dec 2021 11:04:25 -0800 From: Kees Cook To: Johannes Berg Cc: Kalle Valo , kernel test robot , kbuild-all@lists.01.org, Linux Memory Management List , linux-wireless@vger.kernel.org Subject: Re: [linux-next:master 3615/4301] include/linux/compiler_types.h:335:45: error: call to '__compiletime_assert_314' declared with attribute error: BUILD_BUG_ON failed: sizeof(txpd->tx_dest_addr) != ETH_ALEN Message-ID: <202112011059.1F60C79D@keescook> References: <202111302102.apaePz2J-lkp@intel.com> <87pmqgsrcq.fsf@codeaurora.org> <202112010840.0AD4D41162@keescook> <17ccfc4f9f9e74e1d6b48366a87cbcf887521dab.camel@sipsolutions.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17ccfc4f9f9e74e1d6b48366a87cbcf887521dab.camel@sipsolutions.net> X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 71FD5B00009D X-Stat-Signature: ba8donozwoirbh1nr347gza49biecag9 Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=Lz3r8wmw; spf=pass (imf24.hostedemail.com: domain of keescook@chromium.org designates 209.85.216.51 as permitted sender) smtp.mailfrom=keescook@chromium.org; dmarc=pass (policy=none) header.from=chromium.org X-HE-Tag: 1638385467-513909 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Dec 01, 2021 at 06:29:49PM +0100, Johannes Berg wrote: > On Wed, 2021-12-01 at 08:41 -0800, Kees Cook wrote: > > > > > > drivers/net/wireless/marvell/libertas/tx.c:116:9: note: in expansion of macro 'BUILD_BUG_ON' > > > > 116 | BUILD_BUG_ON(sizeof(txpd->tx_dest_addr) != ETH_ALEN); > > > > | ^~~~~~~~~~~~ > > > > > > Kees, can you take a look at this build error? You added the > > > BUILD_BUG_ON(), right? > > > > I will investigate! Given this doesn't happen on allmodconfig but > > a randconfig trips it, this might be finding a legit issue, but I'll > > report back more details. > > > > It's probably some alignment thing - note it happened on a specific ARM > with a specific compiler? Yup, that was it. It's an interesting bit of "accidentally correct" problems that I think I've now fixed with this series: https://lore.kernel.org/all/20211201173234.578124-1-keescook@chromium.org/ My pahole before/after testing appears to have been too limited and missed this case. :( I'm currently reviewing all the others I've sent as well. > But there's not really a good reason to even have the struct_group here, > we only use it as if it was > > u8 tx_dest_addr[ETH_ALEN]; > > anyway? Ah yeah, nothing uses tx_dest_addr_high nor tx_dest_addr_low. Should I send another patch to just rip out the struct_group entirely? -- Kees Cook