From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (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 5BB4C38B153 for ; Wed, 8 Apr 2026 12:01:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775649688; cv=none; b=JLig5x8Zgc/+dQy+ZNLoxutJ7UW6t40C7uapZtlUk6pRyAAgxk+Bg0zVkrPOehhFuQai2Kwx4Et9i225WL6CNyzTH7oMrhOWcdhmpKf4hyXHXUsV3FKelAH3Yujc0IKAcw/LG0+bWbr6Hh9+JneraJVFn1zNv+7rVi0gZdharN4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775649688; c=relaxed/simple; bh=PzatjEcZlLC3CcDcYK4EkHdylp+3GX2xwB7sKedV6bQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=rZIz+QwJ/xISgfUr/4eJMK5MCv3NXsUha9JxCU9QgVDbUVY1RApSEcmyQZsBsOlVefjTrCEuEDmhQVX/5WFfV95dhcOuXSnUGRCGijkyXDsqBY6nBKtqI6cBM2czf8KREljDZfGcpCfedslFiYb2phr5ZpCardZT7ANK0laRzZI= 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.50 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-f50.google.com with SMTP id ffacd0b85a97d-43cff5dafc3so5315869f8f.1 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=SWy5Dh7HG4aq5Qgj+XVyR9SdXgWlnIT0xjGf8VByCN8FfUy2fOnsHzvlK04XcPhlwN kh5uj36JHvkr94DMl4oe8sEuMfCXxmgxzWx4dKaO4xfDb/jOcc1RJPXA1ZAdz/hd6V2c 8z45TG64apGoDcE1+VsJLtA1CbVtEwo1RUj01Vh/l5fUL8XF0fCdhQhFU4E2uMdbyyfQ 07k09+VAh5Bj10sEAIYYX5uk4ISHzG6m5PqlZOiK0bQq4rwKCtuasuA9xuHo2/WQcFmf FbKCzXdGHpz+8mrAInFsfir7y/2j4Qy96PbCf7kflV5i4asz1tKx9LMOMR9bAjaK+Dsn bVVw== X-Forwarded-Encrypted: i=1; AJvYcCVYEOZqVCiSVrsR3nypOs7W0RjahwqDq523dF+j0ngz9e01ACdceosXxRaozzapvNHnuDuK0aHWuuBpe2E=@vger.kernel.org X-Gm-Message-State: AOJu0Yy2TX5nU/7VxDtpCdvHbY03s22crBHYkmWsQu11Q+cZRX7bXQck u3mz5WLVb3sjckVZsOfJveFHhdwYpZxJwveOoD3AR2O1gM9BvQKXkxpV X-Gm-Gg: AeBDievO/G3TQB8GtUtEPtFRW+00ETIbmhX4rKioe14psG+BYfbCAmTu1hekZdWaH0Q RfVUgZi15eKJyIBWSJlpHx/xrzN/ETz3HAywDXm4qy+HKesU50euhdceAydXkqL5LYnXkhoh4F6 DUI1rufxcBVHNaIq70XrVdCrlc8Kn/bVtTzWEw/JWA/Ghn9Z2vhlmMFR+Q992PmuN2wUY3dpmNb yGXWg0apzfLRABEu3HMz90x07qF7YvLO1y1Jkd40ZzU7/ze5/Sc8vnycdN8fb7eH5aD1zLePehM 6Ov0jDYEW6Gn2E0Tz8tINAUsvq2WO5xlPEhdC6fx6lJp8wUrf90JErMi20kpiamiZBzcgZH1Ec/ +oYl6nSrypoRw3diqP6YdydHeEXACowQBbMsy3v1MshBscoMEOo4OV6CDxU8nHf4KjqFSFR4XF5 6e4ud+P3I6BWebUIqGnUFpuH65vN5mRI3aWjb58eL4GO1AwVTMZIRiTBWyGEG+3Rco 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-kernel@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?