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 X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E060C2D0F0 for ; Wed, 1 Apr 2020 22:53:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 54088206E9 for ; Wed, 1 Apr 2020 22:53:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389499AbgDAWxi (ORCPT ); Wed, 1 Apr 2020 18:53:38 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:42412 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389479AbgDAWxi (ORCPT ); Wed, 1 Apr 2020 18:53:38 -0400 Received: from gwarestrin.me.apana.org.au ([192.168.0.7] helo=gwarestrin.arnor.me.apana.org.au) by fornost.hmeau.com with smtp (Exim 4.89 #2 (Debian)) id 1jJmEK-0004Od-Hj; Thu, 02 Apr 2020 09:53:05 +1100 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Thu, 02 Apr 2020 09:53:04 +1100 Date: Thu, 2 Apr 2020 09:53:04 +1100 From: Herbert Xu To: Eric Biggers Cc: Marco Elver , Dmitry Vyukov , syzbot , Borislav Petkov , David Miller , "H. Peter Anvin" , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , LKML , Ingo Molnar , syzkaller-bugs , Thomas Gleixner , the arch/x86 maintainers Subject: Re: KCSAN: data-race in glue_cbc_decrypt_req_128bit / glue_cbc_decrypt_req_128bit Message-ID: <20200401225304.GA16019@gondor.apana.org.au> References: <0000000000009d5cef05a22baa95@google.com> <20200331202706.GA127606@gmail.com> <20200401162028.GA201933@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200401162028.GA201933@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 01, 2020 at 09:20:28AM -0700, Eric Biggers wrote: > > The issue is that fixing it would require adding READ_ONCE() / WRITE_ONCE() in > hundreds of different places, affecting most crypto-related .c files. I don't think we should be doing that. This is exactly the same as using sendfile(2) and modifying the data during the send. As long as you don't trigger behaviours such as crashes or uncontrolled execution then it's fine. The output is simply undefined. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt