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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65DBFCFC293 for ; Tue, 15 Oct 2024 12:08:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D07206B0099; Tue, 15 Oct 2024 08:08:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CB8366B009A; Tue, 15 Oct 2024 08:08:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B579E6B009B; Tue, 15 Oct 2024 08:08:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 9760F6B0099 for ; Tue, 15 Oct 2024 08:08:39 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 8174A1A0CAF for ; Tue, 15 Oct 2024 12:08:23 +0000 (UTC) X-FDA: 82675714464.03.71F05C1 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by imf29.hostedemail.com (Postfix) with ESMTP id 65007120009 for ; Tue, 15 Oct 2024 12:08:27 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=suse.com header.s=google header.b="IjqOrA/h"; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf29.hostedemail.com: domain of pmladek@suse.com designates 209.85.128.44 as permitted sender) smtp.mailfrom=pmladek@suse.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1728994070; a=rsa-sha256; cv=none; b=z5nv45cbBQlGXmR/Q83x42rUR8hTk/nByKq/DtPq/isjW+hSd5lfJejEoa6ExfnsUx5X4t 0wRnQj3w/stVQ4C8Xvcvz1AA6avZE31nIPV7vUksZktLXK9JDFVMyMm6K9V7y6uXxtgLQq 1MywiL67QDSFPPfV6ohE0NgPGpBtxow= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=suse.com header.s=google header.b="IjqOrA/h"; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf29.hostedemail.com: domain of pmladek@suse.com designates 209.85.128.44 as permitted sender) smtp.mailfrom=pmladek@suse.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728994070; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=jb5H3boBi96I8Ci/iktPPSQLPU64M18S3ob2HZhlQ4I=; b=vxwaKDSi2jJndReCXq4bbCrTqh2CeE+s90PwbgNAGLs04MEiIJ98g3czKsQN721VpAQoZl isOc/34Qm8rAkg4NquCv2lPSTBqpv1T1nR0jyZDUv/ErksAncj9AlVYEDJsX/gU4q9Fuog hwomyRpNhUetSousxpWMesIAQj+Ypf4= Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-430ee5c9570so62292745e9.3 for ; Tue, 15 Oct 2024 05:08:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1728994116; x=1729598916; darn=kvack.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=jb5H3boBi96I8Ci/iktPPSQLPU64M18S3ob2HZhlQ4I=; b=IjqOrA/h50ep66IJpVAVC3Gi8INRujxwHLsAZU7qeRBfHtgBReyF6TjRagPxjzbr4j leN+fNDZ4IIOJwLDtd5lnkueHuBFUVNUMeNbNOgF/2Pa7PbQLtnj0yBMMmATovIrTNvZ N6alO6vtit2Y40WoniX/3Wtyfw5kw4o1jWIW5rnmbum4nPiDv+2f10MLZwF6MFTWM16A +xEE34Fi6IA6obkHWo+p9loxaVXCPFJlaIxQWjuySOJT4FVkqWV/uzCagD5JcyUHp4JL NW4Vdy9zcIAEmj01FW0x4pIvL4Ir7w/TDXspy68Zy+f4EUfVkjDyMWCmadZJGaBWCM0u EdWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728994116; x=1729598916; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jb5H3boBi96I8Ci/iktPPSQLPU64M18S3ob2HZhlQ4I=; b=qqVuHaJJhf7fDY1dCt4o1JEnY5dDKFX4RKLCR1Iu9B322upChIhUMlQJJo9JF7pDa2 5zyYGgK+NgKU+yVK58960lGZWIEhZsErWH1Txyn25tD3AqtZvTgwNZ9EOFKdstDt07hW XeLJiGPg248k8NhVzYe28RIpSyqlGl9dmmQcOxroyDVEqKMZeGkI6QIYKoR8WP+mu68K SjvRcBVGu+bDLQdf76ZVMlZgRjv1zqlql9iOSdXe9jBbJtm8Tie1kLgC3eLlsYZKGPvN qVqs9LbLFUPd+8sv5+5hDHKtb9JEEyE7lreoRgLFiApGLJNYs4DCeuFgiBVgXwdfuoXC ORwg== X-Forwarded-Encrypted: i=1; AJvYcCU0K9bkcDLDsmu0i7u+py8j2TL8UxSWr3eIcfIlzIinOs/GbR1/3cCkibbiztI6igltmj/oBY22Ww==@kvack.org X-Gm-Message-State: AOJu0YwJO/IqITy/JWGuE+Y/LJNUFf6faGQGKTfpbJUxxSSpML8nPAwb LlGc+ViEps1q1+FCOAr7khCrp/CWzvN/s2vQA68Ls6LP7blIT/cgPAX7JR8je+8= X-Google-Smtp-Source: AGHT+IHTWs2V6srqDKoruyVn6m+lYkAUbIDhtTysf4cloX9kctqEwo1M8MrkOY8lvinjAcKVF03gXw== X-Received: by 2002:a05:600c:3ba1:b0:42c:c401:6d6f with SMTP id 5b1f17b1804b1-431255e052amr140489625e9.16.1728994115314; Tue, 15 Oct 2024 05:08:35 -0700 (PDT) Received: from pathway.suse.cz ([193.86.92.181]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4313f6b320asm16051135e9.33.2024.10.15.05.08.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2024 05:08:34 -0700 (PDT) Date: Tue, 15 Oct 2024 14:08:33 +0200 From: Petr Mladek To: Ard Biesheuvel Cc: Linus Torvalds , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Ard Biesheuvel , linux-kernel@vger.kernel.org, Masahiro Yamada , Nathan Chancellor , Suren Baghdasaryan , Kent Overstreet , Arnd Bergmann , linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kbuild@vger.kernel.org Subject: Re: [PATCH 0/2] Use dot prefixes for section names Message-ID: References: <20241014125703.2287936-4-ardb+git@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspam-User: X-Rspamd-Queue-Id: 65007120009 X-Rspamd-Server: rspam01 X-Stat-Signature: qs5g1wsrxzee6a5i7sskwd7oetzsh8ya X-HE-Tag: 1728994107-977168 X-HE-Meta: U2FsdGVkX1/EBYLjFEB0puGxURJzJdaJ2XUBSLak8n9v5nYSE1trr7SvwPE4uuBwZ/yaIeGPrc0iDv0WHVm9d402E9J1fRHsj4SXNsttmAGD6Z30K9s7iQL7DOOuMNWs2onzAFyTg5mdmfYC2WzaAjByS/rBMCrSrjIinYfJiXJUjFk+fpdHV0mgnR3j9pohIoGeB3hXoT9ldPXzlgxluDfITguEYQIYknHUElW1QJi00wk4bRHaujvXAf200Y5TQg28KJFQdP2T5ra2Ly2eoSbQiDhDhO+wTB2wVJ0AA+la/1/tfadIL2ZbbrQ8URYUHYnRgX6+2etCOBwFhj8aNVgSY34BRzLjGna6fu5kytTlzrucJXDqKR39YyJJZjj1Jw+/dSQhXbY/1tL7vSdp3HCL9LwjvYWs8sboSXD8iybNPnoGsgcs97AgLTaWgYujAPjDTJ902HW+Ensu4gkWaDwe6Ce5H03QZAheErtUmntrI6NrugwcPVr+rte50umUMRgF9rhB8Lc7VZ0rWEtbCu15Ih7ufJcTQfDzQpOAZbbkfhl53aYfWMSt7SuNlwgMik6vyl70TojsC/luyAGyLL+Vq9BmOS2NPca3m+70ZGVzjokHCiYLZ5pXRSbqoyMvooD15Wsp2a474OdWy1NumOJqx3LDkQvXv1HNNSgwOIswTylEx1QelybEdKEIAkOqOgT/ME8tHEEVDL9ZNWvD29t5KTCnJCiPouXPIfU5sHzVkLAh8sRE6tKebbA0BTDdo9gptKYP6QshlUn3nLPt6TilVmXMqeaNQ591r5dxOYhrokIUymur9+b5TOEGhedMBk488X9rRh1bV816OgfluQ5Lwz4A2eNss9oUqZOGCIQwmiEjfr438wXcH3OIZBq/ovGflamEJn6Q4pGu2J0zn+3gdV1T6TILERUXWQp6+e/QBlnH22lmGyGvYfX8LnPbuSML32rIWuUARhiGsjK QrOLTiRi mWR4yGRXOPJG4Dlkgw4JIbGet9d6LgNHURHrG5Qhjf7e6bla872gpq3dbLdMWz3mCKx0xQHjQ439KqFVgs3x9wP7ob/TwbZoesY+5JyKYcVLtc6fOJyfRhnWSYXmkvgLNQSabuY1mZKLJ8D86CbBkNun+MJOdzb3c4wGfv7DNBQT8TpRi19PizrCSgGikPc15fehUgV2193gswZLI9a7EvHI0bC7S/Y1oJD+v5Ji1qMiVjilr8NDMPo9yCE+pZCZ2GEVV0Yj4naahzE3ap7aZjL01fpbIx0HVajGu5FyPoMHV8QyWMqXYi4Usd/pNAnWTAoACvROBBYnCQ25GKIDYmhZfFfwAd9mHF916jEIvqy+wiSqsFUE8Xl69ZJ2ckV0gjLN5Fq0vMkhe71AM8Zu1hrOrvQPa2Xk+KUYSu9JZxl4jYvSiOHfxUYXvBw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Mon 2024-10-14 20:19:32, Ard Biesheuvel wrote: > On Mon, 14 Oct 2024 at 20:10, Linus Torvalds > wrote: > > > > On Mon, 14 Oct 2024 at 10:44, Ard Biesheuvel wrote: > > > > > > We have this code in arch/x86/Makefile.postlink: > > > > > > quiet_cmd_strip_relocs = RSTRIP $@ > > > cmd_strip_relocs = \ > > > $(OBJCOPY) --remove-section='.rel.*' --remove-section='.rel__*' \ > > > --remove-section='.rela.*' --remove-section='.rela__*' $@ > > > > > > Of course, that could easily be fixed, I was just being cautious in > > > case there is other, out-of-tree tooling for live patch or kexec etc > > > that has similar assumptions wrt section names. > > > > I'd actually much rather just make strip_relocs not have that "." and > > "__" pattern at all, and just say "we strip all sections that start > > with '.rel'". > > > > And then we make the rule that we do *not* create sections named ".rel*". > > > > That seems like a much simpler rule, and would seem to simplify > > strip_relocs too, which would just become > > > > $(OBJCOPY) --remove-section='.rel*' $@ > > > > (We seem to have three different copies of that complex pattern with > > .rel vs .rela and "." vs "__" - it's in s390, riscv, and x86. So we'd > > do that simplification in three places) > > > > IOW, I'd much rather make our section rules simpler rather than more complex. > > > > Of course, if there is some active and acute problem report with this > > thing, we might not have that option, but in the absence of any > > *known* issue with just simplifying things, I'd rather do that. > > > > I don't disagree with any of this. CC'ing folks working on live patch > in case they have any insights. The livepatching specific sections use the name pattern: .klp.rela.objname.section_name They are generated by a post processing of the livepatch module. The code is not upstream at the moment. It is implemented by some out-of-tree tools which are used to build the livepatches. More details can be found in Documentation/livepatch/module-elf-format.rst Best Regards, Petr