Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1684695pxj; Wed, 19 May 2021 11:25:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBhQX8/q5HY38yFz/yg07Ahl2cdBpM8iBhNloFO36xQ3NdcLjAzygLVkHmFUeGOaRuwK6e X-Received: by 2002:a02:b68c:: with SMTP id i12mr264879jam.133.1621448720937; Wed, 19 May 2021 11:25:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621448720; cv=none; d=google.com; s=arc-20160816; b=YdVNjlcxOF31DiBOe8jcoX/b60yrLQk3SixGmHVbKg8JXDfkchb+SMqTd/ye1ndPZh ZIPB5mzepMD7VmBxV+OxGH2txKOLVX9wIan+AajB6y9qGK+LInZtl4IsGPQRbgZrqfI2 Ii22SzQI3FWxh9EeeZbc6yZqS4ObQa8k1Q0X9kJ+76U+r/czpCRbueY67enexxrG5AbU 91lI6dIcFXIPPJER3BIeddVDejzVl6YBUmcqbjq0x3tPzKfiGNt30jew4W7SpWgDdeo0 v6kPqiSG5l7NXVAxKa+7kU23sHYGlldXNG7dZZ+bbc1P7uIM2sAgReTi4k/RKNr/zhFi cxAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=y1fFMMA5hyVC/F/uoCjCvi5quqKUxN90T6o2QdfgidY=; b=s1z05o150xyr/3iXl2HkSoSg6p35Rc5THlAZkwF5uUlShG3/vTP2GRsNzvDwAF/1/Y 1qxWk8VT83jcosxBpkHWbZYc4EWlo85ovQvxOEAJKH0VVOG1/BmmOiJmkW8AQcsLLHGq YSdbpO0VLdPXBfLvjxFYa7rHoshnNmnJnB4jV6APhOQRMKXMNzuzx6cYrbQFtmKhuqJF CjOWBTPMZSOdL/xR62S4QYxZuxigoSCixSDoMEuLuNyEZ6TcR7W+UTlzUOzCFPiNBCPm MBymFbWqde4Oj9ArWm4kdNP1ZZq3KWJhqtXXYGjlB05PntF2GtTLaSdmhWDNHxZ/A1wy Ydaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=G9IW3q0K; 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=chrisdown.name Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a10si354632ilv.110.2021.05.19.11.25.08; Wed, 19 May 2021 11:25:20 -0700 (PDT) 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=@chrisdown.name header.s=google header.b=G9IW3q0K; 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=chrisdown.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245642AbhERRAq (ORCPT + 99 others); Tue, 18 May 2021 13:00:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232496AbhERRAp (ORCPT ); Tue, 18 May 2021 13:00:45 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37D3CC061573 for ; Tue, 18 May 2021 09:59:26 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id z19-20020a7bc7d30000b029017521c1fb75so1953242wmk.0 for ; Tue, 18 May 2021 09:59:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=y1fFMMA5hyVC/F/uoCjCvi5quqKUxN90T6o2QdfgidY=; b=G9IW3q0KIwqsYdFKITs/5CvAwaLbmxR+DJZ3M0pwW2vXx7j/oq27G2yL5US7hF/rl3 gFH2A3CH9vb0tj8oujLDSoVVnvdjVJ2unQvXnbJxAi/zk7gBdpvU+vy4yWQr1+xiLgew 5GxcMU94Q29viJq89VIUrOnt6wMRvPCW3Yk9E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=y1fFMMA5hyVC/F/uoCjCvi5quqKUxN90T6o2QdfgidY=; b=IAU3X1W7ZEPRcMLvc6FekKdPdLuWX1Sq7LcOKEFGlP6JYMS/5KJ3ErquSOyFGdE00b 4l82iPBlroFGqOSfprzccdRwfL95IptvACxJQghcD4ydAtRdsNWsJGYdRWpxAeTa3cmH iDYJSP3gKQatN8M/KbXRnRIueHduA0liGoOOqDnSuW0GWMy7XXwInT8quFdPfZCuP7Gc rAcBycmDXiOq4txasdYQCNSJDMvoBvKA24K67MORPf3L1ydYOxcgtYvWrPKq1aFLVEij jJVFcs8CRsXa4/eHFfWoNQrriYR17KiYhAxNihkbNOLkti1WjKcMET3G5K9q/uJAQ/fK iipg== X-Gm-Message-State: AOAM532+kY3YrGqhZ+m3m0tJITTJVpBMmemjumH0s5JyFHf2SNQfew3r ChaOjE1BfncYieb3yqn8zkcNhA== X-Received: by 2002:a1c:4907:: with SMTP id w7mr5929582wma.11.1621357164891; Tue, 18 May 2021 09:59:24 -0700 (PDT) Received: from localhost ([2a01:4b00:8432:8a00:63de:dd93:20be:f460]) by smtp.gmail.com with ESMTPSA id m7sm22261707wrv.35.2021.05.18.09.59.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 09:59:24 -0700 (PDT) Date: Tue, 18 May 2021 17:59:23 +0100 From: Chris Down To: Andy Shevchenko Cc: linux-kernel@vger.kernel.org, Petr Mladek , Jessica Yu , Sergey Senozhatsky , John Ogness , Steven Rostedt , Greg Kroah-Hartman , Johannes Weiner , Kees Cook , Rasmus Villemoes , kernel-team@fb.com Subject: Re: [PATCH v6 3/4] printk: Userspace format indexing support Message-ID: References: <05d25c65d3f5149c1e8537f74041a7a46bd489d6.1621338324.git.chris@chrisdown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.7 (481f3800) (2021-05-04) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Chris Down writes: >Andy Shevchenko writes: >>>As for the literals, are you saying that you prefer that it's symbolised as >>>a macro or static char, or do you know of an API where this kind of name can >>>be canonically accessed? >> >>I have heard that modern GCC (at least) can utilize same constant literals in a >>single compilation unit, so it won't be duplicated. >> >>But more serious here is the guarantees of the name. Shouldn't it come from >>KBuild / Makefile into some header like version do? > >I'm not against that, but it seems like something worth doing outside >of this patch series, unless you have strong feelings to the contrary? > >More than happy to put that on my TODO list for tree-wide cleanups. Now I think about it, we even just call it that in struct module's is_vmlinux, and set that by doing `strcmp(modname, "vmlinux") == 0`, so it seems pretty static from a terminology point of view. It would be nice to just always use `mod->name`, but unfortunately with !CONFIG_MODULES we don't have `struct module` fleshed out at all in order to do so.