From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f73.google.com (mail-wr1-f73.google.com [209.85.221.73]) (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 D314D1FCFD6 for ; Mon, 27 Jan 2025 11:43:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737978230; cv=none; b=PJbiMAGlPsyIz45AA8JjGTlfJTaZ8l0hM4roklc0dhPD4SsrfZjtx0I6MaWosBRQL9c8upQdPrJoFNQlg2FBCRQY0n4RntAJJ+JFHK3ha40VeZ3svfUiSN+nL5TOfH4Zb0FQ647a0kVn1XZ5l0ThINe874OxpYZMxyqqQ9xp/Ho= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737978230; c=relaxed/simple; bh=CZujJ8P2vjtWwzTI7/a1tHhmO9qgKfgYMDT2aWLraPg=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=cDvSHu1m2FhQfT53iyr/ENOEPEQG2ovWuj43MFiX8JfbLgXFnPtGdmzBul/lT7AeK7W/lIh6aOMnLdIgiKZxRFRpGM/N7StB5SaF+vkFYgC5Co6vxGsRwikHusWu3LGMx1QobyG4hMl5NICF4rdgdiLSIh+LQTTn9QA4Ux+K0Fc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--ardb.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=tk4lIjG/; arc=none smtp.client-ip=209.85.221.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--ardb.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="tk4lIjG/" Received: by mail-wr1-f73.google.com with SMTP id ffacd0b85a97d-3862c67763dso1516332f8f.3 for ; Mon, 27 Jan 2025 03:43:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1737978227; x=1738583027; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=pQgEzW5IOOH2uDl6lbI/5dJWaEmaRZ0HGdWO4mevwC0=; b=tk4lIjG/YVr6fEVp8IxRX2GHZ/roTdkJ1wYCJ4YIdicDjCAs+eDQ5FHJqK4lOerctg HnqESbEvwL+vnR1v/+ZuLAIpMMRRopkMuUOj+iW/coPNS4WwCWVFB4PA6Hz5mpQpKauy Q5Zyj6EcWK3t83nofUqG5BLWmLb/GRBcVwTOQTULrXI7TkqVRDVMeVALJ1poEU/YbhPT Yu3sNyt+EZBIZG/p4zyVaf002dHDNg1SQeMpoxUsqP1grwbsXHeSSV8pGKIm8F8lccQO ii8X4SMNl7PSWNjID/ySKszn2Esqu0hqLnkMAGDoKlnTiLTnemGKc92hSqAkouYQrQk9 Vpzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737978227; x=1738583027; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=pQgEzW5IOOH2uDl6lbI/5dJWaEmaRZ0HGdWO4mevwC0=; b=vY+ZmXYnimtJ7JL/6AIQPdwaRnmVrksW1QB9JYlijvYDD2QRPWNBSHYLhylq56jRV4 7eHRcwM5kCW9dagf/HkpGcCN+SNwKoroavbfq5/IGcSA6TxYNZdyABPi7MGJYrn7Ry66 Nn3l+MBdMzpXhRRtfdgBPEsjwoAucdtf2ijUqxGZj1lq+vbmGkA0fBE3KpJzPRheRwmL kx1i1VHD7qMrCo9Ov+scVmFeFhYfh9Ptmq49ilCyIhw2oV54WNpi0dYGDJyjXt1FFVbF nHQp3gKufrvhiFX4vXrHe7ShDnt+xxeqVvwUyqXYul3Z5wUMgzMR1EFouuMeudBMNunA 3geg== X-Gm-Message-State: AOJu0Yy3NBJVmE8kOnlA7E2BkRF2qrYGIH5zZhnR1MeS5lGHbNTXRAo3 NeQPJSAAqjSSDkzONQvY8hS7buKBY565f5es7GeDdmbEDjqA2ZjwmFzPV77lrL/fGh2C3eidAd1 oJ88+TTkCRxLlu/afM1Hdgmi/Zf3SrA6x7/iI5jrZMt2ZPx2bQfE0VLhFVBBmWbmLbFp7UHKqmp 2hmx6twwIgLTNEvg7owilTbAsOsnux8Q== X-Google-Smtp-Source: AGHT+IFz57d/h2tVV4Kq5Q7r1s5JKPU1aFi0fI0/qwH0FAf4O6UZU1yitbazHYlad1lAqQHoX0LOV+Pe X-Received: from wmsj14.prod.google.com ([2002:a05:600c:1c0e:b0:434:a050:ddcf]) (user=ardb job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:1bca:b0:386:4a0d:bb21 with SMTP id ffacd0b85a97d-38bf5663c0emr26549017f8f.22.1737978227317; Mon, 27 Jan 2025 03:43:47 -0800 (PST) Date: Mon, 27 Jan 2025 12:43:35 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 X-Developer-Signature: v=1; a=openpgp-sha256; l=1335; i=ardb@kernel.org; h=from:subject; bh=FsAmZTJHrcMxIWd827b7rwfzg3KT5WQAJ0gGkZGA5yA=; b=owGbwMvMwCFmkMcZplerG8N4Wi2JIX16YfoaJtbrP/iD6y61eJ9+PvHYo0938g+odnaYz3E9e 2OD+D+XjlIWBjEOBlkxRRaB2X/f7Tw9UarWeZYszBxWJpAhDFycAjCR1AaG/yWvnixgdRWbYMtj VPBwxZkTUt0ajSzvT7zQ/XHwtHbZtjUMfwUenrLT/2L8fM3cu/mHHni8Fn5ouuR+kBZr4ckZe5f UHOQGAA== X-Mailer: git-send-email 2.48.1.262.g85cc9f2d1e-goog Message-ID: <20250127114334.1045857-4-ardb+git@google.com> Subject: [RFC PATCH 0/2] Fix more head.text bugs and improve diagnostic From: Ard Biesheuvel To: linux-kernel@vger.kernel.org Cc: x86@kernel.org, Ard Biesheuvel , Ingo Molnar , Linus Torvalds , Tom Lendacky , Nathan Chancellor Content-Type: text/plain; charset="UTF-8" From: Ard Biesheuvel Linus reports [0] a build issue when using clang, using a config that presumably has IBT and retpolines disabled. In this case, the following diagnostic is emitted. Absolute reference to symbol '.rodata' not permitted in .head.text As Linus explains, this message is not very helpful to the unsuspecting developer, as it does not really pin down the culprit. So improve this by adding the addend and the offset to the error message, and demote it to a warning so the build can complete. This also works around the unhelpful deleting of vmlinux by make when this condition triggers. Then, fix the actual issue being reported here, which is a true positive and indicates that the resulting build is fatally broken on SEV-SNP. [0] https://lore.kernel.org/all/CAHk-=wj7k9nvJn6cpa3-5Ciwn2RGyE605BMkjWE4MqnvC9E92A@mail.gmail.com/ Cc: Ingo Molnar Cc: Linus Torvalds Cc: Tom Lendacky Cc: Nathan Chancellor Ard Biesheuvel (2): x86/relocs: Improve diagnostic for rejected absolute references x86/sev: Disable jump tables in SEV startup code arch/x86/coco/sev/Makefile | 4 ++++ arch/x86/tools/relocs.c | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) -- 2.48.1.262.g85cc9f2d1e-goog