Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2149361pxb; Mon, 11 Jan 2021 02:08:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJz6E+oybP/ncyABag0PjPHA6eB3mvU7giPLbaLLJ+bpg+ZdqyK2C9rEYizTkrQezaj2c4t9 X-Received: by 2002:a05:6402:212:: with SMTP id t18mr13677647edv.37.1610359732635; Mon, 11 Jan 2021 02:08:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610359732; cv=none; d=google.com; s=arc-20160816; b=mTIGOW7CFLMIkfok9q1bjpNNPvbFHrwLjqGmSFvyh9mNqOpYqbmr2zLnFL+fTV6dk+ EUJkM3yNIEg77C9xFmN0vDlqaIKAZLWN9brf4hF1T9z7lyJ1ickpHohZfZFR0q3muie3 ES297D10j4W4c14x21OqL0doJF70UwLHO1Gzkd1cMSpQGDIBnW1S3OFy3WYwjRv9VEqy P7HWygUwxtN1aOgPnxVmHW4Lw8dEYuuRoo/loM4Dzspfiy3zv3bbx0rUYLSU8KTsycFw kq5DPNBpZ399rykq6jrTH7kmpawU9JMIs1kgzij489Jn42MzP94nStZUfIzzmqhHO0d0 V9Aw== 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:date:cc:to:from:subject:message-id :dkim-signature; bh=YOzaCXEr/kpfYx4XNxIfJ2wmIFUIzb+KQl5qAT3V4vg=; b=ae7fTcRj+tGIQgz9BHwNTsRRqb/FDCNuAFRSbz7G1tZgbjWUT/WjiOLoa2d8WDXpDw 6QGFY3rkBJo2KMR+yrkXDk7yelpenHmCL4ykh4v9m0i2bn65TV7i06clNSSatsUc0WEX Itn1/jB57FNjXpWhemVfez1usIM2O5GmuUCYgH1a1PgBqrfjiYlsp1Zlu+sD2FZvKjyc dI3VNWvzVb9A8AA6xOn5rx/MpKJDLJNrnVvx6Bx0S58Q5w4uN2lvpesEfKYbFC6TiwnZ JHuCSl8rrPWhz6gaQWmWDxDVio7H6rQ9igMIQHqKakKeq1rt31IMx+vvDrS44h4uTMcb n58Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=inC2mB8B; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z2si6738917ede.501.2021.01.11.02.08.28; Mon, 11 Jan 2021 02:08:52 -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=@gmail.com header.s=20161025 header.b=inC2mB8B; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728732AbhAKKFQ (ORCPT + 99 others); Mon, 11 Jan 2021 05:05:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728527AbhAKKFQ (ORCPT ); Mon, 11 Jan 2021 05:05:16 -0500 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C40AFC061786; Mon, 11 Jan 2021 02:04:35 -0800 (PST) Received: by mail-ed1-x52b.google.com with SMTP id h16so18138922edt.7; Mon, 11 Jan 2021 02:04:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=YOzaCXEr/kpfYx4XNxIfJ2wmIFUIzb+KQl5qAT3V4vg=; b=inC2mB8BG86FhisiYKWxfnrs2hC5mpc4KyEy1kdQaPEHzCE0j8clGN3LnG1hAU5vYn fH4mIN5Q23lzKwoab14+TcI/CDcOLcVmRjANBfmN+laQBAR7oecs9LXsXvWaP8udEdLD wORuwEbgsUG0r6YjypoMiLW25ylyzBxT8JbwjFNkgH8MWTy59sXU/Oktrcpa+7TaYFEv IZL15lQabuYcRum5hy6ZDo1kDPBAlLugrhJUAl3/q6LIRETEsXiqW8CxxrRDwmnS9XkF 4E9qsARvS+Cr5l1/wJf1VHJSc4aqtVEZ+/ERCGiGS/mhz3wBZM9n/UOLkNLQmZfN7CLq 6hSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=YOzaCXEr/kpfYx4XNxIfJ2wmIFUIzb+KQl5qAT3V4vg=; b=ZvWiwsgbILGEBql9TQwZAWNi69pdPaHP2L/uy/2Hv+pWlAfcqmtu8RVJCG8tagWprE 8t8XkUjnrz4/NLqg14f8okCPIWn1+i6y2PeTNPKaDq61+83/TYOs1XI8yyQvy61Hn5Gc VNsO36heid6oXdo/Zo1AqnidHkBoGt/lCdlwIi8pyjzn5btwn+p/jeDOZOjgLmHnXUZF 0QqFXZROvhKdfl5+eRS7HJSuhx0A0uz/AQ9OdyKQj+w8yAUOFooRIr+jl7RyMfyx+f8a KWffPIoz1rs+BLxfXNCTyVRc22xOOV01NOehXkm5hi4zhNfWS156vF9jBH7jbCgPigm0 QwKQ== X-Gm-Message-State: AOAM532mAeCrbgkC8ABIHMTxCPdePbEPj9ogR73FxPTwdYmxq4JR0R8I 0zp5O0ICNUftnxqui3C4BBI= X-Received: by 2002:a05:6402:746:: with SMTP id p6mr13672420edy.313.1610359474332; Mon, 11 Jan 2021 02:04:34 -0800 (PST) Received: from ubuntu-laptop (ip5f5bfcff.dynamic.kabel-deutschland.de. [95.91.252.255]) by smtp.googlemail.com with ESMTPSA id v18sm6781220ejw.18.2021.01.11.02.04.32 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Jan 2021 02:04:33 -0800 (PST) Message-ID: <6eaa5c51c0b17968e0169b8a16bdbfa4934af5d8.camel@gmail.com> Subject: Re: [PATCH 2/2] scsi: ufs: Protect PM ops and err_handler from user access through sysfs From: Bean Huo To: Can Guo 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 Date: Mon, 11 Jan 2021 11:04:31 +0100 In-Reply-To: <7f193fe5abfb41aa72d17f7884cbd113@codeaurora.org> 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> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Bean >