Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2603196rwb; Fri, 16 Dec 2022 04:24:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf61sUcagr0dYRbWGyFvTjuKoiR9Jih5/6whaIdpMKCVNByRnskvfc1DNYgWXkePd5O7ru5O X-Received: by 2002:a05:6402:4491:b0:46f:777f:f9ad with SMTP id er17-20020a056402449100b0046f777ff9admr24139640edb.19.1671193465371; Fri, 16 Dec 2022 04:24:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671193465; cv=none; d=google.com; s=arc-20160816; b=xa9l7VP7L+tbkB+l2LRkMtIpFRcnSfINPJdfX1X3zBokaWUq84GYsiblXQa7/FHZTK Hfz6fJXgwDzp5T7LRboaOYEVPsWRbtQH6K1OiTRlTw4GTINiJsqcLVZojXT72kQ24Pdy 0G55nvVYHBEzNeW0lNCCPRTXG/ZosrEP/dh2H3hYEP4aoUg81yVXZdj0OZw0lqub+0z0 nbWr/VuSWnz1iLzV6+EJQTJmFy3Sy7qBasHbYN9tOOfncy1KFrBwH3gwG/RuC0x8a6KE TcAHKfuWspg6cZ8lKFFwp/7BQkw30pxxrIHXmWGIwAZGzUfDpUb4OPS6daDLwXmsXrI4 Iojg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from; bh=rL6jrDWxVAx1quFfGQf9cd6BLzIU9scXiIfc48Rubjo=; b=cLna08GchQqbiBifXL7k2lxoTcUTit5yW6eUD26NWqevVGIthGgVXa3RWWDWsQWTFS bpRA4IgADgk1Icn4f9hyRNt4hC+nVqGNBdRsKwTEgzFkrFvbwci0vMOcknzNp7qFR/g5 cUA8vDHUh96CVIZHf7DIWsRmch/UJRfswC5kJ27nzYol2xxCphQmGG3jKEm71gO31AZ5 +EDkMqJK5m+vi9wHSUMThyU4KyeeQfot6sM8ICRn5wcK0RuD+7fzqBpvRcszqPiMMjkg EykyMmOc02c9w2wM1FLrjUe0P14JvAiO+oiDnCt+xpY3o9QfqaOVTANWKIKo9brkwtqC vgGA== 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 g18-20020a056402091200b0046c0e8b6cadsi2483851edz.450.2022.12.16.04.24.08; Fri, 16 Dec 2022 04:24:25 -0800 (PST) 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 S230219AbiLPL5M (ORCPT + 69 others); Fri, 16 Dec 2022 06:57:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229469AbiLPL5J (ORCPT ); Fri, 16 Dec 2022 06:57:09 -0500 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68A3B264F; Fri, 16 Dec 2022 03:57:08 -0800 (PST) Received: from frontend03.mail.m-online.net (unknown [192.168.6.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4NYSJK5z16z1r15N; Fri, 16 Dec 2022 12:57:05 +0100 (CET) Received: from localhost (dynscan3.mnet-online.de [192.168.6.84]) by mail.m-online.net (Postfix) with ESMTP id 4NYSJK33KXz1qqlR; Fri, 16 Dec 2022 12:57:05 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan3.mail.m-online.net [192.168.6.84]) (amavisd-new, port 10024) with ESMTP id qdIf7S9_5Cgo; Fri, 16 Dec 2022 12:57:03 +0100 (CET) X-Auth-Info: I9LqOxI019SRTRCJIUeMssxvg6YNOJZppYTy2eQwvJzS6pIPt2lkGXfejHqM6Sjd Received: from igel.home (aftr-62-216-205-197.dynamic.mnet-online.de [62.216.205.197]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 16 Dec 2022 12:57:03 +0100 (CET) Received: by igel.home (Postfix, from userid 1000) id AA35E2C31C2; Fri, 16 Dec 2022 12:57:03 +0100 (CET) From: Andreas Schwab To: "Leizhen (ThunderTown)" Cc: Geert Uytterhoeven , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , , , Masahiro Yamada , Alexei Starovoitov , Jiri Olsa , Kees Cook , Andrew Morton , Luis Chamberlain , , Steven Rostedt , Ingo Molnar , David Laight , linux-m68k , "Jason A. Donenfeld" Subject: Re: [PATCH v9] kallsyms: Add self-test facility References: <20221115083349.1662-1-thunder.leizhen@huawei.com> <49070ac3-02bb-a3b3-b929-ede07e3b2c95@huawei.com> <4aaede14-8bd3-6071-f17b-7efcb5f0de42@huawei.com> <66ec4021-b633-09ba-73ee-b24cdb3fa25a@huawei.com> X-Yow: Is there something I should be DOING with a GLAZED DONUT?? Date: Fri, 16 Dec 2022 12:57:03 +0100 In-Reply-To: <66ec4021-b633-09ba-73ee-b24cdb3fa25a@huawei.com> (Leizhen's message of "Fri, 16 Dec 2022 17:36:30 +0800") Message-ID: <87h6xvk1dc.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 On Dez 16 2022, Leizhen (ThunderTown) wrote: > It seems that the problem is still strcmp(). After I commented strcmp() in > arch/m68k/include/asm/string.h, and force it to use the one in lib/string.c, > it works well. Does that help? diff --git a/arch/m68k/include/asm/string.h b/arch/m68k/include/asm/string.h index f759d944c449..cdafd67774e0 100644 --- a/arch/m68k/include/asm/string.h +++ b/arch/m68k/include/asm/string.h @@ -42,18 +42,19 @@ static inline char *strncpy(char *dest, const char *src, size_t n) #define __HAVE_ARCH_STRCMP static inline int strcmp(const char *cs, const char *ct) { - char res; + int res = 0, tmp = 0; asm ("\n" "1: move.b (%0)+,%2\n" /* get *cs */ - " cmp.b (%1)+,%2\n" /* compare a byte */ + " move.b (%1)+,%3\n" /* get *ct */ + " cmp.b %3,%2\n" /* compare a byte */ " jne 2f\n" /* not equal, break out */ " tst.b %2\n" /* at end of cs? */ " jne 1b\n" /* no, keep going */ " jra 3f\n" /* strings are equal */ - "2: sub.b -(%1),%2\n" /* *cs - *ct */ + "2: sub.l %3,%2\n" /* *cs - *ct */ "3:" - : "+a" (cs), "+a" (ct), "=d" (res)); + : "+a" (cs), "+a" (ct), "+d" (res), "+d" (tmp)); return res; } #endif /* CONFIG_COLDFIRE */ -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."