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 071223B7B6B for ; Mon, 27 Apr 2026 11:24:04 +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=1777289046; cv=none; b=J9PDeCI/XYe/IiIOoycdDTdliykLZ8RQWb/mnyZKlFFNjSRpugmrjaTA9ql/pE8uUzSG3iReMADlVDzwWHzwE1mWtQbGNLAA7XREeEA9vB/IjHeQ0C+tQF/XvpaNcOnTJR0+b/cOopNZGnUDsB5ZnCboGLUHHIqra/X3GyC3XnM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777289046; c=relaxed/simple; bh=Afk2weCahGRyeKGuNXYLvIwqiz498Udy61UruVHpJbg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=NgSI41da4qnRmcOIbG3HAiM/izFZ6b6j6J8RwBDHDNx1bFTCThp1AwFRpm4M2kmfihM/NdYh53Wvgnoq2cU+3o0I7Ct9HurdpNnpJDmYc5U0XeR27FJMzP9NK80sDzOdaG9qoOxyVbebzKBwlqFifFhs7zrGvlujbD8srFZ33kA= 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=jQ5sQo3R; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=NDyeSNlj; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=jQ5sQo3R; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=NDyeSNlj; 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="jQ5sQo3R"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="NDyeSNlj"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="jQ5sQo3R"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="NDyeSNlj" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104: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 24BB75BCC9; Mon, 27 Apr 2026 11:24:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1777289043; 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=enecEF/kxiIim2Tkby9fngRmnDMvi3KSBpX7DDuh9D0=; b=jQ5sQo3RZ64sLKeSPbRdtJEvR66L+VnVOd0tpQghoqFpe1ldmx4GqHjKx1pUloNM0fE9Hs R6s8/gAwaMRATqbNxJ0E53qpVN89Ay+9C/8OCnNnmcLwHwOu6JtB5s+bFxqfR38kI7k2Ic lclYnf24ryIGD5ocENz4M8wlSWAowOA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1777289043; 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=enecEF/kxiIim2Tkby9fngRmnDMvi3KSBpX7DDuh9D0=; b=NDyeSNljzsIM62HnpVoxbDlp0YBcrKK1WiDpFwZIkWoq7Qlyzr7flKBxTFA7gnoF1YAY/g yqsmmIGo9TshAbDw== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=jQ5sQo3R; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=NDyeSNlj DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1777289043; 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=enecEF/kxiIim2Tkby9fngRmnDMvi3KSBpX7DDuh9D0=; b=jQ5sQo3RZ64sLKeSPbRdtJEvR66L+VnVOd0tpQghoqFpe1ldmx4GqHjKx1pUloNM0fE9Hs R6s8/gAwaMRATqbNxJ0E53qpVN89Ay+9C/8OCnNnmcLwHwOu6JtB5s+bFxqfR38kI7k2Ic lclYnf24ryIGD5ocENz4M8wlSWAowOA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1777289043; 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=enecEF/kxiIim2Tkby9fngRmnDMvi3KSBpX7DDuh9D0=; b=NDyeSNljzsIM62HnpVoxbDlp0YBcrKK1WiDpFwZIkWoq7Qlyzr7flKBxTFA7gnoF1YAY/g yqsmmIGo9TshAbDw== 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 EBB5D593B0; Mon, 27 Apr 2026 11:24:02 +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 cHDyOFJH72lfVgAAD6G6ig (envelope-from ); Mon, 27 Apr 2026 11:24:02 +0000 Message-ID: <1bd69c23-cfe5-41e4-bdd7-768cf74d923f@suse.de> Date: Mon, 27 Apr 2026 13:24:02 +0200 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 v2] nvme-auth: Include SC_C in RVAL controller hash To: Alistair Francis , Sagi Grimberg Cc: Christoph Hellwig , kbusch@kernel.org, axboe@kernel.dk, kch@nvidia.com, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Alistair Francis References: <20260415230824.2790058-1-alistair.francis@wdc.com> <20260416051627.GC14802@lst.de> <9bb1d1bd-2acc-453d-970e-762e173d230f@grimberg.me> Content-Language: en-US From: Hannes Reinecke In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-4.51 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-0.999]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; FREEMAIL_TO(0.00)[gmail.com,grimberg.me]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; FUZZY_RATELIMITED(0.00)[rspamd.com]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCPT_COUNT_SEVEN(0.00)[9]; MID_RHS_MATCH_FROM(0.00)[]; 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)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,suse.de:dkim,suse.de:email,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Action: no action X-Spam-Flag: NO X-Spam-Score: -4.51 X-Spam-Level: X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Rspamd-Queue-Id: 24BB75BCC9 On 4/27/26 01:22, Alistair Francis wrote: > On Sat, Apr 25, 2026 at 8:58 AM Sagi Grimberg wrote: >> >> >> >> On 16/04/2026 8:25, Alistair Francis wrote: >>> On Thu, Apr 16, 2026 at 3:16 PM Christoph Hellwig wrote: >>>> On Thu, Apr 16, 2026 at 09:08:24AM +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. >>>> This looks correct. But I guess this breaks existing implementations >>>> in the wild now? >>> It would break an implementation that is using non zero sc_c and >>> updates one of the Linux target or Linux host but not the other. >>> >>> Note that similar changes have been made recently to "HostHost" and >>> didn't seem to break everything >>> >>> 7e091add9c43 nvme-auth: update sc_c in host response >>> 159de7a825ae nvmet-auth: update sc_c in target host hash calculation >> >> Still doesn't mean that it does not break folks. > > The current implementation breaks all cases of secure concat with a > spec compliant implementation though, which does seem worse. > >> >> I don't see how we get around not breaking other than introducing some >> compat mode under some sysctl (yukk). > > Ewww... > >> >> Perhaps secure-concatenation is new enough that the breakage surface >> is very small. > > I suspect the user base right now is small to zero, especially > considering that this won't work with any spec compliant > implementation and no one else has noticed. > Precisely. Secure concatenation is still pretty new, and there are very few implementations out there. So I'm fine with not having a 'compat' setting. 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