From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x224/fNvDCOfncWAVD63iGw2i18dfhjeBZQzOPfG3Ted/JfuhTpuFDAiP6EwjL6uEoIdFMnQY ARC-Seal: i=1; a=rsa-sha256; t=1516551938; cv=none; d=google.com; s=arc-20160816; b=g79EyHVMfNLSW0bvPNvSm+3E6PDDquwsmOWrWDKVxYEoJzn2df1jxzobldJL/93PiY fRIx7p3IMRvQff5aPELkiQqSdTGOtN1KnU/mnz2f4HIYNJG5EzFoIxH5MprijsFNOp+A 4B34Ou4Js08Tq7YzLcfXa5lZgVWYz9VJA5oJOoJogQeP2HyVxjlTTvWPI37Ha7czIMh7 rZTUACF1ZpiredsLnHtJq1MU5RCzRCLB27Be64TnmIp9kxuGcfXcUMyvgTNX3Yv48Ji/ aPfxZRgkJXw5076wiuwfwj9AIeJJiIa23X5aJO3kNMGAU+lHXR1ooGjutRSK/l2SHps8 H/zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :arc-authentication-results; bh=g1YAz91vv0Dz2DEdHlxj3924rC/YDG8ZE2jSsD4E/I8=; b=t6/97QkWCh/PzwUO0hlCvxzmtAuNJKAih/FgtwUC6HmqPo6UZ6uH6tySQS9IKUlkqx X2M1VbI/J4i1FbOh43hSoXwlQsrGLSRexRwt2maDpG+9CBg7daI+HnXIFOwIw2JYytJ6 5RABr8lI7+XgII3if0Wn+zTYrML/8PP4SkhkN9xec9wphHW9npzs0JXnBKhpOV9ijRVj kMePnWIdQQsfcinIGPOnRrgZ8wVwQmyilag41+2nVCtToPzW1znwU+o11yjJOYcKY5G+ Q4XyRHvDzctNtNBygrEEdbSTaUB6ZwohFWQ4g7RoVTxBwZ7cdcK+SF7SpA01dVDI0kf4 wc/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of arjan@linux.intel.com designates 192.55.52.115 as permitted sender) smtp.mailfrom=arjan@linux.intel.com Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of arjan@linux.intel.com designates 192.55.52.115 as permitted sender) smtp.mailfrom=arjan@linux.intel.com X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,392,1511856000"; d="scan'208";a="28233513" Subject: Re: [RFC 04/10] x86/mm: Only flush indirect branches when switching into non dumpable process To: Ingo Molnar , Peter Zijlstra Cc: KarimAllah Ahmed , linux-kernel@vger.kernel.org, Andi Kleen , Andrea Arcangeli , Andy Lutomirski , Ashok Raj , Asit Mallick , Borislav Petkov , Dan Williams , Dave Hansen , David Woodhouse , Greg Kroah-Hartman , "H . Peter Anvin" , Ingo Molnar , Janakarajan Natarajan , Joerg Roedel , Jun Nakajima , Laura Abbott , Linus Torvalds , Masami Hiramatsu , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Thomas Gleixner , Tim Chen , Tom Lendacky , kvm@vger.kernel.org, x86@kernel.org, Dave Hansen References: <1516476182-5153-1-git-send-email-karahmed@amazon.de> <1516476182-5153-5-git-send-email-karahmed@amazon.de> <20180121112224.GH2269@hirez.programming.kicks-ass.net> <20180121162142.yh366un2blsyiud4@gmail.com> From: Arjan van de Ven Message-ID: Date: Sun, 21 Jan 2018 08:25:36 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180121162142.yh366un2blsyiud4@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1590140567714479425?= X-GMAIL-MSGID: =?utf-8?q?1590219966009427119?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: On 1/21/2018 8:21 AM, Ingo Molnar wrote: > > > So if it's only about the scheduler barrier, what cycle cost are we talking about > here? > in the order of 5000 to 10000 cycles. (depends a bit on the cpu generation but this range is a reasonable approximation) > Because putting something like this into an ELF flag raises the question of who is > allowed to set the flag - does a user-compiled binary count? If yes then it would > be a trivial thing for local exploits to set the flag and turn off the barrier. the barrier is about who you go TO, e.g. the thing under attack. as you say, depending on the thing that would be the evil one does not work.