Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2470375rwb; Fri, 16 Dec 2022 02:28:19 -0800 (PST) X-Google-Smtp-Source: AA0mqf6TfUJwfyYiXmavIc6TjSpD9ThhYA88sb1+9LfQqTIghc37i4lnb+pGlZbIBt6sLJB3SPVP X-Received: by 2002:a05:6a20:d90f:b0:a6:752a:3734 with SMTP id jd15-20020a056a20d90f00b000a6752a3734mr39439211pzb.11.1671186498968; Fri, 16 Dec 2022 02:28:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671186498; cv=none; d=google.com; s=arc-20160816; b=dHLOXCuCOxeneHdgJPeVibiad6YcuHxx1ZUxm2ZORnPUyWZnu9WQEluZLpu5jHnJTk uk8VcxrUtMa38RAKh27pi67Orsli4fB92ffP1h67SC+cGybzib9aOi3k70obstZQu15a I0wkafbjLWqf8wg7HGHG+9ueBjdzrom4w5AFokNnO4tKgnkAgHATL270gfYQMrloe9IY dSM0dOcg0HQl6QCP53h1sPy8/21C39zrj09rnfvQLvfpaGiozZYXg0QsesVdYVvVVJDd KL3WKGrk6GiCuje+WWd8oGsMdNN3ELVg6EDsg71OzJBxXs+QmHshmNNg46d+sbPV/Qiw kkDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:from:subject; bh=S2+u2+Kb18NfAkDKYP7zbtLXxG1Rff+Qo7NVts0qdZs=; b=yPYfrv2nOe3CkcXBD26K++wvkx5pKCJRJG82CFxQbEE26r6LVLJALijnEzHarB018t uZo95dbwgF7yhWkRE/InrFHaVjvyMg1TAas+90yH8WTxRUQNij2S5SLLl04D5Rmb469t 5zCxt42sJbcmSRaLHy+tnbm8MKfuCRAnu5qtMjKj3T0xZFXeAqRClSbL8IRux7n8FGUC +s3gO18SPOOSYdCk0iqHUWka9UJLhGKa80NqZh0BkI2M+hcc0XON3Eru6/jSL+RIkS13 SbfuKZDdbAHaC/y0aONXQbc9PEHFukFzfN4PWQVjqtvspLljdzFlztSdRDG1PI/0NDk2 WTDQ== 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e16-20020a170902ef5000b0019103860c7asi1248015plx.530.2022.12.16.02.28.10; Fri, 16 Dec 2022 02:28:18 -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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230167AbiLPJgt (ORCPT + 68 others); 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 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 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