Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1668223rwo; Wed, 2 Aug 2023 19:24:33 -0700 (PDT) X-Google-Smtp-Source: APBJJlGg+Db4srqOlq5xNTlPVrZbbCBiQZs6I+scb4RPaWM96KEbeW3PPvIlQp10/P+oidMDWj83 X-Received: by 2002:a17:906:153:b0:99b:48d3:5488 with SMTP id 19-20020a170906015300b0099b48d35488mr6100683ejh.24.1691029472890; Wed, 02 Aug 2023 19:24:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691029472; cv=none; d=google.com; s=arc-20160816; b=nJiUjjg3ccq8EFUfrDc/BUXxJa+98q7cRGulxteXjcqZD3kl2wwheczWCQBJJ3Si/G rrgB42x0RvBvY+IUYxDECs+GQtckrTM0Wm+LWeHQhSDgcR8U/BpUhqAoMUl4ACNmrVR/ 35Kp64nbQMb0rwZPOXCie4b7XJKY5edif0baekOV+4qO5zhMoLjJNcNLlltNQ/Y++IVc g3Lhfe2skbuVBlGLj9fUxTLemmGWdmM/LeA/Wdd2QPCtXYc6n0kTjjjJ2dOU4Kjuuioc e5JKbAX3UJHnx2K82lb7AMiAThAbu42K81+8CfEQR2pdmURNWxDeWfM2p0DFq7mV6esG VChw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=fg97a6e3AhIx95hMnRQ/Uh0Uh36y4hXSdrVXpLCiND4=; fh=p3LhtcKKerlxi1+R83aQNbQMqsPJwM66jgHsL8P8U1E=; b=EcxPTkocT5qqCI7ElnLme5SUoyQiYZpWasMqWzlLzTTJLkf4m0LO3aNC1gXo5wc486 8wA/PQxLDyt8iTYmLNVQVQANvQ8uMvr1lalu4MqmQk3H1FyGmtA9gG036DMOAnsiXNVj ARRn3o3gA1WivST+/L+bOiG7p83BhS8cedbJj3NURezgFGYskdtGb4a8GxLec3Tw42TB LmPQxSVnQQZaitQP8cG17f6/nWjCNsUKKe802TU/Qym2b3hLMIF0bmiu8gGVl2idQ2B0 BXrY3hBe7iRFgSv+zmSvWy5a/9EU1J+KrBHVegWhfK+jnaNuKMfeL8S49L/xTv4QdREJ oEiQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pg15-20020a170907204f00b00992aaed9f81si183338ejb.356.2023.08.02.19.24.08; Wed, 02 Aug 2023 19:24:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230143AbjHCCFv (ORCPT + 99 others); Wed, 2 Aug 2023 22:05:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjHCCFt (ORCPT ); Wed, 2 Aug 2023 22:05:49 -0400 Received: from 1wt.eu (ded1.1wt.eu [163.172.96.212]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C709B135; Wed, 2 Aug 2023 19:05:46 -0700 (PDT) Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 37325X2l023759; Thu, 3 Aug 2023 04:05:33 +0200 Date: Thu, 3 Aug 2023 04:05:33 +0200 From: Willy Tarreau To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: Zhangjin Wu , arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, tanyuan@tinylab.org Subject: Re: [PATCH v4 08/12] selftests/nolibc: add test support for ppc Message-ID: <20230803020533.GA23704@1wt.eu> References: <20230802103217.231036-1-falcon@tinylab.org> <20230802160358.407890-1-falcon@tinylab.org> <98629d86-eca8-4cad-aedc-2e2328a4f6ab@t-8ch.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <98629d86-eca8-4cad-aedc-2e2328a4f6ab@t-8ch.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE 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-kernel@vger.kernel.org On Wed, Aug 02, 2023 at 11:36:30PM +0200, Thomas Wei?schuh wrote: > On 2023-08-03 00:03:58+0800, Zhangjin Wu wrote: > > Hi, Willy, Hi Thomas > > > > I'm so happy to share with you, we have solved all of the left found > > issues, include the ones about ppc and the missing poweroff options for > > the tinyconfig series, will renew both series ;-) > > Can we stick to one series at a time? Yes and please this time, let's stick exclusively to what is sufficiently tested for 6.6, otherwise it will have to be delayed. > > > Further compared the preprocessed files, found the root cause is the new > > > compiler using 'no_stack_protector' instead of > > > '__optimize__("-fno-stack-protector")'. And the attribute 'no_stack_protector' > > > breaks our "omit-frame-pointer" like the failure with '-O0' we fixed before. > > > > > > I checked some of the other architectures, they didn't have the same issue, but > > > test shows the 'no_stack_protector' attribute does have such compability issue > > > here. > > > > > > I learned the commit message of tools/include/nolibc/compiler.h, seems > > > __optimize__("-fno-stack-protector") is enough for all of the nolibc supported > > > architectures? is it ok for us to simply give up 'no_stack_protector' > > > eventully? otherwise, we should manually disable 'no_stack_protector' for > > > ppc32: > > > > > > #define __no_stack_protector __attribute__((__optimize__("-fno-stack-protector"))) > > > > > > > Hello, any suggestion here? ;-) > > Patience :-) > > no_stack_protector is the offically documented mechanism to disable > stack protector for a function. As it works for all other architectures > this seems like a compiler bug. Or a limitation. To be honest we're playing with compiler limits by adjusting their optimizations per function. But as long as we don't break what currently works, we can accept to have some limits in a first version (e.g. if ppc32 doesn't support -O0 for now it's not dramatic). Also, some other archs use optimize("Os", "omit-frame-pointer")), maybe that's needed there as well. > If we want to work around it I would prefer to have both attributes. Also if you remember we also used to have a work-around for the function's entry code consisting in renaming _start and having a _start pointer in the asm code itself. That can remain an option to experiment with later. But let's not change everything again at the last minute, all these series have been sufficiently difficult to follow :-( thanks, Willy