From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED375C4167B for ; Fri, 16 Dec 2022 09:36:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230156AbiLPJgt (ORCPT ); Fri, 16 Dec 2022 04:36:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230162AbiLPJgr (ORCPT ); Fri, 16 Dec 2022 04:36:47 -0500 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CCD1286FA; Fri, 16 Dec 2022 01:36:44 -0800 (PST) Received: from dggpemm500006.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4NYP9G6p90zJqZj; Fri, 16 Dec 2022 17:35:46 +0800 (CST) Received: from [10.174.178.55] (10.174.178.55) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 16 Dec 2022 17:36:42 +0800 Subject: Re: [PATCH v9] kallsyms: Add self-test facility From: "Leizhen (ThunderTown)" To: Geert Uytterhoeven CC: 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" References: <20221115083349.1662-1-thunder.leizhen@huawei.com> <49070ac3-02bb-a3b3-b929-ede07e3b2c95@huawei.com> <4aaede14-8bd3-6071-f17b-7efcb5f0de42@huawei.com> Message-ID: <66ec4021-b633-09ba-73ee-b24cdb3fa25a@huawei.com> Date: Fri, 16 Dec 2022 17:36:30 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <4aaede14-8bd3-6071-f17b-7efcb5f0de42@huawei.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.178.55] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500006.china.huawei.com (7.185.36.236) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: live-patching@vger.kernel.org On 2022/12/16 15:42, Leizhen (ThunderTown) wrote: > > > On 2022/12/15 22:51, Geert Uytterhoeven wrote: >> Hi Zhen, >> >> >> On 30f3bb09778de64 with your debug patch v2: > > I've set up the qemu environment, and I'll try to solve it by tomorrow at the latest. 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. The output i=0, because compare_symbol_name() always return zero in below loop. 'low' decreases to 0, then the loop ends. The reason is not clear. I'm still analyzing it. low = mid; while (low) { seq = get_symbol_seq(low - 1); off = get_symbol_offset(seq); kallsyms_expand_symbol(off, namebuf, ARRAY_SIZE(namebuf)); if (compare_symbol_name(name, namebuf)) break; low--; } *start = low; > >> >> >> Gr{oetje,eeting}s, >> >> Geert >> >> -- >> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org >> >> In personal conversations with technical people, I call myself a hacker. But >> when I'm talking to journalists I just say "programmer" or something like that. >> -- Linus Torvalds >> >> . >> > -- Regards, Zhen Lei