Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2686744ybt; Mon, 22 Jun 2020 04:44:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAjPR0stzf5GYSq9rG3OIJ4hMPgtVMWnaK/RwkmsIQ0iPeu+8sVfDbo9bOY+UiEDoCq15k X-Received: by 2002:a17:906:5e08:: with SMTP id n8mr15305480eju.132.1592826247362; Mon, 22 Jun 2020 04:44:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592826247; cv=none; d=google.com; s=arc-20160816; b=MLyM0sChsptT0EsPxKqkoo9ZbMeBGbEoXtPjKfiEnM04qcRBR8CjgRuVlokXHTz2B3 w9E6Xaj2RjFPL202mSodkrpBnvdb5cUyIK1oE2e3PkM998AvyG+faabLPU5LhhUDk3vg 8GyovnhkUIlKOLu4a8c3PtZpl6b1uti0PEkP7tApoA+qXcv7foMvhdtM9UBjZTvnnuUl SPL3eYjRh7YRSLRR+dNDoQquyCSaCNYUVX3wmGz/lBlnGeZ6hWtqL+Ca9O0Y7CYuF8o6 J39qvMJakVKs3dKCjC55Y4K1I8w5UkS1IRz13zDlG2SEoFiOlSGyQwMRcyMAQ+zW3T9c ZwHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature; bh=kQrKbNDc/6IkvX8zRZYkxck2Qap2jlhaPCjcowWErCM=; b=dlW2IDOjn0NomqFGezu18AMzIrOZo0my3kBm9SgoXEY0JusJUpm0WLyY1W/AS/h0Hj 6QPMzwz15cBOPyxhuIxivf/UutQd+z70gP3ZpxymvzbbTiYkAZWQ0UUPBEqsMNulUcKd r6xSRxhx+5r20L5rW8wxfUoNhCbpNxTXqr4FDSM+YLnbgnFWpdR6ttJvXnZKcFEBcyRa gAJRd5NeCBhpYtaGVxyCxmcALMpptWtHRKlI178oXcZVTAXEFmTcaLjwo3SQwl0uUizU voVst6q0ipximvKni44ei+0oiv3UjYnorYnsPWqOnKgmHokxmQGhHedAv6Lc3dQUugO9 keLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=i4Xx0xJz; 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 oh22si7982541ejb.667.2020.06.22.04.43.45; Mon, 22 Jun 2020 04:44:07 -0700 (PDT) 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=fail header.i=@mg.codeaurora.org header.s=smtp header.b=i4Xx0xJz; 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 S1727833AbgFVLjl (ORCPT + 99 others); Mon, 22 Jun 2020 07:39:41 -0400 Received: from mail29.static.mailgun.info ([104.130.122.29]:50627 "EHLO mail29.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726998AbgFVLjk (ORCPT ); Mon, 22 Jun 2020 07:39:40 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1592825980; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=kQrKbNDc/6IkvX8zRZYkxck2Qap2jlhaPCjcowWErCM=; b=i4Xx0xJzTGSJIXHSfE/GMgV9dTERqixLlWH4Elr2Y+cZRsxuB9312w0HSPlueBt1iQ2F1qX0 YR3pPgLHHXI2KEbcTEfGgrmAIji76YvfCsS7Elq1A/Tu9okB4AvWaJFZQ1fBuqzn3MRd4DPG TPjUZjb8p+ajvZQOSAH5WYfAiNU= X-Mailgun-Sending-Ip: 104.130.122.29 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-n13.prod.us-west-2.postgun.com with SMTP id 5ef09873117610c7ffc171ca (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 22 Jun 2020 11:39:31 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 6E665C43395; Mon, 22 Jun 2020 11:39:31 +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=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from [192.168.29.129] (unknown [49.36.71.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mkshah) by smtp.codeaurora.org (Postfix) with ESMTPSA id BFEE6C433C8; Mon, 22 Jun 2020 11:39:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org BFEE6C433C8 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=mkshah@codeaurora.org Subject: Re: [PATCH] soc: qcom: rpmh-rsc: Set suppress_bind_attrs flag To: Stephen Boyd , agross@kernel.org, bjorn.andersson@linaro.org Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dianders@chromium.org, rnayak@codeaurora.org, ilina@codeaurora.org, lsrao@codeaurora.org, john.stultz@linaro.org References: <1592808805-2437-1-git-send-email-mkshah@codeaurora.org> <159281658960.62212.15968925558324290917@swboyd.mtv.corp.google.com> From: Maulik Shah Message-ID: Date: Mon, 22 Jun 2020 17:09:24 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <159281658960.62212.15968925558324290917@swboyd.mtv.corp.google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Thanks for the review Stephen. On 6/22/2020 2:33 PM, Stephen Boyd wrote: > Quoting Maulik Shah (2020-06-21 23:53:25) >> rpmh-rsc driver is fairly core to system and should not be removable >> once its probed. However it allows to unbind driver from sysfs using >> below command which results into a crash on sc7180. > What is the crash? The world falls apart because rpmh APIs start > referencing pointers that point to freed memory? Yes. > >> echo 18200000.rsc > /sys/bus/platform/drivers/rpmh/unbind >> >> Lets prevent unbind at runtime by setting suppress_bind_attrs flag. > Ok. But when the Android module brigade comes knocking they'll have to > revert this change and solve this problem too. Have fun! No should not need to revert this change. Even if rpmh-rsc is planned to be loadable module for android, Once loaded it should be disallowed to be removed. same is the case for PDC irqchip as well. these drivers are core to the system and shouldn't be allowed to rmmod/unbind. Thanks, Maulik > >> Signed-off-by: Maulik Shah >> --- > Reviewed-by: Stephen Boyd -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation