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 B2D6C3858CDB for ; Mon, 3 Apr 2023 02:52:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B2D6C3858CDB 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 _____8Axz_97PypkzOEVAA--.33760S3; Mon, 03 Apr 2023 10:52:43 +0800 (CST) Received: from [10.20.4.187] (unknown [10.20.4.187]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxsOR6PypktyQUAA--.54449S3; Mon, 03 Apr 2023 10:52:42 +0800 (CST) Subject: Re: [PATCH] LoongArch: Modify some member names in mcontext_t and ucontext_t structs to align them with the kernel. From: caiyinyu 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> Message-ID: <0268b8f7-f918-f36b-fd01-5ddbb1b0a23b@loongson.cn> Date: Mon, 3 Apr 2023 10:52:42 +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:AQAAf8CxsOR6PypktyQUAA--.54449S3 X-CM-SenderInfo: 5fdl5xhq1xqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvJXoWxGFWkCw18urW7XF4rKrWkXrb_yoW5Gr4kpF 1vya4rKrWjk3Wv9ryjy345ZryrZryrGwnrGr43AFyUuFWUtFy2grW2gFy29r15Z3y8WF4a yry5tr17Z3y8XFJan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earn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Gentle ping. The previous patch was missing a line of code: #undef __ctx. Here's the updated patch: https://sourceware.org/pipermail/libc-alpha/2023-April/146859.html 在 2023/3/31 上午11:52, caiyinyu 写道: > > 在 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 >