Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp990906pxb; Tue, 29 Mar 2022 14:24:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGh16DZZwGJ5bmYE7SxhT9J9XA9hNQl9VtPM+PTW/jz3/SrzQtUaaiMQuP3tDAmzC2H4vv X-Received: by 2002:a17:902:b692:b0:14c:935b:2b03 with SMTP id c18-20020a170902b69200b0014c935b2b03mr32383797pls.81.1648589064385; Tue, 29 Mar 2022 14:24:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648589064; cv=none; d=google.com; s=arc-20160816; b=DfqmB3EstAzMCTk7X/DnBJLKkVK4kJPmIkNMAVerVqn6AmJMExic6j50/3hohvmpk4 mHn8qX+sjvQKYvzitbGh58xJnO9aYJOHWqp1WzGYKka5BXU5yPkyDJwgLFwLQc+R2Z/r /9YCKKIZRPJgVNHAKEf8eNPFk7e2cK9JmYwTnC+kdSs3Il30nYFTvymRR25BVOn7ZTbG Db03LM8I1WMyOWDBBGgM/DHz3wIV+rCnmuW0/qgVfyQSU9tnm/3eLmZ0idADiNoM9PmB XkPUvrGHc2ZYqJwapJmwNx4HarXltNl2/CoOhmIj+VIUOldDb64ZIQL9xpIsBe1m3592 XYBQ== 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=5BCw6nbHB1HhY9C/SvU0SfIcx4iHjYcssyIjUbMoR1g=; b=D7Vf/RRHjFLEuLX1Z7wSOgb3xrOIxFAtEqWa6f7XxwL+1ui9rTLoiwD+TT+Jc72TpH Po2G5HJumv4HVAxxKKdTrWLeK99pTyHftcoAVGdG3q4Tl5V2edUdANc1+RGjz4buD5w/ XXG9inF19Daip01Zvj8WLMvLQM6Ny5Me95dvqgpsSbhMUxj7CUykTR722EGBqqJxsBBJ nxDLZxkppRSOAP586f38D4sUNnBKQCRRuNfr4Fz726n3GnAyXBrZVrSpZDcuKCIWNCf3 kXEo3pWLPAN/9vORX9brjYB/QBhGWu71qqlzzZh3XJGKRFxWiJTwHalAX2kSsYHTWCQT +Gcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pS1aGCcG; 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 g13-20020a6544cd000000b003816043ef11si18156155pgs.262.2022.03.29.14.24.10; Tue, 29 Mar 2022 14:24:24 -0700 (PDT) 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=pS1aGCcG; 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 S240559AbiC2Si1 (ORCPT + 99 others); Tue, 29 Mar 2022 14:38:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239098AbiC2SiZ (ORCPT ); Tue, 29 Mar 2022 14:38:25 -0400 Received: from mail-il1-x12c.google.com (mail-il1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CD6F1817B9 for ; Tue, 29 Mar 2022 11:36:40 -0700 (PDT) Received: by mail-il1-x12c.google.com with SMTP id k11so4332679ilv.5 for ; Tue, 29 Mar 2022 11:36:40 -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=5BCw6nbHB1HhY9C/SvU0SfIcx4iHjYcssyIjUbMoR1g=; b=pS1aGCcGSgnivTPCc+Il/56orxKx1GRGqaqXURoaGtCJJizQNsPh4IxTyQcze5fi8+ 56p8uP51n7/s/VVInLARqXwsvRQePbpi67+umg11D/g1Lppxv4xmiaSd38XfckQ+KfWw dK0qfPW8NCjDwSo+OK1e1VpOJVU3PU8nedbZ1FWU0AcqBBtaGsBvM7qbzjlluLVnWAJ+ OrO9e0wnAxF3rWJGEnLkweq0YJNg860Dx8x/czKBdsvJKzfIjtraMEquEpNx1UdcvFCy mOvlJal56W7OqLZspczniHMcUJNevVGK/1EVRQQlV8pfKoBkD/53/gBEuTfL+P0tnMi0 WXMA== 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=5BCw6nbHB1HhY9C/SvU0SfIcx4iHjYcssyIjUbMoR1g=; b=fyltH9mgbZJzYiKNkP4StgnIDP65rPkGEAiTBQ1CVQ03X1kCHU4AJTDASZASsCpRP3 W+3Kl0rfZaIM0D9jgwpVY8tegF/VrF0vJhD/L28OHG1xMInLUmZQf6xmblBp0efG+u10 Skg/rYx7c1K9+UOOZCfFplgEN56V3wIOQQmih3zTP3QdCCxKR7UQYerF/3/1Sc0XmCsS QxOHxakRDz29c0gAWqvVLooYNIJLWipQGDrBj/RoSo77jA6uNJWboUysptD9/rNDf9TB R626KQhjjsJZ1nseyvjsooRnNtjvrnCML8uXT3cLFQ5ESlWJIiX75ip3yeBWbvgBATE2 u22A== X-Gm-Message-State: AOAM530n+cidhkPEa8vp5NCXdxjPMoUcE7b5IEtrLqQjMI5nLiqdekM6 9GmBZNfzVjKiY9v3+4G4agGqqNJf2+SaJ5pedU8= X-Received: by 2002:a05:6e02:1a43:b0:2c9:8e7c:ed98 with SMTP id u3-20020a056e021a4300b002c98e7ced98mr9055749ilv.235.1648579000098; Tue, 29 Mar 2022 11:36:40 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Andrey Konovalov Date: Tue, 29 Mar 2022 20:36:29 +0200 Message-ID: Subject: Re: [PATCH v2 0/4] kasan, arm64, scs, stacktrace: collect stack traces from Shadow Call Stack To: Marco Elver Cc: andrey.konovalov@linux.dev, Alexander Potapenko , Catalin Marinas , Will Deacon , Andrew Morton , Dmitry Vyukov , Andrey Ryabinin , kasan-dev , Mark Rutland , Vincenzo Frascino , Sami Tolvanen , Peter Collingbourne , Evgenii Stepanov , Florian Mayer , Linux Memory Management List , LKML , Andrey Konovalov Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 28, 2022 at 2:36 PM Marco Elver wrote: > > > Changes v1->v2: > > - Provide a kernel-wide stack_trace_save_shadow() interface for collecting > > stack traces from shadow stack. > > - Use ptrauth_strip_insn_pac() and READ_ONCE_NOCHECK, see the comments. > > - Get SCS pointer from x18, as per-task value is meant to save the SCS > > value on CPU switches. > > - Collect stack frames from SDEI and IRQ contexts. > > Do any of these new changes introduce new (noticeable) overhead (in > particular patch 2)? I'll measure the overheads and include the results into v3. Thanks!