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=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,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 22931C63777 for ; Mon, 30 Nov 2020 19:04:58 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AC271206CB for ; Mon, 30 Nov 2020 19:04:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qWg2l9P7"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=alien8.de header.i=@alien8.de header.b="jrCIk71I" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AC271206CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=alien8.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SnZdkF2GA9fYI1NCjefZw9AJFfeXrMEufpCi4Kb5RT4=; b=qWg2l9P7WO0Mtea2VPVeQsT9I ff9hhYzpWNK6mrP92MBMXTvUlcTDo2XnvqBUihd9hAWJvOwOhLcaptxlX5HIryV7+/F/ukm+OEwwj iTvyU/JQLAnjXsfjOiM4aAZHgJzpCzfmpFjo2VmrnT60zOvJ84Vlc1QHXQvnmEWjCsdRbbGBkrKG7 13F5ryEWuKNb//yOW+xOwtIjosaK+ERWnPqGcBm0M8iGZJDl/dmKDZWIMls0a/GvC5KYisoWnOnKF 7R2ddPjmQ+DhkSoSDhBOd28+zxQs62g4eK+MghPhVBhZ4vImoqWKO130YWKYLFlrcgbmDm5cQieB8 gg9VJVQTg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjoSc-0008TJ-Ev; Mon, 30 Nov 2020 19:03:42 +0000 Received: from mail.skyhub.de ([2a01:4f8:190:11c2::b:1457]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjoSX-0008Ra-Tl for linux-arm-kernel@lists.infradead.org; Mon, 30 Nov 2020 19:03:39 +0000 Received: from zn.tnic (p200300ec2f0c0400247ce5eea000f6a3.dip0.t-ipconnect.de [IPv6:2003:ec:2f0c:400:247c:e5ee:a000:f6a3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 61A701EC04A9; Mon, 30 Nov 2020 20:03:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1606763014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=rOUJuYK9wa/A/SuFfQYy/ZZkyjuXFeT8MrvwplFTrug=; b=jrCIk71InAWgGv6MbKCP/PFkK+mFlCMD6mvNGDXGXBjva/yHKnrkiSrGICWiapeoO0tSSp boZw16x4ifvlxt7leKkJr6pVUlJlOa3knq3QcEFk9Kh0RdTWee4gd76h/IgS11F7RWPW3w 8cJNDcBF2o3fMatncsMx1sRdnvBwnx4= Date: Mon, 30 Nov 2020 20:03:31 +0100 From: Borislav Petkov To: Rongwei Wang Subject: Re: [PATCH 0/3] arm64:msr: Add MSR driver Message-ID: <20201130190331.GI6019@zn.tnic> References: <20201130174833.41315-1-rongwei.wang@linux.alibaba.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201130174833.41315-1-rongwei.wang@linux.alibaba.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201130_140338_122694_976E9798 X-CRM114-Status: GOOD ( 12.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gshan@redhat.com, Anson.Huang@nxp.com, geert+renesas@glider.be, catalin.marinas@arm.com, masahiroy@kernel.org, linux-kernel@vger.kernel.org, michael@walle.cc, krzk@kernel.org, bjorn.andersson@linaro.org, vkoul@kernel.org, olof@lixom.net, shawnguo@kernel.org, vincenzo.frascino@arm.com, will@kernel.org, ardb@kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Dec 01, 2020 at 01:48:30AM +0800, Rongwei Wang wrote: > MSR ARM driver aims to provide interfacs for user to read or write > data to all system registers. Just a warranty from x86 land: if I were an ARM arch maintainer, I would never never *ever* take such driver exposing naked hw registers to userspace. We have been fighting with this on x86 for years: a7e1f67ed29f ("x86/msr: Filter MSR writes") with userspace tools poking at random MSRs. Read the commit message for what can happen. And taking that thing is like opening a huge can'o'worms that can't be closed anymore. Currently, we're trying to move userspace tools to proper sysfs interfaces but it is a huuuge pain. It is a lot easier to have people define proper interfaces from the get-go where the kernel can control and synchronize access. HTH. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel