Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7054189ybi; Wed, 5 Jun 2019 10:27:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqxLchBWQgnLU6CAFU0pSGcRz88K78nDMV9/bRmYn0mMgL/BsDGDOjniBWau5QmcXrz05tsT X-Received: by 2002:a63:4045:: with SMTP id n66mr6009135pga.386.1559755626633; Wed, 05 Jun 2019 10:27:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559755626; cv=none; d=google.com; s=arc-20160816; b=oUqo4ixKmNe1QUM1V76ndHzN/uXcSHIngGxCS3oaWUxuCVN9ZtKi6uUcZNeu5KUZKW 9tKr1ocDR8RR80K5DE59eBwwPxASbiNa7q0z1wfdZIDXeBdgkDXUiL9MWLR0rCswiS+A sI3bP/D7kvX02rYzfLItc670Ur7K8CQdwbv06etP81xlvhyh7vuXaX1bO8AFyB4/AGvU OfLnl89x7pg6wYVSkQ2GZLhh2FSdz1sA1qe1GAw5zZ9zBrZ+WztjqGjfVKu7AyCybyuk 7NqvnDsmrXeMEPBMP3VmycVz7rPQCHgULntbU66aHblDOoZ/f3OpnigwizLTJiDdo51/ v9VA== 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=4dzrfT5QqLGh7VEyZ93DmM/B2JbZO0W27MdQC2tlHrw=; b=MjTDs+qfRS4sS99LC9It7qb9I7Tc7ppvasVW0qwYpJDpKuR77JJETKWyetIe1poMOy sXPxsw8CJZ057RwVZe8M+0KebLE/XnjWXQyLKGydw7yO7b2xc+nsIZKxoBN47V6X1I8Z zUGCX1AjsRAS4Aic6uVtDpGxPlC2/dOMs4iAvjEl3/WGJ/wP/3Jh40pzV7TFA6glK/gq v2juumm/y/aovJOrtgs+0UvFUm0uReSItN65cJDE2zTbF6xZuaz9U0debZUrliMgljTw d3syl+d+honL1SyGepHtkzUyxJKH4eg9petxdMSn9xABDGRXsaOBOAVE/jlutVQxTKAT yhzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=FKQTQdRi; 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 b12si30333439pfd.79.2019.06.05.10.26.49; Wed, 05 Jun 2019 10:27:06 -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=@linux-foundation.org header.s=google header.b=FKQTQdRi; 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 S1726606AbfFERZM (ORCPT + 99 others); Wed, 5 Jun 2019 13:25:12 -0400 Received: from mail-lj1-f176.google.com ([209.85.208.176]:44322 "EHLO mail-lj1-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726561AbfFERZL (ORCPT ); Wed, 5 Jun 2019 13:25:11 -0400 Received: by mail-lj1-f176.google.com with SMTP id k18so2154905ljc.11 for ; Wed, 05 Jun 2019 10:25:09 -0700 (PDT) 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=4dzrfT5QqLGh7VEyZ93DmM/B2JbZO0W27MdQC2tlHrw=; b=FKQTQdRiCtVECI1Ss50LEAri2FoYB4zuECl4MbKr7V1HG+/fgvFHO/XCFc4PclJL0f Wssk8CHwAJzxGg8oxI5A8N0uaT7yA0hPAHDf6vPUxygAINx56WVYQJa7UQsGrz55oPcZ ZbjDGAg20qL59d3Au7EHam6sThq+5CJLZeVEk= 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=4dzrfT5QqLGh7VEyZ93DmM/B2JbZO0W27MdQC2tlHrw=; b=Uj0QBUCITCk7I0B+RjlqF+9z80QUNiTpb1nPU9i6HyjCFtqB5bp3KJLwfROvbKxtcQ 0bpMO/iu+xjuXP7UO+7bCRazW6ElPks2zGfWYNDCLO2TBPjJq6MHU2bpM9ytltuQsYxx 6KS3lJo7IpIZdNyoiQWf2Yrppvsx5StcQjv0NlFPr8RMBbcn07X5jdgn0swkAGLv55vv MajnmEl3VySXC8rjoimRvBFkPtCDHYdfb++VQwpGGMijkiJIPzQLE55fZ3+s5L6y4HBk XzRHpClTwrS6CSw1T1+rnzfqirn4vgLlESehZUiAZLVW5/eK0bPsgsZ6TivDRrfgC6Dj /sFw== X-Gm-Message-State: APjAAAVOChv+UIxuHUbCqyapixbOA4nlNhN+uk/ctaEOHzxEfZvzOoVm CpFA+Cx54+6KbZDV38E6WPQ4LQViQt8= X-Received: by 2002:a2e:760c:: with SMTP id r12mr6435268ljc.155.1559755508643; Wed, 05 Jun 2019 10:25:08 -0700 (PDT) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com. [209.85.167.50]) by smtp.gmail.com with ESMTPSA id b25sm4278158lff.42.2019.06.05.10.25.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jun 2019 10:25:04 -0700 (PDT) Received: by mail-lf1-f50.google.com with SMTP id a25so19724150lfg.2 for ; Wed, 05 Jun 2019 10:25:04 -0700 (PDT) X-Received: by 2002:ac2:5601:: with SMTP id v1mr7944437lfd.106.1559755503740; Wed, 05 Jun 2019 10:25:03 -0700 (PDT) MIME-Version: 1.0 References: <20190522032144.10995-1-deepa.kernel@gmail.com> <20190529161157.GA27659@redhat.com> <20190604134117.GA29963@redhat.com> <20190605155801.GA25165@redhat.com> In-Reply-To: <20190605155801.GA25165@redhat.com> From: Linus Torvalds Date: Wed, 5 Jun 2019 10:24:47 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH -mm 0/1] signal: simplify set_user_sigmask/restore_user_sigmask To: Oleg Nesterov Cc: Andrew Morton , Deepa Dinamani , Linux List Kernel Mailing , Arnd Bergmann , Davidlohr Bueso , Jens Axboe , Davidlohr Bueso , e@80x24.org, Jason Baron , linux-fsdevel , linux-aio@kvack.org, omar.kilani@gmail.com, Thomas Gleixner , stable , Al Viro , "Eric W. Biederman" , David Laight Content-Type: multipart/mixed; boundary="000000000000bcd942058a96e0bf" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000bcd942058a96e0bf Content-Type: text/plain; charset="UTF-8" On Wed, Jun 5, 2019 at 8:58 AM Oleg Nesterov wrote: > > To simplify the review, please see the code with this patch applied. > I am using epoll_pwait() as an example because it looks very simple. I like it. However. I think I'd like it even more if we just said "we don't need restore_saved_sigmask AT ALL". Which would be fairly easy to do with something like the attached... (Yes, this only does x86, which is a problem, but I'm bringing this up as a RFC..) Is it worth another TIF flag? This sure would simplify things, and it really fits the concept too: this really is a do_signal() issue, and fundamentally goes together with TIF_SIGPENDING. Linus --000000000000bcd942058a96e0bf Content-Type: text/x-patch; charset="US-ASCII"; name="patch.diff" Content-Disposition: attachment; filename="patch.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jwji3ph10 IGFyY2gveDg2L2VudHJ5L2NvbW1vbi5jICAgICAgICAgICAgfCAyICstCiBhcmNoL3g4Ni9pbmNs dWRlL2FzbS90aHJlYWRfaW5mby5oIHwgMiArKwoga2VybmVsL3NpZ25hbC5jICAgICAgICAgICAg ICAgICAgICB8IDEgKwogMyBmaWxlcyBjaGFuZ2VkLCA0IGluc2VydGlvbnMoKyksI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