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 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 16ADEC83F03 for ; Sun, 6 Jul 2025 17:08:24 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1034871.1407218 (Exim 4.92) (envelope-from ) id 1uYSqS-00086l-RB; Sun, 06 Jul 2025 17:08:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1034871.1407218; Sun, 06 Jul 2025 17:08:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uYSqS-00086e-OA; Sun, 06 Jul 2025 17:08:04 +0000 Received: by outflank-mailman (input) for mailman id 1034871; Sun, 06 Jul 2025 17:08:03 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uYSqQ-00086Y-Fc for xen-devel@lists.xenproject.org; Sun, 06 Jul 2025 17:08:03 +0000 Received: from 19.mo550.mail-out.ovh.net (19.mo550.mail-out.ovh.net [178.32.97.206]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id c21b647d-5a8b-11f0-b894-0df219b8e170; Sun, 06 Jul 2025 19:07:55 +0200 (CEST) Received: from director9.ghost.mail-out.ovh.net (unknown [10.110.58.249]) by mo550.mail-out.ovh.net (Postfix) with ESMTP id 4bZv2L6mFkz6TBs for ; Sun, 6 Jul 2025 17:07:54 +0000 (UTC) Received: from ghost-submission-5b5ff79f4f-76ppr (unknown [10.110.96.185]) by director9.ghost.mail-out.ovh.net (Postfix) with ESMTPS id BB2A88163F; Sun, 6 Jul 2025 17:07:53 +0000 (UTC) Received: from 3mdeb.com ([37.59.142.108]) by ghost-submission-5b5ff79f4f-76ppr with ESMTPSA id t0GeIWmtamiVAQAAyoZJ2A (envelope-from ); Sun, 06 Jul 2025 17:07:53 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c21b647d-5a8b-11f0-b894-0df219b8e170 Authentication-Results:garm.ovh; auth=pass (GARM-108S0026b1d5047-69b6-4606-8963-20d1071b4368, FF3279A5BAD606DDEEDDFD371ACA0117F5CC5AB0) smtp.auth=sergii.dmytruk@3mdeb.com X-OVh-ClientIp:176.111.184.221 Date: Sun, 6 Jul 2025 20:07:50 +0300 From: Sergii Dmytruk To: Jan Beulich Cc: Andrew Cooper , Anthony PERARD , Michal Orzel , Julien Grall , Roger Pau =?iso-8859-1?Q?Monn=E9?= , Stefano Stabellini , trenchboot-devel@googlegroups.com, xen-devel@lists.xenproject.org Subject: Re: [PATCH v3 09/22] xen/lib: add implementation of SHA-1 Message-ID: References: <06dd48a5-f9f8-4504-b580-e9609dedab27@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <06dd48a5-f9f8-4504-b580-e9609dedab27@suse.com> X-Ovh-Tracer-Id: 12495800116330214489 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgddvleegkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefuvghrghhiihcuffhmhihtrhhukhcuoehsvghrghhiihdrughmhihtrhhukhesfehmuggvsgdrtghomheqnecuggftrfgrthhtvghrnhepvdfgveegtdffhfdugeevieehkeetudevfeefgedtleejledvfeeutdetudeiveelnecukfhppeduvdejrddtrddtrddupddujeeirdduuddurddukeegrddvvddupdefjedrheelrddugedvrddutdeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehsvghrghhiihdrughmhihtrhhukhesfehmuggvsgdrtghomhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeigvghnqdguvghvvghlsehlihhsthhsrdigvghnphhrohhjvggtthdrohhrghdpoffvtefjohhsthepmhhoheehtdgmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=ZcsZ6+ff9WwR0SMm9MMw1nkmYGTF6gTxZ1gB87cFGVo=; c=relaxed/relaxed; d=3mdeb.com; h=From; s=ovhmo3617313-selector1; t=1751821675; v=1; b=JtUsZ7vyCQBDCZYOBT7NSet+FTTMqQKGF7RxETMar5tjPrYrHTEkcoV820Kbw3gDfqo/tf91 jkfe6tCTynk0kPIcBCg2rss10tunVHHOl7yPHPdIr4WUeUkQCecD5tuH6iogm90YaX/WKivWGKy b+xkvQ1ypLwS8Dl359F1wNTYLn/nVxMbATI9FV9+E4Qb289N45/Zd8naB6zBJhzJJD496nHgbWW Yg0QZ5RM51c9Rhl+ukw6Tm1Qi8fXf9H+/isN08bLhw3YkGym2EShhEUon9rXDdewR/T3yDUv5t7 PUvyvwPIphjzpYN1fFI/ON595re4v+m5DrbV/aZ9IR0DA== On Wed, Jul 02, 2025 at 04:45:44PM +0200, Jan Beulich wrote: > On 30.05.2025 15:17, Sergii Dmytruk wrote: > > +static void sha1_init(struct sha1_state *sctx) > > +{ > > + sctx->state[0] = 0x67452301UL; > > + sctx->state[1] = 0xefcdab89UL; > > + sctx->state[2] = 0x98badcfeUL; > > + sctx->state[3] = 0x10325476UL; > > + sctx->state[4] = 0xc3d2e1f0UL; > > ->state[] is an array of uint32_t, to the L-s here look inapplicable. I did that trying to stay close to sha2-256.c, but will remove Ls. > > +static void sha1_final(struct sha1_state *sctx, uint8_t out[SHA1_DIGEST_SIZE]) > > +{ > > + const int bit_offset = SHA1_BLOCK_SIZE - sizeof(__be64); > > + unsigned int partial = sctx->count % SHA1_BLOCK_SIZE; > > + > > + __be32 *digest = (__be32 *)out; > > + unsigned int i; > > Please can you omit the blank line in the middle of this (not overly large) > block of declarations? > > With the two adjustments: > Acked-by: Jan Beulich > > Jan Sure, will be gone in v4. Thanks