Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1723901imu; Wed, 28 Nov 2018 14:07:00 -0800 (PST) X-Google-Smtp-Source: AFSGD/XScsCSUTMaFQKZo8ktKrfowPJ1KLoFw1IOJap+n9ChsBhkGmqZ+WXJCD+Au+Uvwn4i14aO X-Received: by 2002:a62:5658:: with SMTP id k85mr28922749pfb.231.1543442820436; Wed, 28 Nov 2018 14:07:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543442820; cv=none; d=google.com; s=arc-20160816; b=G846eISP5G5o/MebYR6oN9CVaK7XhcCPC200wYy8mOmDsr/2ws02OF8qPEeq3F/J5W x4XYfUbqLIv4Nn52VIqBfUWflP9Z4mdKr5uNw9uespKfws8TXj3zAKnEu52yCKKkMlmL Qn+ViDzUjOCc3pzqswSgq1ofq1sP2s1WPvFkHV9UquxHMhF4gtnoxQkJ6Jy3lZfNZX8+ hixrhDPEvptXogGNAtVnfScVJ6CEPIhSP7Pa6tmP3WFzodOLFsbqmB8LSYfS6QtInkbW lTxGjFANpr3dZkl17iV8Yd8Vf3EOA91OngeF1MXiLzURABh9opSqLdwt5WDToWPK2tBi ACgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=YIRWX8HfezgQR+9EQQES7Z/KXWx7Tuf/kx19LqqRruw=; b=TE+9zkjjNdYT3wI6SgjNFff03aBI4bVzskerp7dlaQjIEWeXrfKcPaH8G6BYqH1/OR BRXSlQcyrf4WqvHJ9VlvO0TLw3bhyvANuc+5KpaaKPCFa343KBI8IJFCFsToN0RDLmm0 iJgW3HQb3EE/apfByoTmM7EPM0gb3paU87gQwqDSARuBnnPrSZh/gKhlu6WaP0qWbW/m AmKC+ZwAIz7dia0hpXAjeY45WU4P1q/q2GWVMlUqH34U+bIHqGsO/HO3mTC8ND1ZHWSK bJ8kwTjkRrR42Rq/kT/ZZcTLW8377Vo5P0fjq206dF3fBMOVJmY7d9PTeC9dyuCcC/db b+Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brauner.io header.s=google header.b="MYfWu/ey"; 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 d14si8683101pgn.390.2018.11.28.14.06.45; Wed, 28 Nov 2018 14:07:00 -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=@brauner.io header.s=google header.b="MYfWu/ey"; 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 S1726414AbeK2JJF (ORCPT + 99 others); Thu, 29 Nov 2018 04:09:05 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:35412 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726340AbeK2JJE (ORCPT ); Thu, 29 Nov 2018 04:09:04 -0500 Received: by mail-pg1-f196.google.com with SMTP id s198so10112280pgs.2 for ; Wed, 28 Nov 2018 14:05:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brauner.io; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=YIRWX8HfezgQR+9EQQES7Z/KXWx7Tuf/kx19LqqRruw=; b=MYfWu/ey04TPJAI8Zt09WEoL6rOdVOYOyysShRoiBq2bmHXlkOwy500Ak+nnB6cP9C 1HEW3mP/FU8IhpQGzW3dTTCuyIJNh8CW1Pc+PejKkDnDQ7YotsGFIdJw3gn3ZuOkezlL aWGgXRqMGFHiHDJ82AZVrkxsXLXsnx8w48brA6EOuCw6VKgiEgrz5fnkPcgpN7R1tzao wodVYBUnIT8yjKy2yWBPDyBXzX7I2F9iqkz99nO5LwG9M9skrwlGAddtllXK49Kb6VbE F/bQsuQilNzieG4uPUua2LA0xROeCPFyHhHimkW0IQYKFWRx5odBjHc4F9KexOzEgteL Nw1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=YIRWX8HfezgQR+9EQQES7Z/KXWx7Tuf/kx19LqqRruw=; b=Ls5RUhobE/w85y1+6AKKkmn4AtYo3SbgIykgFi8LLdcVFqITCbglAXMHrgnzHWI+pF SXCcQ8PdYTdOMTvHhbd5uax3nPfhUvNUF6eJwY4dZ5d7B75a9DtSDoELOHhkSS9Yni9W nZspqxKpYPPOHm9vAFIZ13c/Fua2MW+eEbWFlDjwP0Y7ymNxl+Mo7l2r/dygMoG/kFce HXSjjUDkAFnxqtwU3iBC4nGXGi6de6e8D/pd294Pr3HrVXgLlTX7R7S2Az6IKRInQtgY jjxtY8/rgQHkQvbKBJrr8AprSi0VQ2jNDew3iekzkHriXLRluteIu/bjwmqeOsic5Z/g /7zA== X-Gm-Message-State: AGRZ1gKBLwMluAH3Iu9/j/hPPin1W7KUs63eCCKuSZvYSTK+L52d+gXd MzIgMR+a7GR69p3nyUf4sV8zMA== X-Received: by 2002:a62:824c:: with SMTP id w73mr39066971pfd.150.1543442758958; Wed, 28 Nov 2018 14:05:58 -0800 (PST) Received: from brauner.io ([2404:4404:133a:4500:9d11:de0b:446c:8485]) by smtp.gmail.com with ESMTPSA id m17-v6sm9831262pfi.102.2018.11.28.14.05.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Nov 2018 14:05:58 -0800 (PST) Date: Wed, 28 Nov 2018 23:05:49 +0100 From: Christian Brauner To: Joey Pabalinas Cc: ebiederm@xmission.com, linux-kernel@vger.kernel.org, serge@hallyn.com, jannh@google.com, luto@kernel.org, akpm@linux-foundation.org, oleg@redhat.com, cyphar@cyphar.com, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, dancol@google.com, timmurray@google.com, linux-man@vger.kernel.org, Kees Cook Subject: Re: [PATCH v1 2/2] signal: add procfd_signal() syscall Message-ID: <20181128220545.fplqmbkfhxowx3lf@brauner.io> References: <20181119103241.5229-1-christian@brauner.io> <20181119103241.5229-3-christian@brauner.io> <20181128214534.xxqoyy7mi5dw54kj@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20181128214534.xxqoyy7mi5dw54kj@gmail.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 28, 2018 at 11:45:34AM -1000, Joey Pabalinas wrote: > On Mon, Nov 19, 2018 at 11:32:39AM +0100, Christian Brauner wrote: > > + if (info) { > > + ret = __copy_siginfo_from_user(sig, &kinfo, info); > > + if (unlikely(ret)) > > + goto err; > I think you're misreading here. It jumps to: err: fdput(f); return ret; and does propagate the error. This is also an old iteration of the patch. Christian > What's the reason you don't propagate up the errors from __copy_siginfo_from_user()? > Granted, I admit that -E2BIG is kind of weird to return, but -EFAULT seems like a > fairly sane error. > > Or is there some reason it's more useful to just return -EINVAL for all of the > failure cases here? > > -- > Cheers, > Joey Pabalinas