Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3293701pxv; Sun, 4 Jul 2021 14:06:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxoqMjTh4chMmdiMbcd2VlNSp8WE9WBr/9FAMR2iFZRbbvNa0gP03pve8eaKEWH16aeebO2 X-Received: by 2002:a6b:187:: with SMTP id 129mr1949649iob.188.1625432779957; Sun, 04 Jul 2021 14:06:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625432779; cv=none; d=google.com; s=arc-20160816; b=V9MQ0NxRTQz956hUDjGkp3zALtOSUsarbtKlWFZUdUF09NqAJrEfQ9UNZMbXVASE4d ZCDlwrXhXaPOhacbSpKSU0o/XbnJITP/GOR47flTmJF+Q2zRVNgZ38KeUb+U4/UsSIKF fZJ9hycKj58B6Hc5H9sAvYrvmwXvVbhNdua+s5DEYfH0Tv4sVoLMFuxKlx2QwTeidmXO hYB8fwvbvt6poRj4FC7JFaEAZo/mqt4WgK8tiAaRiampukmV7ptRFnJpcqIfO6mramNG KgKuqQ4Y7k/zbqhYsfvEPatYuUv+0AlnPTNxEJlPiML1+kuNdBqHC338V+g81SNsT61M nHzw== 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=1eUr+gbecB5vZp8b6uWu5kOh4miZGULdLwL3OofYB+o=; b=Bc2jucFB/9PrqSiGFyeoWSg4INPndaBVWnyuq73WXh1pvptDzEKt4GK2GlIDdMIG6v r+Nz64wrm8BjomlEOGI2rLA5eaFoT8nxDWLLiWa/xknJaPC5TOstaa1abE90QtAdok6Z EvdGeLwHr/2EEmZqHReDwg+R3SRRf5Fm56LePbtLGXuEIu09ulHUi5FTpif0yZW59rSV paTbOwOu2Zgv5CWp4C52C2qzm//rqEsYaekTgD4/rWANQQ9Lm3uASHbUkhrAR5CcSdZ3 DtIvsTilQrk9H+kwWWklifPfQxhoc9SQvHoRpaup5v+BMXAO/MgvRDEuvAmGcAr5atkX xh2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=EvCMmD0n; 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 l17si11633375jas.38.2021.07.04.14.06.07; Sun, 04 Jul 2021 14:06:19 -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=@infradead.org header.s=casper.20170209 header.b=EvCMmD0n; 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 S229869AbhGDVIO (ORCPT + 99 others); Sun, 4 Jul 2021 17:08:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229681AbhGDVIO (ORCPT ); Sun, 4 Jul 2021 17:08:14 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39B89C061574; Sun, 4 Jul 2021 14:05:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=1eUr+gbecB5vZp8b6uWu5kOh4miZGULdLwL3OofYB+o=; b=EvCMmD0n/QDhfPrCw3JMAOyG7x dydQUiG8qbs24YHnT9qafnQX0MePXUhawlwRJmI8Jpwsa9QuEyHS8mlkA4vXoPi1E24UKQvgLhVBS a5peUvgVTQaDYgxskZl+gKBdezwoce9W6Tki4euisOg9PllOipt/HV3qs51TcPCISgxKG4SF9SBFE QStujndr8c5gI2i9ZGX8mJ6O0c/KmDh7ErxxoKVviMrKMGbs78rOXKfkV6vlpsYurk85oSYZrRue9 CfZrVVAUMDfQdqEWCcRSbsMDQUjEuca6i6hT1Lsa/M4esFCCL+VBAjZ7FTM0LJy3t+kdlha/wv+F0 02Bh61eg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m09IH-009b56-3Y; Sun, 04 Jul 2021 21:04:52 +0000 Date: Sun, 4 Jul 2021 22:04:49 +0100 From: Matthew Wilcox To: ojeda@kernel.org Cc: 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: References: <20210704202756.29107-1-ojeda@kernel.org> <20210704202756.29107-2-ojeda@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210704202756.29107-2-ojeda@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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]) ?