Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2287967pxp; Mon, 21 Mar 2022 15:59:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvvJxPPruUxHau4ZXwcrpoXB6vX1dEwYLX7GjLp/lFbFN499G3UkFVNf/Esuylw/SdOd8S X-Received: by 2002:a17:90b:1d02:b0:1c7:1802:c00e with SMTP id on2-20020a17090b1d0200b001c71802c00emr1497776pjb.99.1647903550760; Mon, 21 Mar 2022 15:59:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647903550; cv=none; d=google.com; s=arc-20160816; b=JFaNurnP2TZuCj8qdmG3wp40UdY3vBZetQLOrIfTFTjJGM4Bt6AO7tuhzh6NBUHaAh wnhJDWutoIUyHWg5dKgyc9m0JjNLdqts9vlmrtyFzEkDrAiBkhM6U/P+sYRUzdzeTcVE AVFP4SlzunBu1NsnC4Yk2xBydxX8eUq4CDoOKGmVBb3taSGlweiV0givlt7idrWAOQQw LVNr5CePsBVPh5UK0s2GalAdQrom5FWDxCn9SeuRP6k/QNNoSAB0zcrflUvjQYSh91vJ Yu7JQ59uFMjN0/UoWgMpwUJit2M9kw4hzOMtNDR63ECtif5YTe/nXKwmz8UEGDTxEcL1 VzXA== 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=3yhe1yZzGEpebfSEI4NmtuOUmADVwotj/x5O7U8D/9Y=; b=H74J7AkucdU0RJh5jtmzEl/G/4DlfNxmylKeDN5iXGwBGI0/r/YAxCzBC65heWLd5x ZQc51noKcji3Rm9hmH4kiMFLPcoxu564xBdONrbUhrl1uy4YMCx3h62BrbTiT/kO6fKS wO9BObf+JkSPqinsDj4s8gEp0Hfrww6TsuNlio7V5F96RDxC3T7oaN2i58y5vo17qC+b UfOJjSmixL+8Zz/jlzM/E3yPBnn+zqUHDv1sIbgfdxoZ/ETe+FCSbld8wheVAT/N9cRu kinb1D/YhTeN2Ki395d15U8VBRk0S4jABhi6eqLM19G1kTJRGJu4YQgBU+M++RI1wVof lxMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pUR9BPsX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id lr3-20020a17090b4b8300b001c6e317c0d9si663029pjb.51.2022.03.21.15.59.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 15:59:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pUR9BPsX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5C5AE442E09; Mon, 21 Mar 2022 15:12:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343697AbiCTVLM (ORCPT + 99 others); Sun, 20 Mar 2022 17:11:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343693AbiCTVLL (ORCPT ); Sun, 20 Mar 2022 17:11:11 -0400 Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F1C9473BB for ; Sun, 20 Mar 2022 14:09:48 -0700 (PDT) Received: by mail-il1-x12f.google.com with SMTP id h21so9243299ila.7 for ; Sun, 20 Mar 2022 14:09:48 -0700 (PDT) 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=3yhe1yZzGEpebfSEI4NmtuOUmADVwotj/x5O7U8D/9Y=; b=pUR9BPsXnC/s1tR3UVEal3RV8LChzsf1b1v9T9WywlfOCsYkMrsSY+8c44AWBGWRLf j2q+DKY+2f3NmkcWerih3TRQlbTxsqu4iaIKNjWDiuIcJBjXlwZUyWwHuxc7wpmItisT FO/6cEVsAZAs1oJbhpq/tBeSWy7DcQk9CXx3IOsxGziPWQrI7Uqgxtq1o1pNUgQBxPuV hLW4+sBJIL+uzsGplKp2LvwhegquH9PlD81VtV/boIomK/1LFEoBOTVy3upOOC4JrG64 j+B6amMkJ/FjVm1mMMy4DxE32hMURAJo9Y8ObXkQDKpfgW3yLP1II5YTMFhLkbGycQEb fmWw== 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=3yhe1yZzGEpebfSEI4NmtuOUmADVwotj/x5O7U8D/9Y=; b=wB5/ZZFIAWqFpm7pBx8wXIX/CS/jdlZJ1hICs7/vM9z2/QMOLLCZbnSnXCuHxzeNZF yTeDRFckLhPDektfiv386LduZ9ObWwZnYAzyuJwfizlUdHAlq6yYS+ZmlLbRC6h44TYl LIPDWhM98D9hPnZKceZzLcJNl0K0j6BvH9qBAHBZ7+MA0BcLuWy8MkCUDtpmV4y2NFRU ku75IpqoVpxy9tGqMKzMMPCRwhofij+EfgU6pL7YX/2mkFNBrjok82oyPFaWDFnpejuT f3F4lS/hahjsdrH3FFtqB7JoXyc+4FGg1/TnPlVqFlbYl08MnLGtFDhsam515i+FwbAo q5KQ== X-Gm-Message-State: AOAM531DVemRWT3W9fonXwV1Y3EhdvvE/6ykxOY5ZiliPeHtgFvjO03I 5AYyT5HQ2O7FB62+D7l+GE1pAxId+nYc9gTmEUo= X-Received: by 2002:a05:6e02:1a4c:b0:2c7:c6fc:79f4 with SMTP id u12-20020a056e021a4c00b002c7c6fc79f4mr8215769ilv.235.1647810587864; Sun, 20 Mar 2022 14:09:47 -0700 (PDT) MIME-Version: 1.0 References: <57133fafc4d74377a4a08d98e276d58fe4a127dc.1647115974.git.andreyknvl@google.com> In-Reply-To: From: Andrey Konovalov Date: Sun, 20 Mar 2022 22:09:37 +0100 Message-ID: Subject: Re: [PATCH] kasan, scs: collect stack traces from shadow stack To: Dmitry Vyukov Cc: andrey.konovalov@linux.dev, Marco Elver , Alexander Potapenko , Andrew Morton , Andrey Ryabinin , kasan-dev , Vincenzo Frascino , Catalin Marinas , Will Deacon , Mark Rutland , Sami Tolvanen , Peter Collingbourne , Evgenii Stepanov , Linux Memory Management List , LKML , Andrey Konovalov Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,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 Mon, Mar 14, 2022 at 8:17 AM Dmitry Vyukov wrote: > > > +static unsigned int save_shadow_stack(unsigned long *entries, > > + unsigned int nr_entries) > > +{ > > + unsigned long *scs_sp = task_scs_sp(current); > > + unsigned long *scs_base = task_scs(current); > > Just to double-check: interrupt frames are also appended to the the > current task buffer, right? Looked into this and found a few issues, will fix in v2. Interrupt frames will be collected then.