From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (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 13B61396D1A for ; Fri, 6 Mar 2026 14:54:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772808856; cv=none; b=sMcDftXxXogWkhXLFfNPqz5DfBLL0BNjmhppvfPcyITHGyejFjle7wuC7UkT9P2DOmNoT42tzDHKO1m+NZBIHTt3awckflMDbsCeniuUkjfwKiL6LjljWhyK4PRQQAq3x9vm1eNGJHpBGlZ1kQ1EI88CeV6q7v0uvZFzA9Phgr4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772808856; c=relaxed/simple; bh=GZGaDDYLoKh/sEF19UQqD8F312SaVEbWa7PmuamAQ4A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ayicj+ZuKUIPDf1s5/9ICbi69IUbKYeeQ7j5KpjuMT7ugbmXsRVWqsiBxG5G0WHBNoqQvTM7F3SN3392d9aSSlyekv7XU6XOAvwMFCQNhF9gg1x8XdN3CQ69Mgns70BxvqSc+r7WHoLnfr3o9mgnn3pf8rqgxhM3fxtpUkqXozQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id ACEE968BFE; Fri, 6 Mar 2026 15:54:09 +0100 (CET) Date: Fri, 6 Mar 2026 15:54:09 +0100 From: Christoph Hellwig To: alistair23@gmail.com Cc: hare@suse.de, kbusch@kernel.org, axboe@kernel.dk, hch@lst.de, sagi@grimberg.me, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Alistair Francis , Kamaljit Singh Subject: Re: [PATCH] nvme-auth: Don't propose NVME_AUTH_DHGROUP_NULL with SC_C Message-ID: <20260306145409.GA18945@lst.de> References: <20260306041806.2321074-1-alistair.francis@wdc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260306041806.2321074-1-alistair.francis@wdc.com> User-Agent: Mutt/1.5.17 (2007-11-01) On Fri, Mar 06, 2026 at 02:18:06PM +1000, alistair23@gmail.com wrote: > + u8 dh_list_offset = 30; Can you add a symbolic name for this while we're at it and reuse it for the dhchap.dhlen assignment. > + if (chap->sc_c == NVME_AUTH_SECP_NOSC) > + data->auth_protocol[0].dhchap.idlist[dh_list_offset++] = NVME_AUTH_DHGROUP_NULL; > + data->auth_protocol[0].dhchap.idlist[dh_list_offset++] = NVME_AUTH_DHGROUP_2048; And please add a local variable pointing data->auth_protocol[0].dhchap.idlist to make this somewhat readable.