Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp151641pxb; Thu, 21 Jan 2021 03:52:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJx2Pk/Oyf5YYKHQxgK8UpMiZpwSzysI0coyxrjAIGNTQ0w9wlqJ4Uy/BoOpFLE8wOP230EB X-Received: by 2002:a50:d888:: with SMTP id p8mr11010558edj.147.1611229920378; Thu, 21 Jan 2021 03:52:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611229920; cv=none; d=google.com; s=arc-20160816; b=jyiiAaIWgYSlJZ6a+zobMAQvONpPnl0/W5EL2rrzVy0Xe7evf5UGG8v/Y+5GyT34fA +q6bL4NyGjuM4+xwzPi+UxUiFRpp0Qe3fP/R/PVPZ5NejWCHFa20vUo+Fwt/O/H61P+o fTtQy1yz06lUN/PUMSR8A6q26IBqwiwkPbuLrTJKTC42532BHgkB5A9GXGKoPgt2I4rN Ltl1/zGExfYlGunF36I1eDUrhcUNA7sYJAKL6sGYp3Hs1Gr9wXmSuCSnC6k3XJSaxY8E we4lldJCWblWE9mow2np9e55n6B1Cqq1nxb5qg0TnBDBg3PHmfKugJ8QzXQnfBrFQ1Y4 d/3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=4LoYAC73s65Y5H0iYwUuGzJLofq3OtSrbEyyV4z/Kog=; b=TiWSwvHa+pGe8Z3oUmcIY0AqsIxJcdqDg+aRSPNGonCFb3Fb25t8Tc0diKIijSKsIz vfLUffm3+5ZvCXmG3bds3/+mUhRZbhsf8xHP4JzR8KKtazvM9FbernAHKSjB3sdcOESf Fim2GeL28GfbMalBtigjUfoEsJdmImyGIJMfV85Z7LhRqa83M3dWhVjyCcHjdbAsisRA hf+x+ExyLCLVMBx8v65T3gjlJZZXuFOPU5axF4KMImmkkbBcivuuOrjDoPiEiw+4pwaO bx1dxub5sLe2+MPBmGi8noREcQNIX+A7dEesDguLfY0myXce+/aT2yBLILac8tczJSwt Zo3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oBpyGboZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k13si1698640ejv.559.2021.01.21.03.51.36; Thu, 21 Jan 2021 03:52:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oBpyGboZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729707AbhAULuu (ORCPT + 99 others); Thu, 21 Jan 2021 06:50:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:48620 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729951AbhAULtl (ORCPT ); Thu, 21 Jan 2021 06:49:41 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 90D07239D3; Thu, 21 Jan 2021 11:48:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611229735; bh=4LoYAC73s65Y5H0iYwUuGzJLofq3OtSrbEyyV4z/Kog=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=oBpyGboZuZUjl523dwPWQwgTBZSYXSYF7piXJkDfjOhUnVt0mpF8tpsy6IyLDmxlw qEEdYZQyh7zk9SiuMR9gAne8ettknwKIH/ju5oblc2y0c8cPAUbRYfRSGNlkO0j1m5 2FEsgxre++Ar5NxlVBxnqODtLjLTLhKARflHZfGoN/TgbXUdsYgKdTh45LAroo4mZ1 KrNgaP/zIEMCm4OYGIAbJrPzRzEjpubHHEu8KTitI8Y9Di8C5W4rZvaOFat+emLEP9 CFszvu3uSFjl4ka4jogtXmDQEiwwvM0XQJx+6s9dFEcoSFPXRNu8TODLF5zOVsnT1c Zv/hYiVOlhZrQ== Received: by mail-ot1-f45.google.com with SMTP id 36so1322264otp.2; Thu, 21 Jan 2021 03:48:55 -0800 (PST) X-Gm-Message-State: AOAM533gRuAtpuHrz4A9DAiBfvMD331Nq3NGfb4Thi7F7IcWhzt4L/Er qpo8xB4FjnfFhXyjNReCt/fa7uaOM+Ud7cl8VU8= X-Received: by 2002:a05:6830:1e2a:: with SMTP id t10mr4636246otr.90.1611229734707; Thu, 21 Jan 2021 03:48:54 -0800 (PST) MIME-Version: 1.0 References: <20210120173800.1660730-1-jthierry@redhat.com> <186bb660-6e70-6bbf-4e96-1894799c79ce@redhat.com> In-Reply-To: From: Ard Biesheuvel Date: Thu, 21 Jan 2021 12:48:43 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 00/17] objtool: add base support for arm64 To: Peter Zijlstra Cc: Julien Thierry , Linux Kernel Mailing List , Linux ARM , Catalin Marinas , Will Deacon , Masahiro Yamada , Kees Cook , Michal Marek , Josh Poimboeuf , Mark Rutland , Mark Brown , linux-efi , linux-hardening@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 21 Jan 2021 at 12:23, Peter Zijlstra wrote: > > On Thu, Jan 21, 2021 at 12:08:23PM +0100, Ard Biesheuvel wrote: > > On Thu, 21 Jan 2021 at 11:26, Julien Thierry wrote: > > > > I'm not familiar with toolcahin code models, but would this approach be > > > able to validate assembly code (either inline or in assembly files?) > > > > > > > No, it would not. But those files are part of the code base, and can > > be reviewed and audited. > > x86 has a long history if failing at exactly that. That's a fair point. But on the flip side, maintaining objtool does not look like it has been a walk in the park either. What i am especially concerned about is things like 3193c0836f20, where we actually have to disable certain compiler optimizations because they interfere with objtool's ability to understand the resulting object code. Correctness and performance are challenging enough as requirements for generated code. Mind you, I am not saying it is not worth it *for x86*, where there is a lot of other stuff going on. But on arm64, we don't care about ORC, about -fomit-frame-pointer, about retpolines or about any of the other things objtool enables. On arm64, all it currently seems to provide is a way to capture the call stack accurately, and given that it needs a GCC plugin for this (which needs to be maintained as well, which is non-trivial, and also bars us from using objtool with Clang builds), my current position is simply that opening this can of worms at this point is just not worth it.