From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 361A83290C3 for ; Wed, 18 Mar 2026 16:48:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773852489; cv=none; b=Q+oYSYCcvnuTgkB9o2OwPMm9oSlSsVN4IZhgqu4ktAiCyC5QWm9k/bX0kVosKBciXMirb/chPJF4FHgfyJT5fjZYOGxrD5KaqYOEkX/vn1wByLqngYw1Sqoux8CcxXsnrziPLY6b4PTW45JSC3YUeNS6uSHrdN6rqTisZiQtPrA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773852489; c=relaxed/simple; bh=PKT9F9Bv/CmooAEC8wVeX5cmD0kDmh+SOh7Id6R0ZIs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Zhj8znSF0Vj2+S6BoCNiKGi/r0/MCkT51lb7ArjUFB/W2gpZ6MIYhoVy7IU71BfxxsUETmmYAmojgY7yZWFCTVrsV1aWaaihuwYSXFuPUicR6HhH33kobnmu+f9j9FC7T7z/Up0PkDrC/3OrsU4dLdci0d0nHtWHkI8VvLU2fmg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=EGElgVeo; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=XIEoLe/i; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=EGElgVeo; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=XIEoLe/i; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="EGElgVeo"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="XIEoLe/i"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="EGElgVeo"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="XIEoLe/i" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 6C3975BECE; Wed, 18 Mar 2026 16:48:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1773852486; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vyNSpfJycQvmc9Dwcox0eBbj7nc/2eYewd/VeIr02Hk=; b=EGElgVeo3SMJOArkPU9ljZoTP+jzK0+L6WLv7VcCHWi51Jc/XxDSpOfj2AhGpdPjwjOXG7 u2edWMR0CqMeYQjip016q3ZJLq3cxo+0Wa6T8UYMgCOWeZe5HfaY1AN/DQAl7c0Ah2/din 7us04mIqmZyqyCXRZVU2lpibVX7UHsA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1773852486; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vyNSpfJycQvmc9Dwcox0eBbj7nc/2eYewd/VeIr02Hk=; b=XIEoLe/ieasKOL9jBUt8Jj/u3Q/5O3wdpCTe/N4HoHEej/EfngSSw3Mnf3BFi/xV4W62WB gH6q2b24nHK5BHCw== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1773852486; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vyNSpfJycQvmc9Dwcox0eBbj7nc/2eYewd/VeIr02Hk=; b=EGElgVeo3SMJOArkPU9ljZoTP+jzK0+L6WLv7VcCHWi51Jc/XxDSpOfj2AhGpdPjwjOXG7 u2edWMR0CqMeYQjip016q3ZJLq3cxo+0Wa6T8UYMgCOWeZe5HfaY1AN/DQAl7c0Ah2/din 7us04mIqmZyqyCXRZVU2lpibVX7UHsA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1773852486; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vyNSpfJycQvmc9Dwcox0eBbj7nc/2eYewd/VeIr02Hk=; b=XIEoLe/ieasKOL9jBUt8Jj/u3Q/5O3wdpCTe/N4HoHEej/EfngSSw3Mnf3BFi/xV4W62WB gH6q2b24nHK5BHCw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 179464273B; Wed, 18 Mar 2026 16:48:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id RZYmBEbXummddgAAD6G6ig (envelope-from ); Wed, 18 Mar 2026 16:48:06 +0000 Message-ID: <45828832-b084-4e2d-bfb1-751c4d18321e@suse.de> Date: Wed, 18 Mar 2026 17:48:05 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] nvme-auth: Include SC_C in RVAL controller hash To: Chris Leech , alistair23@gmail.com Cc: kbusch@kernel.org, axboe@kernel.dk, hch@lst.de, sagi@grimberg.me, kch@nvidia.com, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Alistair Francis References: <20260317031330.2794078-1-alistair.francis@wdc.com> <20260318-straw-snazzy-a8976b9c9427@redhat.com> Content-Language: en-US From: Hannes Reinecke In-Reply-To: <20260318-straw-snazzy-a8976b9c9427@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-4.30 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-0.999]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_TO(0.00)[redhat.com,gmail.com]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_SEVEN(0.00)[10]; FUZZY_RATELIMITED(0.00)[rspamd.com]; MID_RHS_MATCH_FROM(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:helo] X-Spam-Flag: NO X-Spam-Score: -4.30 X-Spam-Level: On 3/18/26 17:40, Chris Leech wrote: > On Tue, Mar 17, 2026 at 01:13:30PM +1000, alistair23@gmail.com wrote: >> From: Alistair Francis >> >> Section 8.3.4.5.5 of the NVMe Base Specification 2.1 describes what is >> included in the Response Value (RVAL) hash and SC_C should be included. >> Currently we are hardcoding 0 instead of using the correct SC_C value. >> >> Update the host and target code to use the SC_C when calculating the >> RVAL instead of using 0. > > Am I correct in reading this, the current kernel implementation is out > of spec when doing secure channel concatenation (SC_C != 0) with > bidirectional authentication (R1 takes SC_C into account, but not R2)? > I certainly never tested secure concatenation with bi-directional authentication (seem to have fallen into the same trap as Martin George). So the chance of regression is rather small. When you fix it, pleas add a test-case for blktests, too, such that we extend test coverage for this particular corner-case. Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich