Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp90634lqr; Tue, 4 Jun 2024 22:54:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWyAQ9ijdAmgpA6yg3HJt3vmjPrtN49WswqgkzTSCUi4qcYZGsBToqERe6Hkg+fe5JaEoHQtH1f0cSReGNrhUaUcl1xZPgtxAPgUcpPyA== X-Google-Smtp-Source: AGHT+IEvBK4tlZ4ku9hF9aNMEAgtIkCmSYMOUYjD36SPYGNrjuSBPMDB3gT8EaL1zoSa6IY1rbD+ X-Received: by 2002:a17:90b:1e11:b0:2ab:8324:1b47 with SMTP id 98e67ed59e1d1-2c27cc3d5fdmr2602855a91.15.1717566878869; Tue, 04 Jun 2024 22:54:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717566878; cv=pass; d=google.com; s=arc-20160816; b=u2ykb82e2+q8eGxo5DwM5+0PS1pqpXl4c2ellK14FaLdTI0ozaFiwK3bJcnSuR3TFi CYn3mbMU4mKiZHMTlmCqtg3//AI9CVi93zqSw837sOwsNwGxBih6vfAn0AyoF7wnioT5 t77oTCfXslRQhOUZ5zNKtzUQFEmi8OtfKJHwQtE6pzrVr7tNWG0hQU8rqGRml9+aPR2U NWO5sIxsZRSjhC5CaaDDtrx0vQ7Nu//EJFgW/z5c5BDlOMdmUVxgw2xRqnt8iz6O8RH7 +qEF+V/dkA05V6N26038bqrm4sHKXikkOPWrG0X2FqfJB5MRSgbKX9aTOCg9KMWmIIBE v8Kw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=un9uDj7H+MLScxd5oL8tYnZYlx+NSOTxYT0gygtVM4M=; fh=G4L83EuLZHDhfA05ukFmawwJAnPIZTZ94j8a2tWUyps=; b=0qXY5sLsOBRMg6JmQAPYnFGI/FJVBv98yKY1aChNkbpbkAmo/oVvHBy21Ezm6hu+C1 i7sFBtNhx8dZmHqE8syuYW7EmIuWrOViLOqFt1uOGYUW6nkYRJjgDxLIIlcGdnbGT/G6 ZfeHR9PTcZ4ch+X3eEOIuPd582EZ4pIbcngOu+esOvrV2NybJ9C0BV9Gvd9NKUDTyLHf Ha6X4hqPCE78E5Bj/854ij3A8ZzgJw6f+x1laeM1hZECsD+UxPAvJbPD7LaRt2F5tB2o 6VcErUpdk0KDzj7gktgRTP85+ti6YJqEJy3vPdxN4PXvuGbvxbCImJm15SBTLIsEZydp gOQg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=b1gQf3KU; arc=pass (i=1 spf=pass spfdomain=xry111.site dkim=pass dkdomain=xry111.site dmarc=pass fromdomain=xry111.site); spf=pass (google.com: domain of linux-kernel+bounces-201789-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201789-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c28069c309si619956a91.129.2024.06.04.22.54.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 22:54:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201789-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=b1gQf3KU; arc=pass (i=1 spf=pass spfdomain=xry111.site dkim=pass dkdomain=xry111.site dmarc=pass fromdomain=xry111.site); spf=pass (google.com: domain of linux-kernel+bounces-201789-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201789-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8117F284D8A for ; Wed, 5 Jun 2024 05:54:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 683D821C187; Wed, 5 Jun 2024 05:54:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xry111.site header.i=@xry111.site header.b="b1gQf3KU" Received: from xry111.site (xry111.site [89.208.246.23]) (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 6767E5916B for ; Wed, 5 Jun 2024 05:54:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=89.208.246.23 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717566873; cv=none; b=QG20+NX2mwRLTISdgtZJGPXPGOgA9fCwrSa0znsHKeJANS35wfkYEOWtpadRZifKvOXN77dugYzTIVbjhpxnGkEjJdXPmB7sDJygf8gJNU+/x/YTD49L2GjA6SRz1Xv+fLmmhnyHIy6YVh+Gg3BnT0Kk+AzQlyrMOwDVNwV7+MA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717566873; c=relaxed/simple; bh=EspUqG4ttGTIApJuU4Zyr3ByWO1L6W7xAoo5CHf9MUs=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=SX4hWcuYGi4wH98xG83y4TcOK3/9c1rypv/1Q3jisytPwtLAPbTFycKRCX0va6LFBFRYPSVnMsYLHekGQtzFVAlrXLzVkpg8waSQBv4/9tw7Daxdpz8EBMLRiYuwJoXhEG3aGIN4Knzn23JIBShK87yzLUDKrO7uUSQ1fUJCXWY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xry111.site; spf=pass smtp.mailfrom=xry111.site; dkim=pass (1024-bit key) header.d=xry111.site header.i=@xry111.site header.b=b1gQf3KU; arc=none smtp.client-ip=89.208.246.23 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1717566869; bh=EspUqG4ttGTIApJuU4Zyr3ByWO1L6W7xAoo5CHf9MUs=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=b1gQf3KU771VjhSnDDt5+ombnMhT0RnQ7/bP4vcpki3LkuXiJXeywCbgIjPP7knIp BVN8yXdvaHlOWN7w6j9iaLlFSt8aaJ1VTU5hefEyDDLMLJGt1P3R8NpJAlrMCaG+FE Dc1uqOas9u+c5PkNSkcq0PYTOS5sWJVLGlZu6m5w= Received: from [127.0.0.1] (unknown [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id AF40066ADA; Wed, 5 Jun 2024 01:54:25 -0400 (EDT) Message-ID: Subject: Re: [PATCH] loongarch: Only select HAVE_OBJTOOL and allow ORC unwinder if the inline assembler supports R_LARCH_{32,64}_PCREL From: Xi Ruoyao To: Nathan Chancellor Cc: Huacai Chen , WANG Xuerui , Tiezhu Yang , Nick Desaulniers , Bill Wendling , Justin Stitt , Youling Tang , Jinyang He , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, mengqinggang@loongson.cn, cailulu@loongson.cn, wanglei@loongson.cn, luweining@loongson.cn, Yujie Liu , Heng Qi , Tejun Heo Date: Wed, 05 Jun 2024 13:54:24 +0800 In-Reply-To: <20240605054328.GA279426@thelio-3990X> References: <20240604150741.30252-1-xry111@xry111.site> <20240605054328.GA279426@thelio-3990X> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Tue, 2024-06-04 at 22:43 -0700, Nathan Chancellor wrote: > On Tue, Jun 04, 2024 at 11:07:41PM +0800, Xi Ruoyao wrote: > > GAS <=3D 2.41 does not support generating R_LARCH_{32,64}_PCREL for > > "label - ." and it generates R_LARCH_{ADD,SUB}{32,64} pairs instead. > > objtool cannot handle R_LARCH_{ADD,SUB}{32,64} pair in __jump_table > > (static key implementation) and etc. so it will produce some warnings. > > This is causing the kernel CI systems to complain everywhere. > >=20 > > For GAS we can check if -mthin-add-sub option is available to know if > > R_LARCH_{32,64}_PCREL are supported. > >=20 > > For Clang, we require Clang >=3D 18 and Clang >=3D 17 already supports > > R_LARCH_{32,64}_PCREL, so we can always assume Clang is fine for > > objtool. >=20 > For what it's worth, I have noticed some warnings with clang that I > don't see with GCC but I only filed an issue on our GitHub and never > followed up on the mailing list, so sorry about that. >=20 > https://github.com/ClangBuiltLinux/linux/issues/2024 >=20 > Might be tangential to this patch though but I felt it was worth > mentioning. The warnings in GCC build is definitely the issue handled by this patch. But the warnings in Clang build should be a different issue. Can you attach the kernel/events/core.o file from the Clang build for analysis? I guess we need to disable more optimization... I personally hate "pessimizing the code generation just for debugging" with a passion so I never enabled objtool on LoongArch, thus I didn't notice the issue. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University