From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, NICE_REPLY_A,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29677 invoked from network); 8 Apr 2022 02:21:36 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 8 Apr 2022 02:21:36 -0000 Received: (qmail 16113 invoked by uid 550); 8 Apr 2022 02:21:29 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 16068 invoked from network); 8 Apr 2022 02:21:28 -0000 To: musl@lists.openwall.com References: <64c0ef49-4618-8eca-c826-bd2a840c284b@loongson.cn> <20220331184719.GH7074@brightrain.aerifal.cx> <1fec7c01-ea91-aa7c-d6d5-474c00d9347c@loongson.cn> <20220406160042.GB8499@voyager> From: =?UTF-8?B?546L5rSq5Lqu?= Message-ID: <8dfcd620-4143-7450-8429-a89ed2264620@loongson.cn> Date: Fri, 8 Apr 2022 10:21:15 +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: <20220406160042.GB8499@voyager> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CM-TRANSID:AQAAf9Dxr9cbnE9ioIoaAA--.3567S3 X-Coremail-Antispam: 1UD129KBjvJXoWxJrWUZFWkGw17Xw45Xry7Jrb_yoW8Gr1kpa yjga12krs5Jry7WFWI9wn7Wr12qw4rt34jyryrJ34jva45XryvyF47t390kr1fGryvk3y2 qa1Utw1fZ3yDZ3DanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUvIb7Iv0xC_Zr1lb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rw A2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6xII jxv20xvEc7CjxVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjc xK6I8E87Iv6xkF7I0E14v26F4UJVW0owAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40E FcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr 0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcVAKI48JMxk0xIA0c2IEe2xFo4CEbIxv r21lc2xSY4AK6svPMxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I 0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWU JVWUXwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcV CY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_WFyUJVCq3wCI42IY6I8E87Iv 67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf 9x07joGQDUUUUU= X-CM-SenderInfo: pzdqwxxrqjzxhdqjqz5rrqw2lrqou0/ Subject: Re: [musl] Re: add loongarch64 port 在 2022/4/7 上午12:00, Markus Wichmann 写道: > On Wed, Apr 06, 2022 at 10:08:24AM +0800, 王洪亮 wrote: >> Hi, Rich >> >> >> within __clone() implement __NR_clone3 syscall, >> >> will that confusion between clone and clone3? >> >> >> Hongliang Wang >> >> >> > __clone() is a function with a defined interface. How it is implemented > is not given in the name. Why should __clone() have to be implemented > using the SYS_clone system call? If I understood the thread so far > correctly, the final kernel will not even have SYS_clone. > > Compare with open(), which is often implemented in terms of SYS_openat > instead of SYS_open. Or qsort(), which, despite the name, is rarely > implemented as a quicksort. > > So no, there will be no confusion of system calls because a function is > not implemented in terms of the system call of the same name, as long as > the function fulfills the defined interface. > > Ciao, > Markus Hi, I agree this point. In the implementation,I found a problem: In order to implement __NR_clone3 syscall in __clone(), I need to fill struct clone_args,I found clone_args.stack point to the lowest address of stack,but the input parameter "stack" of __clone() point to stack bottom(STACK_GROWS_DOWN), because of no stack_size,I can't convert between them. Do you have any good suggestions? Hongliang Wang