Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2178263imu; Sat, 12 Jan 2019 18:06:21 -0800 (PST) X-Google-Smtp-Source: ALg8bN5AwfOm0VarHctgRpoPytQNQrm1TKRLl1OGaX3dCG9E2og/9bUlvFRMYnoQ6FmkYKIwkInB X-Received: by 2002:a17:902:bd4a:: with SMTP id b10mr20557412plx.232.1547345181674; Sat, 12 Jan 2019 18:06:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547345181; cv=none; d=google.com; s=arc-20160816; b=dVMXj7PEHvkvXJGsK7IHaGa+O+bU/zoRwaUfJbNk2YPprQ+LmQBEyHwzAKg4cmNNDu zVSrqjLw/OOlTg1Hm0FXM/1yrNNli/9IUqPK/eUyprRAjYx4UF/4QCNUwOZVDFMSySnO fjNrEFSjtNCLmvGuWMQ8616wjLknT66zv2i0C4L1e0sFG8VEJ2uiOIRqmqq7UbMtxv7V K91bOZSWNA3ifG46k7qoTgrZMcXqZk7f39ZMcgleo8ohBJVIPdnizQGE80IiaJfvTwWa /mSNdOqVGKMQ4TVYpi3tc7w+hYobOC/1mvHZ0jPncAfWCINoGyjSXbjV9A5vRoNmRhon xVgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date; bh=sRY6Ym4H636ePkzQ3rr4j5M1859Qybyd5g9/sqSqgTQ=; b=EcLGLkLkPfRSuCUnSKAszQDQACqVJKq682nSH64oRZ8Ifxa77BQs/YYhF43n+THURv MnWt5rbtix8zG1oPpF3njBPC16rnmHal7VBKYT+FroUBnLIKOO9ZxIOaLq5bR9T4JhU9 +li+RQwDkLHFVXiU6TIFhpC6EfpqcGN/eGt+ptRMxdytN0qm43nUm+zMAv2dQzS9gKuB iZJCRxNcBMr+ca3ayzhx7VUGtJxaxEWJpcHsRXXikQGaF/pFyh9zDHikOIwc7UGHE3+E VW5DGOggH6lbZMMWVSZkt+AF0lVfUbuUQvjv6vqKXo/fQePugbF3XEHV8P2ZT6I75uYF 7oDQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 44si18644608plc.110.2019.01.12.18.05.52; Sat, 12 Jan 2019 18:06:21 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726608AbfAMAhi convert rfc822-to-8bit (ORCPT + 99 others); Sat, 12 Jan 2019 19:37:38 -0500 Received: from terminus.zytor.com ([198.137.202.136]:57827 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726412AbfAMAhi (ORCPT ); Sat, 12 Jan 2019 19:37:38 -0500 Received: from [IPv6:2607:fb90:3095:7b5f:c01c:f28c:b0dd:a254] ([172.58.39.235]) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id x0D0aifJ1362661 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Sat, 12 Jan 2019 16:36:45 -0800 Date: Sat, 12 Jan 2019 16:36:38 -0800 User-Agent: K-9 Mail for Android In-Reply-To: References: <20190110203023.GL2861@worktop.programming.kicks-ass.net> <20190110205226.iburt6mrddsxnjpk@treble> <20190111151525.tf7lhuycyyvjjxez@treble> <12578A17-E695-4DD5-AEC7-E29FAB2C8322@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCH v3 0/6] Static calls To: Linus Torvalds CC: Josh Poimboeuf , Nadav Amit , Andy Lutomirski , Peter Zijlstra , the arch/x86 maintainers , Linux List Kernel Mailing , Ard Biesheuvel , Steven Rostedt , Ingo Molnar , Thomas Gleixner , Masami Hiramatsu , Jason Baron , Jiri Kosina , David Laight , Borislav Petkov , Julia Cartwright , Jessica Yu , Rasmus Villemoes , Edward Cree , Daniel Bristot de Oliveira From: hpa@zytor.com Message-ID: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On January 11, 2019 11:34:34 AM PST, Linus Torvalds wrote: >On Fri, Jan 11, 2019 at 11:24 AM wrote: >> >> I still don't see why can't simply spin in the #BP handler until the >patch is complete. > >So here's at least one problem: > >text_poke_bp() > text_poke(addr, &int3, sizeof(int3)); > *interrupt* > interrupt has a static call > *BP* > poke_int3_handler > *BOOM* > >Note how at BOOM we cannot just spin (or return) to wait for the >'int3' to be switched back. Becuase it never will. Because we are >interrupting the thing that would do that switch-back. > >So we'd have to do the 'text_poke_bp()' sequence with interrupts >disabled. Which we can't do right now at least, because part of that >sequence involves that on_each_cpu(do_sync_core) thing, which needs >interrupts enabled. > >See? > >Or am I missing something? > > Linus Ok, I was thinking far more about spinning with an IRET and letting the exception be delivered. Patching with interrupts disabled have other problems... -- Sent from my Android device with K-9 Mail. Please excuse my brevity.