Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3287721pxv; Sun, 4 Jul 2021 13:53:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTUUbF3szkU4JnE4blO/n0yjqu7jaLjECPlycKc43DlmJC0UuvMDPiQ8FSIsSMHm5q1MKX X-Received: by 2002:a05:6602:2c4d:: with SMTP id x13mr8932519iov.148.1625431997332; Sun, 04 Jul 2021 13:53:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625431997; cv=none; d=google.com; s=arc-20160816; b=gUc8i+fhFLGYAXuGFidKhDTp2rnb2O1lzBxFvxM+mA8T+XMSouJ/y8H5LqbR8O9896 WqpsAkpeOR0ay3moBnPw5MHpvK5BDQv7S0K7R5Mfnwx5jd8Y8gnCYeEWaRpbtwpWB2R8 3l8OdwIUC8hTPJsnK2F2tIv8ZaGIRp2N8uwbjHDUcyKdoE+wS9AhuStZWy3DWN/vcFXI WelaFJf5ZBxY8nDvKH8IFtg2CeW7Qr5yBoaBioXczP46wED4M0W/1c2cDWUHv+8pJTXO TN43MD9Pdxv2yXlYAdNLcNxOMgRuCB6JBTq/97yUVX/EE2UKfKNw273/6BgDZjWr5k5e nMhg== 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=1kNbjhH0GpClGiRwzQUpR4hJv6EHO3XdnhQiyv1Zn4I=; b=OHfnpOEKeBwt7rAK8XtUUp1aufTR154Dg0BcLrvtZ8eDDibXDVQx0TsVPRsJZ5ZUke x5f/y7xjAiqOMIhRRV8omKlpFlW3az80+HwU6rRRRrK1+4Sn/L/yUUBjhmscO/fUd1tu BjzTRAiodLbsT5SdGI88+BkOq0bYaNU0aHlEy3qlCW1cgbpSCqMvo/mS7tUiNvnRbNnp WIx3+lJPjYkO6iRFAclM18jy/Ynx0EtDqTZzq/Gr4EHqZIzDGJC6cjgSgkrKmXN+ILud I5Hu0TEhUy1Sjac2kOV/2/rprsQjbVGlfmw/+TfZ3GGkoOEL6CuRxJrt17odks8FZRs6 O1Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=DDKedwHA; 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 h13si6889128ila.68.2021.07.04.13.53.04; Sun, 04 Jul 2021 13:53:17 -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=@linux-foundation.org header.s=google header.b=DDKedwHA; 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 S229869AbhGDUzC (ORCPT + 99 others); Sun, 4 Jul 2021 16:55:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229743AbhGDUzB (ORCPT ); Sun, 4 Jul 2021 16:55:01 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8ECCC061765 for ; Sun, 4 Jul 2021 13:52:25 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id q18so28647043lfc.7 for ; Sun, 04 Jul 2021 13:52:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1kNbjhH0GpClGiRwzQUpR4hJv6EHO3XdnhQiyv1Zn4I=; b=DDKedwHAnd/R9xdhNG2krhsT+Nw/0E+PNH+jTyBdnlj/cEeFjebi3V2C3060Nznwiw vtlfihLS1N6oGS1nPJo971wzPG320Cr4ei5n8FjoPqsNRC/sBQhpBRy3FWWHn7ysHPW0 LY6Jmq2nQLEukQRziXJban++K/Kva/xuLIO6k= 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=1kNbjhH0GpClGiRwzQUpR4hJv6EHO3XdnhQiyv1Zn4I=; b=EQoHp8kdVkXRB8EoD9mR/LbsLN/M3F9j9tl8qvnxHqKnFtT9ZRYfPv5LjYo+iBbZLm 0OStMdqfOTj+jPKzlpToZEHE6xMrnJ+u829stcVNSZ5LXfS6Te33YGsdD6kIK0RiNS3z ymxEMfL9Y5he9C7qvYd2rJOpmu7/rcSZsU3HTG5SVEK1lsHU9Th2hE/lXFWSQ7ph6ICq wdq/exh5xbGuxuETat3GbBIHVAW+355pgV3UPhrWXxa6EVXj2XIxk9K5/aCRfgSBAfMk +/00KJOdS/I01CxM/E7Drwv1fXyMQy9Az332mLQc1k6UAtZhmlJeLlsfMVVapvZYvM4/ JWrw== X-Gm-Message-State: AOAM533dR+yXBNOvLoh3H5/i8qDl+rmfMbRbmb7U50XlJZwTAxQAy0vn XAVvH3JORN5eKQsHV0ObDMOa9N6KirOIQJga X-Received: by 2002:a05:6512:3caa:: with SMTP id h42mr7792458lfv.613.1625431943767; Sun, 04 Jul 2021 13:52:23 -0700 (PDT) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com. [209.85.167.41]) by smtp.gmail.com with ESMTPSA id e16sm877957lfq.295.2021.07.04.13.52.22 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 04 Jul 2021 13:52:22 -0700 (PDT) Received: by mail-lf1-f41.google.com with SMTP id t17so28774224lfq.0 for ; Sun, 04 Jul 2021 13:52:22 -0700 (PDT) X-Received: by 2002:ac2:42d6:: with SMTP id n22mr7866162lfl.41.1625431941847; Sun, 04 Jul 2021 13:52:21 -0700 (PDT) MIME-Version: 1.0 References: <20210704202756.29107-1-ojeda@kernel.org> <20210704202756.29107-2-ojeda@kernel.org> In-Reply-To: <20210704202756.29107-2-ojeda@kernel.org> From: Linus Torvalds Date: Sun, 4 Jul 2021 13:52:06 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 01/17] kallsyms: support big kernel symbols (2-byte lengths) To: Miguel Ojeda Cc: Greg Kroah-Hartman , rust-for-linux@vger.kernel.org, Linux Kbuild mailing list , "open list:DOCUMENTATION" , Linux Kernel Mailing List , Alex Gaynor , Geoffrey Thomas , Finn Behrens , Adam Bratschi-Kaye , Wedson Almeida Filho Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 4, 2021 at 1:28 PM wrote: > > > + /* If zero, it is a "big" symbol, so a two byte length follows. */ > + if (len == 0) { > + len = (data[0] << 8) | data[1]; > + data += 2; > + off += len + 2; > + } Side note: it might be a good idea at this point to verify that "len" is >255. Also, why is this in big-endian order? Let's just try to kill big-endian data, it's disgusting and should just die already. BE is practically dead anyway, we shouldn't add new cases. Networking has legacy reasons from the bad old days when byte order wars were still a thing, but those days are gone. Linus