Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp588897pxb; Wed, 27 Jan 2021 16:01:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJyEsTQj62EPE5iZYKNOt1CRSaYakywNgPHP8VVjI334sp2Lr+4y8eJs+qsWS6g87I8CvcRs X-Received: by 2002:a17:906:944a:: with SMTP id z10mr8381275ejx.96.1611792083399; Wed, 27 Jan 2021 16:01:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611792083; cv=none; d=google.com; s=arc-20160816; b=neHfV6ngyHZv+zGxd4W6syyexSrW13JBk147Vz59OoPjB32ehwQA9Am7byl48lKRjs Lket5JTDSpvBtmLvWxiPvc/mS8A/ppASYoYGa0YvCjPLYWu6IduOueng3dwVKVuQ/uEi 0DKp6hRMWQcBQYzALK3blUtxMaFbIwvxJQpIKx+To7+oh7sbFh/Xjl6/gA+1qusQ9PHi Q6x72fKBAyeItdo7hMPZT34BlXM1rAzpe7Opq5WnU7dxGD8QUohEag9wxaQhJaSKf6gH 9VrE1WuYByTcQc7k+ILYRDA1AbPxyY91Rt8bjfOiTXuXBjhTWQob4f/15gZX4aBdWxGp 8xbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5G8ReFENXtBrmXhSJg2W7hD4LjvA0msd1dZRn8y6tqg=; b=pJMq2DZVhnFCMrrq/NU/3xOQjnC+80Pv/iRdy5KvcF0We/xM80GaDkTt9iNCxUgr6s tm74ACGZ2ZOpVzGrOaLuxHfD2fALkqP7MYAeHN3k/FmpjypP10k1+UnYjVCAlYnkgTjY 7fc42tGbry2rO5quiWNgCBD3QgEUhYvLf7r9cf4bD6YndqCw2Mu0YjjCmKrhSjfgNztU o+HczDUrSK62N+/VPYvDuRN58Qa3fJUDl2JCagBteqGvshvPgrNxTAR9odbeqUYoRiIT 2cOulaYpSk/DlIiJ0Dn816onp1Y6hjq9fZ8DvKMCGFSQKFsZomBbfWlDyiQNtgwodhP3 Hrfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=atFyTl5f; 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=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e6si1952925edz.362.2021.01.27.16.00.59; Wed, 27 Jan 2021 16:01:23 -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=@alien8.de header.s=dkim header.b=atFyTl5f; 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=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231407AbhA0Oc1 (ORCPT + 99 others); Wed, 27 Jan 2021 09:32:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231562AbhA0ObM (ORCPT ); Wed, 27 Jan 2021 09:31:12 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4F4BC0613D6 for ; Wed, 27 Jan 2021 06:30:32 -0800 (PST) Received: from zn.tnic (p200300ec2f0f5c00182d512fee937b6e.dip0.t-ipconnect.de [IPv6:2003:ec:2f0f:5c00:182d:512f:ee93:7b6e]) (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 EED0F1EC0472; Wed, 27 Jan 2021 15:30:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1611757831; 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=5G8ReFENXtBrmXhSJg2W7hD4LjvA0msd1dZRn8y6tqg=; b=atFyTl5fy88iKuI/2uTJ9be1SerQyh9GfgvW7ASafO9NtJM8Bz22zzCBCb7zssKiti3YDd j1/Md230+W3+ANrXhOnpq2/toqD60lcCoNY5cEXVgULWnEPMg34ayF55wU2uoSvkT0PI38 QoSYH8PvOyurJ9ip8QuA9OL5UrUjabs= Date: Wed, 27 Jan 2021 15:30:25 +0100 From: Borislav Petkov To: Misono Tomohiro Cc: linux-kernel@vger.kernel.org, x86@kernel.org, hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com Subject: Re: [PATCH] x86/msr: Filter msr write by X86_IOC_WRMSR_REGS ioctl Message-ID: <20210127143025.GD17424@zn.tnic> References: <20210127122456.13939-1-misono.tomohiro@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210127122456.13939-1-misono.tomohiro@jp.fujitsu.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 27, 2021 at 09:24:56PM +0900, Misono Tomohiro wrote: > commit a7e1f67ed29f ("x86/msr: Filter MSR writes") introduces a > module parameter to disable writing to msr device file (and add_taint() > upon writing). As msr register can be written by X86_IOC_WRMSR_REGS > ioctl too, they should be applied to the ioctl as well. Blergh, I missed that. :-\ > Fixes: a7e1f67ed29f ("x86/msr: Filter MSR writes") > Signed-off-by: Misono Tomohiro > --- > Hello, > > I just noticed this when I read the code. > I'm not sure if anyone uses ioctl interface now, but I tested this > by resetting IA32_MPERF by X86_IOC_WRMSR_REGS ioctl. Yeah, I'm sure once this hits people's kernels, someone will complain. In any case, good catch, thanks! -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette