Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1649191pxb; Thu, 4 Feb 2021 19:57:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJw6vD6nor8J0X4mTayoXvWZ/N/xAPPjMEjIqyenerLayrYtm0AcSCs0d5oBOGAg506l1uje X-Received: by 2002:a05:6402:1809:: with SMTP id g9mr1705669edy.2.1612497464032; Thu, 04 Feb 2021 19:57:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612497464; cv=none; d=google.com; s=arc-20160816; b=SLsdAS2LoH+BoDdabcVRYfB5MOWf3U/A4SWamMG5/1LQAMhZFfGWcnznuZXibhvlRI zTE57XX8j+16jvgFRofbXfU2UL5n/OaR08SWb1oCxkpfGFyOITOfo8D9AUrkDkaQhQlo Sms1r/uSiuWvqDY1d2MxQuqaf4Xaf2ozOEEVnBu977qg3Oglh1Vx7KZ1OpETd5wqIE6o gtnMeeTeKTIKXE/zXrkIuJb5KLnkmyhDYudrOzZPJaLNRCVBSn/eoWhdvpjr4Y+EWeaQ aQwqZSyJ/v8Ik/BBHITTFzXGYONyA4s0RgxpNGulDcabdqv8c3YH9RBRYkM6rP7pjJOb ECpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=MAaRJACWW51J5vlqCTX3yVGM03oPhbUpsF+ymE+oVAM=; b=d1I914YajJ3EhSl3ltF2ngu4SoV9pq9sXCstoVztHgMLcpep2AEJ0e1r1LyRRVPbFe 11vUnqQec+inpcy7vQsfUGKWdWJ93Jip76qhRFWEe3rblev5izD+OChJoQikkcTxECSc K0CvGhYezrir3bbQ+sMmPGG5jGmUQUlDhFzv0eviylstP3ynmc1Ryn33hnY8zoZ45xuy IuDpS7D9Tj8K3aNTk6Vo1Gp2wEOhEa6LGMiK7pmtNDsbuma+uFv97MVEjcMnsos02eEf I0/4WXvz6b0aBN0nFeIh9hH75kvJ2w6ZGVU7xp2NYeSPuDAL9RNjB+acO8fvGb6EHRpE LdDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=qVaZKJI5; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s12si1339063edy.569.2021.02.04.19.57.20; Thu, 04 Feb 2021 19:57:44 -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=@google.com header.s=20161025 header.b=qVaZKJI5; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231209AbhBED4F (ORCPT + 99 others); Thu, 4 Feb 2021 22:56:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231183AbhBED4E (ORCPT ); Thu, 4 Feb 2021 22:56:04 -0500 Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86DB0C0613D6 for ; Thu, 4 Feb 2021 19:55:24 -0800 (PST) Received: by mail-qk1-x72f.google.com with SMTP id l27so5677449qki.9 for ; Thu, 04 Feb 2021 19:55:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MAaRJACWW51J5vlqCTX3yVGM03oPhbUpsF+ymE+oVAM=; b=qVaZKJI5PUUQL3kPtrZv9MP7rbEn2UOxoEk1D/qucv3hsjP9Rzl6XZEOSkM89Gcz8n Th2e8DYWq3VGFXrleupHZl6pcF56VM2YV8DOtGyGzVYKbqKpWhtpBud63WA7FItli+2z 60A7Qv4R8o5iM2CSGXU3lm+LlRhwAUlS4HSAz9ekA65tWg5Y99zakqBz5yo/NxsDfMGe yf2qpAeLBHnIUqGmqryBTwH11mItoUMFqNLk5JW1ujFkFRLZRYR+xF+aKrNYATFKF5yr TSn7hLacsQ/mA9ogRiLIZp8vz0j44fNl/yamA4u5t2DWmEqpBaQXJH8WaFGabokpw5Mn CcOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MAaRJACWW51J5vlqCTX3yVGM03oPhbUpsF+ymE+oVAM=; b=p2tJGXXfIrEcojZIVegt66sezs2cyS2FRUOCDxg4yOx0YpQZnaqaQ7r+uN1CSpAR5R SuEN7cCIRP9/JVWP1gkuOLyzqC3qfdILS6TVTmo86TuICNbSjo8pi7SnirusKMxWfqMH ycotlzkSTvhi6tZZp0w0Ps38mPHdiRWz8fKEvm+kAwYia0BoaA4pZ8r8n/4K3nxMXy6M Jyw2m24l2ECOc75rBdWfGTaj6xPkkOSBJAL3797xwg1RFzCyvzO73W7rulcPWfPn6FNN cp4zDpSaTLlTiQixh7lKRIOfR7tvMRD75m+kIj3E5XNWk1AzSjZPWR4XK7+vZffAmWTu tIyA== X-Gm-Message-State: AOAM533T8jRuClUbTY/RqW8AIjrVmNcMSOa/yuS4FOqRkBnaRT6Wueq5 3DzN1LGk+CZxo95EDqm5vjuHIilBEuzhKbj6GfYNMQ== X-Received: by 2002:ae9:e647:: with SMTP id x7mr2481056qkl.276.1612497323405; Thu, 04 Feb 2021 19:55:23 -0800 (PST) MIME-Version: 1.0 References: <20210123011704.1901835-1-joel@joelfernandes.org> <20210123011704.1901835-3-joel@joelfernandes.org> In-Reply-To: From: Josh Don Date: Thu, 4 Feb 2021 19:55:12 -0800 Message-ID: Subject: Re: [PATCH v10 2/5] sched: CGroup tagging interface for core scheduling To: Peter Zijlstra Cc: "Joel Fernandes (Google)" , Nishanth Aravamudan , Julien Desfossez , Tim Chen , Vineeth Pillai , Aaron Lu , Aubrey Li , Thomas Gleixner , linux-kernel , mingo@kernel.org, torvalds@linux-foundation.org, fweisbec@gmail.com, Kees Cook , Greg Kerr , Phil Auld , Valentin Schneider , Mel Gorman , Pawan Gupta , Paolo Bonzini , vineeth@bitbyteword.org, Chen Yu , Christian Brauner , Agata Gruza , Antonio Gomez Iglesias , graf@amazon.com, konrad.wilk@oracle.com, dfaggioli@suse.com, Paul Turner , Steven Rostedt , Patrick Bellasi , benbjiang@tencent.com, Alexandre Chartre , James.Bottomley@hansenpartnership.com, OWeisse@umich.edu, Dhaval Giani , Junaid Shahid , Jesse Barnes , "Hyser,Chris" , Ben Segall , Hao Luo , Tom Lendacky Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 4, 2021 at 6:02 AM Peter Zijlstra wrote: > > On Fri, Jan 22, 2021 at 08:17:01PM -0500, Joel Fernandes (Google) wrote: > > > +#ifdef CONFIG_SCHED_DEBUG > > + /* Read the group cookie. */ > > + { > > + .name = "core_group_cookie", > > + .flags = CFTYPE_NOT_ON_ROOT, > > + .read_u64 = cpu_core_group_cookie_read_u64, > > + }, > > +#endif > > > +#ifdef CONFIG_SCHED_DEBUG > > + /* Read the group cookie. */ > > + { > > + .name = "core_group_cookie", > > + .flags = CFTYPE_NOT_ON_ROOT, > > + .read_u64 = cpu_core_group_cookie_read_u64, > > + }, > > +#endif > > AFAICT this leaks kernel pointers. IIRC that was a bad thing. For that matter, we're also exposing the cookie pointer in /proc/$pid/sched. Currently these are used by the selftests to validate that two tasks are/aren't sharing. If this poses a risk, we can rework to avoid exposing the actual pointers.