[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] crypto/rijndael: adjust for Misra C:2012 rule 8.3


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • Date: Wed, 13 May 2026 22:57:30 +0200
  • Arc-authentication-results: i=1; bugseng.com; arc=none smtp.remote-ip=162.55.131.47
  • Arc-message-signature: i=1; d=bugseng.com; s=openarc; a=rsa-sha256; c=relaxed/relaxed; t=1778705850; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:X-Sender:Organization:Content-Type: Content-Transfer-Encoding; bh=2+2IlPZf8jZ1VbwpfpG+rDF5J+dRcr28rGmbAHPKR24=; b=SlOgZVKDhsl7tk/mFBaPvqFaCPMpRWjIpV+327782dmz7RGJALDe7ERAzc7cFZpGMi3G NwR5/JXN/jHqwkHG2uAUFybL07FYSPz1SU8kZnTw8dsEXM7Xbp6PtkyMHFnx7fXBednQx CU57ze35hGVGrob2rCzsEa6hsOM9NzqAGch04w045+7IlhtpQNYMTVFDfF39bqXfhfFuE RsFhgO8lFMaSG0Y0O/S4hQg3RwxYSoe76zKZ28fFN2EZl3B85dvFmLJVgHHJNOknzfQWd hgRttC9ZD1Pik7ZmEtHLbpJ3treDYA5DjuU7yAgftdEDYQk5sXGyzAWH/oO8cpWn/d97j 8sCIiZgJfRB5QSnWZuFZaSwFynt/Bq7sJIqs0vOYfWJRIzeWsRRQw3inoWz4Hw3LCqQwB YEzQsHC0tr0/bI3JwSCJTzqMTC8xk004xj/Zr578F1qUQ/90tKjHe5irpylCDUGvNAwig yp94p4TE+hsCJ2f2K7OqLJAi87ba6uUtT5XGHh19ShxgtxLDmSe+Gn5ki8UV0Y6xwI4Bq p4qV1YX3nmiWg+bTLGUE0qNbgZBDuJtaYHk66z5fXsaqBk2foyLHMiJ/qzrsod8tNzRWQ aQvv4IiXFLzHhVR8yE223tWxV/jU0GXmEP3qR1tdpZvqT1mB40BN/llOCyainHk=
  • Arc-seal: i=1; d=bugseng.com; s=openarc; a=rsa-sha256; cv=none; t=1778705850; b=ceNqlb+CuF+jorU8Wx9BcxFvagjdfPy49Ky5wBqMxnAU/q1rGMG6y/SqonF3zc8YpWKQ 37Cy56+B6GHF4CrIDmXQvr3J3rC3PXIl7cSl6uFImmIulAvIbtU8vMI4MHHCgDgJPlhMw Gsf8irz85frWaQ6VEPFWqCg+hWrdDQhJ+BNLI3jnL2YAll56UUXeLttGMINjIIybXZfdj ZT/7WDKxkkgUOicCXY+1Q6mt78r+gqQHtXk82eTjMEtQb0Doztt+MVa9taDUk1QeZWbou lGkeGpU1i/WXBBoaB2bvoTbHSpdROHvRvEAn8cHhaeCRARIxZ2ldpOE0TGKTZ+XZyEwa8 p31xTSRIMiUZBdicEL9UBskXppFFbBDjSnvTa6FaA7clQkpiNS0YCbOEBZjSGvWuQELf4 cjcle2d5aMfH7xRVCBi7u1Lq3RvhgR7teIoVVdhjGKV1PZ20RjqxQQLIjM7igzYm/ghEG yidtjzcaT15xhUKaJ7UmbzvyC+m4RgKI81vpbM8MyiK0cTbAfnGaoKzfsrr/WYq8OvgoG Tp0oWBBnxI9GrnwLjXzcHVJMSX9X8t7yg+wGfsBq0qxcNQ/FKPGxLrlz3riJkppMbYjpp gxWtC9UOJ/fQCks1QKAvrUGMjSOoaFhDcZfqcF1BBGqQVu1PbaOmDepFUO0vpI0=
  • Authentication-results: eu.smtp.expurgate.cloud; none
  • Authentication-results: bugseng.com; arc=none smtp.remote-ip=162.55.131.47
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 13 May 2026 20:57:35 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2026-05-13 16:01, Jan Beulich wrote:
... ("All declarations of an object or function shall use the same names and type qualifiers"). Bring declarations in line with the corresponding definitions, accepting the use of the being-phased-out u<N> types. While
we don't define NEED_RIJNDAEL_DECRYPT, cover rijndaelKeySetupDec() as
well for completeness.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>


Reviewed-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>

with the typo in rijndaelKeySetupDec's declaration fixed as noted by Stefano

--- a/xen/include/crypto/rijndael.h
+++ b/xen/include/crypto/rijndael.h
@@ -50,9 +50,8 @@ int   rijndael_set_key_enc_only(rijndael_c
void rijndael_decrypt(rijndael_ctx *ctx, const unsigned char *src, unsigned char *dst); void rijndael_encrypt(rijndael_ctx *ctx, const unsigned char *src, unsigned char *dst);

-int rijndaelKeySetupEnc(unsigned int rk[], const unsigned char cipherKey[], int keyBits); -int rijndaelKeySetupDec(unsigned int rk[], const unsigned char cipkerKey[], int keyBits); -void rijndaelEncrypt(const unsigned int rk[], int Nr, const unsigned char pt[16],
-                       unsigned char ct[16]);
+int    rijndaelKeySetupEnc(u32 rk[], const u8 cipherKey[], int keyBits);
+int    rijndaelKeySetupDec(u32 rk[], const u8 cipkerKey[], int keyBits);
+void rijndaelEncrypt(const u32 rk[], int Nr, const u8 pt[16], u8 ct[16]);

 #endif /* __RIJNDAEL_H */

--
Nicola Vetrini, B.Sc.
Software Engineer
BUGSENG (https://bugseng.com)
LinkedIn: https://www.linkedin.com/in/nicola-vetrini-a42471253



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.