Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1909868lqg; Mon, 4 Mar 2024 07:25:01 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWbzmsN8Ts81Le/Wxn/RLSmTBoA0oSU+LufRNtNqk/hL1+FPuKHiVZ0g4BtD4CIR6EkbjKJabA3abQQD2a95BpP1HHSU1r0f1BOXfC1LA== X-Google-Smtp-Source: AGHT+IFHSee8tAN/M3dY0lmP9XzYvjqrxmAKjKHvndcrdij27xoOJu6FvAWyW8ZbMW08APjEJKPJ X-Received: by 2002:a17:906:1114:b0:a3e:8300:1af3 with SMTP id h20-20020a170906111400b00a3e83001af3mr6168528eja.30.1709565901083; Mon, 04 Mar 2024 07:25:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709565901; cv=pass; d=google.com; s=arc-20160816; b=bECsfUHCfNgQlJ3/IeskH1IMSMLVG3ceIIkFJ+CoxvaKw5jWv/3OQnOzW+dvAGhpQD 4amsQLo90uXoXhgeFyknHxzC1OR429RWiB5ZO8o05WUjUBDdoo2hXRqUYm45iMk0KqqL lS9zLkxihnziAoEAJ+/z+qgcosp3Kq1Lxg3lA+uM0CSWTRITn6OiiLwRI6cP92geVaH8 4hiGu48siMvRP5bnoe5k/DxzyU6ntGRmO44aWX3naocghAILajSd93+hdkvqnNAxazIn n23xNVvSlUSa6VBd8AiRet2qxEdphhiJuoAufywwfZu0TTfkOjnUH3xlvPJ4xPacPlO3 Db7w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=2vo2vhINLndAbmsy2x9nMoGOF6rXfHWOlGOzvknFxQU=; fh=BpVONM+ks1rstx2Iw9OgN3/AVJIowpSVUaSNQtMaiwk=; b=GPgDpeqR/K4yinyUzYOCNOkZyRvugwpV7h5pJPu1QK6ZWNvcuAbEN8ASocExWRgOQn Ks/LpZYm40zJ1HxxF2DaBXefjK79HlbUBLi3oISu0ptF468rCOJYFHyiG/3AGOdnQp1b /qv8qbir8e+DwSFrtDaIyNd6PIexk67T79YXFuSQkAzA8KKMVHXJppmjcgjYIcSyVJjH 97CKAMXTEBSoEB8FXFtn/4MB2um4q8DuBpVzoMjeqcIX3ypdyjQ1TI4AVgAD7/PVy297 sgYKYawCW+yAyoWzWeRXj3zX2r3mR+PjG7lmFmcvJT1JKzOGMMRKX9T2DEvDF2tAUQIZ OoOA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OX2NwF11; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-90814-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90814-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id k27-20020a1709061c1b00b00a4447e46e60si3962090ejg.1013.2024.03.04.07.25.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 07:25:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90814-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OX2NwF11; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-90814-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90814-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 925D51F261AB for ; Mon, 4 Mar 2024 15:25:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B426F47A7C; Mon, 4 Mar 2024 15:24:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OX2NwF11" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C9EDC4653A; Mon, 4 Mar 2024 15:24:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709565891; cv=none; b=JNjEabveeNaHe4xMfnxjFgiphnAy7mTpp9Sp8Nt7sSARDJZ8pDXZHLcGfZA0VkO6OueMKyXkGc2iZhJFejZI492pLcddvPrUlKAJ7bzfZtFL+SSraTusiPS9p53GFjoE5t5Hr2dYn3XBRa38jcHSrL2lvxZwOifLz6M+8tRoVbA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709565891; c=relaxed/simple; bh=N1JfdXgyaxSd4c/fdLzv44gAp2pZlsV4ZCg6XBxQnKI=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=X0NY+yyJcwm1yxZzENcJeleVJVy/b1WxcqSrZOtYRiNAXzrhRvQNUnpPzbcjB9FKIO0KzXDLii/qx7atW97kSVDuei6kZJQTrGQGjG7eGPX2Ep4Ts4tneO790M8/kSOvkv8BSNeLqBUPtZJ0TteKOfgBfOeJd+yj/ZiZb9maTNU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OX2NwF11; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACCCCC433C7; Mon, 4 Mar 2024 15:24:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709565891; bh=N1JfdXgyaxSd4c/fdLzv44gAp2pZlsV4ZCg6XBxQnKI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=OX2NwF114dP1vGv3xCFxgAvAJK2k/1x1RApKZFIsPAByq9z7xAhDsd29VNt9XzVIO 4TbehB+V6LbEjw0Yf2tx0BDzE7pRMOej4x/4DB1ewe064WyFjF4xhUD6FDyF1v16LN rZ87eYQKNvFBQtWhLGmK+EzcJmE8VBZNCPsJEuw98y231hfBEZEdfkbyyI888kng2c B8SDOa8cDBSoIzP3MeNFTYzukgVel6/G9UFjpCOrq7WyL5Jw96IsoGqUEIfCGYu1LG daoe8ukCR3vsixhy66NkAUk1JmJgjG4P7GMYJl2ZELgkhmqmNRo1tGrx9i2iri7Gx0 dwlQt5hEJoSLw== Date: Mon, 4 Mar 2024 07:24:49 -0800 From: Jakub Kicinski To: Alexander Lobakin Cc: Eric Dumazet , Kees Cook , "David S. Miller" , Paolo Abeni , Andy Shevchenko , "Gustavo A. R. Silva" , , , Simon Horman , "Jiri Pirko" , Daniel Borkmann , Coco Li , Amritha Nambiar , Subject: Re: [PATCH] netdev: Use flexible array for trailing private bytes Message-ID: <20240304072449.0c10b397@kernel.org> In-Reply-To: References: <20240229213018.work.556-kees@kernel.org> <20240229225910.79e224cf@kernel.org> <9050bdec-b34a-4133-8ba5-021dfd4b1c75@intel.com> <77d3f074-8cb6-466b-ab31-a7b0bac659d0@intel.com> <20240301093517.428e5b5d@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 4 Mar 2024 15:32:51 +0100 Alexander Lobakin wrote: > > 100% I should have linked to the thread that led to Kees's work. > > Adding directly to net_device would be way better but there's > > a handful of drivers which embed the struct. > > I think it's okay to embed a struct with flex array at the end as long > as it's not used? Or the compiler will say that the flex array is not at > the end of the structure? Technically, yes. Practically it ties the lifetime of a refcounted object to something semi-related with different lifetime rules :(