From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 328A1C64E7A for ; Tue, 1 Dec 2020 14:34:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DC5702080A for ; Tue, 1 Dec 2020 14:34:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731072AbgLAOef convert rfc822-to-8bit (ORCPT ); Tue, 1 Dec 2020 09:34:35 -0500 Received: from out30-42.freemail.mail.aliyun.com ([115.124.30.42]:37284 "EHLO out30-42.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726402AbgLAOef (ORCPT ); Tue, 1 Dec 2020 09:34:35 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=rongwei.wang@linux.alibaba.com;NM=1;PH=DS;RN=17;SR=0;TI=SMTPD_---0UHDgYhH_1606833223; Received: from 192.168.74.104(mailfrom:rongwei.wang@linux.alibaba.com fp:SMTPD_---0UHDgYhH_1606833223) by smtp.aliyun-inc.com(127.0.0.1); Tue, 01 Dec 2020 22:33:43 +0800 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: [PATCH 0/3] arm64:msr: Add MSR driver From: wangrongwei In-Reply-To: <20201201112647.GA22927@zn.tnic> Date: Tue, 1 Dec 2020 22:33:42 +0800 Cc: catalin.marinas@arm.com, Will Deacon , bjorn.andersson@linaro.org, shawnguo@kernel.org, vkoul@kernel.org, geert+renesas@glider.be, Anson.Huang@nxp.com, michael@walle.cc, krzk@kernel.org, olof@lixom.net, vincenzo.frascino@arm.com, ardb@kernel.org, masahiroy@kernel.org, gshan@redhat.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: References: <20201130174833.41315-1-rongwei.wang@linux.alibaba.com> <20201130190331.GI6019@zn.tnic> <8724DF91-5BF0-4265-8091-F9E0C7DC2F1A@linux.alibaba.com> <20201201112647.GA22927@zn.tnic> To: Borislav Petkov X-Mailer: Apple Mail (2.3608.120.23.2.4) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 2020年12月1日 下午7:26,Borislav Petkov 写道: > > On Tue, Dec 01, 2020 at 11:44:52AM +0800, wangrongwei wrote: >> Indeed, I have read the commit message, and it seems that writes data >> to a system register may cause many problems. Actually, we have taken >> this into account. In the current version, we have separated the read >> and write functions to the system registers into two commands, > > There's rdmsr and wrmsr in msr-tools on x86 too. Yes, and x86 also provides two instructions with the same name in the instruction set, but not in ARM. > >> In providing the WRASR function, we consider that users should bear >> the consequences of rewriting registers during the debugging phase. In >> fact, most of the time we rarely use WRASR, and only use it when we >> are very confident. > > As I said, there should never never ever be a tool which allows writing > of registers from userspace. If I could go back in time, I'd stop this > on x86 but it is too late now. Not for ARM though. > > Also, do you see how all the people who replied to your mail, put the > text under the quoted text. Do that too, pls, from now on, and refrain > from top-posting. Thank you for the reminder, it has been corrected! > > Thx. > > -- > Regards/Gruss, > Boris. > > https://people.kernel.org/tglx/notes-about-netiquette Thanks, Rongwei Wang.