Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3334958pxv; Sun, 4 Jul 2021 15:44:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnlEREQZogR6hrzdS74K1ySbXLHWS15x64Obn9LWkgE85q0auJ3/9LxEaD5gyILW/Jc9WI X-Received: by 2002:a17:906:cb93:: with SMTP id mf19mr8332392ejb.427.1625438669713; Sun, 04 Jul 2021 15:44:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625438669; cv=none; d=google.com; s=arc-20160816; b=z8MBbBBK4qw3482Vrl4shr9U/2V1CKBCvnmjzwsaWEa8Ej6cSCrUl0k3THvb48+DWW Q3zno1kiB/6rLcl00pj+fkzZtEWGwsgTrvbUdINqTsuwL3IWkN1zk3M7I9CWCEyH0EHB C6pco1uq8mizFd76seKGUMSa7qV2Y168pZ9a/8zDCUqnB7lLG0hHE+NbKC5ZjaKVybtf 6uo5L64zwbPdqNKUVjiNEKh08B5iULns12pV9ZfYZZ+0ybz6hvMOfTFtl6t6x3sknxhb h1AXXRiDk1iOncWPzMqK6b92YjEuxdUjW2oAK2P4nlYw9IUzNt/9au4EwfLFYaSsd0D1 CSmQ== 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=xtcuflbG6V/1JlvW4xdoIPk6pojTTMLLnJIHQJBxuHE=; b=TumWyLk4Wz7mN0Xpoz107JQnexDtDIPFEWuiieLDtD461+21CGQpQAsYTDffFdMXdL oj113Kmfi+lPWyZxRHxiJLNBGkBEKaf52wv7fzB/3rkervIhsqIy9GmcCnaBZDeb6x0q ygWVQ9CMAFiObzvAtime+58wv+IsfOkt/3W1aQ9LQ9SVMStYTIGeVk0lwmer7ZNW4U8f z8AuBRjgt7MbndyvLbMC3AUUnhtmgPEcpb4F9TP/piEa79qw5H8BDJD2R0cIjC9Qb80Z +nc7gkjElJj7u1OayA4eKDu50frYc+I22weMqJ6BAP3TYkqxlgHxVzhfmb3aUFVdD1sc NXnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=HnU0Im7U; 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 h15si960236edv.253.2021.07.04.15.43.55; Sun, 04 Jul 2021 15:44:29 -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=HnU0Im7U; 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 S229698AbhGDWpS (ORCPT + 99 others); Sun, 4 Jul 2021 18:45:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229549AbhGDWpR (ORCPT ); Sun, 4 Jul 2021 18:45:17 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77389C061574; Sun, 4 Jul 2021 15:42:41 -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=xtcuflbG6V/1JlvW4xdoIPk6pojTTMLLnJIHQJBxuHE=; b=HnU0Im7UY/ke3GadqxbisGQBDi U+u4YSYiXdknjeVfND/u0mTNVX3iHt+We8TLUrsrtdkTFTS/wMBU1c2MedcwfHaKNrmdI2IUu/eMZ 1TzbprAYDesMnwMi94W1v17kRw8pvOL10M5boKLAqU3P3MqJxdw7OBnrhWXr1Ma/4pBSE2HZyaLQ1 AoJY4ovXZtHReBRX3e60YmV61SOZDeTdWJM3IQBd6MzGTgXT9fvug7g+DZoYd+o7k6+B6SiMwvk5Y pXPf1wjkjxHD+B5XAHFj7xz/cCiVh9+e0JGoko535HXO0VxFR0QV7g8Vf/Gl0kcvA2C3qwWS3GJ74 7iuORfGg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0AoO-009eDv-00; Sun, 04 Jul 2021 22:42:13 +0000 Date: Sun, 4 Jul 2021 23:42:03 +0100 From: Matthew Wilcox To: Gary Guo Cc: Miguel Ojeda , 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 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> <20210704232007.0000357e@garyguo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210704232007.0000357e@garyguo.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 04, 2021 at 11:20:07PM +0100, Gary Guo wrote: > This is big endian. Fundamentally, it doesn't matter whether it's encoded as top-7 + bottom-8 or bottom-7 + top-8. It could just as well be: if (len >= 128) { len -= 128; len += *data * 256; data++; } It doesn't matter whether it's compatible with some other encoding. This encoding has one producer and one consumer. As long as they agree, it's fine. If you want to make an argument about extensibiity, then I'm going to suggest that wanting a symbol name more than 32kB in size is a sign you've done something else very, very wrong. At that point, you should probably switch to comparing hashes of the symbol instead of the symbol. Indeed, I think we're already there at 300 byte symbols; we should probably SipHash the full, unmangled symbol [1]. At 33k symbols in the current kernel, the risk of a collision of a 64-bit value is negligible, and almost every kernel symbol is longer than 7 bytes (thankfully). [1] ie SipHash("void unlock_page(struct page *)")