From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 AC5032FE07 for ; Mon, 6 Nov 2023 22:37:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TLEuc1hk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0757C433C8; Mon, 6 Nov 2023 22:37:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699310221; bh=KnWg66fiIqkuYC0T/uFVfOj96qkrkHSpP3jCOZgXqgQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=TLEuc1hkIODtMEb3BiwZxEdqxQNP2v/9+Vxrf9wO1ngAh2Y9Sh1qOna8RrRNd+nl0 Sl7vPPFM8PF5IvkFwHXWdS0URA4bjMwiAY32r4Hv4GgiYbKRqiefcu6nzpz9kXXph6 dAFD2AKiRFIwjLT78caEFOCL9/THb1cmSJnXMXB23XOtsffvaFemIP7RohRuXBYT1x /fianyyDso/TKsa42ivVLRJShe5XenZ6araTmF1UXty05qjIU2QVTPH3yLCCXYGBsG LAdsaEnxlVkS1jTGmAAPoAmUvD7Sq27ekga6JWMh9wQO1CLZsgqiapUU9zVryStzBi mO0nCwIefHa5Q== Date: Mon, 6 Nov 2023 14:36:59 -0800 From: Jakub Kicinski To: "Dae R. Jeong" Cc: borisp@nvidia.com, john.fastabend@gmail.com, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, ywchoi@casys.kaist.ac.kr Subject: Re: Missing a write memory barrier in tls_init() Message-ID: <20231106143659.12e0d126@kernel.org> In-Reply-To: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 2 Nov 2023 16:11:29 +0900 Dae R. Jeong wrote: > In addition, I believe the {tls_setsockopt, tls_getsockopt} > implementation is fine because of the address dependency. I think > load-load reordering is prohibited in this case so we don't need a > read barrier. Sounds plausible, could you send a patch? The smb_wmb() would be better placed in tls_init(), IMHO.