Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1000760pxf; Thu, 11 Mar 2021 22:28:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJz+IBqpgS/3lpThZrDEkYc6c0xSJYiaf+nXWrm0m9OsrkLhYbGOK1VeJ02AdYjbROJclR1B X-Received: by 2002:a17:906:a94b:: with SMTP id hh11mr6932758ejb.459.1615530494503; Thu, 11 Mar 2021 22:28:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615530494; cv=none; d=google.com; s=arc-20160816; b=tyx+e93GRRouEmegPXAkWEENmXWaHhB4V9ao5WTCd+HINdQ412JD/1YcjgWhGHGW6K +dmF8zXryC/VCqUWuNCGhP7dGfT7IFpaE2rejaxQsfNGJFBBd5TqfXKG4usWLOhF4ecc QLrd9YMR17IZkihhXDkZkc9Fbns+QSTaMs/Pf1CGCN0Gmf7iaT43yOewKNYIvipcIAwp 8iCQ1ZNimOTfGh04RRwrtQ1oNJH4Ebd8GOKPMs/adfmC5v/TA2eGpyF5FMVP/hROtHM1 adxQ8LypwsJO8bl2iAiRYUf7k5VPyEOe/dEcpNafsbng05f0d3nlMIsBDN4MniNJwsL7 QRCQ== 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=WGxkED5xvO7EBqFm4DCtSvWu3HlooVb2eOQvFO803JU=; b=H1cLi+AEK3KBaW5bvMsyZADZkJSByNnJXt/Rm4MvyrZpS/g2oQNG2XlI2Y/KajEF2N +/cg9gXYt33ZuLk5D9ItOHztRWSwgO7LsVyakHH8OafrlAc6VHnladHgIHJCclYIqMKj 8msRQm6A96SWqJ9yrlBTHDECjfLpjQBFOb9indDZp1oxTu5zGSfjX5V8y8Ep+FfDpORP lx3xpqVN+ao2Xc5bkd3Uq7Lzr2EtY8pqDzTylhCfxn5y9SefpAeIJ/Aafs0/zWv6b94W UkEKb233IpS2jP1GfFnd/xyigSFt0Iak5svw9mu16ul569Sxuyx8ITbyFMcsxlHYwVIV XV7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WfGhsPrM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lj22si3504474ejb.614.2021.03.11.22.27.52; Thu, 11 Mar 2021 22:28:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WfGhsPrM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231954AbhCLDq6 (ORCPT + 99 others); Thu, 11 Mar 2021 22:46:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:44560 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231925AbhCLDqz (ORCPT ); Thu, 11 Mar 2021 22:46:55 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 61BE064F94 for ; Fri, 12 Mar 2021 03:46:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615520815; bh=4R+bUiUQrhAbhcNq5F9PTRR6LOdoOwhc+tn0NqBlX+M=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=WfGhsPrMk6twy/JXIkr08yNMjm7RjFp9o1vVqy0yOSkHKKMeRBj9abUiPv1TZ5Gk7 9tp57mMqkQ2hVyCijXDS+pAvFGxS2uvnjYo868eucIczegZPeytOUQ4qStxT9R85xK /tvJ8DQ+ihzD7qGUcAknyy+cMKscnGRzBRQtfgsUpV0orgSuMUiHEJ8qOMh/KXjXt9 HsINldf2PpL1Cg/bj6ECAcSvRrLujK5FtX35WG+rs2d/uG29W5xjSxltuNS7GQlR4I EGDWoHtnCHhPSnmq7XpFCvh71HhhWf38r0lB5ZlGDyXh6iIQX97LsmiYqbTrLyUdt1 apUw5wgbDyoYw== Received: by mail-qk1-f180.google.com with SMTP id x10so23038358qkm.8 for ; Thu, 11 Mar 2021 19:46:55 -0800 (PST) X-Gm-Message-State: AOAM533Wjej+bLG6uNvASDCt5R792HQ7MCgFNB0Zrs2gIKoQvhZKdSfP S1ClsuL1rp3/HLe2kDn0AH0emB8AeD1q5IocnyQ= X-Received: by 2002:ae9:f81a:: with SMTP id x26mr10406100qkh.497.1615520814578; Thu, 11 Mar 2021 19:46:54 -0800 (PST) MIME-Version: 1.0 References: <20210305194206.3165917-1-elver@google.com> <20210305194206.3165917-2-elver@google.com> In-Reply-To: From: Timur Tabi Date: Thu, 11 Mar 2021 21:46:16 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] lib/vsprintf: reduce space taken by no_hash_pointers warning To: Marco Elver Cc: Petr Mladek , LKML , Vlastimil Babka , Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes , Geert Uytterhoeven Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 8, 2021 at 4:51 AM Marco Elver wrote: > If we do __initconst change we need to manually remove the duplicate > lines because we're asking the compiler to create a large array (and > there's no more auto-dedup). If we do not remove the duplicate lines, > the __initconst-only approach would create a larger image and result > in subtly increased memory consumption during init. The additional > code together with manual dedup should offset that. (I can split this > patch as Andy suggests, but first need confirmation what people > actually want.) > > I have no idea what the right trade-off is, and appeal to Geert to > suggest what would be acceptable to him. Maybe we can have only the message itself wrapped in an #ifdef CONFIG_ of some kind. For example: +#ifndef CONFIG_CC_OPTIMIZE_FOR_SIZE pr_warn("**********************************************************\n"); pr_warn("** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE **\n"); pr_warn("** **\n"); pr_warn("** This system shows unhashed kernel memory addresses **\n"); ... +#endif return 0; } In other words, if space is really constrained, then don't include the message. Or maybe just include part of the message.