Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2952460pxb; Tue, 12 Jan 2021 02:42:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJwewZBUq3w6F/aouGue7VxD04k9rOAMF2ClDXBfOeo4Hg1v0mz+szvdsnMIxt9nTsTSQ62O X-Received: by 2002:a17:906:2755:: with SMTP id a21mr2791297ejd.374.1610448152345; Tue, 12 Jan 2021 02:42:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610448152; cv=none; d=google.com; s=arc-20160816; b=HIPi8Si12gBkM3jErld8VPZPPiRptJjBVMxh7YrVUXEg3niNlFlzHWXcdtZC57qoLv lLUE6z4rAqtfe8E57qcXeJrJcCNzL68d4ubmCtjibjy5CyoKBPEzvEonxAMZf5dW+9b0 n36E+U9C0dZd8685N+5Ms5qQpz/3BqPGcpx55GLS4R/lDukUQT5kMPWouwwXavnbYsj4 Qqm9Zy2wrxLxsWSickHYhBlSYoD+L52/vBvRTER7szlkmH/lI8MaBYQlE3ZOye8UU4kC MM3w3uAYKDfx4SM1P23wcUO0Lmqqd9Gs/yI3AtkuTeRqtUbBcz+m4/4EozxNQEN8MwX6 /NkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=Nv/zP2h6yHmultnitPDgLlwcKLI62F6LDdyCUTp686A=; b=vXX0Y92pM9N9/59p63GQfXwofO/w7ikma64eNEI0gtrrG+Cl1c/Tp25DF+oO1IBVEL scqhdlw75v9wZ6GePLrIMv7VWvuIBzYhCcwzVr+O73sGLVL2TfQbtvPv/rwQLcv8FLw7 Trzv359UMgoMf307F35wkm4HsIeelwqjK1A3bq29mc3kGPwyNVpwJ+fPzgRIAABsZl96 N/aqAb+4K9jvxppKhWV1ZCxqJKtUv7ec4TEAIe18GJp4FHYvUzxjeudEYC439dzPpnE9 Cbdbmm9pm1JHqCTSzHwJv2ajJcmlF4zSt+SNJ/ZjIKPBLwNF5qb8vlVwSIk5BuTH8VOX 3qgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=uukft+lC; 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 n3si1129142edr.560.2021.01.12.02.42.09; Tue, 12 Jan 2021 02:42:32 -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; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=uukft+lC; 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 S1731597AbhALAqu (ORCPT + 99 others); Mon, 11 Jan 2021 19:46:50 -0500 Received: from so254-31.mailgun.net ([198.61.254.31]:12547 "EHLO so254-31.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731480AbhALAqf (ORCPT ); Mon, 11 Jan 2021 19:46:35 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1610412370; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=Nv/zP2h6yHmultnitPDgLlwcKLI62F6LDdyCUTp686A=; b=uukft+lCOJ+3a63Qz055xp2svanPRdAr2a9kXDm2DP6uVdRGhBL+jdauCCuwcj0Tf6yu7Sla dlAk0vLCnVucmiM0Ycr14zyChPp1QP+z1Cm652oX7xP+GWtlp2ez1T27IH7ewfkveytipJSV eGZYl3q1yDObVu4rHhtVrCktibk= X-Mailgun-Sending-Ip: 198.61.254.31 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n09.prod.us-west-2.postgun.com with SMTP id 5ffcf12bd84bad3547658e9e (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 12 Jan 2021 00:45:31 GMT Sender: cang=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id DC9DEC43478; Tue, 12 Jan 2021 00:45:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: cang) by smtp.codeaurora.org (Postfix) with ESMTPSA id 7F5D2C433C6; Tue, 12 Jan 2021 00:45:29 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 12 Jan 2021 08:45:29 +0800 From: Can Guo To: Bean Huo Cc: asutoshd@codeaurora.org, nguyenb@codeaurora.org, hongwus@codeaurora.org, ziqichen@codeaurora.org, rnayak@codeaurora.org, linux-scsi@vger.kernel.org, kernel-team@android.com, saravanak@google.com, salyzyn@google.com, rjw@rjwysocki.net, Alim Akhtar , Avri Altman , "James E.J. Bottomley" , "Martin K. Petersen" , Stanley Chu , Bean Huo , Nitin Rawat , Adrian Hunter , Bart Van Assche , Satya Tangirala , open list Subject: Re: [PATCH 2/2] scsi: ufs: Protect PM ops and err_handler from user access through sysfs In-Reply-To: <6eaa5c51c0b17968e0169b8a16bdbfa4934af5d8.camel@gmail.com> References: <1609595975-12219-1-git-send-email-cang@codeaurora.org> <1609595975-12219-3-git-send-email-cang@codeaurora.org> <80a15afab8024d0b61d312b57585c9322ac91958.camel@gmail.com> <7d49c1dfc3f648c484076f3c3a7f4e1e@codeaurora.org> <1514403adf486ac8069253c09f45b021bad32e00.camel@gmail.com> <606774efd4d89f0ea78cefeb428cc9e1@codeaurora.org> <146b46a5c38f4582a9a8e6df1d87cdfc0684f549.camel@gmail.com> <976641f42211af23d90464d0c4841cc40740b0d7.camel@gmail.com> <7f193fe5abfb41aa72d17f7884cbd113@codeaurora.org> <6eaa5c51c0b17968e0169b8a16bdbfa4934af5d8.camel@gmail.com> Message-ID: <9d74b57f9a26878705b7162a36b2bceb@codeaurora.org> X-Sender: cang@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-01-11 18:04, Bean Huo wrote: > On Mon, 2021-01-11 at 17:22 +0800, Can Guo wrote: >> > > meaning you are tring to access a register when clocks are >> > > disabled. >> > > This >> > > leads to system CRASH. >> > > >> > >> > OK, let it simple, share this kind of crash log becuase of access >> > sysfs >> > node in the shutdown flow. >> > >> > >> > > [2] OCP is over current protection. While UFS shutting down, you >> > > may >> > > have put UFS regulators to LPM. After that, if you are still >> > > trying >> > > to >> > > talk to UFS, OCP can happen on VCCQ/VCCQ2. This leads to system >> > > CRASH >> > > too. >> > >> > the same as above, share the crash log. >> > >> >> If you have hand-on experiences on NoC and/or OCP issues, you won't >> ask >> for the crash log. The tricky parts about critial NoC and OCP issues >> is > > OK, interesting. would you tell me which register access node in ufs- > sysfs.c can trigger this crash? let me verify your statement. > > I believe I have explained enough to prove we need this change. If you are really interested in NoC and OCP, feel free to ping me on teams, I will show you how to trigger one and what is it like on my setup. Can Guo. > Bean > >>