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 X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6690BC433ED for ; Wed, 12 May 2021 18:13:54 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AFD0A611BF for ; Wed, 12 May 2021 18:13:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AFD0A611BF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=P5kwGf92fRN6Wluj1t5bfANml5Hrfzxiz6kEd+RfovA=; b=qDifawHckGwUYuzWPGD6jop+1 BoYC9IdIiwyiJ4EYIPdz/Hneylc/hNnzL6cF5ke3iDNfILf/F8Dog+qYnjesjEJY1q346RZs0rcjN 4gVsFrTaGKbdoTwFQdht1dwhoA31nh4bwKqNx6G5imATbQlHUueB+9qXBWIheITOJj6qFHqEkfQWC Geq4fh6jA7qefOah5CMuKXSzYjJm9Jwq4l9pm4WdvoHQEaXdP6eXSs4MbHU2EpPUEHosvdBwQI+xf g0ZnL43taxxrrUofgKuXM++69JjVuh415ogtyWcsV5uaT1KDTAuxGnXUCOtlv0IqymNNn8JPirsd3 YJbfL5sXA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgtKq-003Yz5-S6; Wed, 12 May 2021 18:11:54 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgtDW-003WVv-8z for linux-arm-kernel@desiato.infradead.org; Wed, 12 May 2021 18:04:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=d6PyBDz5Hz+HLZJQx9m2fhDjeQhvfMXZj/HKgsByeXo=; b=hvTCsiZueTxoBJVFoc2bgjDxDJ 02v9n6g5FY13qHk8PfnGUJf2qWvF0xk/ilB9lty+PGc86yKiPAMf23N4Lf7KX7iOIQsqKpPygxazE bCcC7xNqIxXUSQbT41rDL8LvzExgty+AaXwrR0E1Ii9PeklBQ0i7/DsFtvvykZhNDYQ0w+MINUjcO 70Km8OKUFhgWWNZWao4d5FaGMPNadeaPGuaiQ1iK9ZI1yPPkTmCe9C37PEdr3Ne+BIAggWp9k6KOQ hVvuoobfDolUqO3jKRTGIXsaFR5RyTepoR4TkAVMHgzodUrPIiAggpEn3/Br0eL4ToIvYSMY91sp+ 8/NEhg3Q==; Received: from mail-vk1-xa2e.google.com ([2607:f8b0:4864:20::a2e]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgtDT-00Ag85-Fx for linux-arm-kernel@lists.infradead.org; Wed, 12 May 2021 18:04:16 +0000 Received: by mail-vk1-xa2e.google.com with SMTP id n74so4938943vkc.6 for ; Wed, 12 May 2021 11:04:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=d6PyBDz5Hz+HLZJQx9m2fhDjeQhvfMXZj/HKgsByeXo=; b=EwWfS3nUxUd6F4Hza9Wih48U/DhHt7dkvd7SLfXZB9AGGY0vfd4pqFrdusmN8cEYyS lQKD0SvIknzYN1dLg9K0qeIpr0aJTt96qaYa6V4J/wf4mjLc7k/lK18/sRp6PhSws5dv r14mRXobZqw+H/tl/bTwJK1xulWqG1EF93+eSdX519DzA3USBFSPV3TRhpryr/imW6/h IWEqrrl1Wlc5lDzEUm25bGumfYBqVBftmsSBUcMiOFXjEvh3NzJaGQVLR8+NzPj8bhpr mLyRO8xnT7z4aaJ9s2rAEczBml/s9ZWy6r7SvVTO0mFtUSciYzUZLTWk7D1GcQbJdi3a CZFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=d6PyBDz5Hz+HLZJQx9m2fhDjeQhvfMXZj/HKgsByeXo=; b=GwtYL4BMvutamBHwpAY+k/p/U6DHlBJSI3D+e0XFjGwVmdi6ZeCFs0PJAThHF4aZap QgxUPbATkgF6bS+o88JhvrTRpolB/SJUNG1KqCqmkVd0zOZlI5nav76eYhCNnZ9B0bo0 rYYqfjDXpXJh5/HvTMTT7N1p7plGislLqoC/b6PeweTP1UdZPs+WDLEwMWlNsFQlLGmM iaztP/6QAXvaF3gsPftw8VdnJv35WNVQZJKN9FNU/fQijIoR8yhgFacHGxJz5YSt2IwK zTUmxIbbgLJzyDGx7w/KLTOSSkdDrMj/uKHl8sz2ZqxxiyNUaJykn6Yi13fpUIw/yomr HedQ== X-Gm-Message-State: AOAM530GlonYg1UDYviJ3OqFKxG0iYfC4uhpzHC2bJx79XdnZQwmVqRa wfCB2g2J50SRNosOeBcsaWnnV30i2M7mXjq/M4c= X-Google-Smtp-Source: ABdhPJzu/KIleZZfDrE9427pC4pMWBUduSAchOxtS5+3xBoN5DZNk5IQG0YwqS/XFE66PwTAAAZ4EwHDIAjCHjv9kbA= X-Received: by 2002:a1f:20c9:: with SMTP id g192mr4453848vkg.8.1620842654032; Wed, 12 May 2021 11:04:14 -0700 (PDT) MIME-Version: 1.0 References: <20210511185057.3815777-1-jim.cromie@gmail.com> <20210511185057.3815777-18-jim.cromie@gmail.com> In-Reply-To: From: jim.cromie@gmail.com Date: Wed, 12 May 2021 12:03:47 -0600 Message-ID: Subject: Re: [RFC PATCH v5 17/28] dyndbg: prevent build bugs via -DNO_DYNAMIC_DEBUG_TABLE To: Ard Biesheuvel Cc: Russell King , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , X86 ML , "H. Peter Anvin" , Andy Lutomirski , Kees Cook , Nick Desaulniers , Masahiro Yamada , Linus Walleij , Nathan Chancellor , Geert Uytterhoeven , Bill Wendling , Sami Tolvanen , Arvind Sankar , Joerg Roedel , Nick Terrell , Dave Young , Pingfan Liu , Atish Patra , Linux ARM , Linux Kernel Mailing List , "open list:SPARC + UltraSPARC (sparc/sparc64)" , linux-efi , Linux Memory Management List , kbuild test robot X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210512_110415_565935_0008C0C9 X-CRM114-Status: GOOD ( 24.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, May 12, 2021 at 8:55 AM Ard Biesheuvel wrote: > > On Tue, 11 May 2021 at 20:51, Jim Cromie wrote: > > > > The next patch adds DEFINE_DYNAMIC_DEBUG_TABLE(), which broke several > > subtrees, including efi, vdso, and some of arch/*/boot/compressed, > > with various relocation errors, iirc. > > > > Avoid those problems by adding a define to suppress the "transparent" > > DEFINE_DYNAMIC_DEBUG_TABLE() invocation. I found the x86 problems > > myself, lkp@intel.com found arm & sparc problems, and may yet find > > others. > > > > Given that I was only cc'ed on this patch in isolation, would you mind > adding more clarification here? What is DEFINE_DYNAMIC_DEBUG_TABLE() > supposed to do, and why is it breaking standalone binaries? > > hi Ard, the thread starts here: https://lore.kernel.org/linux-mm/20210511185057.3815777-1-jim.cromie@gmail.com/ the _TABLE macro derives from DEFINE_DYNAMIC_DEBUG_METADATA, which puts private static struct _ddebug's in section("__dyndbg") the _TABLE macro populates a different section(".gnu.linkonce.dyndbg"), which is then placed by linker script at the start of the section. ISTM that the new section might be whats breaking things. And maybe that the vmlinux linker script isnt involved. so the storage the _TABLE wants to define is unbound (and unused, since there are no pr_debugs) I did see relocation errors somewhere... This is my 1st time doing something creative with the linker As to larger purpose, I'll try to restate the patchset mission: theres ~45kb savings possible by compressing the highly redundant data (~70kb) which decorates pr_debug messages. 1 - split the compressible/decoration columns to a different section|block, for block compression this adds temporary .site pointer from _ddebug -> _ddebug_site 2 - change code so !site is safe. _TABLEs only real job is to provide a header record, at the beginning of the section/array, for a single .site pointer to the _dyndbg_sites section added in 1. Because the header has a fixed offset from any pr_debug in the vector, all pr_debugs can use the headers copy of .site, and dont need their own. specialize & unionize So it allows to drop the temporary pointer, restoring memory size parity with master. And we then have the _dyndbg_sites section, full of redundant data, ready to compress. suppression with -DNO_DYNAMIC_DEBUG was a workaround, didnt think about it afterwards does this clarify ? thanks Jim _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel