Received: by 10.223.185.116 with SMTP id b49csp6508017wrg; Thu, 8 Mar 2018 08:33:11 -0800 (PST) X-Google-Smtp-Source: AG47ELtQJWDbka2tHtZslMEDAmSsQY0nd7Ikjdy308259j9vwG/V/kCymjT65cUacF5toar6HbKQ X-Received: by 10.99.96.73 with SMTP id u70mr20896696pgb.199.1520526791676; Thu, 08 Mar 2018 08:33:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520526791; cv=none; d=google.com; s=arc-20160816; b=Wuj77L76C2+pj8Ye8RSSDtOgnsBWwsERmcq2eiukKKN/ywzmsPFdn4HQ3lqfAu04Ik 1RMssySTEcqBDcnxIHworoo4uo3gpnmpEBwW9/r8fZeh7YqwNBKBiHyTBC0wo3ufSV4Y +wkvdZ5B3qS5WszqXnBkLyiotjumqXD8m+GR4aKRxbOuLC7iURBK6saU1m45mhANGeXF LKiuD3G6W2CQU1uU8Rm0ks7lvktA1iWKirSIbLtNk26MRzV5MHO01rfR9Y+t8/i20z/I QysyS4YvJ+mENs8+Ggkf7LP3m2YEEbVEvujoBo6EUgu+VgShDaY9IQaKfNfm7Ye/fO6a l2gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=gH4602uLCZDLfMpIbylChUhbCyxK1CyBRjeSgAAniz4=; b=mPE/GxRtKywF8bBk4qzDAW8J8rU5So1VJ/Ljri+RKQG0tKoRmrPNTAW0Yy4/2vRF2f RaezullRMz8CLitjZrT1+X4xT16TBy4fdDR9t3a+WZxggLULy8hzs8yTJqbloW/m60je 9rtzYNXtX4g+yBYB4yBCr/E65w2/QIqsvsXkbZcmwbO4mW7bw4deP4OH31U23ZRT/Wrb 2aSrelZvP/a0kUYARE5n8KADFLC50KRbi6L2+/fx/I0FNN16l7fgvPXf/QXz9bNk/9TP CWZxVOlD9ngdI9nX5qqWv2KbASHIVCYIg4gG21zEAJ7qnaTz13SBOOEGYjOf9xo/effE CI8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tVoGPoRR; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p25si13109677pgn.151.2018.03.08.08.32.56; Thu, 08 Mar 2018 08:33:11 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tVoGPoRR; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935888AbeCHQbw (ORCPT + 99 others); Thu, 8 Mar 2018 11:31:52 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:41072 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754612AbeCHQbu (ORCPT ); Thu, 8 Mar 2018 11:31:50 -0500 Received: by mail-pg0-f65.google.com with SMTP id q27so2403347pgn.8; Thu, 08 Mar 2018 08:31:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=gH4602uLCZDLfMpIbylChUhbCyxK1CyBRjeSgAAniz4=; b=tVoGPoRRIppHz68gZ0OI+IOn5h2GH9wu7SxzcH2tp0/Ly7irz906D4bDDvHIef3U3P XL+stm0SGY2Gk/40Vkiq8Hlqn0UuOQetiEFlWTvhRVZ6LVg/QuYo+5wh8n7lcEi01FiR BhMXdEhztYDMwHhClXuJEaFGvaQ1WsQk2O7jf2z1OOVAdykiadGmkuVCuEuMaexqF58R 4s7wntiH4oALGkAEZttCoVZFthvDWIpuA1QrUbrXoxL38h+6Sw2GyP1kYrvzIkVxNyjY O57AzINVbx454tjDmPt30FlLgUlpT0KiCbw52skjARiIiJWOcAefUZRmZspVP37bSH0g aBUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=gH4602uLCZDLfMpIbylChUhbCyxK1CyBRjeSgAAniz4=; b=SqMfUZ4sR6sRjWfENJOcujAclDTmpZFx2g0fEQgQ45aAWuVdlbTF9rcPJrAzdWs/8E /JOdg6v7DlrSxRR5mOjMBWbt6BL8A1Ozu4EvQaS/t4N1AN1aUNbDPZs7JYI0khZzpFLU CPzifTEgfEiCumS1GZLWQBks0QnKopaGlF0uj3F/u2ooYNIzHwSiJp4Sy59DzstqsaEU iO9cWr7Ao/ej1Ya1fe4PiGHSW5IcOLdXZhF/6V8ujidbXosHO8kkn8SN+CP0a6cT1mk5 dH/w/yPJqmOdyPk9Es0LXKR81vK1C6uPRsehRDjLtUSS0Q+3eUoyQqqyEp48RcncBIQ8 Xi6A== X-Gm-Message-State: APf1xPCR633MXs48AUuidX9GAVXPGIdnfvq2s9CRP28BdRDy2z+kbtV9 /upv0YEJB592oL9yWGSkHws2LRL9 X-Received: by 10.98.31.79 with SMTP id f76mr26971894pff.60.1520526710210; Thu, 08 Mar 2018 08:31:50 -0800 (PST) Received: from ?IPv6:2a00:79e1:abc:100:641:391c:2715:1239? ([2a00:79e1:abc:100:641:391c:2715:1239]) by smtp.gmail.com with ESMTPSA id r80sm43408830pfe.170.2018.03.08.08.31.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Mar 2018 08:31:49 -0800 (PST) Subject: Re: [PATCH] net: xfrm: use preempt-safe this_cpu_read() in ipcomp_alloc_tfms() To: Herbert Xu , Greg Hackmann Cc: Steffen Klassert , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20180307192416.233202-1-ghackmann@google.com> <20180308073328.GA8111@gondor.apana.org.au> From: Eric Dumazet Message-ID: Date: Thu, 8 Mar 2018 08:31:47 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180308073328.GA8111@gondor.apana.org.au> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/07/2018 11:33 PM, Herbert Xu wrote: > On Wed, Mar 07, 2018 at 11:24:16AM -0800, Greg Hackmann wrote: >> f7c83bcbfaf5 ("net: xfrm: use __this_cpu_read per-cpu helper") added a >> __this_cpu_read() call inside ipcomp_alloc_tfms(). Since this call was >> introduced, the rules around per-cpu accessors have been tightened and >> __this_cpu_read() cannot be used in a preemptible context. >> >> syzkaller reported this leading to the following kernel BUG while >> fuzzing sendmsg: > > How about reverting f7c83bcbfaf5 instead? > > Thanks, > Because that would not be nice. this_cpu_read() is faster than going through raw_smp_processor_id() and per_cpu_ptr()