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 X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 516CFC83029 for ; Thu, 2 Sep 2021 17:38:59 +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 0C841610FF for ; Thu, 2 Sep 2021 17:38:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0C841610FF 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=299mSF6WkqE+WdSR4naNbYsjyS+uTEY307GNxHaUd40=; b=lmXVPw3u/VAr8A JbzAqOnpLYtxP9+z4hsc9I6IEJsACkSSYmSx/9yJOwNvlmM4si9RQ+rn9i7owEElXvh1Sr8R0mr37 p10XweGpTnABmZmXIH0qHIAvmiDPBsUuk7ZJbC/qFMWikxD/LOMO09PYk1tv7mZ/nKdSFsLpF42tz dlMtb1JMgIPPLjyTdpOuMNg4gQXw/QdLkByj9NkDs4M0R4fsS8L0RSPKx4LxkwJxy9cXaI7PFYznd iZH9uXeC91WO4RAbGsLhdxG6/xLoHwuyBge4ZjnAgAK2CLRdUvmRbTHKZTbP4OjkcGlZV4/2IWiSv IeF6icPirq1PGZn+IVEQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLqed-00A8J5-50; Thu, 02 Sep 2021 17:37:35 +0000 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLqeY-00A8HI-Pm for linux-arm-kernel@lists.infradead.org; Thu, 02 Sep 2021 17:37:32 +0000 Received: by mail-pl1-x629.google.com with SMTP id m17so1655906plc.6 for ; Thu, 02 Sep 2021 10:37:30 -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=HDAoUcZsfD+c/zEC0G2P+XLrfWfsXMInjiJ2c5tUjik=; b=gfrGu3TieN1sG6JBeZ/ppgP2xRHXanv2OoeZyn/J7xB6Xju7XUkcNyEW+87BWZuxCY 43aLdcDr/zLJWDZkXfdY+ntoMc8/lhOH3FZqyo1JG4jjrcOgTzOWwQtPXTSfnuvKeteH BjK/Vc4GPRrjhGM2oxA9TMmVjkLhpgJvElm6Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=HDAoUcZsfD+c/zEC0G2P+XLrfWfsXMInjiJ2c5tUjik=; b=ZQ7sEq2BgKZkhdZUw4LcV21rxQ5bVZ1tM0r9YypoZ5bYB+oBlnXBB4/VYYL/s1UfQ8 H2MUfduckH9T2diyxXUZl4NsOsu83kIFECLa+HMoxsoeJbhRxxDuZVZVK30/bpDq1rWm MCueJ4kzGF/9UjBoBhIfvSoz/UzvYck8I3dzYSuf3zo4AEW3k1lIBJehS74sZsZaojA6 To4AF41tn9yCvmac3pROBFTKer/216D3Nf7C6D8XBBzjFcyalpBDQRlLEWlGEfzVT31F bTpzFL4T/Xj6OfldeWhscC3G4VD3HO28SYQzmHCSpx0jSxyBABfF37jkHn3YTGz5Xgxw wdGA== X-Gm-Message-State: AOAM532Q5H2jfv6vSqpCSWB2wjAcdtJdZCHH6gmSidaQvJw/aHhwewyk GePj1NO5b59TFALE2+cjgeMX+w== X-Google-Smtp-Source: ABdhPJzISf1zacCO0hVRi7xUY/mfmSYpRYOBnO0mwBhHxhMQP/+SwUHlYxKTp9Y34GjPbK7lRdzIpw== X-Received: by 2002:a17:90a:6f01:: with SMTP id d1mr5280843pjk.36.1630604249962; Thu, 02 Sep 2021 10:37:29 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id c9sm3455764pgq.58.2021.09.02.10.37.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Sep 2021 10:37:29 -0700 (PDT) Date: Thu, 2 Sep 2021 10:37:27 -0700 From: Kees Cook To: Ard Biesheuvel Cc: Keith Packard , Linux Kernel Mailing List , Abbott Liu , Alexander Sverdlin , Al Viro , Andrew Morton , Anshuman Khandual , Arnd Bergmann , Bjorn Andersson , Florian Fainelli , Geert Uytterhoeven , Hartley Sweeten , Jens Axboe , Jian Cai , Joe Perches , Linus Walleij , Linux ARM , Maninder Singh , Manivannan Sadhasivam , Marc Zyngier , Masahiro Yamada , Mike Rapoport , Nick Desaulniers , Nick Desaulniers , Nicolas Pitre , Peter Zijlstra , Russell King , Thomas Gleixner , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Valentin Schneider , Vaneet Narang , "Wolfram Sang (Renesas)" , YiFei Zhu , Keith Packard , linux-hardening@vger.kernel.org Subject: Re: [PATCH 0/2]: ARM: Enable THREAD_INFO_IN_TASK Message-ID: <202109021036.859812D3DB@keescook> References: <20210902155429.3987201-1-keithp@keithp.com> <202109020904.976207C@keescook> 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-20210902_103730_873071_25B52E3B X-CRM114-Status: GOOD ( 27.43 ) 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 Thu, Sep 02, 2021 at 06:18:29PM +0200, Ard Biesheuvel wrote: > On Thu, 2 Sept 2021 at 18:07, Kees Cook wrote: > > > > On Thu, Sep 02, 2021 at 08:54:26AM -0700, Keith Packard wrote: > > > Placing thread_info in the kernel stack leaves it vulnerable to stack > > > overflow attacks. This short series addresses that by using the > > > existing THREAD_INFO_IN_TASK infrastructure. > > > > Very cool! Thanks for working on this. If you want, you can refer to the > > KSPP bug for this too: > > https://github.com/KSPP/linux/issues/1 > > > > (Anyone want to do MIPS?) > > > > I take it this breaks the GCC plugin based per-task stack protector, > given that it emits code to mask the stack pointer and apply an offset > to the resulting value. > > It would be nice if we could replace this with something suitable for > THREAD_INFO_IN_TASK, and if it is suitable enough, try and get the > GCC/Clang folks to adopt it as well (which was never going to happen > for the stack pointer mask/offset approach) I'd love to see the native GCC offset stuff work on arm32, but it's not clear to me how much work that would be. It's implemented for several architectures already. I've tried to capture the matrix here: https://github.com/KSPP/linux/issues/29 -Kees -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel