Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp2699701rwb; Mon, 7 Aug 2023 01:49:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGfABRl78WK0G2qVHb5ekvqQAHXGcDLDCP9jUAIOMt+IYDWKxLwarPdFNtOLIrALfy6SXNw X-Received: by 2002:a05:6a00:2307:b0:687:2e0b:228 with SMTP id h7-20020a056a00230700b006872e0b0228mr8534557pfh.11.1691398163729; Mon, 07 Aug 2023 01:49:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691398163; cv=none; d=google.com; s=arc-20160816; b=cXPKjyWshE46/4Ui68nl0WaWQNpAe/E9U20CxBBYzdzTs9eXYMJCwVUC4/tyvofCQv TA71Y1C/Q3a+T4hUzaD0xPrQ294EU+P6IeWBrhMyBlDwXhEYIUIaNPVp3c/ippZi/9ST TO+7+JcwA4qmuzdxN+EdyJLCN9K4FAcCZnKlv2YhcOEZTBFU7pO0nyAOkj17/Rd26JdB RulGkiGw4F54gtq676cYpEC21diuUXWSQerMDf7NcdxPTMMrJOO0asXvQB20zWUCPO6d PVW3/weEPqW+zlREVwH7dyqN+Y23a0UWngVLMCPnu+v6kg1KZGS0p8IYxoGw57iFwQz8 jr3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=9lD14SqYLH65MDQsqSdPkU+lKslR9Gfl58egWJWUHg4=; fh=lmlr0Gbzm2gQ2YJMNaZBB6x9h83u4wS0T623cr3uDXk=; b=KyYSdAKQW2g+JPO2OnivFu9/5BDUBRPUR2YNPxbXZj2HfrZrGW3zlpadQ/RVShihjV TqN7nMeyMndTPbftrFiSjXBvxFYJXXc0bVPeF0teVM96HYAOZoaoRQ1iCfvF0DNIfzHT 2ivgVTLjlc5CSqhIqj1o/sV9oyKzlhff93hfMs6Q6/A7zjJR3WBr/IK62sv1DR1uu+0O a/QBgKU06oHHAVZMDoJai8m7D/PYeqGUr6NQ3SKjMq62ng2dPI8e2mPIxVQ6iY5uZSSp iwS6LbphT4rSIlqduCzQvP0zl0hz8Ww/c6QZkQmGUOD9QteuNh6lLr69plEpRu4utCc0 Veow== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cq5-20020a056a00330500b006872a89502csi5441923pfb.186.2023.08.07.01.49.12; Mon, 07 Aug 2023 01:49:23 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229776AbjHGIQQ convert rfc822-to-8bit (ORCPT + 99 others); Mon, 7 Aug 2023 04:16:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229588AbjHGIQO (ORCPT ); Mon, 7 Aug 2023 04:16:14 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 891501708 for ; Mon, 7 Aug 2023 01:16:12 -0700 (PDT) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-201-6FPU6Xj6Ow-DPKP--BfwjA-1; Mon, 07 Aug 2023 09:16:06 +0100 X-MC-Unique: 6FPU6Xj6Ow-DPKP--BfwjA-1 Received: from AcuMS.Aculab.com (10.202.163.6) by AcuMS.aculab.com (10.202.163.6) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Mon, 7 Aug 2023 09:16:02 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Mon, 7 Aug 2023 09:16:02 +0100 From: David Laight To: 'Zhangjin Wu' , "w@1wt.eu" CC: "arnd@arndb.de" , "linux-kernel@vger.kernel.org" , "linux-kselftest@vger.kernel.org" , "thomas@t-8ch.de" Subject: RE: [PATCH v6 06/15] tools/nolibc: __sysret: support syscalls who return a pointer Thread-Topic: [PATCH v6 06/15] tools/nolibc: __sysret: support syscalls who return a pointer Thread-Index: AQHZyGJM8MfmHZ1C3ES1BFx0kL6bna/eeWXw Date: Mon, 7 Aug 2023 08:16:02 +0000 Message-ID: References: <20230806095846.GB10627@1wt.eu> <20230806123351.35202-1-falcon@tinylab.org> In-Reply-To: <20230806123351.35202-1-falcon@tinylab.org> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,PDS_BAD_THREAD_QP_64, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=no 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 From: Zhangjin Wu > Sent: 06 August 2023 13:34 ... > Based on your macro version, I tried to use the is_signed_type() from kernel, > it seems works. You'll find that (void *)0 isn't 'constant enough' for is_constexpr() - so is_constexpr((type)0) can be used to detect pointer types. Probably requires an 'is_pointer_type()' define. This also rather means that is_signed_type() needs to be wrapped in is_constexpr() - probably generating header file inclusion hell. I'm going to add a comment on v3 of the patch... David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)