Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1730187pxb; Wed, 9 Feb 2022 03:19:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJxNR0s1xNyZjGoh/CYdnB6xWyiu7mcs3WeUfWGrFlTr101uJFASzsAT7qrzMcoifyIyu4P+ X-Received: by 2002:a17:902:d48b:: with SMTP id c11mr1657662plg.30.1644405541606; Wed, 09 Feb 2022 03:19:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644405541; cv=none; d=google.com; s=arc-20160816; b=zXq9j64Gz+9njq38D9hxXU69g5jeVvoJGuW/5aTznyi8Eriri+OgSrMIt4/jZh+llF 71hg7oWZ+eHw6Q76VFgyNyr4+zMTZyE1chXTPolwgMXY7Nbh1Wz/twpDBupyrnSVXwPr Lq/wQ5h34O1/o7j1VLenJtLcIBuJEEDuSPEzTJbLXECU0oVHqzLY/8cvq+uXWCv/aZdF L6YV5/ZU592jYkD0/xh8lQn1xXBtk9V26gygJpWif78hNa4ODYSCRvyE9I5joaz7zd/I 8n8YmlF2NPA08Gwyi+XnvZnokjAWgcQkEq1mlLkRMIzk3vRiOwDg5Rn+vpjKepZoFABK m3BQ== 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:dkim-signature; bh=CQtLM0uGZTqmaNF9UZ+oi/TWbQe36RQ1cY4m3+2cQSI=; b=0f32sUish8Sejy1pk2iuWKzeyj6sv57fWfcoWp7eC1gSfFGKryjsRX731C6MfIVHdC Ur/mDKXECbATSdmYUUgpauqKBRGkeMGnGLhrBi3ESpInv0cl4/2eWjUNuFfKq2zmimH3 MKPehWhdmosonLAes3xBtoqtTIWMfx1jjg4unmKJXJADpMv1e6ZE0jSx9wSVOb2mGBsT gXyeTYyuwfETX4ufhBattyDMM+/BhWNx/AykBuDDRldCUpxykT/NeJEkw5XanQfKptv2 nyraQArT5aqjzdTJF9jZ1k/iieF/2KdAbvzXnR30aTnQJHGF8lf8pAr12JciedemjEey ne9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=l83IosW3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h184si2249253pge.466.2022.02.09.03.19.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 03:19:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=l83IosW3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 082E6E0717DC; Wed, 9 Feb 2022 01:46:03 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384637AbiBHSMR (ORCPT + 99 others); Tue, 8 Feb 2022 13:12:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344326AbiBHSMP (ORCPT ); Tue, 8 Feb 2022 13:12:15 -0500 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12320C061576; Tue, 8 Feb 2022 10:12:15 -0800 (PST) Received: by mail-pj1-x102f.google.com with SMTP id on2so8728124pjb.4; Tue, 08 Feb 2022 10:12:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CQtLM0uGZTqmaNF9UZ+oi/TWbQe36RQ1cY4m3+2cQSI=; b=l83IosW3IirO5p1luRL2ZBacfhRFJaHclc9839UiD5gdHqhkE0o4YCrnNlUf2mz+py 359eQfdM10UZvoUCmhUUyF1FIWixwTBZYnSXIcD3TG3Ool0DjgCIUl/fWHM4RwOkVXEO 5NJPvhYd1yHPqbVUUGi1wq9mOxim2q7h3wZlxQjw/N6/DeOvU1IUCh0KivytpL/9+ZlF fxjXG+tncgN454/dB05R4qL+kQcLcr/89McBCS5ZfY6WgJ/LgfqEwYDsM2/ape66RiPr IoIHaImmXyHPypfKbsnlPDAIBGJG51AvsYe73D/Nha9jR/tlpDZQkpIsneWuIOGYBGBn oD2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CQtLM0uGZTqmaNF9UZ+oi/TWbQe36RQ1cY4m3+2cQSI=; b=utwnzOoish8MsVdMgdCwXbExyfn0hXi5TovjsCFpsdEYug9oESTTf22yvC2HTXAzwK mHHAxOT4fyJpKWlGtYCLITV4TDfFqrlALjfnBHudP7yF70FtdzfxcP5NuKyIuIWy7mj6 Rw5bCruAdfokB3dlkU7rrmBU55L7VHpyJZt4d1xFU06p4h+h4fzcDeu4CS6voBwYtPIh WIwyaLYuBIDed8Iku9v27vsDdph7DeGnF5QcOUUTxpdk/xUEc5tzTUrY3YpHMwWTL+Q0 9goZG15fW5vWE+rfTfN10BpGHm8XimtXwUaKZOxtS8Chdqh4BPSYE68X2Cc78BFkuNXq YZMQ== X-Gm-Message-State: AOAM5329866QHlaG12dgY+oWkSqSxhJZoWHomIsZflHiPV6gaIb3zaCm lX9WFbT7BJKqbuoJx3K4Vi3w20EUzULV3BfjhS8= X-Received: by 2002:a17:902:9308:: with SMTP id bc8mr5793310plb.147.1644343934227; Tue, 08 Feb 2022 10:12:14 -0800 (PST) MIME-Version: 1.0 References: <20220203060641.119522-1-vimal.agrawal@sophos.com> <20220204083933.136096-1-vimal.agrawal@sophos.com> In-Reply-To: From: Vimal Agrawal Date: Tue, 8 Feb 2022 23:42:02 +0530 Message-ID: Subject: Re: [PATCH v5] modules: add heuristic when stripping unneeded symbols To: Luis Chamberlain Cc: Christoph Hellwig , Masahiro Yamada , Michal Marek , Nick Desaulniers , Jan Beulich , Jeff Mahoney , Sam Ravnborg , linux-kbuild@vger.kernel.org, jeyu@kernel.org, linux-kernel@vger.kernel.org, nishit.shah@sophos.com, Vimal Agrawal , Dirk VanDerMerwe , gregkh@linuxfoundation.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 > You are saying that sometimes having "best" evaluated to non zero > yields incorrect results, where the symbol found is actualy not a .text > symbol for a text address? If so, is this really true for cases where > no stripping is used? If so this is bigger news and I'd like to address > this separately in another commit but we need proof, not just > speculation. > I have not seen this issue without stripping so far as in that case it will find some better match with some .text address but I have seen this consistently with stripping. > And you seem to be suggesting that this seems to hold more true when > "--strip-unneeded" is used given there are fewer symbols left after > striping? > yes. This is seen with stripping only. > > without stripping, it will definitely > > resolve to some .text address closely matching in case of no stripping > > OK so there is no issue when stripping is used. > yes. I assume you meant when stripping is not used. > > but it can go wrong with stripping. I have seen it a few times post > > the first patch during testing. > > OK then we need to take care your added heuristics do not affect > non-stripping. > yes. so I tested .init , .text and one data address (without being stripped) to make sure there is no affect. Attached the result in my previous mail. > > best could be incorrect even for text address when --strip-unneeded is used. > > e.g. in my case, it is resolving .init.text address to __this_module > > You should be explicit about this in your commit log. > Ok > When you submit a v2 patch and you change something like that you must > clarify changes which are not clear either in the commit log or below > the --- lines after the diffstat and before the actual patch. Each new > patch iteration should have a set of bullets with all the changes you > have made so that the maintainer can track what you have done > differently on each iteration. > > Right now you are not making any of this easy on me so I ask that you > stop submitting new patches willy nilly until we have actualy discussed > each item, and we decide what to do. I also ask that you keep track of > each change you are making on each new patch iteration on the patch > after the --- lines and before the patch, so I can easily tell all the > changes you have made on each new iteration. > Sure. Thanks for educating me. > Luis