Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp530903ybi; Fri, 24 May 2019 07:32:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqy/rcqr2UWCwAkvclPRFzIXlDYlbPFl4Xlae/yY3SRqv/C30lzoROZNny530AYvmo80AtgO X-Received: by 2002:a17:90a:7344:: with SMTP id j4mr581011pjs.71.1558708368570; Fri, 24 May 2019 07:32:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558708368; cv=none; d=google.com; s=arc-20160816; b=dffB1E61VIGNPIfaIxJMEH7OiomE2eEoMw601by9w7gBR0iYHklCFCBdrJHVpe1EIk ZPSRq8nJS5M9Qh9l8GhqoI62QZmmPnD4NEMhW6ybS4tMvFpqiZ0fO7iDy6eoEg6KLABC pDuTcBnjs0ZRXHzlOtbDvWfAwbRnjo6ok3JezxJ1KOoH41ok9BjcF2w1RbDaobxOQbLH c750wKWz/ZetujgXVIHU8szMej5bGrc9fWBe5ohCVHKfFSW9Rvg0l8EwYh8XJHh/IFbI 6SMy0YKAz8MwiM4cv0N9eN9bhw0/amLybMGpwqSE2nClWsl614OvQ1eWT46PUoO6+rA4 hRZg== 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=PF5/kSstL6dB+XBbydanwTKTfO7G7GNRcoy9R05gXJU=; b=gBrtGIUZdkORHYsb+M1OtGU7YLntzOxmCNX/gHubCpNPNNh0lpMwSZoLkbU6zQI+ZZ RNi/CSiSJosMsAghOvcDo3wE9gTiDdlgK2cRkN3jtFf75uZL4hUEgPXJBRDl64Jv+kv3 V03oB5dy5Po2Gh64x/I6ex8QDbF7QtNsr3Rvy9yepcEr1UIESJRWfLsajEQzjrWZHPVW OWm1a+lNyE7wC7DCfIHCSNkUd3R2FgOSZn5RAlMhXU5ORVS8Aob6EMTxMvZLxXESD8om uBSlCIsBStpn3djP5P0Ukr6j4A4rxwPOZVBN+7d8LCCtVwsXJwFQCYwjUN+eLHQlN+Wo nfKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jBqIdyIc; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v5si4338055pgs.285.2019.05.24.07.32.29; Fri, 24 May 2019 07:32:48 -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=pass header.i=@gmail.com header.s=20161025 header.b=jBqIdyIc; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404040AbfEXO3a (ORCPT + 99 others); Fri, 24 May 2019 10:29:30 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:35696 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390885AbfEXO33 (ORCPT ); Fri, 24 May 2019 10:29:29 -0400 Received: by mail-io1-f68.google.com with SMTP id p2so7933130iol.2; Fri, 24 May 2019 07:29:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PF5/kSstL6dB+XBbydanwTKTfO7G7GNRcoy9R05gXJU=; b=jBqIdyIcrkxXjas2FWZbfS+W5bempIzwewW+zyCJHL/m95gd42FS3XCJWVJ4ZXvqbw JDW9hH3yJt0ZpVtU30w7IAJoTJrMzh3mNzAJKMtJXmBs8QEVMLqp/UiBdgiSUsLXejQY kdQODvpc6ac5nkd2kLxkKvjxrcb6itRfHc9fzJjpGwInYB/BMx2e8vnGqX5IZWJiZreB wcAsp+2JJY89nyuIxmxCqg3Svn6hyveeyOqFskrrCCdnXjjFe8coM3Pgjky6+ls7cpGx 1NTPW8GONUHILalvYGEAMCtL3Nh5QHQ/SRjYrDMus9+QOfL5mf/6AiMgtLihtb+xdE+j QAHg== 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=PF5/kSstL6dB+XBbydanwTKTfO7G7GNRcoy9R05gXJU=; b=Ly6BSdb62p5ZE9ZLCwA/GJgiw1WivuYKFrEalwCCNOy8AUL3DW81JW8xf5u/3YKnKh T0pXO/ZAOF6SQIZj7vlZbQOWMQaG8kyInjotSTODlCKc6rHO/RtxOt8MzBojuCMNTVtv WjfJD+SSPYRx8p75puiiIffz1OBzfREJeigDs6+IFNry6jvhKayLUe6ABqcoFbqTwzy8 U8oht12NOquyEmh3o0MEcU1oPFeDS0VH97++o50JK3gdcaXL41rW8dVH6EjxeNAF2wZa w9bjludmxrYAUL4wNFoyf9ekkcG+aw+mSSDEdVRcHstAaiIAU+PK3rOYz3kPvUiv2K+l AetQ== X-Gm-Message-State: APjAAAVe1lrCU29VmhVnVyXeXWjZ7RCmSOL6czD2XBjd6E/SqCe8v+64 7WRiMp6aNPs4GvX8OkRV/SlIRWdo9yEwB0MdAGQ= X-Received: by 2002:a6b:6217:: with SMTP id f23mr3327984iog.110.1558708168549; Fri, 24 May 2019 07:29:28 -0700 (PDT) MIME-Version: 1.0 References: <20190522150505.GA4915@redhat.com> <20190522161407.GB4915@redhat.com> <4f7b6dbeab1d424baaebd7a5df116349@AcuMS.aculab.com> <20190523145944.GB23070@redhat.com> <345cfba5edde470f9a68d913f44fa342@AcuMS.aculab.com> <20190523163604.GE23070@redhat.com> <20190524141947.GC2655@redhat.com> In-Reply-To: <20190524141947.GC2655@redhat.com> From: Deepa Dinamani Date: Fri, 24 May 2019 07:29:13 -0700 Message-ID: Subject: Re: [PATCH v2] signal: Adjust error codes according to restore_user_sigmask() To: Oleg Nesterov Cc: David Laight , Linux Kernel Mailing List , Andrew Morton , Alexander Viro , Arnd Bergmann , "dbueso@suse.de" , "axboe@kernel.dk" , Davidlohr Bueso , Eric Wong , Jason Baron , Linux FS-devel Mailing List , linux-aio , Omar Kilani , Thomas Gleixner , "stable@vger.kernel.org" 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 I think you are misunderstanding what I said. You are taking things out of context. I was saying here what I did was inspired by why the syscall was designed to begin with. The syscall below refers to epoll_wait and not epoll_pwait. -Deepa On Fri, May 24, 2019 at 7:19 AM Oleg Nesterov wrote: > > On 05/23, Deepa Dinamani wrote: > > > > 1. block the signals you don't care about. > > 2. syscall() > > 3. unblock the signals blocked in 1. > > and even this part of your email is very confusing. because in this case > we can never miss a signal. I'd say > > 1. block the signals you don't care about > 2. unblock the signals which should interrupt the syscall below > 3. syscall() > 4. block the signals unblocked in 2. > > Oleg. >