Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1312639pxm; Thu, 24 Feb 2022 00:08:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJxrEqXiVz7y0XVAirfbbeT29ARlMTzlf7F76nq3P/9/yj5D6vECGoTNveFaetYUO5nCyt8n X-Received: by 2002:a17:906:1188:b0:6ce:f315:21df with SMTP id n8-20020a170906118800b006cef31521dfmr1307503eja.591.1645690110572; Thu, 24 Feb 2022 00:08:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645690110; cv=none; d=google.com; s=arc-20160816; b=jZsD+R+BHnDNcBK8aiZnppEsJY479z/T7V6Y6cN8RVobYHLm+8IUTgB+Pnz/1kIyI7 H+MsDfwsrAc+nbEaei/24CGOWf4uaTdGkxT53NBl+N+/y24YhYouAV/Bcb27hraVcxOi yzibf2TRL3sOCf8AbvcIMrPCyl8jDZtRMuBExYGU2mTYvVNgAjnjXhnI1HyVN59ANq2M sReRZjw8cAsNdtwKf7VyWs9ZQ+xc1b45dUwBFxBKLaptlz0yIPPyjcHrAh/Ot8oA/s1u ruQHb3pj5knVz2Syp4C2LGzQbaPWie2xAzNARZYmINqWkdSNlJHEML54st0lAgHzwKWZ iGNA== 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=69+mSNz7gTFXWXZZqcOIp0MaPmAG8AGfcHpHb4Enfug=; b=elmcwl/lEbBkHwHbLhQNw2IzTGcMn4KhXk5Rn6BCSyfQRVYD8BOL+ta2WpQH8c2ZKx QMk0U0O4L/oH5W+tdgZrrEW2Q/3jFCnchOGfqPGnWhy8Zal6jnlX/HBlLjtwoXWodWbC HYwICKEZnePcJqQgEkzmjFvL64gEokdgHbcYDvY8LzJq1G9eB07c/9YPlzNZIOFyqp7D EupoCQ1CMn0JfVjRXPOK0Mg6fZgEMAFGVFdN/15UlqeRfumtrM8ZfiVp1wIkb06HLxu1 5haoujFMeUSUDOUZ9E+YHzKYqqfn6wH/4xeGZtAvZ4hi0Q+jIiFwib4O+4yfT4VeGoAa RzyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MJBLpupY; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fy1si1503027ejc.779.2022.02.24.00.08.05; Thu, 24 Feb 2022 00:08:30 -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=@gmail.com header.s=20210112 header.b=MJBLpupY; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231271AbiBXGXm (ORCPT + 99 others); Thu, 24 Feb 2022 01:23:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229632AbiBXGXl (ORCPT ); Thu, 24 Feb 2022 01:23:41 -0500 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D66C165C19; Wed, 23 Feb 2022 22:23:12 -0800 (PST) Received: by mail-ed1-x52a.google.com with SMTP id cm8so1415565edb.3; Wed, 23 Feb 2022 22:23:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=69+mSNz7gTFXWXZZqcOIp0MaPmAG8AGfcHpHb4Enfug=; b=MJBLpupYfAwJzcBD8mLvjEcwEWbv8vQPdsyvldsB1LKJWaKAA/fp54IwLk9Md8lgTx ZI98umEuWLrlcQ+18uknmcQLI/20vN7T42gVy7ekJKRgXOXDhRd0GI3gVNUsl6nwziv3 iJDEV6/NuhXbSWzimR30YSQlw9df9FS/mFe4dmWse561L5eZhGm6dftsMFinvr1tnbFi VWjo7hjS/DY8RBoM2oPvFR8rjhATfrcDH3MC5CRIectXuYpD88A+FkItGcNKTcd2bw0i OZizpDnvYC3yvynm2ggbIiSRwsYNqSx3oYCCaAhz5H3O4viil3q21GWfF0NrUnevtEpD F+Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=69+mSNz7gTFXWXZZqcOIp0MaPmAG8AGfcHpHb4Enfug=; b=X45OliCpQXC9qFisIjfLsBzQYxSKC0ivd5UFsdoztnFkfDu09gzjjFEmY3zundHEXL d8JL3/OMGWeS/aOsnSFLr9CohhfC5NmnXnh+OT2bReRn1kQfsBZ33zUfBgbmOqv4RJ2o GFDydjI/ncTu8Mb1/iiBWtM6gIg8qA3jfswhSBtPnsYnDALZuemb+dYG3SvRVmEe/iwZ nQ2EnXdEdtxom79bEsGw9TneYSyK6QPgHKE8fn2Q73sKG+8erpf2vvBNfa1jv/dm8MZu ok7VHb5iRC/gkqL0Ks/1bmJKyH+/9sdWt+Y5ltYeOXKxpxZVsjvsAMuaUq6jQ/Oom84D MMIg== X-Gm-Message-State: AOAM532OXAXp72BGLektOX3mWwgShut//Y62c2BJ1VT+802e0hllEZxO YiWjMO6H7SFZEG4AADBC3a0OYSfgU9veBio55Qld0usD X-Received: by 2002:a50:fa93:0:b0:40f:d482:ef63 with SMTP id w19-20020a50fa93000000b0040fd482ef63mr885613edr.348.1645683790702; Wed, 23 Feb 2022 22:23:10 -0800 (PST) MIME-Version: 1.0 References: <20220224060503.1856302-1-keescook@chromium.org> In-Reply-To: <20220224060503.1856302-1-keescook@chromium.org> From: Max Filippov Date: Wed, 23 Feb 2022 22:22:59 -0800 Message-ID: Subject: Re: [PATCH] xtensa: Implement "current_stack_pointer" To: Kees Cook Cc: Chris Zankel , Marc Zyngier , "open list:TENSILICA XTENSA PORT (xtensa)" , LKML , linux-hardening@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, FROM_LOCAL_NOVOWEL,HK_RANDOM_ENVFROM,HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 Wed, Feb 23, 2022 at 10:05 PM Kees Cook wrote: > > To follow the existing per-arch conventions replace open-coded uses > of asm "sp" as "current_stack_pointer". This will let it be used in > non-arch places (like HARDENED_USERCOPY). > > Cc: Chris Zankel > Cc: Max Filippov > Cc: Marc Zyngier > Cc: linux-xtensa@linux-xtensa.org > Signed-off-by: Kees Cook > --- > arch/xtensa/Kconfig | 1 + > arch/xtensa/include/asm/current.h | 2 ++ > arch/xtensa/include/asm/stacktrace.h | 2 +- > arch/xtensa/kernel/irq.c | 3 +-- > 4 files changed, 5 insertions(+), 3 deletions(-) Acked-by: Max Filippov -- Thanks. -- Max