From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pg0-x22d.google.com ([2607:f8b0:400e:c05::22d]) by Galois.linutronix.de with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1fEd2U-00071W-Gx for speck@linutronix.de; Fri, 04 May 2018 17:54:30 +0200 Received: by mail-pg0-x22d.google.com with SMTP id a13-v6so15723601pgu.4 for ; Fri, 04 May 2018 08:54:30 -0700 (PDT) Received: from xps13.linux-foundation.org ([2605:e000:d602:1400:2d65:9003:2c6c:b4fa]) by smtp.gmail.com with ESMTPSA id 185sm34392695pfu.13.2018.05.04.08.54.22 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 May 2018 08:54:23 -0700 (PDT) Sender: Linus Torvalds Date: Fri, 4 May 2018 05:54:21 -1000 (HST) From: Linus Torvalds Subject: [MODERATED] Re: [PATCH 1/5] SSB extra 2 In-Reply-To: <20180504155034.GO12217@hirez.programming.kicks-ass.net> Message-ID: References: =?utf-8?q?=3Ce69f3b?= =?utf-8?q?41d5b7fa52cf43682663d1f6f3c5de7d03=2E1525383411=2Egit=2Edave=2E?= =?utf-8?q?hansen=40intel=2Ecom=3E?= <20180504092050.GK12217@hirez.programming.kicks-ass.net> <90f19909-5f25-ece9-e2b0-3c8cedc60caf@linux.intel.com> <20180504155034.GO12217@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: On Fri, 4 May 2018, speck for Peter Zijlstra wrote: > > Teaching the interpreter to do this is trivial, for the JIT we would > emit a "CALL $asm_pre_thunk" as first instruction and "CALL > $asm_post_thunk" before every RET. > > And when it doesn't need to mitigate, don't issue the instructions at > all. Ack, that sounds better. Linus