Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2832655pxb; Mon, 19 Apr 2021 15:26:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsv981257ybd36l1LE/c3Rvny1xFSw59bpsaPoY+jHTFMUuWotQyY7JRPF43OgZWMe9KJX X-Received: by 2002:a05:6402:10c9:: with SMTP id p9mr28691331edu.268.1618871202746; Mon, 19 Apr 2021 15:26:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618871202; cv=none; d=google.com; s=arc-20160816; b=yHBCf0Fg8g3aDXDC+qAuB5ifmDFWM5G8kHuBuAC/0U4ucnbToUb3uJPvK/HM2uOXo6 9JAvZZZUSqyZOFSsofn7Tjix2cFtvua6Be7OsF+IKxThFaFs9YreycR4GyPrOyrK9lxl ylVpJv4RzZtpxu/wJFZNS+t0Jw7Z3vlxZMrXxK4zt4PsVJZSYubVs3BJo8E0vx9QGHzS ocxkSrHbqK6yaTB+SwytCuxQ9Ag8dOV0OWA1vt/cXPrX/TvFEgnR66QKtquPUHgsqbqU yYqRzVbVNz2TP7aZ2kmZ1HJ7kdjgrgfaAtVW3s7XudF+Nk+zl4ES4qhn7FgC6FptRTOm cmJQ== 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=DZAiVp0HPCvt+Q56acSFAC0/xsTpWCSEtHLPhq6sng4=; b=rqPHVDtEpPY8OlpdEIJTDz/lfiqGww1mJ7iT8Z5RxLaDbkTY9CpNEiX8eA035OzGMz XzQgEqw/nlzkLDLyDQOLVi7WMFk6NhZ8LLHlpmKzCVZC98wx7GY39J7mjTRzcpGWZ+Aa xRN5S3hk4/JjVvp81Xnv199EhcoKidUrwv8Gg3atvC/+cTjtSn+DY4SWyOq0qhT2/VmT AeAeLeG9qh5EzHYUDpQRn3CbTtK7lXPpxhdtZpv16hLmJSUmAlJbRRqWUPX3lV3/GYgc YnHFMFdO9njw6T10DKWyscF5OVgjr113DTVqu7Kv6IZ/PvdAUSMPz1fEM9dcBKAyoi8E V1Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="o3qng/pg"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w7si13424783ejy.722.2021.04.19.15.26.19; Mon, 19 Apr 2021 15:26:42 -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=@gmail.com header.s=20161025 header.b="o3qng/pg"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240359AbhDSVEK (ORCPT + 99 others); Mon, 19 Apr 2021 17:04:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238515AbhDSVEF (ORCPT ); Mon, 19 Apr 2021 17:04:05 -0400 Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AB1BC06174A; Mon, 19 Apr 2021 14:03:35 -0700 (PDT) Received: by mail-yb1-xb29.google.com with SMTP id n12so40416362ybf.8; Mon, 19 Apr 2021 14:03:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DZAiVp0HPCvt+Q56acSFAC0/xsTpWCSEtHLPhq6sng4=; b=o3qng/pgSCa3Dc0G3aIezrIFgv7cqh67a4iPOYbRdaupA4JvOOk3fYkh0SBurKEOEf wXMiChhj3YBk5t5xIaEJYyb+NLTCVMSVklY8FDIESon1UoDL6cOmEdfVXwC5ooQA+M2i g/0o2wQxsOeIzX+AYGCyjX3pP78UodlqfzYkKPOvsqKRKg5lUF+aK0XdQn+6y0ANnYKA +Xt7LcxFHKxwEtJuTtej6qSWhPRAntsvto2U1crY22pCcbiPzu5OFPH8tKzJTvXipQTY C2aOxVrGtVQ6N2ZNLmMdIjOt1cpNcYsgR6X52kpvX0Napke6++67gL01OQrWJ22QlfrO 5OdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DZAiVp0HPCvt+Q56acSFAC0/xsTpWCSEtHLPhq6sng4=; b=c5PTm7tYez22eWnO/qML8C/u2DfqJ85S1Hf6loak+6BbIRJxxI0fu85XF+VdwiWFJ0 a3RGPKauWepAy4msqNWbUYC3oGN9y5tprF7rP0nQ0OlRWzE5Y9tw5iZlYe43x4QxKAmn EOekmzdDmW3G9xD60dCyyUjpsTWt0a9oJWC2NwXj3vm39pivLisC2Yh86V03TcdCNQq/ jT+Gi35cMIZ/wSrhG38YBgq+JdKcjg56eaYA1hILpNszQZVJptHhkvXIX8ZuB5EGUns8 43EptjwWh3cdgILubp8wR3OsKCk7JP3EJrP8GNXyWN9y01Bdg9onl0zBpMbk+ATVW/9I 1Xdg== X-Gm-Message-State: AOAM530HFyZAyW1vNGfwAnXEpe9oLI3ps1JvFfFqdT+HKlaaD5MREUUA MXzcKQNeRDqBzVsCac3SlYjQOWac5CtHHYl0Bfw= X-Received: by 2002:a25:6803:: with SMTP id d3mr20848597ybc.422.1618866213945; Mon, 19 Apr 2021 14:03:33 -0700 (PDT) MIME-Version: 1.0 References: <20210414184604.23473-1-ojeda@kernel.org> <20210414184604.23473-5-ojeda@kernel.org> <20210419195850.GV7604@twin.jikos.cz> <20210419201721.GF2531743@casper.infradead.org> In-Reply-To: <20210419201721.GF2531743@casper.infradead.org> From: Miguel Ojeda Date: Mon, 19 Apr 2021 23:03:23 +0200 Message-ID: Subject: Re: [PATCH 04/13] Kbuild: Rust support To: Matthew Wilcox Cc: dsterba@suse.cz, Peter Zijlstra , Miguel Ojeda , Linus Torvalds , Greg Kroah-Hartman , rust-for-linux , Linux Kbuild mailing list , Linux Doc Mailing List , linux-kernel , Alex Gaynor , Geoffrey Thomas , Finn Behrens , Adam Bratschi-Kaye , Wedson Almeida Filho , Michael Ellerman Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 19, 2021 at 10:18 PM Matthew Wilcox wrote: > > Yes, I agree, we need a better story for name mangling. > My proposal is that we store a pretty name which matches the source > (eg rust_binder::range_alloc) and a sha1 of the mangled symbol > (40 bytes of uninteresting hex). Symbol resolution is performed against > the sha1. Printing is of the pretty name. It should be obvious from > the stack trace which variant of a function is being called, no? If the pretty name is only `rust_binder::range_alloc`, that would not be enough, since (in this case) that is a module name (i.e. the namespace of the `DescriptorState` type). The function being called here is `fmt` (the one outside the `<>`), which is a method of the `Debug` trait. We could perhaps reduce this down to: rust_binder::range_alloc::DescriptorState::fmt without much ambiguity (in most cases). Cheers, Miguel