Received: by 10.223.185.116 with SMTP id b49csp6040334wrg; Thu, 8 Mar 2018 00:24:51 -0800 (PST) X-Google-Smtp-Source: AG47ELu1sB2dwxxNXCXciP1l/2n+cK+rduC6ZaaLMBdiIB/s1T2New1u3XIvEi0RTLCewpOYs+6M X-Received: by 10.98.178.17 with SMTP id x17mr25846788pfe.2.1520497491570; Thu, 08 Mar 2018 00:24:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520497491; cv=none; d=google.com; s=arc-20160816; b=yiAittXLZL7iGnidH1ecp/bc9S4hU3DqX0ylnnefy6xfvs6YzfTC1ZV969qtOGhq0R w2RGlS0ZhdGz5gGV/Y5fFOMrFERG57uaB0JEBxfH7BgLZCFJbsOP4Yeb2z/GRg1eHq3q bBoBaxUnAcHnC+7k+oeHFjnZAqJOpwy+IRGtxqAjScd3//lFMYJNNqK2Q7X/v17wiohu z9aR30mAAUL49BwiMIzFMQjFGhcHvo3SAWL8tnp7MKlsLyS83rEbcPEsv7V1vOSeOnsh EZYE4MyP3jFT9mzsZAm5SqvjDnpqwZPA2E0Q8gmRVfl8d+COih36gYXO350I0O1qSoHn OuXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=za/UwjzJYBX5KaoplVt3UxEWaZvq0zrtsjpV33zKQXA=; b=Nc/GNGYcsj7ehYW4mvEST3WXNl4gdy79t+wKSEqg1aV/FRXl7P1mywIuGG5hmDGxE7 Ec+OayLQA5Kz+nPFcUiGXEeAWuZgvC5xKVTy634SPz4xhG9xL3+oHjMxbvezObNQwAUi U5IuxRa6TECMsqMAer1Rbxtp/V5kTf/ipWSaU9+a+2B4vLmXi0VxwoS/x+sJMx+aAPHl tUjbAxyF/6Yg+K+YC2rQZAcjtCIHJVGZf2V27s2W9K4ZpuRVDX38KahYOYx6wdjxXNd3 SIWY+ROgzx4iobTto0DzGpDCmKGtxMt4X+95+BHLX1h2Vq3foOKg43i/gUioPxjllg6J m+tw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d88si15376811pfe.215.2018.03.08.00.24.36; Thu, 08 Mar 2018 00:24:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935395AbeCHIX1 (ORCPT + 99 others); Thu, 8 Mar 2018 03:23:27 -0500 Received: from orcrist.hmeau.com ([104.223.48.154]:48588 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755009AbeCHIXZ (ORCPT ); Thu, 8 Mar 2018 03:23:25 -0500 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtp (Exim 4.84_2 #2 (Debian)) id 1etqpZ-0007dP-V5; Thu, 08 Mar 2018 16:23:18 +0800 Received: from herbert by gondobar with local (Exim 4.84_2) (envelope-from ) id 1etqpU-0002CE-BC; Thu, 08 Mar 2018 16:23:12 +0800 Date: Thu, 8 Mar 2018 16:23:12 +0800 From: Herbert Xu To: Greg Hackmann Cc: Steffen Klassert , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 net] net: xfrm: use preempt-safe this_cpu_read() in ipcomp_alloc_tfms() Message-ID: <20180308082312.GA8403@gondor.apana.org.au> References: <20180307224253.152470-1-ghackmann@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180307224253.152470-1-ghackmann@google.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 07, 2018 at 02:42:53PM -0800, Greg Hackmann wrote: > f7c83bcbfaf5 ("net: xfrm: use __this_cpu_read per-cpu helper") added a > __this_cpu_read() call inside ipcomp_alloc_tfms(). > > At the time, __this_cpu_read() required the caller to either not care > about races or to handle preemption/interrupt issues. 3.15 tightened > the rules around some per-cpu operations, and now __this_cpu_read() > should never be used in a preemptible context. On 3.15 and later, we > need to use this_cpu_read() instead. > > syzkaller reported this leading to the following kernel BUG while > fuzzing sendmsg: Please explain why we can't revert f7c83bcbfaf5 instead. Your patch contradicts the comment above the line that you're changing. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt