Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3300806pxv; Sun, 4 Jul 2021 14:22:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWUh7Dmzhgc6G9kdfiN8KI7SEs3e5g/2Gjt2GqOVAPkOODSzlyrnXCA1iu//6ob7E9OADT X-Received: by 2002:a5d:8154:: with SMTP id f20mr9249820ioo.89.1625433751822; Sun, 04 Jul 2021 14:22:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1625433751; cv=pass; d=google.com; s=arc-20160816; b=tbZndNFvDBnA3Z1pMPMbh314QVY6NMRCZ4I7fCf1hw0htlbL/uZS+fjR2Duucy2EQk lkmVzzOE+oxYSuqhhr0+jGgIvU0VOgZs1yd4SeEXUxvsqh+lYfZfFN3vlrilueNg7yWN cOnGSypvx7YQ8tzx39gHCEgCyvjnNNHM2Xga9vmzcrb+vEduoifGT5ghhoKyfKwSSM+U yEAY37jl31enhcfrUOXQvcLWJIuKT3gK4oumcZq0vjyVe/dtt1tB38CVaqgj3+JJ5g0+ HVYDa2GuTebv+zTOwM9lEGYV2INmFECFhfQ3AJtqkNeYehBRk1gpsYQ9m4aQXDQGGuaN aZNg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=0HlhU3BpdTXwRWiGCadcDs7Hux7YqjhP6S+4GbFQwOc=; b=rzrmdqR2VVodbPexMOaVcMV5g3ZC+FfivgRTcDOP28qQSzzygDxRrjaHzlcKAVV48e qdMD+jxqqvE+gKPllsAAxCtXfKtVhjQ1TYAFZ9n3RxCa6K12gMklVw5Lme/FjxxQKqAv dHZb1cUstz8ZA/WNMKy21ZOF5Ljf5q+I8Qxeae8xl+WcIiQcZU7LjEnevZElIeQ0mh2D MrCVT/6kywGjoO77YPglfTzwtUxFquSctrxWLbs32hHFvWMk1jeBR04McCAj2E8rP7qH knEuDL1hbEY6uh982vFuCrSdfpjs8mESzi1Fjv7x8hiUPjqS7l+ooEJ562pP36ZbaraA dtWQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@garyguo.net header.s=selector1 header.b=d+3osRrs; arc=pass (i=1 spf=pass spfdomain=garyguo.net dkim=pass dkdomain=garyguo.net dmarc=pass fromdomain=garyguo.net); 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v18si10740898ioh.67.2021.07.04.14.22.20; Sun, 04 Jul 2021 14:22:31 -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=@garyguo.net header.s=selector1 header.b=d+3osRrs; arc=pass (i=1 spf=pass spfdomain=garyguo.net dkim=pass dkdomain=garyguo.net dmarc=pass fromdomain=garyguo.net); 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230025AbhGDVXZ (ORCPT + 99 others); Sun, 4 Jul 2021 17:23:25 -0400 Received: from mail-eopbgr100129.outbound.protection.outlook.com ([40.107.10.129]:37760 "EHLO GBR01-LO2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229814AbhGDVXY (ORCPT ); Sun, 4 Jul 2021 17:23:24 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KsQS7hkIYSsk3RaWYvQo3dHEAqDFtkV6BWv1aVzzH0cWKQNze6/HT+/xS4qwht1RgKJ8g4HILTxpcBxrRTAQ8SzKsWQAAQtyGZoL5OfQcB0ySvaNtfAfPy9ckhXb7Zg3P08pFNrOFZzHU3REX2KQ7bViTtNqPLntPaDOFk4ZwFtLcRAhRgCWneuARVineB+hyUtYf3x0H5+B0g6WdbQkkCBjjw0BKUG+kbJhy27katvWcKCFausZz1u0sL2SYxXJ865XS4PgwySw3YFa/cstTUmmDyK+T4931urCHPtc6VCeyKztO0K1pzkU2A0FhH11T+VOEU0HiXA3ojosZ9buwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0HlhU3BpdTXwRWiGCadcDs7Hux7YqjhP6S+4GbFQwOc=; b=PZWto3NJZI9nGbzBKs6WO9rCLK3ZaroTtO9XDgXnDIen7Iutbt31BWc2Wh69jDo08FBIIY2jLFDC/qaI8aQT5HRYg9Pf0zyxCxY3c/wq6Q0rWKzypQMuARE+YXB86qreEy1W8apt6FeTffRrxhdlcZ5YPu6TOwXX1frmoYaC1PsXsA6cPaDyvUe2VZHwxVz4yF0ZmrDGAj3bbk2b+vOBMykb4FZ7EhNOa2FohBGP/U9ZxXjaeytmDglLsGn5/TKiO3CNqUqShYw79VddOv8TROxOsF7H5JTPswTYCvoc+thBHI5kMbho6R5r2iKNYk0jDRHadzFjZvJUA93w/OTylg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=garyguo.net; dmarc=pass action=none header.from=garyguo.net; dkim=pass header.d=garyguo.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=garyguo.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0HlhU3BpdTXwRWiGCadcDs7Hux7YqjhP6S+4GbFQwOc=; b=d+3osRrs3cC8D3xHYFUhPncFzAd3PM7nH/Kq6o9RD41odaGhHGsFAZKOvBrIdyNAf2ofgUEBl76+PLzen/I95/163jlQ104e0mnLzwXK8gbdajJ8yv9uUgn02P0LXZ5hTKecKTb3RO9XIbhqY7twpPqD3oXWQHumuiH1E7XRjMc= Authentication-Results: infradead.org; dkim=none (message not signed) header.d=none;infradead.org; dmarc=none action=none header.from=garyguo.net; Received: from LNXP265MB0746.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:16::23) by LNXP265MB2555.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:135::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22; Sun, 4 Jul 2021 21:20:46 +0000 Received: from LNXP265MB0746.GBRP265.PROD.OUTLOOK.COM ([fe80::944f:5a46:312d:8099]) by LNXP265MB0746.GBRP265.PROD.OUTLOOK.COM ([fe80::944f:5a46:312d:8099%3]) with mapi id 15.20.4287.033; Sun, 4 Jul 2021 21:20:46 +0000 Date: Sun, 4 Jul 2021 22:20:43 +0100 From: Gary Guo To: Matthew Wilcox Cc: ojeda@kernel.org, Linus Torvalds , Greg Kroah-Hartman , rust-for-linux@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Alex Gaynor , Geoffrey Thomas , Finn Behrens , Adam Bratschi-Kaye , Wedson Almeida Filho Subject: Re: [PATCH 01/17] kallsyms: support big kernel symbols (2-byte lengths) Message-ID: <20210704222043.000026b3@garyguo.net> In-Reply-To: References: <20210704202756.29107-1-ojeda@kernel.org> <20210704202756.29107-2-ojeda@kernel.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; i686-w64-mingw32) Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Originating-IP: [2001:470:6972:501:ac54:3e6d:9d2c:fe4e] X-ClientProxiedBy: LO4P123CA0330.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18c::11) To LNXP265MB0746.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:16::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (2001:470:6972:501:ac54:3e6d:9d2c:fe4e) by LO4P123CA0330.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22 via Frontend Transport; Sun, 4 Jul 2021 21:20:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0ed65cd6-5289-4680-028e-08d93f3196ad X-MS-TrafficTypeDiagnostic: LNXP265MB2555: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: E2MCZTjU9jxgFtl8IgaxJqfce4Gj2bFby/asZV1OFROyNHestmH0sZroFhsX6IT3Ox21rMkq9zX7yBFqLaPzMIws5tIx1ZqzDJzCadSyyDA/PClh/udzAssJzd7dWvIo571mKBxMxjdomQQnmA7ZoNX8APLtp4PKelil/dF6UB28N+jdSygLQT0lqH6ABcqECQEeBiXg+FxQFhYvtpyeB6DvZZiolc1bFIVtOi5xMdOlc2lcPEAcKOvMNF7h86jLZgJextEjRh9denMMpXh2nFwM6pcMAqR/RXqupDYSDsRodqurmHWmhOL8pI2j+DhK5TtufS9ek7cRVdWjtDl1zXp4ngN5lp8hvYwplVTLFVOECT8ckn9aJ+Kk5/eCY2iYvTUF/jmhsvzKqo6gWMHPUKb9S94JDvRl+rYy4xDE7xbeycxlJBlWoqUKwPWhcWoP3S29pWaUE1SBZc/BZnaquwqhAURBjI4nnVQa4iqbEY3+/jcxj6J9LB/84eWpWSrlvFCaPBRLIm60bjjjXLhXqmhIAgQj83i4nGWURoHUDppq/eI201+qFzILTgCFOwDw6OTiPrzkKL2+WjL/wAHQbIjL4yxSLO6QGvN5PwKrMX7gOejXVATW0oK0O0J9yBEpPNO59ObmNXsKDLdqHg+ZZw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LNXP265MB0746.GBRP265.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(346002)(366004)(376002)(136003)(39830400003)(396003)(2616005)(508600001)(6916009)(186003)(5660300002)(8936002)(7416002)(83380400001)(1076003)(316002)(6486002)(54906003)(52116002)(66946007)(16526019)(6496006)(38100700002)(8676002)(36756003)(4326008)(86362001)(2906002)(66556008)(66476007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?5AfWXdWJGtthDEEmCQQnlI76zszwFhcoMKQO7dfR14YCpjYHCEmFuPiRU3C5?= =?us-ascii?Q?VA07SlbCOxDZu4tzrvJHFddm6Fz0Sko2KtNtmkKqZuV9ZAFpjksKShXIo9+a?= =?us-ascii?Q?DsQ7/CW/4K1UuNsnNT6zRBOsRilg0oaBwkyP8cXZGcBTQM4Fz5K3phCI4q91?= =?us-ascii?Q?AvzGdXvwu8ZUg1Q1J0fWcmkq9nC8s1bq+apm++HeWbvJgmAgbDDen3sVWQhd?= =?us-ascii?Q?MA/khBqHiZe1O7gdee8xTuNN2ISm3vAzPPXFbpWpnPzgoqFl868HEoUFkpKd?= =?us-ascii?Q?/mAQ+vY/z8jIljPiUgWahfrKa2efgtR8wFFPpnc3KTQQLC4qnEcSAuyNdIzx?= =?us-ascii?Q?2CvhOxX6RkKbsijFMpnp6YcCqE44CLrEJ1mc4EF9zoNfmwQmbrmo0kv5l8/H?= =?us-ascii?Q?sSleoZiBstmTWhMzu6QtW8c72wyF4ytTYjxfvstGVqsRsu3hRHPQ2s9XzWMP?= =?us-ascii?Q?z2cGp9Zl6nHDFWPxeUlMx16/6vrZwhTQ8/fiksrtiUnrW2+HY9Nh4MukiZhp?= =?us-ascii?Q?LsOi+9RfNzAfVqsEy/SQ/1rZH1IFTlJo9cWdno552iB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-Id: 0ed65cd6-5289-4680-028e-08d93f3196ad X-MS-Exchange-CrossTenant-AuthSource: LNXP265MB0746.GBRP265.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2021 21:20:46.4823 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bbc898ad-b10f-4e10-8552-d9377b823d45 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: He4GUwlWcEaT5qpZIRjXF1nxQrZeuANGTKdDaaZ/7SBeJMevUk6z3bN8iHGoLHEsh1TqrcY4NXRpzAewMmGbMg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LNXP265MB2555 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 4 Jul 2021 22:04:49 +0100 Matthew Wilcox wrote: > On Sun, Jul 04, 2021 at 10:27:40PM +0200, ojeda@kernel.org wrote: > > From: Miguel Ojeda > > > > Rust symbols can become quite long due to namespacing introduced > > by modules, types, traits, generics, etc. > > > > Increasing to 255 is not enough in some cases, and therefore > > we need to introduce 2-byte lengths to the symbol table. We call > > these "big" symbols. > > > > In order to avoid increasing all lengths to 2 bytes (since most > > of them only require 1 byte, including many Rust ones), we use > > length zero to mark "big" symbols in the table. > > What happened to my suggestion from last time of encoding symbols < > 128 as 0-127 and symbols larger than that as (data[0] - 128) * 256 + > data[1]) ? Yeah, I agree ULEB128 or similar encoding scheme would be better than using 0 as an escape byte. If ULEB128 is used and we restrict number of bytes to 2, it will encode numbers up to 2**14 instead of 2**16 like the current scheme, but that should be sufficient anyway. - Gary