Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp707122pxb; Thu, 2 Sep 2021 13:08:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhmfkCg+9Js+z7p1uI8tmCVEhZw/MxZZ5HIAvnkCgnaXMaQk8rphKvUa0a+cH3svXkyiX7 X-Received: by 2002:a17:906:34ca:: with SMTP id h10mr5684235ejb.137.1630613329668; Thu, 02 Sep 2021 13:08:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630613329; cv=none; d=google.com; s=arc-20160816; b=QOgByAGInrNQIeL5dw86ujDDo8OTNbrWkuAgccxQ+JHBo6z2QY9xlPKhSN22uqXKpe 6v3JIJweKui+xSjX1/+lYjtCz39csOH53M/9ddk0Jj+VuCaZ2ZPyT8Ow9rW18vtWVT27 1KLfZN1sSg7ad7WjlAc6DhCFNXpFMgHt9paxKT6afVBWV4K5Voth92sQLqVGxGGc9E7H YO9/ctRBRFfe0AooL2/ujr6/psJjACH+Irw8tP83Vad75f6ZVxRIXQNrjpetrwQKXqws 00jGpDTvYVjbY1Xo8hIZtLwSsfEcZlJRsH3LUHDiUYVgJ7AC34r5yp3UREPijh8wu5YY LlSg== 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=JcYHOKNx0hNjqmpLEEHso3KVVidsGV0+VqdBVx4KJ+E=; b=ovjEGw/lPeoDhyFkymnGrbxvcRT9UbpY/zybhycs25vdA/mVPUnv7Mh9TPS4Kka06R vCMnJCTb6sg0+UnY349kT+hLEXgs2/xJKv8gY/N4wMyg1ZIxJ3nXtTv/a5xeBr2z7Bl3 G5Ho1SQdjqupuws0p+Omr9ziI75wOwnrzcaXaJoADGPe7Iu8BxL93iNtJePOfv+JvV5D HcgX5yOaJ5EYpZ7nOt060vli+yv6VwYNTjZqFn42Rfb1w9WazwJstGQWZCf4CRHW1MHW bfh6M+Su0LI1AYgyfIlmnmMUrN9DAwOXKyuFuA1aX8DeWpboEGZORg+6KJbcfaaUkd8l AqwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a6+vJTGR; 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 w17si2944955edr.212.2021.09.02.13.08.24; Thu, 02 Sep 2021 13:08:49 -0700 (PDT) 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=a6+vJTGR; 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 S1346306AbhIBQTl (ORCPT + 99 others); Thu, 2 Sep 2021 12:19:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:54174 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346300AbhIBQTk (ORCPT ); Thu, 2 Sep 2021 12:19:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 778E46187D; Thu, 2 Sep 2021 16:18:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1630599521; bh=JcYHOKNx0hNjqmpLEEHso3KVVidsGV0+VqdBVx4KJ+E=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=a6+vJTGRHe9Xk+46Babj4Gu37PjdCTzZYp0DfDtkOJqquwkr/5mOPt4qdYrECoU8t 49oSyyN+AzKd/DqIfJ7DlWYaJJrRlGox7+furvQdwPKa66x9Te8SlUFYGKH+SCgb7o uNTQcaDM5ZWsyxuoR8pdw1g2F7At4e3p1XAQO145v1W5/+g6LTxWNEONuFXdbEpbkv jv6ZNJrcDavta44h8cPv1I6sjItQ1f/mzsAKR/dnB/AJgvgq/lkReFAhaLWvTmiOsF xdYsndBmLwUTtVzBXMQnoVNjY1SqfANX4zVIHMaeL8xtf97NFimFW2Tt36qW3MtCzT j1JEI1UPDLqPQ== Received: by mail-ot1-f54.google.com with SMTP id i3-20020a056830210300b0051af5666070so3200908otc.4; Thu, 02 Sep 2021 09:18:41 -0700 (PDT) X-Gm-Message-State: AOAM530NEJklET1K1auVD1gnvWx6mwsyR0aN/tJdaWxGQPNbQcIqf0ly C9e5xQi85MTlqOc2lwuQ/Ve7b5hIZpexuWtOUKI= X-Received: by 2002:a05:6830:444:: with SMTP id d4mr3261443otc.108.1630599520694; Thu, 02 Sep 2021 09:18:40 -0700 (PDT) MIME-Version: 1.0 References: <20210902155429.3987201-1-keithp@keithp.com> <202109020904.976207C@keescook> In-Reply-To: <202109020904.976207C@keescook> From: Ard Biesheuvel Date: Thu, 2 Sep 2021 18:18:29 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/2]: ARM: Enable THREAD_INFO_IN_TASK To: Kees Cook 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 , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Valentin Schneider , Vaneet Narang , "Wolfram Sang (Renesas)" , YiFei Zhu , Keith Packard , 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, 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) Where can I find these patches? I don't see them on linux-arm-kernel@