Received: by 10.192.165.156 with SMTP id m28csp969910imm; Mon, 16 Apr 2018 11:42:25 -0700 (PDT) X-Google-Smtp-Source: AIpwx49elWY4zQi+xwnyTAst0VUEa5FQ+xQXg2l9aL9JeY8HKQ932Rlmc2fb/ciemW53//NrR3qC X-Received: by 10.99.4.88 with SMTP id 85mr4215212pge.156.1523904144971; Mon, 16 Apr 2018 11:42:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523904144; cv=none; d=google.com; s=arc-20160816; b=QoyGwuRss3O7W9+lUsSHJNyr3iK9nL27H/PTBtCDzpYiC4YIO7BHasdj4ohJysv5Dv s+zCrcZxqTRuCsJ0aMuIYGA15C+C0G/YypA/uXhhAMSjJDvAXP456QNPwSk/TwwpbwEr 5Ni+zv/Gxntc+Vzl9Gzbh6jNJ0fLeL5yP0GxSHVA7BgkoeJHdl/PG2FVqtRSlW6zUP1q nGdtEpDXy6RRB6QCzM6SWw00Xem9WltKkZDa4lM2xrgdZBHBKwTAkpJg7J0iIyA14XPF 0Uy2AYn06IJhAkEhOKB3v4Fc6p2iX1BqMsmBSuqomTwi58OsCA9y7ZcnqavsgZhzODoU +vMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=OfQqTCavpFMZBX6m6z5giMTNRysHBTFDadGTQzqokWc=; b=n184rB+0oox5BUx2qchBPU+EcDgb6pwt+k4ynTSsGMB6Ca5A0r2xKJ3tAr1xrdGU+K dphONHalG0aQ/2J1j16ExxSDVL7iBArAq8K1qsgtTVeEAHi6Z4/kja3ZHUzwIAx3gF4y /mi2S1ibDE/Of1bhvE2J6d0wu3lXRWC5Uz62NekYUUNB4m/ZikeRkh6OLDgp3+h/y+Jz FfLgkP6ATqOQrvE8zBHg5PZegWIrwz6XC8Jxah/7j1nHYOwDD55/GMaB0N+N/UZ7CsZa f4Md0RCH2auD66vEduCtfKSoaSiWUDKyt/xMu3HM1xQy6AH0vjPIhBnBrA+L1feUGcCz sAOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=cAzCOuPQ; dkim=fail header.i=@linux-foundation.org header.s=google header.b=Wvi5SDuH; 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 f14si10244818pgn.597.2018.04.16.11.42.10; Mon, 16 Apr 2018 11:42:24 -0700 (PDT) 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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=cAzCOuPQ; dkim=fail header.i=@linux-foundation.org header.s=google header.b=Wvi5SDuH; 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 S1753196AbeDPSjw (ORCPT + 99 others); Mon, 16 Apr 2018 14:39:52 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:38150 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753049AbeDPSju (ORCPT ); Mon, 16 Apr 2018 14:39:50 -0400 Received: by mail-io0-f196.google.com with SMTP id h9so5677214iob.5; Mon, 16 Apr 2018 11:39:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=OfQqTCavpFMZBX6m6z5giMTNRysHBTFDadGTQzqokWc=; b=cAzCOuPQDx18NMWFSzKPcpoMzINLeJJBkQpId32I07wav6cCpE/jSB8TbVwChO5/M/ 8UVRVtAHgY9cWrq521xGgsI+ZsdBhqIus3jndwQdWGr/5iKJoPq5LlqXmryEK0eOpjhl G3UsyDqtYsKqn3VG5L5gJQ303qE4HGZITN4SrTLoWgrdeTP3ZAa8E1F47AAyfYBPMDQA MVfD8J4SNilOT26WYdu4nScd5CIGYUHHHWpnIDb036BVEJcp+7zTt0T0hAsTJIsctj3S 4Mm4PsRsZkFF9Kchs17t6fU20W1TjQ5WtiivancXAMyGfa2gHdJtyKk1qZ9qq9CyAVby 23qA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=OfQqTCavpFMZBX6m6z5giMTNRysHBTFDadGTQzqokWc=; b=Wvi5SDuHqo1zP2TKDmP5a4ujLiJiGCedaLKswp8Z48vppEWUG2HatNyGoC+maSK9JL 96C6bLPfxrwXu0njpEDBPe6k6AQC6WsWG9evNuR5mw6g0xcEOe31SG7jdCYpCvkq/XGl IhENoZVM5VIJkRN91TFkcfyIV4SU6oFIgHJhU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=OfQqTCavpFMZBX6m6z5giMTNRysHBTFDadGTQzqokWc=; b=HufX2JMdMNywij+6DzytrP9m8cRsU/+kOyVXqt94KOjQq6p3WO9OSV42hgNuAbk6TS MK5OCrPclMqkJrIrcnhP++1nFtJr1lJBXSLzlXRMuTNkjeKxrtN4ANGu68RePAJtEyi+ RG5REZo58Qix+tgAP12u7groG3yXQh9/dwngQSou4au72XO7qJlieycqTwGLP2kcV9kR sbOwssggYklsypcYESvEN0p+fgL+mQ+RpP18LCpwofA1REDj5PjsM3slbmUSY8nQJMrJ HJb8Qbcldba4QMfv3AqQF7MviUp2rkX+rBm0HQzVk0BXm7qX+cpheOW+72Jg7Kb3qwSO 2EdA== X-Gm-Message-State: ALQs6tB8V5D88srks2VIcXfI5DyyEq8PJVTgODs/st++Jzj7udBk8Id2 f5XJUxIJD/gXvOmLBJDijPMgztqSsjyw1USmtYE= X-Received: by 10.107.70.4 with SMTP id t4mr4463402ioa.203.1523903989320; Mon, 16 Apr 2018 11:39:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.95.15 with HTTP; Mon, 16 Apr 2018 11:39:48 -0700 (PDT) In-Reply-To: <542721578.11358.1523903708510.JavaMail.zimbra@efficios.com> References: <20180412192800.15708-1-mathieu.desnoyers@efficios.com> <20180412192800.15708-13-mathieu.desnoyers@efficios.com> <542721578.11358.1523903708510.JavaMail.zimbra@efficios.com> From: Linus Torvalds Date: Mon, 16 Apr 2018 11:39:48 -0700 X-Google-Sender-Auth: RrWC6h71UoHhn6LZjr5mYkiAqX4 Message-ID: Subject: Re: [RFC PATCH for 4.18 12/23] cpu_opv: Provide cpu_opv system call (v7) To: Mathieu Desnoyers Cc: Andy Lutomirski , Peter Zijlstra , "Paul E. McKenney" , Boqun Feng , Dave Watson , linux-kernel , linux-api , Paul Turner , Andrew Morton , Russell King , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Andrew Hunter , Andi Kleen , Chris Lameter , Ben Maurer , rostedt , Josh Triplett , Catalin Marinas , Will Deacon , Michael Kerrisk Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 16, 2018 at 11:35 AM, Mathieu Desnoyers wrote: > Specifically for single-stepping, the __rseq_table section introduced > at user-level will allow newer debuggers and tools which do line and > instruction-level single-stepping to skip over rseq critical sections. > However, this breaks existing debuggers and tools. I really don't think single-stepping is a valid argument. Even if the cpu_opv() allows you to "single step", you're not actually single stepping the same thing that you're using. So you are literally debugging something else than the real code. At that point, you don't need "cpu_opv()", you need to just load /dev/urandom in a buffer, and single-step that. Ta-daa! No new kernel functionality needed. So if the main argument for cpu_opv is single-stepping, then just rip it out. It's not useful. Anybody who cares deeply about single-stepping shouldn't be using optimistic algorithms, and they shouldn't be doing multi-threaded stuff either. They won't be able to use things like transactional memory either. You can't single-step into the kernel to see what the kernel does either when you're debugging something. News at 11: "single stepping isn't always viable". Linus