Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp6468401ioo; Thu, 2 Jun 2022 07:08:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4o8kLFqgsoI2aGiGqH46fVlxCf5BE6zR9WK4dDbdkCB27mUPdWxTuehxhuoylWKlgpxhv X-Received: by 2002:a05:6402:ca5:b0:42d:dba5:b2a0 with SMTP id cn5-20020a0564020ca500b0042ddba5b2a0mr5712855edb.197.1654178920352; Thu, 02 Jun 2022 07:08:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654178920; cv=none; d=google.com; s=arc-20160816; b=hU//oiuXvXajoZ9oGj+zLoVS2A9cdX+ouIIvKtT9wMGoonjdrUIaH098t45bQCm2h9 +/FJLRsHAMAmANVZItAjP32Y7UaJBwxsnTABNzlX7oUh/Uv98gHrLXLgnpYJri8b6LcQ iBQaIRcD3HwZynmuZqmn1U5PNKs9Ca49j9V+3LzDu+MRz/QOi4krf5qktbDMMtj07CUf 0tddIsMvnLrXOTD0p1VHaiKFilesl4qL4T7avG+pxBi4LGySHYT+m2rNcQtg8OoEvIp9 AC42XmUs2CDY3QapFqsAegF+V/5Ik488v0bhez++34z0fB/ro44whns1Vtw1ZBycF2YL 7llA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=vMpZvn0Mae7UO2Ef2ea1D6C0zMlTGRd7GR/pp2vjcG0=; b=cwLNDjxP+a4JuODrHGByIz/rn6qucyBACDcJxZxwxeY6j10S2CEHkiOJi5ngS+YAjM of5TsrF4VxRwr5dtEUfLf7VZKQaG6EWCfd8D8mlO6zCtyOSy7ZvN8dc4zz4HSHt5r7lV UX4MNszg+Q1aTVmu3HRaXEeanvrXcbeqiOtEquyjuoUkpATSP/PeIpGRuUMBpqHj/o74 ybZGmL6n7n51et5ujyNVrI5JRmA38kiTf7zwYDsvacgyu99ckOfPFvf8Da/yOg4TRpgx 5v4WJbNoGsKtffrtLDZIQKwPumNlcJ44U+hXDLri3emnB5O7m9OJx++8K6xym+bk0DWV 8yYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t27-20020a508d5b000000b00418c2b5befdsi5049779edt.479.2022.06.02.07.08.12; Thu, 02 Jun 2022 07:08:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232785AbiFBKpZ (ORCPT + 99 others); Thu, 2 Jun 2022 06:45:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230270AbiFBKpU (ORCPT ); Thu, 2 Jun 2022 06:45:20 -0400 Received: from a.mx.secunet.com (a.mx.secunet.com [62.96.220.36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5081B6335; Thu, 2 Jun 2022 03:45:19 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id D246B205CD; Thu, 2 Jun 2022 12:45:16 +0200 (CEST) X-Virus-Scanned: by secunet Received: from a.mx.secunet.com ([127.0.0.1]) by localhost (a.mx.secunet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Mtn_T9EtDur0; Thu, 2 Jun 2022 12:45:16 +0200 (CEST) Received: from mailout1.secunet.com (mailout1.secunet.com [62.96.220.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by a.mx.secunet.com (Postfix) with ESMTPS id 5A821204A4; Thu, 2 Jun 2022 12:45:16 +0200 (CEST) Received: from cas-essen-01.secunet.de (unknown [10.53.40.201]) by mailout1.secunet.com (Postfix) with ESMTP id 4C21580004A; Thu, 2 Jun 2022 12:45:16 +0200 (CEST) Received: from mbx-essen-01.secunet.de (10.53.40.197) by cas-essen-01.secunet.de (10.53.40.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 2 Jun 2022 12:45:16 +0200 Received: from gauss2.secunet.de (10.182.7.193) by mbx-essen-01.secunet.de (10.53.40.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 2 Jun 2022 12:45:15 +0200 Received: by gauss2.secunet.de (Postfix, from userid 1000) id 8E8693182D6D; Thu, 2 Jun 2022 12:45:15 +0200 (CEST) Date: Thu, 2 Jun 2022 12:45:15 +0200 From: Steffen Klassert To: Stephen Hemminger CC: , Herbert Xu , "David S. Miller" , open list Subject: Re: [RFC] xfrm: convert alg_key to flexible array member Message-ID: <20220602104515.GI91220@gauss3.secunet.de> References: <20220524204741.980721-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220524204741.980721-1-stephen@networkplumber.org> X-ClientProxiedBy: cas-essen-02.secunet.de (10.53.40.202) To mbx-essen-01.secunet.de (10.53.40.197) X-EXCLAIMER-MD-CONFIG: 2c86f778-e09b-4440-8b15-867914633a10 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 24, 2022 at 01:47:40PM -0700, Stephen Hemminger wrote: > Iproute2 build generates a warning when built with gcc-12. > This is because the alg_key in xfrm.h API has zero size > array element instead of flexible array. > > CC xfrm_state.o > In function ‘xfrm_algo_parse’, > inlined from ‘xfrm_state_modify.constprop’ at xfrm_state.c:573:5: > xfrm_state.c:162:32: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] > 162 | buf[j] = val; > | ~~~~~~~^~~~~ > > This patch convert the alg_key into flexible array member. > There are other zero size arrays here that should be converted as > well. > > This patch is RFC only since it is only compile tested and > passes trivial iproute2 tests. > > Signed-off-by: Stephen Hemminger I've put this today to our test systems and it showed no problems, so we can integrate it after the merge window.