Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2560768rwb; Fri, 16 Dec 2022 03:54:29 -0800 (PST) X-Google-Smtp-Source: AA0mqf7tiN82GExl/Y45YC0XCUipDoVtto180FX+K0vNFaKSBz+K8pZB6+oGtjuyD6IO0Z7nIcRD X-Received: by 2002:a05:6a20:6f01:b0:a2:c1f4:3c70 with SMTP id gt1-20020a056a206f0100b000a2c1f43c70mr42558138pzb.8.1671191669165; Fri, 16 Dec 2022 03:54:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671191669; cv=none; d=google.com; s=arc-20160816; b=fDkMxLmIZUk+adM2JpZMgMeIby6VdFjft1EnwNPEXjueQfTnTC0NMCZTClB++UX+Yv 48q0HdvsU97STDw61JlMn2NOUH7TAAH9HGEWg7r3J03u0mdpdO8vUrDmDkhtgEPMzQTR OKSbfGTLE6l6aYYv6wRib6hsTtSZkEC/LsyDyXoaWoDEOuj6PBmyAkV5uu3ldM1J7eCh gny1Uv/ypmOfFrfccOIXcAQwNYSt5HbNEIludGArh3fORR1Wa2zdvUbL/bCD1q5Qn6Z/ MouLmhbI0/b8hsXR5G+XzayJnQI1pdnFCoYdx65NRwwx9084yhwJvIBcAQQXtCBQjzpw Mfog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=cpsh6MRE6XYtx9/rCflIcIbNFehaXSviVtyQLfJ5VOk=; b=RxWmqVZ4dy7F/fDQNRCPUIPwLUrgqZtWLuZG7937XkEFOIZbph1IshJ5bDDC+bHJLa QVcOR5fA+1QbfODGVDADL561xchpA4qIB6YNR/V70UtyKUVvvFPdtYzbCGUDV66sDZLS mSv1LbQUYR2X8b4EBhbHABJHYfEraoBO2Zrxd+Ss/epHUFlYGCgsO0CnmgXKORyUPbFP QN1dfz3cW3l8vMCeaHmPwWrDOrUt4IZwmWysTzGZwv5Cfj4fwD5/tDnWK9BTiJ7EjXX4 NUcccN/yd2mrCIfZwyJoV7QRIED/Z7+01wlkbI47TgFCg1orm99DmEJa/bQcVrEhGC4G /elw== 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 l5-20020a63ba45000000b0047853e401c8si2496815pgu.69.2022.12.16.03.54.20; Fri, 16 Dec 2022 03:54:29 -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 S230273AbiLPL2l (ORCPT + 68 others); Fri, 16 Dec 2022 06:28:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230223AbiLPL2i (ORCPT ); Fri, 16 Dec 2022 06:28:38 -0500 Received: from mail-qv1-f45.google.com (mail-qv1-f45.google.com [209.85.219.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 623662A409; Fri, 16 Dec 2022 03:28:37 -0800 (PST) Received: by mail-qv1-f45.google.com with SMTP id c14so1480286qvq.0; Fri, 16 Dec 2022 03:28:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cpsh6MRE6XYtx9/rCflIcIbNFehaXSviVtyQLfJ5VOk=; b=0b+XLxVJFLps7fTjsm9dhvP3y/BLGrpyYeMYItXOdnth/AYbYB0U8+lC4cqX2UBGU5 kCRaxMUrFufiQPyri6eqZBN9iJkGcxeX5WpVa7cZRSmF826F5vk6Mh/B+7qQ7RevJ3ko 4N/XzVtfsnXYsy60IrPCwY81tgO/Kp+BdfcUOf9QgCuuzgKHiN7iednccDe138z5kpXJ 09nb21r4wQDaBlWbgXLYgtlXgDOUl+yceq5PaLbF3jiBpdkCQHAT1dJzs1dQFFpDTqTa bwg05DzWu4m2Vbn6QT3FyQHFgORKBSneNoLzzhnSvoUwDZ7HRTvsScS9NyC+QFEf77Oi mmFg== X-Gm-Message-State: ANoB5pnSdlVmPuunUXcQ1eGNZ9OuMi9Sv3NYfcDz7w6BElBIJTkX+QpZ Bo7poD6mhn/+MojfTPo76gAlU8TRT6I+IA== X-Received: by 2002:a0c:fdea:0:b0:4c6:b888:5da with SMTP id m10-20020a0cfdea000000b004c6b88805damr35018984qvu.18.1671190116332; Fri, 16 Dec 2022 03:28:36 -0800 (PST) Received: from mail-yw1-f176.google.com (mail-yw1-f176.google.com. [209.85.128.176]) by smtp.gmail.com with ESMTPSA id n11-20020a05620a294b00b006b5cc25535fsm1301168qkp.99.2022.12.16.03.28.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Dec 2022 03:28:35 -0800 (PST) Received: by mail-yw1-f176.google.com with SMTP id 00721157ae682-3f15a6f72d0so29183067b3.1; Fri, 16 Dec 2022 03:28:34 -0800 (PST) X-Received: by 2002:a0d:dd4b:0:b0:370:61f5:b19e with SMTP id g72-20020a0ddd4b000000b0037061f5b19emr28567896ywe.316.1671190114634; Fri, 16 Dec 2022 03:28:34 -0800 (PST) MIME-Version: 1.0 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> In-Reply-To: <66ec4021-b633-09ba-73ee-b24cdb3fa25a@huawei.com> From: Geert Uytterhoeven Date: Fri, 16 Dec 2022 12:28:22 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v9] kallsyms: Add self-test facility To: "Leizhen (ThunderTown)" Cc: Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Alexei Starovoitov , Jiri Olsa , Kees Cook , Andrew Morton , Luis Chamberlain , linux-modules@vger.kernel.org, Steven Rostedt , Ingo Molnar , David Laight , linux-m68k , "Jason A. Donenfeld" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no 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 Hi Zhen, On Fri, Dec 16, 2022 at 10:43 AM Leizhen (ThunderTown) wrote: > On 2022/12/16 15:42, Leizhen (ThunderTown) wrote: > > On 2022/12/15 22:51, Geert Uytterhoeven wrote: > >> 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. I can confirm that. One difference is that the one in lib/string.c always return -1/0/1, while the m68k version can return other negative or positive numbers. However, adding: if (res < 0) return -1; if (res > 0) return 1; to the m68k version doesn't make a difference. Renaming the m68k version (changed to -1/0/1) to m68k_strcmp(), and the generic version to lib_strcmp(), and adding a wrapper that calls and compares both, shows that both functions do return the same value, and the test succeeds. Moving the m68k version inside lib/string.c makes the test pass, too. So it must be related to the function being inline, and gcc making (incorrect) assumptions... 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