Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3990142rwd; Mon, 29 May 2023 21:39:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5SYUWxg2rbzmgYVp7y7ohaNhz1fWI8Z1pGWbyypuhjXX5MQDVyAgAMd7fJTq9SJHQPMLcb X-Received: by 2002:a05:6a00:3286:b0:63d:2d6a:47be with SMTP id ck6-20020a056a00328600b0063d2d6a47bemr934618pfb.2.1685421559810; Mon, 29 May 2023 21:39:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685421559; cv=none; d=google.com; s=arc-20160816; b=ihQaUb15Uh3elmbTj77Ge3i1TxygIJOXsyAIJbCy5vf6+Dczmuo4CawNlALWgffi0E 5+22BJJeDK8kIA0rWhp5O4J+4yZuqDtpeeMPrrIDKAU2zPZe6vqRFIvQB/AbP7dUcUfU 2buGdK5kpWVN0nwDbPqwzvoQQSiyFjRmCcimk3jT8ihUGxszLZnD8+HrQ6VTPa5uj9qL lrSKCAFABcyMo7ELyJdDNEjS1z6r2ihOUiLbQE8aZLvbQjpiaYMxy5BlUgRtbaw53dhX v780rMIFEDu2I6ttDlZbuNxe+/fyPfZvDlAc7hJefmlrXySt3/H7nIkl5ZKHbnv8PhOF Y95g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:references:in-reply-to:user-agent:subject:cc:to:from :date:dkim-signature; bh=bDIJG+lZ6A66xcref2mK1rSpYcVsdXZqfYLry1iZRrg=; b=haNf5ix5EHEaw51wlsqPQW6u0+BiAF/LcthS1RodgQlq5ofC1ha4khc9KZElNYrzQ4 KUPztV3Gbc1AGSHLDdWk2SQqDAFnVmGYTGrlTE5O61rmu51L1AGY78lX1wli5E9smx8W Ycjbns2s2cV7VOs8wDxpco4XMhwR9GNpDNjGCAh0cEhvfqrI/WuA6AubtTRQ/PMQ0/Pl 9/Cs7lhukxUBXH8lSIXf2tgB3yev+FZNy6alwVPsbCEIaGmsE1bMjZE8LO9AuiU3rn5f AXK3fiPsOjo9IvzNUkpOBrsFx63PxWaVe3yR3qMIqc5enRMIVHRaX5VGuxPszeU9ji1R t/Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rCXiIQIm; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k3-20020a628403000000b0064378fd1d54si1073660pfd.258.2023.05.29.21.38.57; Mon, 29 May 2023 21:39:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rCXiIQIm; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230016AbjE3EXu (ORCPT + 99 others); Tue, 30 May 2023 00:23:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230021AbjE3EXn (ORCPT ); Tue, 30 May 2023 00:23:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D6D0E4; Mon, 29 May 2023 21:23:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B057F619B9; Tue, 30 May 2023 04:23:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03344C433D2; Tue, 30 May 2023 04:23:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685420621; bh=GqutkF5MXsruCTwXr5ie/PdJ0e98ztYdsBZec7CiqHU=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=rCXiIQImQZ3BZIQhrr/E5IEfYFqR5NxJfeOT8IxJgsA+pjekgz9LJuZkeCVCGeM1o SdiNRcgHSFViZtDOoOp4lJiLBxkZaRyg9eedKnkE5zF4t7nq0vG1GE8K2a9hU7HARh wR+TqyQyiQLKTvCq3q/fg0j8AuijHn4MSeSlft9aICNsks8yuNeLNE0hya0l3lHhm/ bo8AqCJ2d13Ic3b4cvBQWr/FMKUlKYc397oCWMI3cNXjg3p2vKbCNXebQajn9AK5Hi VnyQtA2EUlI3PrqJW1we6wf/D9OUydQ7bsH9jJJyqkThZZOeScps2umkRJULhM4Z5W 97OLLRGPTH80g== Date: Mon, 29 May 2023 21:23:39 -0700 From: Kees Cook To: =?ISO-8859-1?Q?Joan_Bruguera_Mic=F3?= , Thorsten Leemhuis CC: Herbert Xu , "David S. Miller" , linux-crypto@vger.kernel.org, LKML , Linux Next Mailing List , Kees Cook Subject: =?US-ASCII?Q?Re=3A_build_error_while_building_arch/x86/purgatory/sha256?= =?US-ASCII?Q?=2Eo=3A_invalid_=27asm=27=3A_operand_i?= =?US-ASCII?Q?s_not_a_condition_code_=5B=2E=2E=2E=5D?= User-Agent: K-9 Mail for Android In-Reply-To: <20230528164031.266590-1-joanbrugueram@gmail.com> References: <175578ec-9dec-7a9c-8d3a-43f24ff86b92@leemhuis.info> <20230528164031.266590-1-joanbrugueram@gmail.com> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On May 28, 2023 9:40:31 AM PDT, "Joan Bruguera Mic=C3=B3" wrote: >I can also reproduce the problem with Arch's linux-next-git, see config: >https://aur=2Earchlinux=2Eorg/cgit/aur=2Egit/tree/config?h=3Dlinux-next-g= it&id=3Df9a384e1c582321651fb613782ebc5a581146af0 > >I've bisected it to df8fc4e934c1 ("kbuild: Enable -fstrict-flex-arrays=3D= 3"), >which explains why it only happens on GCC13=2E > >The problematic expansion that causes the error seems to be this fragment >from `_BUG_FLAGS` in `arch/x86/include/asm/bug=2Eh`: > asm("=2Elong %c0 - =2E\n": : "i" (__FILE__)); > >Along with the fact that this file is built with `-mcmodel=3Dlarge` >(see `PURGATORY_CFLAGS` in `arch/x86/purgatory/Makefile`)=2E I haven't reproduced this yet, but the error implies that the asm input "i= "mmediate value of the __FILE__ string address cannot be used with the asm = template format "%c0" (a constant value)=2E https://gcc=2Egnu=2Eorg/onlinedocs/gcc/Extended-Asm=2Ehtml#Generic-Operand= -Modifiers I cannot fathom why struct flex array logic would change that=2E=2E=2E I'll take a closer look in the morning=2E -Kees --=20 Kees Cook