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 89F6DD18138 for ; Mon, 14 Oct 2024 18:19:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 107D36B0083; Mon, 14 Oct 2024 14:19:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0B89A6B0088; Mon, 14 Oct 2024 14:19:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EC1B36B0089; Mon, 14 Oct 2024 14:19:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id C6FAA6B0083 for ; Mon, 14 Oct 2024 14:19:49 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id A28B61C6166 for ; Mon, 14 Oct 2024 18:19:40 +0000 (UTC) X-FDA: 82673021214.02.85E2789 Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf08.hostedemail.com (Postfix) with ESMTP id 27E60160020 for ; Mon, 14 Oct 2024 18:19:42 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=KLQJMeWZ; spf=pass (imf08.hostedemail.com: domain of ardb@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=ardb@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728929941; 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=jZ6+c4OUeG4GMqDdXR7JFDD0zXrcha4TUJ2wZNwkJJc=; b=QCBOdTy2cywP8HtSzWShHORD/w+2DWn/HCaxLzVlVxxqUkIWp/dRBc7bG0j0ZkPxHEEV/F PtqIc1hCda1lBvhoQTmYqo4jY1NpCDG9CxNBZ1HBGWR6S24bbwnuhdDSw47m9bU+ZjnL22 XWzKN8yj/+lC3i5U0N8ujfBdqajlH1E= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=KLQJMeWZ; spf=pass (imf08.hostedemail.com: domain of ardb@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=ardb@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1728929941; a=rsa-sha256; cv=none; b=8Wf2eA1Ksm3ivKktb2nhmMEm91KxL0HGgEYd5LE7nAwyyKbdQfY954Ra0kyuMATnzpdjua 9j3dvnwi/QkFDt+TF2d8oXmcIi/7N2rJyNw8q1BfAlMK4AE0hppAMEfoOdUar6M/F9cter 8bPTTxtSyVOL52gX2kRt/MP6eC5zUhY= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 01653A426B9 for ; Mon, 14 Oct 2024 18:19:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40E7DC4AF0B for ; Mon, 14 Oct 2024 18:19:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728929986; bh=TxUCyeeMRm5Ud8o4aIEwmIXkL6gZ6PeV1NLiBEmUvIE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=KLQJMeWZmBRBilWM3CeyUn/o79CkeC+YNNkqYV6767Kb4j9xQPqBjuFD+FHkt1ONx dBAMMWU21EVqxgXI93HwT7HhfdtHAr1dl6pn/QW2L2n0EIL2zEnLAb3MTpol1i+jqF vmT//qe6x6hGxBxZUkKMgSAIU+IpKCw8gICfLuR6OPJnKf7sbkzb/eibObPhc8Wcp3 69x48BnXxHPUbuSDgnqo/t7ltAEatLU6MeRXko5mbq2AsQSQneMqEPhM+tYL0dyFWg 0lVe6PN+Pm7YubNvB2FLn4eq/qc4sDi2sXYk+w16AAlOXF4HVJjXNFYdDce4hsVb/P aydqcMyjLGqBQ== Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-539e63c8678so2154033e87.0 for ; Mon, 14 Oct 2024 11:19:46 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCWSyDsjRksZTHNoHDIZWDOKWSGQwwyguF5Aru8qAswBwwdc0NjCd6QXUoe0IjRhnT8XwQ5lj5d3Yw==@kvack.org X-Gm-Message-State: AOJu0Yx4kVZp/drPkcPPI/acpZQ/0rIbZ48qQw+90l611sM4sr4so17L 4xxt7Sg4hdKkTXnG3UT/69wzhKF8nawMrcA9daw7KoNHPm9A09NhO4xV3f79K487DjLj3/bJwS5 +r6q/7U/+IJPOMxPihMdmi9+3FLQ= X-Google-Smtp-Source: AGHT+IFalTDh2wE6xZEIhn9mgV3+/I7S44kAaMJvf18IdkYh70pwRaujyo7n88yZg0/BpxXhbx5ooo6luSKvrxdRAog= X-Received: by 2002:a05:6512:3d15:b0:534:3cdc:dbfe with SMTP id 2adb3069b0e04-539e55142d5mr4375599e87.28.1728929984515; Mon, 14 Oct 2024 11:19:44 -0700 (PDT) MIME-Version: 1.0 References: <20241014125703.2287936-4-ardb+git@google.com> In-Reply-To: From: Ard Biesheuvel Date: Mon, 14 Oct 2024 20:19:32 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/2] Use dot prefixes for section names To: Linus Torvalds , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek Cc: 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 Content-Type: text/plain; charset="UTF-8" X-Rspam-User: X-Stat-Signature: 1gzawybpihfp694auds8k96te9jz8sha X-Rspamd-Queue-Id: 27E60160020 X-Rspamd-Server: rspam11 X-HE-Tag: 1728929982-936554 X-HE-Meta: U2FsdGVkX181SPEDCxzrpnMMu7JPIeqoywQgtah10RTp2ohz4mWhf0JeA0pCcS7YgUg7OkOitAw3kvo6R1wEwH/HGBRXaJ8J5r7eLuJXkew0Bt8PrO5CBK3Z3DU5ILAlI43vcbk9Ynm16fK3ek1o14o2xXHn43YDyU71bqk6UqA0th9wLtsAshRwjspwbAOX/dgMBBiXTX+3yHkywhnDBDn0k6WS79GrNFtiB8/cojWcloG3ZwkmlDQlg+tUrIe1rKiZrwiGsR/n1UHXsdBmrFxZXz7VVpxWFbe4WO8/UX+fhSO/LbqRlvoSQW/hhy3f8Y46MqlTo5kycv/F0gLeaB/pAi9/tF5GfGOHxcmDiOqr1eCkFA8jKdb2LxjuYU/UNU2EwDhdI5JBhFwlHpkRMOcHPfD6OZevAM/2N1U/NvGO/l7+jDH+31ohWTXhmgYhvmHX9ScJpe1TAXMolNQcThbk8nlHg5lre1JQkZ0k0bx+WQ7jnhbVONvhruNqgEiZxZoI+dF46hxSDlA4TZKIUPcI5GfUWesCMcLG2dlEe6+WrpdqhgBxDit8FcXh8b+Lb3ILFj9oZJ0Y05Zk6Ozo8fiQCljBKq3aLxb7sql9hTqsI01NBIzhtBU3X0chotItyaRB3mkW/NcH5fOPIKXw3yxfGWdQfwBgcRhu+lHYG1DfTu5MfqKOzMlal10OLJQyfoOtWEsDlSApdn1ogfFOlfMjqxDDROj+/4od0C4aEykf9m4zfTNbc9sFfRVRZKioeZK3DNmsnL0iLv2JunJLYSPHmHU/sT8Y4mAIQDY65Ult/1XgHgBC8TZEDYZaqL2QSPM768Qe5nSQJI5grqXa5jcJ7NJD54i7S+SwMgCDj8SKUI2qTlWiaOCbAlzP2L4xUJDCHtU6jfWsT9AuUzFzvFEvAH0JPnh9yqPyBGDlh76Jo3wqTvzNMlcHxUzPLRRZprzyPU+ZGcu7bHz+Zrr Zdbgx3k+ 41H/jfOuFSZl1QMEMJXG6eAZxkyjwKrL8xMzhpgihTSRJSCSjT8Y1cWjkbfdPYXOlHQi/kOvMRYKD1I5X+2HzrMyzWZjGf8j3n3fpXebXBWXJ2rB3gtzfNW0CfcDABsFLLuIpPos31ueeanyzjf9vkVCwsQjPG7gCDqksSWnKp+PzDupv1SE88WdBpLGmyNjcQVDOZDAF9U0Wd2f6rA25fedzwSZRde8isI2sGIscuZem/FRAo9b9asAjox2tZowc5Qi5AomxuJFYxkxO+ycBQbLYDBwhf+73S9HD0BuCLDiIfwJWcodQb6xVLcN5niOxbQaevyKLEHU1pFa+wYWMOtXV6wIm7gUEd16caccw67U9Sfo0c9WvD7EPh+RCL1znO90UoApwAyRIZqDR6tT4poTvYn0It0WCjSkfdG7grOZDGOOKUxLw1rxqpHLj6V1nfJGEHLCun7znUSjsqCxyLUkknA== 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, 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. Full thread here: https://lore.kernel.org/all/20241014125703.2287936-4-ardb+git@google.com/