From nobody Sun Feb 8 07:58:58 2026 Received: from abb.hmeau.com (abb.hmeau.com [180.181.231.80]) (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 DA1F11EB5DB; Tue, 21 Oct 2025 04:08:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=180.181.231.80 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761019692; cv=none; b=nA6zPRUHOraW53NdB6AS2i76dz9wPVsgKpgmD9r+mTtnBzWba/vuLyhrt4Iy5EbBOCnJe8Iw7CC8EZRiiOb00A/mzv8ZXYKyUc4L2aPlSDXaz2Eh6jGK9pokVEJqufTqK1qvOyIt/69sTPLKbaZLq+2LS5Pht8dZ6KZCNfr9rO0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761019692; c=relaxed/simple; bh=otCA/DNdOW+b41rKqMPvBAFFOBff1X+BHKvz77ZSenk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MKM+Tt9FtZheea7GMxaATsbD1uRnpujwxtyNBLuM1KoFXAs6G4iDm1BISrd9v9TUrmJlPDeRLXe83oeEEsfoNeeqDHTaVEb+OmUDyZudfwZRHE31uDdzyIzhbzXeFdhYhwTHTS1g07yKeNqMCQwNHlkPPwLSCb7QsjwSK16EyWw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gondor.apana.org.au; spf=pass smtp.mailfrom=gondor.apana.org.au; dkim=pass (2048-bit key) header.d=gondor.apana.org.au header.i=@gondor.apana.org.au header.b=M8h10v7q; arc=none smtp.client-ip=180.181.231.80 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gondor.apana.org.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gondor.apana.org.au Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gondor.apana.org.au header.i=@gondor.apana.org.au header.b="M8h10v7q" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gondor.apana.org.au; s=h01; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:cc:to:subject:message-id:date: from:content-type:reply-to; bh=FFfJ1T3gGeeywcD/IcU+HActRpSmxrKsGyO5NhVaCvU=; b=M8h10v7q9f5AGT5gKkSuaDbHCdisDtDGyY+dgX+D1L60SumcC4ZD4dqOz85VS/VJWQA04l0LNic kBSiroNiN2e6tph/2kSuBLx9d6OcO30/U/QJTFYxwT1pg7Jw2974mXcZQkkUNESEFjQZiR7qoYR2g TJLyMppS2wKL+gdqEEXjF/ePQlu7rJaxRBgjiLyYdsU2FhLI57Fp0Ld6pHbfPrFxFUKpdqc0ibkph img2dTMvEgCVZitTgh7Kh7B2lJVzvdB/HD/dZEwP15yAHi1ToLEmd30lM2U7ToI8Aenrbsz3Hzgdx Gyd6ASpb0L2/cF4e3icaAuUPduPf7V9uejYA==; Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.96 #2 (Debian)) id 1vB3fA-00EEef-2N; Tue, 21 Oct 2025 12:07:57 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Tue, 21 Oct 2025 12:07:56 +0800 Date: Tue, 21 Oct 2025 12:07:56 +0800 From: Herbert Xu To: Stephen Rothwell Cc: Meenakshi Aggarwal , Pankaj Gupta , Linux Crypto List , Linux Kernel Mailing List , Linux Next Mailing List Subject: [PATCH] KEYS: trusted: Pass argument by pointer in dump_options Message-ID: References: <20251020140735.39084e85@canb.auug.org.au> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20251020140735.39084e85@canb.auug.org.au> Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" On Mon, Oct 20, 2025 at 02:07:35PM +1100, Stephen Rothwell wrote: > Hi all, >=20 > After merging the crypto tree, today's linux-next build (x86_64 > allmodconfig) produced this warning: >=20 > security/keys/trusted-keys/trusted_caam.c: In function 'dump_options': > security/keys/trusted-keys/trusted_caam.c:37:20: note: the ABI of passing= struct with a flexible array member has changed in GCC 4.4 > 37 | static inline void dump_options(struct caam_pkey_info pkey_info) > | ^~~~~~~~~~~~ >=20 > Introduced by commit >=20 > 9eb25ca6c973 ("KEYS: trusted: caam based protected key") >=20 > I am not sure what to do about this. It would be nice if we could > suppress the note as we do not support gcc 4.4 any more. Otherwise, > I suspect that converting the pkey_info argument to a pointer will get > rid of the note. Yes let's change that into a pointer: Reported-by: Stephen Rothwell ---8<--- Instead of passing pkey_info into dump_options by value, using a pointer instead. Reported-by: Stephen Rothwell Signed-off-by: Herbert Xu diff --git a/security/keys/trusted-keys/trusted_caam.c b/security/keys/trus= ted-keys/trusted_caam.c index 090099d1b04d..601943ce0d60 100644 --- a/security/keys/trusted-keys/trusted_caam.c +++ b/security/keys/trusted-keys/trusted_caam.c @@ -29,12 +29,12 @@ static const match_table_t key_tokens =3D { }; =20 #ifdef CAAM_DEBUG -static inline void dump_options(struct caam_pkey_info pkey_info) +static inline void dump_options(const struct caam_pkey_info *pkey_info) { - pr_info("key encryption algo %d\n", pkey_info.key_enc_algo); + pr_info("key encryption algo %d\n", pkey_info->key_enc_algo); } #else -static inline void dump_options(struct caam_pkey_info pkey_info) +static inline void dump_options(const struct caam_pkey_info *pkey_info) { } #endif @@ -108,7 +108,7 @@ static int trusted_caam_seal(struct trusted_key_payload= *p, char *datablob) ret =3D get_pkey_options(datablob, &info.pkey_info); if (ret < 0) return 0; - dump_options(info.pkey_info); + dump_options(&info.pkey_info); } =20 ret =3D caam_encap_blob(blobifier, &info); @@ -140,7 +140,7 @@ static int trusted_caam_unseal(struct trusted_key_paylo= ad *p, char *datablob) ret =3D get_pkey_options(datablob, &info.pkey_info); if (ret < 0) return 0; - dump_options(info.pkey_info); + dump_options(&info.pkey_info); =20 p->key_len =3D p->blob_len + sizeof(struct caam_pkey_info); memcpy(p->key, &info.pkey_info, sizeof(struct caam_pkey_info)); --=20 Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt