From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BD8EC4361B for ; Fri, 18 Dec 2020 10:32:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EBB2323A5B for ; Fri, 18 Dec 2020 10:32:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733106AbgLRKcH (ORCPT ); Fri, 18 Dec 2020 05:32:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:58726 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728249AbgLRKcH (ORCPT ); Fri, 18 Dec 2020 05:32:07 -0500 Date: Fri, 18 Dec 2020 11:31:22 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1608287486; bh=H+2oMPdaBm6uzckKT4AzZKea+ItnBPnlVjfUoiHdDV4=; h=From:To:Cc:Subject:References:In-Reply-To:From; b=cktprwcAG1lS3+av13kaq3oJFr7mF5fewQ0IyEgvYx25kRovxCZy6U5sml/tbyIxB wjE09h1rOol4j1wQRfiHZ/3AoJwSvw+97o8mmL6Ivw/zpM0WG4VVzSYdWbzhxV6VQ0 /150jhMOqxUl4bveOrRgB3eMwA22NxtMCmbboqOM= From: Greg KH To: Meng Zhuo Cc: linux-api@vger.kernel.org, bpf@vger.kernel.org Subject: Re: Please remove all bit fields in bpf uapi Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org On Fri, Dec 18, 2020 at 05:09:58PM +0800, Meng Zhuo wrote: > Hi, Greg > > Thank you for your reply > It's fine to do compile bit fields "by hand". Surely Go has something like "if (field & 0x01)", right? That's all you need for a bitfield. Look at the most common syscall, open(2)? It uses bitfields, why can't Go handle that? > However is it possible to setup a guideline that forrbid "bit fields" > in uapi in the future? Where would that guideline go and who would enforce it? :) thanks, greg k-h