Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp463676pxb; Thu, 21 Jan 2021 11:13:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzmfkX1knKbaJhMYp6GwNf8wGS9HrozbSa5e2TKIEMsF/gCSANb037elARSp28aWBKwmeXS X-Received: by 2002:a17:906:2454:: with SMTP id a20mr621046ejb.203.1611256434640; Thu, 21 Jan 2021 11:13:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611256434; cv=none; d=google.com; s=arc-20160816; b=vszCBxvIM0HNGXsWMvCNI5B6fWDdYkHa91YI0y7N44YHAdjWrjZ16YmFFmanlEdRYL cLlNs+gDZFnmkT7WE4XhbxnjOP4PAmviJC1bxT7TwtEJAdp3x01tASEWcUdglxKOW3fd BqCNvEBWzxboi1IHIP+zdL8an5Vl+lXOzSGOXFVCvVm19jtnw9Wd942Gr0EOulqfxagi llceGZ9STtj4MqlA8+iwT16YcRzZ0KhT02V4GgPmRtd9XL56y07NjKF4HcuUXYXdmgnD 3djirNlJgtC1UNQQeOmyJFOxJ/PTDqS68tPjn2U8/uGMtm6DTOlLLtgVOIVsBxS6C87Y hh/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=iHmqRd/vGQ8bXH3WweCSc7aVRmaROp/3pb5yIZG6T/I=; b=Y9LGrbvtGKevetDiW2EBXFyV7TiBwr9x7BPKxq7X0HX73WAQmNWWfva5rygpF7ptO9 T1zoGHHWPakCWMhql4J1oWzf3+bxRxCRVVgw9RFmtHHm4ShLML+Jpg1/8PShuTa0gmQ+ HWjE2+ivLqkyTvtTaDPM1wWZdp4Khg798/EZWUST1o4M+/+XZ246k9M0S9UR2GsepBPH 9/OjoPIsRm1GwpOWrjpL+T7eoeJyZbjLkvM07dojdSPIcgoHgprq+hv/GiixgLEBj6CX Q9rEuXyoVlWCrHISYzGgv9v1Y8xwdqlSl2ojuGafnGMSSW82eaLb8neE04vvE6navz3G gCTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j18si2696574edw.197.2021.01.21.11.13.28; Thu, 21 Jan 2021 11:13:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727019AbhAUTLW (ORCPT + 99 others); Thu, 21 Jan 2021 14:11:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:38610 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726821AbhAUTKh (ORCPT ); Thu, 21 Jan 2021 14:10:37 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8BDCF221E7; Thu, 21 Jan 2021 19:09:52 +0000 (UTC) Date: Thu, 21 Jan 2021 14:09:51 -0500 From: Steven Rostedt To: Denis Efremov Cc: Gaurav Kohli , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v1] trace: Fix race in trace_open and buffer resize call Message-ID: <20210121140951.2a554a5e@gandalf.local.home> In-Reply-To: References: <1601976833-24377-1-git-send-email-gkohli@codeaurora.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 21 Jan 2021 17:30:40 +0300 Denis Efremov wrote: > Hi, > > This patch (CVE-2020-27825) was tagged with > Fixes: b23d7a5f4a07a ("ring-buffer: speed up buffer resets by avoiding synchronize_rcu for each CPU") > > I'm not an expert here but it seems like b23d7a5f4a07a only refactored > ring_buffer_reset_cpu() by introducing reset_disabled_cpu_buffer() without > significant changes. Hence, mutex_lock(&buffer->mutex)/mutex_unlock(&buffer->mutex) > can be backported further than b23d7a5f4a07a~ and to all LTS kernels. Is > b23d7a5f4a07a the actual cause of the bug? > Ug, that looks to be a mistake. Looking back at the thread about this: https://lore.kernel.org/linux-arm-msm/20200915141304.41fa7c30@gandalf.local.home/ That should have been: Depends-on: b23d7a5f4a07 ("ring-buffer: speed up buffer resets by avoiding synchronize_rcu for each CPU") -- Steve