Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp7129434ybc; Thu, 28 Nov 2019 11:26:49 -0800 (PST) X-Google-Smtp-Source: APXvYqxUPGvTAsL1cLMhC6Ti1uUPUbFORSJVOEra/Vae5BgDhZE66A3YCm7SsX40N2infu7O04cl X-Received: by 2002:aa7:c518:: with SMTP id o24mr39512062edq.110.1574969196009; Thu, 28 Nov 2019 11:26:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574969196; cv=none; d=google.com; s=arc-20160816; b=UTZoQi3YqzHZTQk5wvlQn+OAMUy1J6hJ77Ub7/i3TTzoOm5Rsy+hx7gCamUX7w6Lo7 rg2zNRtrWc1FeevjFw8YxKArbjx/FQQbgSCNoChXSGYQOk0pj2+0jXqgYYmJouDa30Jd i//cApqUeTNwc4IdUgx59nZ/LLSWbsbxOrUnZKixXtN43squyXW6qQtp7xmnjuvTC931 n8YYxuv4kOy9rweXW9xiPJGkDLKsBKbBk/4YnmsexoYHcBDUF+mq6LffV0VeBBWPU/2W EdXs7ovYePIR2Y14QVNmrMXUUYZwc/8EOPIloDywm4Q+lu2TSmkNPv+HoYU0NHCF0Big HfpA== 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 :in-reply-to:references:mime-version:dkim-signature; bh=YZsnKc3g5fDTaGiejE7r1Q2K/HU4vGwibJmTL3Kxzh8=; b=hY21JhbHvin0CXLg/tsgSgBC2wtGhnszn8p5DIGjyuWR2aDuEsO7cV8WLN25tdkr3F aicCTUc5fXVxrKr+2lhMJXYGSi4mua+8t0NJtL7qOHS7JVqosKGFxukHs5dCdKN/0N9T PdFrIsknFdxCQ8JC8poHpFv5IRvdY9j053xU82bz1NmgS7QioKuT9wX2kTnYD/vuUgoh jcAIqymYsj/Cfvl48bw62vuJn/dFeYBqqAxnfd2dhq8tFSCFB5tbxw3h7kAwgZQODeDo 25kW/3JYDE06ctwxF3vKBCluvkAZY8j+9+hbY+VK4FkUYy7OH9O4HmT0gcTSRr4pK8rt FbHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=AARO3KUA; 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 h13si17180486edj.265.2019.11.28.11.26.11; Thu, 28 Nov 2019 11:26:35 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=AARO3KUA; 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 S1726593AbfK1TZE (ORCPT + 99 others); Thu, 28 Nov 2019 14:25:04 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:37305 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726556AbfK1TZE (ORCPT ); Thu, 28 Nov 2019 14:25:04 -0500 Received: by mail-lf1-f68.google.com with SMTP id b20so20809471lfp.4 for ; Thu, 28 Nov 2019 11:25:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YZsnKc3g5fDTaGiejE7r1Q2K/HU4vGwibJmTL3Kxzh8=; b=AARO3KUA0Ed9Lzp/XDCbJWlA2wX/oQNuxqPR3MrxpmJyIu7GQW/8QbZAhZyDVn3Eh8 0Ak/kGhIhnfiLyEpsrgu5xOPnslYQreyJFs5/a/HKD6sDqmSqdp3dLzq+VjO2p3QxHIt yBGSGjJePXKf3q5cbuKWZ72BxI/e3CHE70jvs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YZsnKc3g5fDTaGiejE7r1Q2K/HU4vGwibJmTL3Kxzh8=; b=Bf9ngpt5+a2HTMYzL58dYSzek33EFXdxSCGShgrS63gsO47EO6ZYH7rlOsH7QAs5vY 9WU+QUVFU5o0CO/jFq6fF+cL8BezqAcb3QNSE+VaLZH3UJAT/RhM3yh65+bnfhAxRXhw CU21Z0Q+K7SRAwDxLQZ39XW+rsBpQTqPd3fmRaFW4x8JIGuznVwsVZp2JrMobbw/xg0V F6yOAoDj1+b+ez8wrroHvm2ompC5pMPEIwmrKpz82McgFCtKYhc1u12IaiqdYaMSLeST k8nhIDFFZ5IMuV2KGhbyNqHSQ8RpKtLWnruHkc6vKIvpSDH4v5QQrMAkRNDmru2RDHKz eEOg== X-Gm-Message-State: APjAAAWfZgyKMT+L9fHmgC0XExjoxl5uWTju0HLdKZhkQ+6IjwHhbw1n Z/OQJEKdWIXE4si6WNje4CvYyQP/I7g= X-Received: by 2002:ac2:47ec:: with SMTP id b12mr27476042lfp.162.1574969101137; Thu, 28 Nov 2019 11:25:01 -0800 (PST) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com. [209.85.208.177]) by smtp.gmail.com with ESMTPSA id m9sm58068lfj.57.2019.11.28.11.24.59 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 Nov 2019 11:25:00 -0800 (PST) Received: by mail-lj1-f177.google.com with SMTP id k8so18999321ljh.5 for ; Thu, 28 Nov 2019 11:24:59 -0800 (PST) X-Received: by 2002:a2e:2c19:: with SMTP id s25mr35381421ljs.26.1574969099676; Thu, 28 Nov 2019 11:24:59 -0800 (PST) MIME-Version: 1.0 References: <20191126110659.GA14042@redhat.com> <20191126110758.GA14051@redhat.com> <20191127170234.GA26180@redhat.com> <20191128153644.GA5508@redhat.com> In-Reply-To: <20191128153644.GA5508@redhat.com> From: Linus Torvalds Date: Thu, 28 Nov 2019 11:24:43 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] ptrace/x86: introduce TS_COMPAT_RESTART to fix get_nr_restart_syscall() To: Oleg Nesterov Cc: Andrew Morton , Andy Lutomirski , Borislav Petkov , Ingo Molnar , Jan Kratochvil , Pedro Alves , Peter Anvin , Thomas Gleixner , Linux Kernel Mailing List , "the arch/x86 maintainers" 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 Thu, Nov 28, 2019 at 7:36 AM Oleg Nesterov wrote: > > You misunderstood my question, I do not see a good place for the code > above. So I am going to uglify */signal.[ch] files. Ahh, ok, I thought that was kind of understood. > --- a/arch/x86/include/asm/signal.h > +++ b/arch/x86/include/asm/signal.h > @@ -5,6 +5,10 @@ > #ifndef __ASSEMBLY__ > #include > > +struct restart_block; > +extern void arch_set_restart_data(struct restart_block *); > +#define arch_set_restart_data arch_set_restart_data I'd just replace this with /* We need to save TS_COMPAT at the time of the call */ #define arch_set_restart_data(blk) (blk)->arch_data = current_thread_info()->status or something like that. Linus