From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751969AbcJAEWL (ORCPT ); Sat, 1 Oct 2016 00:22:11 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:35884 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750908AbcJAEWK (ORCPT ); Sat, 1 Oct 2016 00:22:10 -0400 MIME-Version: 1.0 In-Reply-To: References: <20160930185642.GH14666@pc.thejh.net> From: Linus Torvalds Date: Fri, 30 Sep 2016 21:22:08 -0700 X-Google-Sender-Auth: f0iA79LT17ecY3CIgut-D0cxYe4 Message-ID: Subject: Re: [PATCH 1/3] proc: Stop reporting eip and esp in /proc/PID/stat To: Andy Lutomirski Cc: Jann Horn , Peter Zijlstra , Andy Lutomirski , X86 ML , "linux-kernel@vger.kernel.org" , Brian Gerst , Borislav Petkov , Linux API , Kees Cook , Tycho Andersen , Tetsuo Handa Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 30, 2016 at 7:01 PM, Andy Lutomirski wrote: > > Peter, how nasty would it be to add some lightish-weight lock that > lets us pin a task in a non-running state? Maybe we could take the rq > lock, do something to the task to make it sleepy (steal it off the > queue?), unlock the lock, do whatever we're going, then take the lock > again and put it back. No. Don't do this. Forcing some sleeping lock in the core task state /proc stuff is a nightmare. That thing ends up being used very heavily under some loads. No _way_ is it ok to synchronize with the target task. > Or if we had a seqlock-like thing, we could maybe arrange for > get_wchan to abort if the task get scheduled between when it starts > and when it finishes. seq_lock might be ok, but do we even need it? What's the worst that can happen? An odd symbol name showing up in a race condition? Sounds like a non-issue to me. Linus