Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp996079imu; Tue, 11 Dec 2018 10:52:31 -0800 (PST) X-Google-Smtp-Source: AFSGD/X1WgvxdhEoD78y42pQwgO1bQOYHECOk/QQ95aXu4nWiONKhHleOgE4TTutAZd0tutameHJ X-Received: by 2002:a62:c42:: with SMTP id u63mr17034921pfi.73.1544554351377; Tue, 11 Dec 2018 10:52:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544554351; cv=none; d=google.com; s=arc-20160816; b=bkG1kYaZba6xCLp1+kyMWdPWOdkNykC2pNIawXcMESCKWr58PJ/6A/lPvslmnbct22 LDnKjxgxFItCy+f96FYMR6cASLqlcr1+QRiRj5gEIRyCBA6gKGlmWxJAfcoZcsBFeNu4 eo1XqkwjO1u8EKAEwx9iO/TEGPRKrsl2V1gAyZl0bWStCS5A2g3W8mmvpFK7uLHoHJhP RqPfn+AeqrqqLAleba6jogr09uqfVDfLsmQxqs2t6YD3Sd5/Z/nqrl9vPsgHVN7VIt6V XvfB7WZGczbGX3kscxw8MrJi9MUi/o550YeoXZyz30brHz6C+09CtLJnJUGcMW3UQZ3B McTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=oZZINlvYBbDILPSJNpIxdmlDy8Lws0mbvmdR00LVZZU=; b=PMJjUphxvJeQv22v0wsJU/2LSCAKzFG3jmAMxCtkPvzfuK8vTcSCMyitAFue8Z7wyw jnAZgCLfmUzpsnLJgEKagU+WuHDuXC41buZDyFsk8TCwlty2I3lrbBYWvoDQ/IWP93/h yRw+l8O3xb0uecaIPWVvE6fIAr5ciGG9HwiAM1xEAcihpDqL5iKb95O3oH2UymIe3oXw j0f914B3Mj6vfwgWuWcwACH4jDyvojX8dn4YWkMen0z2wF6LdQips3ISXVawU4nUgal6 w6sK3X1Q2G5wJPghu+Ttsf6zDpz0Ykg+Rja15wtsI/L8v6CgvKOL9i1kOaDq+HY5R7pA EjZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=FmyCIeCm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6si11888246pgk.201.2018.12.11.10.52.16; Tue, 11 Dec 2018 10:52:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=FmyCIeCm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726762AbeLKSvL (ORCPT + 99 others); Tue, 11 Dec 2018 13:51:11 -0500 Received: from mail.skyhub.de ([5.9.137.197]:37512 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726252AbeLKSvJ (ORCPT ); Tue, 11 Dec 2018 13:51:09 -0500 Received: from zn.tnic (p200300EC2BCD2B00A9CB44BC54679BA1.dip0.t-ipconnect.de [IPv6:2003:ec:2bcd:2b00:a9cb:44bc:5467:9ba1]) (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 A7EA11EC0BAA; Tue, 11 Dec 2018 19:51:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1544554267; 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=oZZINlvYBbDILPSJNpIxdmlDy8Lws0mbvmdR00LVZZU=; b=FmyCIeCmzyiLWVqKFDGNlbko/62SDCQE8+iZPQ9RraYiHbOFtCI1B0kchbZAjesytNoYss VG9/sEja53DR07rDWx5+IrmSWPMlnF+dFnPv6lHRKHKMxG7Z2m1Ue1nRaeMLjhK0/LnRza buisavFau49uPKwYvdl6cueamZnSxBM= Date: Tue, 11 Dec 2018 19:50:59 +0100 From: Borislav Petkov To: Reinette Chatre Cc: tglx@linutronix.de, fenghua.yu@intel.com, tony.luck@intel.com, gavin.hindman@intel.com, jithu.joseph@intel.com, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH V2] x86/intel_rdt: Ensure usage of CPUs are locked while needed Message-ID: <20181211185059.GP27375@zn.tnic> References: <20181211123404.GC27375@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 11, 2018 at 10:33:59AM -0800, Reinette Chatre wrote: > I am not sure that this is an issue when updating a schemata in the > general case. In the case when just CAT schemata (without > pseudo-locking) is updated then the cpu mask associated with the cache > instance is indeed used to determine which CPUs should have their > registers changed but only the current CPU is not checked for being > online, for the other CPUs smp_call_function_many() is used that > includes an online check. Well, in your fix rdtgroup_schemata_write() disables hotplug for its whole duration and doesn't look at what schemata update is being done, right? > I had the same question in V1's notes to the maintainer :) Whoops, and I read that... Sorry. :-\ > My initial concern was the lack of IS_ERR checking. Understanding the > flow better now it seems to me that this is indeed not a bug now. The > reasoning is that an ERR_PTR is only returned when a negative id is > provided in the parameters to rdt_find_domain(). There are currently > only two places where a negative id could be provided to > rdt_find_domain(), domain_add_cpu() and domain_remove_cpu(), and both > locations test the return value using IS_ERR. Right. I'll queue it for the normal merge window. Thx. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.