From patchwork Tue Jan 23 13:30:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 13527456 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1C4B2C47258 for ; Tue, 23 Jan 2024 13:31:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: Mime-Version:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=zyRnmHQ0QxNVtQA8UVlCMAef4jkTQOUnnNumOJbtEgg=; b=eib 50S0/OwHLutssRTW8QWvmF4Y+fXBlS3XLBcwYVPCD/RFcrMl4fzhLM2vVdNEs/MMgnwwTd9ebNX0i dErJL3/PKuypwlnqNrEuJVXGBWk5EVidXkyNPbyi4Mz5MAEnOZqa0jSlD1hUZMisvhDb+Srmh8mN8 ePHDAAob2whmFX1sBe0W+TVBb9MGMFmkJCxBytXCgfHduEMZUuFN2IXkr/0MNp5Ho4oahsYIgLl/E uOctjHiUX7YPrnw2dc4ENGmCHfwv1HLwu1cxRc3D0JcrLR5gU+S6ei9ONMnwAa90s2ZcDk5a+rI3A j5ZZB7NlGoWizUaka9yUVmcRU1y1j2w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSGrw-00Gczg-1Y; Tue, 23 Jan 2024 13:31:12 +0000 Received: from mail-yw1-x114a.google.com ([2607:f8b0:4864:20::114a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSGrp-00GctZ-2b for linux-arm-kernel@lists.infradead.org; Tue, 23 Jan 2024 13:31:11 +0000 Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-5ee22efe5eeso50549187b3.3 for ; Tue, 23 Jan 2024 05:31:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1706016662; x=1706621462; darn=lists.infradead.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=OwOGsZIfPiVfwGWa4S38dHy0I+egcyUXOrcZKFgN0is=; b=b5rEB7mmZ6VnxCxc53cuQChiLUv46CO3QXiiGo6sBFCMtESwaEe/yogj1jmVileppn 4tNPzBYdut6ANniEhiJ/6fGEOctYabi50XCs8JTt5DELfSBZ17sM7BILDzzK+zY3phGq sICE4WCRsccLiE0e5pAXGY+FO5p6C+7T+mQjPQ0qQNEwPqQlH75hvOh7bjE0USwC5S29 agW+YOrBGSFukf722U31d5F5TNga1niax3hvDSaC5GJRywtJ8v2Wdtve3BI5wz6YbQ3J trNDu8jctG0seeaytQtMhvc+d3qD+adUU7CHS8cl93TDFHQ/7CtlpHhmB7Z7VFy52OgJ NiNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706016662; x=1706621462; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=OwOGsZIfPiVfwGWa4S38dHy0I+egcyUXOrcZKFgN0is=; b=kgsCIwyuOQJIJvROrtl75k3onbafIHpq5VN0dgh0VSxVj9PkyYYWt6ZIhfD6CJ8NjS RMUzO3ELvvOaJltAjNWatP76K1TaX9e/ju5nhMFYCmLgiV7gXtq/gC5RHMTjyFZSW8Rv xHRojrUWAAsQr6dvry2d5N2xwORD3EgFmrjU/87c/UaNuZnDLtvglUCjM/+jkvp4KCjp aqSzisrpwuV1DS1Zgj++y2Hgg4JjeLNgMvZzb2PRAUOdMFShxgiewBeauYkZbYkG3FEw pnhyBRYQVWJcO/hGZfJx2/VjWnqDBfI2HA3wOXCyVxFCKoGl3GoxmOZhHlDNBGqptUVp XAUQ== X-Gm-Message-State: AOJu0YwUumToxSJQZuHrwlg6sc3ETCxAj7miNQSz2ZrMEx3z1FDBBWKU eWPWvFV/AGARccnUB6nFONpdD/mIapDVFck1KMVokz4xGcBSp03XJgFw4F6LpOiycp8GbV8EXC3 8nbVGIhXp3azx6sz0ADCxrm6mK++mF6SmA2wTsfFfZnNgtRaULXpKQHqkyjsYn+7iJ5GxgA6y+X 2b9VV9r3ElgWGPOsIdXFG3p0zGD1FWG1JSwv0eI3ZF X-Google-Smtp-Source: AGHT+IGqavjPOGcw4opBPiTQOQJ8JKgIDl+TekrcDEjnbmdbtqk+V4BDiC2ldEfY9RUrn+hAtP6ZRk8V X-Received: from palermo.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:118a]) (user=ardb job=sendgmr) by 2002:a81:5208:0:b0:5ff:ea65:3a71 with SMTP id g8-20020a815208000000b005ffea653a71mr1098137ywb.3.1706016662034; Tue, 23 Jan 2024 05:31:02 -0800 (PST) Date: Tue, 23 Jan 2024 14:30:53 +0100 Mime-Version: 1.0 X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 X-Developer-Signature: v=1; a=openpgp-sha256; l=640; i=ardb@kernel.org; h=from:subject; bh=onN4S16zcM24pdzGJCrxsblULF1WidLiiw2q4WhExhs=; b=owGbwMvMwCFmkMcZplerG8N4Wi2JIXX9/t6PmWVLZOvK9VeYPpJ+PctJx2KH3cWFaml/xdZtW 382bkt4RykLgxgHg6yYIovA7L/vdp6eKFXrPEsWZg4rE8gQBi5OAZhIxRyG/477Ti9462H6aYvX JxZ/tjNO8sfiNi3fVbv9/c0Z116bNjMwMvS/m1F99xLXo1u31RjN1hx7wHZS9b9Zj4m/j9iBC2d 2HeIGAA== X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog Message-ID: <20240123133052.1417449-4-ardb+git@google.com> Subject: [PATCH 0/2] arm64: Fix for dynamic SCS under full LTO take #2 From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Cc: will@kernel.org, catalin.marinas@arm.com, mark.rutland@arm.com, Ard Biesheuvel , Sami Tolvanen , Kees Cook X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240123_053105_886413_C76B8651 X-CRM114-Status: UNSURE ( 9.17 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Ard Biesheuvel Disabling unwind table generation turns out not to fix the issue with full LTO and dynamic shadow call stack, as reported by Sami. So instead, disable LTO for the compilation unit in question. Implemented as a revert + new patch so that only the real fix needs to go to -stable. Cc: Sami Tolvanen Cc: Kees Cook Ard Biesheuvel (2): arm64: Revert "scs: Work around full LTO issue with dynamic SCS" arm64: scs: Disable LTO for SCS patching code arch/arm64/kernel/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Sami Tolvanen Tested-by: Sami Tolvanen Reviewed-by: Kees Cook