From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5792C433EF for ; Mon, 11 Oct 2021 17:24:53 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 75D5960E74 for ; Mon, 11 Oct 2021 17:24:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 75D5960E74 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=edPkv5PGcrGdurliIlYHt2zLaEoH46fKxyMl/oK0KMY=; b=pPImVjoRfCyUu/ 7VAMtYXk1hMl2N5jzrBDTRyJh6Hd8bsDZW7CczkZNlvWj7eAUJwbekC5RR8T+GXEYVju9s0yEQAa2 mbcmyduFIF1DU38X0R2vnCvcq+Uv8+grsZl4QBsy9bfZ+AnU9BL9JLoqJx66Eb6jsMyk6k6OzgBkv P368sG5w+LUVd3RAfkrL0Q1HqeGUlaAT4oOJW4tqQ1bZJx/NR2euEVW7n61PEXNjaEB8d0DMvzWkH zgxHDJdjiJYwMKELpAhwv3Ss0v6am/z8nYswbZzGW3Afq2qryOwlcDia7SgJI2MKUPpHqwBg5+2g/ Xn3+nXb3T5gnT+czg9Nw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mZz0C-00ADUE-GP; Mon, 11 Oct 2021 17:22:16 +0000 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mZz08-00ADTF-Iw for linux-arm-kernel@lists.infradead.org; Mon, 11 Oct 2021 17:22:14 +0000 Received: by mail-pg1-x52e.google.com with SMTP id s11so11420627pgr.11 for ; Mon, 11 Oct 2021 10:22:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=yMlyKjTZ3F+k6gm9goqR13PsTFVjPWSjU55WmL7OznQ=; b=SVLDnqrO+xIUfmQiOxF//fPAVoG5H53uZ+GtZTVDVyqO6vdMZnuhFztLkLn7Sk1V0/ PQWsGvXtLernHFVNFfkUtPrF16ySz87VtC9Zml9BrSA0GLK51rwKJmXmj1dFV1/f8WqT qxKO08ZOtE+Avx00EerRfhEPKV3mL6M4lr3Vc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=yMlyKjTZ3F+k6gm9goqR13PsTFVjPWSjU55WmL7OznQ=; b=pvEArJ46SzUgttSVJiRUoWtOO6sKwgj3IcgaBMXEDiJFqplD2ThCgiczA7DxhktlCY xmEY+gS7q3H5uhpp+nCodWQlGfGMx/RcjDbnqdXaBvRZVmyi0ARN27icvnCdi/+cJJH5 FXQt5Ok7bJOtFpu6zjFnZsm0+RL5jA5Sm5uqugSYPASvEzTQF6QFY4n9TWqThnZsxZ5W cGlAkOnOTNwGCL/9MnJo1BQVVeCjIkRBqzYND/dLrfungrK8dDV9AUj/eEyUBYD3FH1j FksSlq4wegSaRv9rkSg2K1bXP+di9t8HqDJXCG5B6nPIP7aolMF9zv9G3nc3nbsY43xP tWlA== X-Gm-Message-State: AOAM533pR2EKBQ7gnLRNC/toTFZum3Bcn1fxi3ClonCLY2n9zDqnM15R QoOnIlM8zXm/PP5/wyN+hsmW/g== X-Google-Smtp-Source: ABdhPJzRRjtsOVbNDiB+8ygRNRqA9i5mYRkJRnwsV5mVIkLbuF+wcOFY+Qs7z9rs9x1lqibYWvP65A== X-Received: by 2002:a62:5a41:0:b0:448:152d:78bf with SMTP id o62-20020a625a41000000b00448152d78bfmr27222643pfb.77.1633972930675; Mon, 11 Oct 2021 10:22:10 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id l14sm3353337pgt.17.2021.10.11.10.22.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Oct 2021 10:22:10 -0700 (PDT) Date: Mon, 11 Oct 2021 10:22:09 -0700 From: Kees Cook To: Ard Biesheuvel , Russell King Cc: Linux ARM , Keith Packard , Arnd Bergmann , Amit Daniel Kachhap , Linus Walleij Subject: Re: [GIT PULL] ARM: support THREAD_INFO_IN_TASK Message-ID: <202110111020.CA7E7212@keescook> References: <20210927150443.2654851-1-ardb@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211011_102212_668187_8A24CC40 X-CRM114-Status: GOOD ( 30.71 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Oct 10, 2021 at 09:50:52AM +0200, Ard Biesheuvel wrote: > On Mon, 27 Sept 2021 at 17:06, Ard Biesheuvel wrote: > > > > The following changes since commit 6880fa6c56601bb8ed59df6c30fd390cc5f6dd8f: > > > > Linux 5.15-rc1 (2021-09-12 16:28:37 -0700) > > > > are available in the Git repository at: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git tags/pr-arm32-ti-in-task > > > > for you to fetch changes up to 18ed1c01a7dd3d7c780b06a49124da237a4c1790: > > > > ARM: smp: Enable THREAD_INFO_IN_TASK (2021-09-27 16:54:02 +0200) > > > > ---------------------------------------------------------------- > > ARM: support THREAD_INFO_IN_TASK > > > > Move thread_info off the stack and into the task struct, as is done by > > many other architectures. This requires a method to find the task struct > > of the task currently running on the CPU, which is provided in this case > > by the user space TLS (Thread Local Storage) register. This implies that > > the feature is only supported on CPUs that implement this register, > > i.e., ARM v6k or later. > > > > Kindly tested by Amit and reviewed by Linus. The first patch is against > > the GCC plugins subsystem, but was reviewed by the maintainer and can be > > taken through the ARM tree. > > > > ---------------------------------------------------------------- > > > > Ping? As this is a prerequisite for the IRQ stack work and it's been Reviewed/Tested-by already, I could carry this series for -next. Maybe that would help? -Kees > > > Cc: Keith Packard > > Cc: Kees Cook > > Cc: Arnd Bergmann > > Cc: Amit Daniel Kachhap > > Cc: Linus Walleij > > > > Ard Biesheuvel (4): > > gcc-plugins: arm-ssp: Prepare for THREAD_INFO_IN_TASK support > > ARM: smp: Free up the TLS register while running in the kernel > > ARM: smp: Store current pointer in TPIDRURO register if available > > ARM: smp: Enable THREAD_INFO_IN_TASK > > > > Keith Packard (1): > > ARM: smp: Pass task to secondary_start_kernel > > > > arch/arm/Kconfig | 8 ++++- > > arch/arm/Makefile | 9 ++--- > > arch/arm/include/asm/assembler.h | 29 ++++++++++++++++ > > arch/arm/include/asm/current.h | 50 +++++++++++++++++++++++++++ > > arch/arm/include/asm/smp.h | 3 +- > > arch/arm/include/asm/stackprotector.h | 2 -- > > arch/arm/include/asm/switch_to.h | 16 +++++++++ > > arch/arm/include/asm/thread_info.h | 15 +++++--- > > arch/arm/include/asm/tls.h | 10 ++++-- > > arch/arm/kernel/asm-offsets.c | 6 ++-- > > arch/arm/kernel/entry-armv.S | 5 +++ > > arch/arm/kernel/entry-common.S | 1 + > > arch/arm/kernel/entry-header.S | 8 +++++ > > arch/arm/kernel/head-common.S | 5 +++ > > arch/arm/kernel/head-nommu.S | 1 + > > arch/arm/kernel/head.S | 5 +-- > > arch/arm/kernel/process.c | 8 ++--- > > arch/arm/kernel/smp.c | 13 +++++-- > > arch/arm/mm/proc-macros.S | 3 +- > > scripts/gcc-plugins/arm_ssp_per_task_plugin.c | 27 ++++----------- > > 20 files changed, 174 insertions(+), 50 deletions(-) > > create mode 100644 arch/arm/include/asm/current.h > > > > _______________________________________________ > > linux-arm-kernel mailing list > > linux-arm-kernel@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel