From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id 72B5A3858D20 for ; Fri, 31 Mar 2023 03:52:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 72B5A3858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn Received: from loongson.cn (unknown [10.20.4.187]) by gateway (Coremail) with SMTP id _____8AxJAwUWSZkJ88UAA--.31871S3; Fri, 31 Mar 2023 11:52:53 +0800 (CST) Received: from [10.20.4.187] (unknown [10.20.4.187]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxHL4SWSZkX8IRAA--.14427S3; Fri, 31 Mar 2023 11:52:51 +0800 (CST) Subject: Re: [PATCH] LoongArch: Modify some member names in mcontext_t and ucontext_t structs to align them with the kernel. To: Xi Ruoyao , libc-alpha@sourceware.org Cc: adhemerval.zanella@linaro.org, Chenghua Xu , =?UTF-8?B?546L5rSq6JmO?= , lixing@loongson.cn References: <20230324062510.1812367-1-caiyinyu@loongson.cn> From: caiyinyu Message-ID: Date: Fri, 31 Mar 2023 11:52:50 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CM-TRANSID:AQAAf8AxHL4SWSZkX8IRAA--.14427S3 X-CM-SenderInfo: 5fdl5xhq1xqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvJXoW7ZrW8uF17Ww45Xr1Utw1rXrb_yoW8Zw45pF 10ka45KrW7J3WF934qyay5Zry5ZryrGw17trW7CrW7Za47Ja4xKrWakFW2kr45Zry8WF4a yrW3trykAayvqa7anT9S1TB71UUUUUDqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bI8YFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVW8JVW5JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwA2z4 x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v26r4UJVWxJr1l e2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE44I27wAqx4xG64xvF2 IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jrv_JF1lYx0Ex4A2jsIE14v26r1j6r4U McvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvEwIxGrwCYjI0SjxkI62AI1cAE67vIY487Mx AIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_ Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwI xGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8 JwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcV C2z280aVCY1x0267AKxVWUJVW8JbIYCTnIWIevJa73UjIFyTuYvjxUwmhFDUUUU X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 在 2023/3/24 下午3:40, Xi Ruoyao 写道: > On Fri, 2023-03-24 at 14:25 +0800, caiyinyu wrote: >>  typedef struct mcontext_t >>  { >> -  unsigned long long __pc; >> -  unsigned long long __gregs[32]; >> -  unsigned int __flags; >> -  unsigned long long __extcontext[0] __attribute__((__aligned__(16))); >> +  unsigned long long __ctx(sc_pc); >> +  unsigned long long __ctx(sc_regs)[32]; >> +  unsigned int __ctx(sc_flags); >> +  unsigned long long __ctx(sc_extcontext)[0] __attribute__((__aligned__(16))); >>  } mcontext_t; > How about this? > > __extension__ typedef struct mcontext_t > { > union > { > /* Backward compatibility names. */ > struct > { > unsigned long long __pc; > unsigned long long __gregs[32]; > unsigned int __flags; > unsigned long long __extcontext[0] __attribute__((__aligned__(16))); > }; > struct > { > unsigned long long __ctx(sc_pc); > unsigned long long __ctx(sc_regs)[32]; > unsigned int __ctx(sc_flags); > unsigned long long __ctx(sc_extcontext)[0] __attribute__((__aligned__(16))); > }; > }; > } mcontext_t; Your plan caused fails in glibc conform tests. We wanted to inform you that we are aware that the proposed modification[1] will affect the public API. However, since LoongArch Musl has not yet been released, and the LoongArch Euler system, Debian system, Alpine, and other systems are still in early development stages, we have not yet widely released the system. Therefore, we believe it is necessary to proceed with the modification. We do not want to carry the burden of history and remain committed to proceeding with the modification. Additionally, we also plan to backport this patch[1] to versions 2.36 and 2.37 to address the issue of inconsistent naming of musl/glibc/kernel sigcontext/mcontext_t members from the source, resolving this issue at the root. This will eliminate potential problems for future software and system development. [1] patch: https://sourceware.org/pipermail/libc-alpha/2023-March/146607.html