Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4719302iob; Sun, 8 May 2022 23:09:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPEKC8rFvr2OzNK8LB6xfz/9+s3wVBwwexOIJvW5vlIW2lCxe9JJR41Dk3xe+i6wPpkUHq X-Received: by 2002:a63:4b54:0:b0:3c6:b0d:3f4d with SMTP id k20-20020a634b54000000b003c60b0d3f4dmr12085342pgl.350.1652076571524; Sun, 08 May 2022 23:09:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652076571; cv=none; d=google.com; s=arc-20160816; b=cgYGmhUrO7tYtMOhhZ7Ip91PiO8KERpn47TJq9e0HX509k7b/kK9iu9Weh26MavArB dNzdsv3A/W9mJjPMcLkEzAapOjbybPldpPXut10pkxshcWftXbuhxIQb89XCx3DmwF0Y y9DuiyXoy5Nx2GG7Hlc9QkW8Gh14wJqpiOJotPCpAYpwI54LEBapdUhwV1IogetT0GUZ bxPbsH5OKM7OErzvjUiX33QG2e+QMmp8jvZN8HsKxMg4oJUEoDms3pX3tNrl+KbfJf6Z +D7WPEi6EYZvh7iGJU7do0yDK3am1x6hWwysjr7InPJu/pUaQnXIjJ+BuuODpDGc7yeY U0Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yGDqiI6M0oNMw7HcvJNQVYcC7hsIU1lzszoW5YElTJg=; b=PHaDdteMtgRzBdw12pslr656XCvTgmPak+I99tQG0w4BrPgxwpZFsFN7D4thd7GopZ a0Xicust/+JdgJSaI7g1Cs5SstYTqDgdN7nJqGQvYoB66BHTEPOfFLNrRX685GKbWCyf 2GuhJDdjAz2B4gHDm6eZBry6RTzd2bVc0OnlhGEwX9KR00yDv044WrlEgBtRTikweqqy kWG/z2TqJcLnWKhpJQogKk/XZvBWeOngATlw7BjiFXqQqBgO/LaLIURoAv4sZ9QQrNIo Hmig+y8cU4s3urZJeaLdpKuZVb61JnFCZCMQf77y0II92TUHWN3eeW/0Vv3iJtHVW92q PFTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=eMV+DSLN; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id l185-20020a6391c2000000b003c16c84a15csi12787864pge.188.2022.05.08.23.09.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 23:09:31 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=eMV+DSLN; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DA98417337D; Sun, 8 May 2022 23:09:18 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381804AbiEGRNU (ORCPT + 99 others); Sat, 7 May 2022 13:13:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236727AbiEGRNQ (ORCPT ); Sat, 7 May 2022 13:13:16 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7FD8220D9 for ; Sat, 7 May 2022 10:09:27 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id fv2so9662303pjb.4 for ; Sat, 07 May 2022 10:09:27 -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=yGDqiI6M0oNMw7HcvJNQVYcC7hsIU1lzszoW5YElTJg=; b=eMV+DSLNLZf3b1Jb6raZ9+YgZKg7GiSqUHxO5oTBQnhokBZ0WeRIyeeMzRLwlPNvJ1 MN3b49gABY42OqTjEkiu0l+ikc+oXBj/VR2fI/a+4140XunBdYht74kU+pjkhj1ZTfiN fqNViDC14RlGXowyTsUjmChwjvv2wDSabU2uw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=yGDqiI6M0oNMw7HcvJNQVYcC7hsIU1lzszoW5YElTJg=; b=YvphaHubxCDttMEQyCW8PzHyU26TOc9ASlAXN7eyd3XkBvdsrj7T8LLbQYKDfseHuj w5EetRXikaA3vLFdJcGLgibZBCZMnQSrbg7IJBr6p9r+N7AhKten9CPpxE403/fGAxPo DQj/1+GZ3JjvBrZJrt7s5A2J2DxdDYgJ7ObYyg8zO/PP/YSVnfApxjfJeVw6yoMk02UX E0MqgHJLgFd4OFJIze7YbLkihPJ8ZBh0dtuz3/Bm5DHpidI8gev/S7iAvKbwRj6Ct1IA yOGKwNU7GmS/RKGOLbdRrXWEriRAJeID/Qm4Joy+w7I8qMVptt0glnPf1SgblH+VJ4LK beaA== X-Gm-Message-State: AOAM533qHfxv4AqYIPHbT3wr6YEevVojl5dsuJeePcPImkPWhWnRXoqx IburD03wQY3GOuJTZQNfYjOrAQ== X-Received: by 2002:a17:90b:610:b0:1d9:4008:cfee with SMTP id gb16-20020a17090b061000b001d94008cfeemr10304083pjb.71.1651943367413; Sat, 07 May 2022 10:09:27 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id e30-20020a631e1e000000b003c14af5060asm5283963pge.34.2022.05.07.10.09.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 May 2022 10:09:27 -0700 (PDT) Date: Sat, 7 May 2022 10:09:26 -0700 From: Kees Cook To: Miguel Ojeda Cc: Miguel Ojeda , Linus Torvalds , Greg Kroah-Hartman , rust-for-linux , linux-kernel , Jarkko Sakkinen , Alex Gaynor , Wedson Almeida Filho Subject: Re: [PATCH v6 17/23] scripts: decode_stacktrace: demangle Rust symbols Message-ID: <202205071006.6F651F6A@keescook> References: <20220507052451.12890-1-ojeda@kernel.org> <20220507052451.12890-18-ojeda@kernel.org> <202205070122.B240F989@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Sat, May 07, 2022 at 12:21:14PM +0200, Miguel Ojeda wrote: > - If we replace the mangled symbol, then some tools may not expect > e.g. whitespace or other characters (which Rust demangled symbols > have); or if they handle them, they may be expecting actual symbols > (like in the case above) because they use them later on to correlate > them to some other data. Yeah. I think this is the fundamental issue, and it requires just leaving it up to userspace. I don't see any significant benefits to any of the other solutions. Maybe some day we'll want demangling visible in traces, etc, but it doesn't make sense to try to design that now. The mangled version is existing-parser-safe. -- Kees Cook