Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp125244pxu; Tue, 5 Jan 2021 06:52:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxCtTFJVrp3L9TfxsS5fKjHyzS11tuVOegyi8rlz3n5Nkqio5umJAiL2V3VZEjSQKi/hyya X-Received: by 2002:a17:906:1a01:: with SMTP id i1mr72274784ejf.315.1609858334371; Tue, 05 Jan 2021 06:52:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609858334; cv=none; d=google.com; s=arc-20160816; b=SKz749oLlaC9xreW3oc7GZ2PxYAREc/YF2Gbye5BnwA/cLx5dUvAf8DJmroQPovIHS Y5HxD+uiHWHraSbGH2jWDl44HsTyq0HZivDBITa2lqhOWscvH8AeCoqG7c0R90iP5q7h MZiCxE3nPES4B+86TlKXp4Q6cg5cTMnYMR6bA5kjMzYHr1+sLSvW/DD06EWQ8qXLT8Fw YNo4x1U7XZAxs4AmUHzQRygLjk/htpnr+GRXLDG/rZg49hb5KdzGXqEK7piRTknD7jZh BA/sGOCxrp4GjXLubnwul4Mmi2qULyuUKhAN8V4ZHmS7MGOsgfSKNG7Rmn9vIzqw41KE z7HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=zCpGRcCytiwDmu7xuUzzI6C7J/MRk83a3WkBh9PC9ss=; b=o14HHjdvPERpHncyX/SOVmlDQ4mBspkUikrMUMoHR5MnXWHk/ny/cPpbEGz60lB6w7 qyZ+k01jlglH8mefiAiPoz3W9cMoZDeAh6s7sO0xMDa1L/k2dOda2t7AjGF/68Ywr3uj kM8FphBpir/LxnMqO8wxr4clI8Zvirzshh1L8NlfUCbSjwSrkF/IzYKjyzvptTOGEOrj 0gIrnCn2MZFtbqAj7ZlikjEUBGb8mVHR/tqrv87Cs6+FwDN0GeMBx4oVOHmeeWb16U/h 5+cDb5B5nlKoc2KTTZ0vNHy5eJXqSD864G/qzWrjpqy77ka0DWeP8L+iIAQX/3tY5vBI O7mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mess.org header.s=2020 header.b=QNy4B2Y1; 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 t5si31219774ejy.497.2021.01.05.06.51.49; Tue, 05 Jan 2021 06:52:14 -0800 (PST) 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=fail header.i=@mess.org header.s=2020 header.b=QNy4B2Y1; 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 S1728545AbhAEOqq (ORCPT + 99 others); Tue, 5 Jan 2021 09:46:46 -0500 Received: from gofer.mess.org ([88.97.38.141]:34493 "EHLO gofer.mess.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726827AbhAEOqS (ORCPT ); Tue, 5 Jan 2021 09:46:18 -0500 Received: by gofer.mess.org (Postfix, from userid 1000) id CA9C5C639B; Tue, 5 Jan 2021 14:45:34 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mess.org; s=2020; t=1609857934; bh=vNMC+XjILBx6ybTc4yZLUSBL7ZhoWqLqlWehk6Wem00=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QNy4B2Y1H5sUO2bx8i2G2OrKcF4OQHcTYQ/hz1qhHJUfjMHnxlev1dvWPw4rCJVpX ZPJN8Xxv8EqEKxXzggLeW5+PfqpZP8AiGBIwugqi/8rVU1df5el1azskZ5sRkBIuWk G1lKr+1lp70HUT4jQEXVYmqt8VLwOypufaANYaTWse7gQH3NpZCsMsGAl0psRXN0xe pDUq1y85AANV4++JIfzRHtoT7eOJDOpoPPTHox4LMMNp7ghkYnEgP8lrbl1BopDnrR 0TbZgFOYSb08SUwsVQV1Wf1cjn0ZJXw4FbPCTA4lyBRs9oEfinqwXMCEvtqT5utvYw 8Gkrslnd/Njxw== From: Sean Young To: Yonghong Song , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , John Fastabend , KP Singh , Nathan Chancellor , Nick Desaulniers , Quentin Monnet , =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= , linux-doc@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: [PATCH v3 2/4] libbpf: add support for ints larger than 128 bits Date: Tue, 5 Jan 2021 14:45:32 +0000 Message-Id: <3d3f8d4cc59b61d42e05d5f66d7b29fc7eb20cfa.1609855479.git.sean@mess.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org clang supports arbitrary length ints using the _ExtInt extension. This can be useful to hold very large values, e.g. 256 bit or 512 bit types. This requires the _ExtInt extension enabled in clang, which is under review. Link: https://clang.llvm.org/docs/LanguageExtensions.html#extended-integer-types Link: https://reviews.llvm.org/D93103 Signed-off-by: Sean Young --- tools/lib/bpf/btf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c index 3c3f2bc6c652..a676373f052b 100644 --- a/tools/lib/bpf/btf.c +++ b/tools/lib/bpf/btf.c @@ -1722,7 +1722,7 @@ int btf__add_int(struct btf *btf, const char *name, size_t byte_sz, int encoding if (!name || !name[0]) return -EINVAL; /* byte_sz must be power of 2 */ - if (!byte_sz || (byte_sz & (byte_sz - 1)) || byte_sz > 16) + if (!byte_sz || (byte_sz & (byte_sz - 1)) || byte_sz > 64) return -EINVAL; if (encoding & ~(BTF_INT_SIGNED | BTF_INT_CHAR | BTF_INT_BOOL)) return -EINVAL; -- 2.29.2