Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3915748rwb; Tue, 8 Nov 2022 09:45:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf47MuDEtMeTeaDdF7tnDpYoTrXmm7WGBzZd648ozZ1krf3ug0NDeR00r5M4NLkdVBNcDrvN X-Received: by 2002:a17:906:3c01:b0:7ae:77c0:556a with SMTP id h1-20020a1709063c0100b007ae77c0556amr6058932ejg.2.1667929501318; Tue, 08 Nov 2022 09:45:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667929501; cv=none; d=google.com; s=arc-20160816; b=IRW3K8MonaaNJaWTFfMqscDrP39zcDjb4jBgNLvdknw/AISvwyhUlD+RSYfTBFNula dMdmG3AtuOFIysZVDMR3HSP9Kpd3lQhE0vb9xPwsD0aWvOZx6VW/zOa8L0ThHwhTy13D SMFyge/78pZ6hRm08hY8QzCLdfUFRv/8s6JG2VLPBQrPuKhS+p8+tUINlJ7PrSwosOTw OL2t2FFnRq3pH49YgZqEl5GN6Bv/POBphYJpiGo/hy91DXxvA2at+kaW1t7oVxk3gZe0 8Ld0R/ffd1IaZTN4uo0w79xfmZOgZL6OsXBPOOapyjJCaU+IR3KMy8cjgj41BlIYxBBj qMdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fK9ZOq28H+fM7m16NfEd45BIkrILXmxWP6UHBlAc2sY=; b=JtXWQ803199r00uSNJ616imxn590lQy746iAow9Q1G5vxa+mcQBDKLK8OFnEOQfJlc y3LJHcn6JCM3bfFqN3l5Qz0HD9Ba0FHRY2bO0t8Fx3FHv3DRvkOSRr0XXfwXxp51/g0I +1yWp70pLU1FPuSkw8ysu9NU6a4sLUR+5mz5kQTrjKiM/H0RAaS5OyrSYL+BaTyMGpIX ncTJsvoc4G+is6PALiw8JGLhSci1JM6a/IAm2zv+kc3bInT75z4wxUXj1oXlPpg4gnIm O2XfmRDepTXaIqoIdEZJRO031MXo7lmuo702c3lZs0U7lYVTml1kmXpbv9uBAVzDPWEq e2Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SSSt7S5a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g12-20020a056402090c00b0045c786162f5si16884604edz.567.2022.11.08.09.44.39; Tue, 08 Nov 2022 09:45:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SSSt7S5a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S234561AbiKHRjF (ORCPT + 91 others); Tue, 8 Nov 2022 12:39:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233945AbiKHRjD (ORCPT ); Tue, 8 Nov 2022 12:39:03 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AAB751C12 for ; Tue, 8 Nov 2022 09:39:02 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 34797B81BE5 for ; Tue, 8 Nov 2022 17:39:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80979C433D6; Tue, 8 Nov 2022 17:38:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667929139; bh=mqfsf17//0/isn+/08NYUF61MiAk4w+15OSNUwJdrUk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SSSt7S5aOsKgn8a1phdxK9wMKdROSc9snNrfjs6YLlf0r0U9Jo/JI/zCASw4bPQC6 HIVDlaEY5lfcy3z5c2g20JrxjzDEUj02IGNd7sh1OQIR2PKLEzVTYewH20Su0Ipgb4 l+CLCjQl9Q8xdtJQnNgGyJqsxggsSXpXGJXIPjWnROHP/9HlMh0ian7hfBbQFlHSSf 8Yn6obn6PgplH113YSsRlpTrfeM1yet0bc/EgKBmtS7rWuWrIo/dUH0t6jQLEZTGZv MepqA48AdfIQpMlTIsF6F4tZZHVqqH1qAJMREV4ljaQHXRZcX7ITr2DUbOIrbctz52 ZKfmUFEASUyMw== From: Will Deacon To: linux-arm-kernel@lists.infradead.org, Ard Biesheuvel Cc: catalin.marinas@arm.com, kernel-team@android.com, Will Deacon , Mark Rutland , Eric Biggers , "Jason A . Donenfeld" , Adam Langley , Marc Zyngier , Suzuki K Poulose , Kees Cook , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] arm64: Enable data independent timing (DIT) in the kernel Date: Tue, 8 Nov 2022 17:38:39 +0000 Message-Id: <166791912755.763730.5286516806941074687.b4-ty@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20221107172400.1851434-1-ardb@kernel.org> References: <20221107172400.1851434-1-ardb@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 7 Nov 2022 18:24:00 +0100, Ard Biesheuvel wrote: > The ARM architecture revision v8.4 introduces a data independent timing > control (DIT) which can be set at any exception level, and instructs the > CPU to avoid optimizations that may result in a correlation between the > execution time of certain instructions and the value of the data they > operate on. > > The DIT bit is part of PSTATE, and is therefore context switched as > usual, given that it becomes part of the saved program state (SPSR) when > taking an exception. We have also defined a hwcap for DIT, and so user > space can discover already whether or nor DIT is available. This means > that, as far as user space is concerned, DIT is wired up and fully > functional. > > [...] Applied to arm64 (for-next/cpufeature), thanks! [1/1] arm64: Enable data independent timing (DIT) in the kernel https://git.kernel.org/arm64/c/01ab991fc0ee Cheers, -- Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev