From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5EE163B8BA1 for ; Wed, 8 Apr 2026 12:01:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775649689; cv=none; b=eoDI27USyVunnRw+OWjUUQHumk62y7r8E5EZWyTTnoE9LXujP73VgppXQeqfdLHmULD0dTPK3OEI9ZPIykeXswzHHABE7IWtkh9PMVHciHV3ubBVYWAl5BzmrgIvn49kVrl7iAp1XW4HbN5iXo1LYa7eM2Ycwo3grcgSdxp4UF0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775649689; c=relaxed/simple; bh=PzatjEcZlLC3CcDcYK4EkHdylp+3GX2xwB7sKedV6bQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=kwe5bQQNHiUI+f0LaHKlMGOaoqS8LY68NW2YrO61ydiHumqcqcWZDh+YgHEYCQdvPzrWtAiWEqyKJv97tvdA3Sr8ceiJkBWrzsRQEfo5G2BrXtwkJlc5Nogkb5edjAZuv2rhB5HqW+eQPFayVkznh1CltcArY50mYsC16TCgMhc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=GK9SuwRH; arc=none smtp.client-ip=209.85.221.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GK9SuwRH" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-43d23305225so4708233f8f.2 for ; Wed, 08 Apr 2026 05:01:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775649686; x=1776254486; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=SKiBpbWpbld374A9r2Q0cE5hUF5hr9IGEQUkT2cfnOs=; b=GK9SuwRHFaRsbWe3swWibBslkMKHLI0MPum9cMMYMk9mX3yFW/+aIn64fNulhczjoV QwLAWiBYeSooVSgIVww8Dv4kWWOdYJ7QGbBKzi4PzU9vFBoE54u9il5NOVM/YiL2ep9a 2vRKL71kg0Y5pDrRel+t067NabozVywSrIV8zEWW87WP/IRdW4h+h63OynEymFGuMkA9 a1bM8G3DetSVy1CH0z6cwmGAeVI+YLMlld2rSv2moGlvw/hrCNk2p4yDqBVVaeoQgsLI dWlKdYatk8n+R1TFuGM7KBkjujVTSjhjZSHp/QMUpbcVDvIRP0sVe4d83otEXqGJJvpO x0EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775649686; x=1776254486; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SKiBpbWpbld374A9r2Q0cE5hUF5hr9IGEQUkT2cfnOs=; b=tVm3Lo0g7NIAWwG2OloqcltWNSkydTp+Pf8XeaYORhUrNRRVdJ9WGVzvDY3UltBJnT z1BvZPapdK3kuP6zqBTgFCjcTuMmtwZkXAsouwbzNNJXRN9D1nDtSRRmpHaVVtpJNo3Q tq/1EGSLcignnK5DD1OBteSj6At1Si4zmbhtVQSrWxc/N378q8ERZuASkgzXSM1MV0KA mtzEXEKmmrHIvkDOht65nIYUwB1Ia/0QXea5x1JVvP9HbErlfYd4aLMokbdL8/R110wm vrKoqHR9/BlaNbvhxO8DmlwwnsAID3kFVqbLrwz0TP6gAj2G583w+kmWOnDKBH3q1Fvk Hr5A== X-Forwarded-Encrypted: i=1; AJvYcCUgfoT9p1WfLlrzItzdfRvQ8nI51wbr2uNSJEyuo11ywA0J/jLP7tIWNV5/iw3NLdDjVxn67fXUZse+IAspG8nI@vger.kernel.org X-Gm-Message-State: AOJu0YxKKAWkb0wD3tYOG+8X1zydrHcGUsBc9GcJBOH2ppgYBpllW91u l76y25m4p7J06XsVmzZruuAxwWEsFRuwQz5PVufTLhhVYpcFmUAprI5/UFmyGh21BwT6g40H X-Gm-Gg: AeBDiesqk7K7kISHzgDRpctz3vEcCLyM34zLWU1Gv9Ior7+69LS5H7hzaMwwU2dmWyl io4EQKO+Ie6848pTFAAD8NhLP2whg/BEPv7cCGUXbbBKRiHf3KtJjuuTgCUrNIVhBwDlvGUIXOd /a4PeqntmWroKA+ybLDPa6ucEE8+fMzYCz0b4I2+29Nd9OaIsJ2MbveHQDb8MXLPzhV8Xz/ZSdA jvoXufneg9A95f/fpBocQ5+Ec/koG+k3vUTnm4elbVhwrTU1SmFR0Fy6w/LE1GARc73moXntp8R 2HD6+S6hgT8otHoHhrPYw7ahZN8xWHy6pNX82yZxJK48xd73P+4ukKsMb4XGOkLfGS1mR4w2cF/ 9NHQeJgcTU9cCb7joXN/PKZs7NdCSbAYhXUFNMwD3DsLbrm6yzVaTVFG0KpYVr7S8hx+kOz085l e1BF40ah7IgZq6+MYAfzXMIyfHGdQ1c5FvMTnsgXzTiv90t2ISkx9Qa1Nav+ieQVct X-Received: by 2002:a05:6000:400e:b0:43b:86ce:27a1 with SMTP id ffacd0b85a97d-43d29277093mr28647541f8f.17.1775649685383; Wed, 08 Apr 2026 05:01:25 -0700 (PDT) Received: from [192.168.50.24] (host-2-100-232-239.as13285.net. [2.100.232.239]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43d1e4f843dsm56100255f8f.37.2026.04.08.05.01.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Apr 2026 05:01:24 -0700 (PDT) Message-ID: <2b848d54-c265-4675-91bd-a84fb2719b00@gmail.com> Date: Wed, 8 Apr 2026 13:01:24 +0100 Precedence: bulk X-Mailing-List: linux-toolchains@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] x86/boot: Discard .interp sections To: Borislav Petkov , Segher Boessenkool Cc: Michael Matz , tglx@kernel.org, mingo@redhat.com, linux-kernel@vger.kernel.org, x86@kernel.org, linux-toolchains@vger.kernel.org References: <20260407233957.2263551-1-lehoangnamtep@gmail.com> <20260408095202.GAadYlQtQvNJ5WXFDn@fat_crate.local> <20260408100944.GBadYpaB8WLl78FamY@fat_crate.local> Content-Language: en-US From: Nam Le In-Reply-To: <20260408100944.GBadYpaB8WLl78FamY@fat_crate.local> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 08/04/2026 11:09, Borislav Petkov wrote: > On Wed, Apr 08, 2026 at 04:58:08AM -0500, Segher Boessenkool wrote: >> On Wed, Apr 08, 2026 at 11:52:02AM +0200, Borislav Petkov wrote: >>> Sounds to me like you're shooting yourself in the foot on purpose: >> >> And no matter what this needs to add a comment there saying this is to >> work around, hrm, imperfections in LLVM! So that people who hit >> problems here later have something to start with. > > Right, I see --dynamic-linker=file in ld.bfd too. Why isn't that one slapping > a section too? > > :-) > I am not sure why ld.bfd doesn't add the section in, but it seems the LLVM maintainers have no plans of making ld.lld behave the same as ld.bfd according to the comments made here: Link: https://github.com/llvm/llvm-project/issues/78873#issuecomment-1902794108 > Sounds to me like you're shooting yourself in the foot on purpose: > > --dynamic-linker=value > Specify the dynamic linker to be used for a dynamically linked executable. > This is recorded in an ELF segment of type PT_INTERP. > > So don't do that then. Normally I would never add this flag, but some package manager (specifically Nix) adds --dynamic-linker as a default when building any applications. Ideally this should be a fix on LLVM's side of things since its a pretty significant difference in behavior between ld.lld and ld.bfd, but for the meantime I believe this is a minimal enough change to fix the issue. > And no matter what this needs to add a comment there saying this is to > work around, hrm, imperfections in LLVM! So that people who hit > problems here later have something to start with. Thank you for the advice! Should I add a comment and submit a v2 patch for the change?