Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1225625rwo; Wed, 2 Aug 2023 10:29:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlFH1Jk/XB0f/XPnTGixOWSZygWKtvEEQnSHUnZe/hzQMLluagHUtwA0pwEsn5cRqRTqxHLe X-Received: by 2002:a05:6a20:3d02:b0:13c:a02a:9804 with SMTP id y2-20020a056a203d0200b0013ca02a9804mr21697562pzi.32.1690997359027; Wed, 02 Aug 2023 10:29:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690997359; cv=none; d=google.com; s=arc-20160816; b=PaBqfOEXjJJYWa+ZpZ56CdpeAFfnyLF6bwwC27JUUea07WqUEqm1W1gwL83GGn0gq6 Z3pvMk1ZDKGCXCg/g+SYdla+vPh8x9HQb2j346bm9HP4mH1jnE/i/2cVnat99pHcvCuZ DdtmFW8CtZ0i2Mfg77cj4B5yffdAZXWdNnv43htx7I9MruppATFy8S3aFh5A1TErcnN4 Jqwcj21tHarMksOGsYJ5uTLXt3j+Nje+e/OXXuBHtyDZA8RobckHGigDfzwntM7AbbnM k6oBV/lAebzxvhojKj8VSWJN4ULd1NJHC/yq8MLKlDfwTzGzryqMSM7rCFJV0/Kv3wIa 5qRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=Y5Ka9Xl2O8+tSSSoS/dcvb0yS42j2A89Lo3OZWkKzKg=; fh=qzDI7tM+2Ybs3V9lnNokw21fTSArb45APOwjntdnXV8=; b=sppxMBz7T0Zjz/3M66cdyXHxYV62G6YFyeWxo3vPyCS5i3mkyF+EQaBtsLObJ9lJKv 0Dmdxs2YndgO97dNAdPfrrYocxLkFmVxWB/rl0jy5EKwNP9m0FwwEmfhVRi1iHFY9FOq 8DxlEyThQzKPONmmdj4Fc6Z53jU87D9jTu2qRbW/1MqWWyuy/5sdckmCZ9f8g1ClDjsI BELU8ajtSs96KZ6EXGy6Lz2l1ybcCMDKTmUppsgR7ZvALaGRjjNVjs/h1lhz20iFrhfw P8CzMFiID617BpEn0eJAd109NKb9PkMi9SdD32E9yJ7WrLfxF7c5ddL4z9w1JnI1qfaR uVMw== 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 t2-20020a63f342000000b00563e09f3c3esi981992pgj.359.2023.08.02.10.29.01; Wed, 02 Aug 2023 10:29:18 -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 S235483AbjHBQEa (ORCPT + 99 others); Wed, 2 Aug 2023 12:04:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235519AbjHBQET (ORCPT ); Wed, 2 Aug 2023 12:04:19 -0400 Received: from smtpbguseast1.qq.com (smtpbguseast1.qq.com [54.204.34.129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B3DF1BF1; Wed, 2 Aug 2023 09:04:12 -0700 (PDT) X-QQ-mid: bizesmtp91t1690992239t4lqpxx1 Received: from linux-lab-host.localdomain ( [116.30.131.233]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 03 Aug 2023 00:03:58 +0800 (CST) X-QQ-SSF: 01200000000000E0X000000A0000000 X-QQ-GoodBg: 0 X-BIZMAIL-ID: 3533296546830657737 From: Zhangjin Wu To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux@weissschuh.net, tanyuan@tinylab.org Subject: Re: [PATCH v4 08/12] selftests/nolibc: add test support for ppc Date: Thu, 3 Aug 2023 00:03:58 +0800 Message-Id: <20230802160358.407890-1-falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230802103217.231036-1-falcon@tinylab.org> References: <20230802103217.231036-1-falcon@tinylab.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrgz:qybglogicsvrgz5a-1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, 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 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 ;-) > 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? ;-) BTW, we have found another -O0 + "omit-frame-pointer" regression with gcc 13.1.0 on all architectures ("omit-frame-pointer" will be completely ignored when -O0 passed whatever other internal optimize attribute like 'Os' we used together in commit '4dc4401991fc' for gcc < 11.1.0), Yuan is doing more tests to confirm it, will open another discussion for it. > Benefit from the __no_stack_protetor macro, we have no need to input > __optimize__("-fno-stack-protector") for every new architecture, it may be the > time to only use __optimize__("-fno-stack-protector"), am I missing something? > > > out that your willingness to work around some of the oddities met on > > this one have resulted in a lot of drift away from the "keep it simple" > > principle and significantly delayed the possibilities to integrate the > > rest of your work. It would be much saner to only focus on ppc64/ppc64le > > and figure later how to make ppc32 work (or decide not to support it if > > it's not worth the effort in the end). > > Another test shows, the run target of ppc64le with the big endian gcc 13.1.0 > toolchain has test startup failure (although we have verified run-user before, > run-user ok! and run with local powerpc64le toolchain ok too!), I'm debugging > this now, hope it not cost too much. Just solved this, when -mabi=elfv2 supported by the toolchain (gcc 13.1.0 has this option), kernel will compile with this ABI, to align with kernel, our user space application should use -mabi=elfv2 too if toolchain support it, otherwise, test will simply fails at startup, this solves it: $(call cc-option,-mabi=elfv2) > > Another good news is, Yuan has found a working defconfig for ppc32 which has > poweroff support and he is helping me narrowing down the exact options, this > will eventually make us happy ;-) > We eventually find the missing poweroff option for ppc32, will update the patches with them. we also found such options for all of the nolibc supported architectures, will add them in their tinyconfig support patches. Thanks, Zhangjin > Thanks & Best regards, > Zhangjin > > > > > Regards, > > willy