Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1170916rdb; Fri, 9 Feb 2024 12:30:03 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUdErhitVjq/LWwce/oxQpJjMFSnO9BnWUGpikceL2sqlMBxFyTcKuTqNyi3wbl+HawduO005YF5Qui8klj07a1ALNQf3UZ+IorT28MAw== X-Google-Smtp-Source: AGHT+IG6fOrtBPQ/B3ARyxnBHZO3wd1SLNonN/R1TJOqTj9EzSvqxZNSsXMJPU7Kz6b5OlAIVP0g X-Received: by 2002:a05:6a20:c6cb:b0:19c:a2ec:64f with SMTP id gw11-20020a056a20c6cb00b0019ca2ec064fmr342125pzb.2.1707510602915; Fri, 09 Feb 2024 12:30:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707510602; cv=pass; d=google.com; s=arc-20160816; b=ERO29KDwWdkPb0qIo9qpGid5E6R2X0Ej0swgnO49k9Ix4zuycuQojvDHC1OV7l7v8d kvnQwJ727BlOl4pjTVrsd8iUwbfUUnl6jkqq1GBg8YYP4iOuu3zMqlSvTIvhYQSiOZNh M/ew1D9jb+XIXIAkfSMtplr1Q20ODlWqo+wDqMAheN1sLxEfJNILKU4HfWGhMTCnWVj6 nGthqZ/FTK1YFGORhMu+k8CBRx5UVRMJTdbanz7J/4RUMcgg1gWD7qjsrJPG8oK0nFU8 /yWBtnyG9OKFcRWv7PhFZu0021ZVv87wMuoV/oTJNDe6o5RA0yyTq5wsINgcWDZKZTLo GXVQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:feedback-id:dkim-signature:dkim-signature; bh=7HHSZSBrGnvXlR9ji0eRnBBMyU/kYyPlTorpNyRe0mk=; fh=RwsaEwbUVjJfPi4YVBQ9cqBVzoRUDPXxvLU23EafXTM=; b=tx0pZYbBAMRKN8d0o+1y6Ix/fkLRXod010A6+hz/6PucBUw7Ie4Cgbg5LId6jNI2Lu qemrnyxyAh9Uz+T2IR26xCd6jUDnPtq1unZsWYnfMws0iHDv7IBL/Dm86eF7DEnoCb/G tTMiDt7PSr3TtYSCTBdPuxQjuxscccKDHnvBn5w9Y1lw7mjZMzj95l/J4086HB/XtIeE oekY+dAPeRnv7F46OSfg8dUoJVY+u9FSe5Drur3VCH5S907WwUrhmxC431gXNezJRXdV anT8VBU0MtlSH26Lgbor2OwoBPh4Omhq0yVrZtwmjZcIDdDnNi7VVcZiri6prh51B5f7 WAWg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tycho.pizza header.s=fm2 header.b=DAbw1HfX; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=yf1Pu1dw; arc=pass (i=1 spf=pass spfdomain=tycho.pizza dkim=pass dkdomain=tycho.pizza dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-59914-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59914-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCXl7ySzmv+O3T/aNeGmKNYkURawYuUwdwf6w9PXz9v6PBWKXXGGpONk9llj1sKpVBfAlsgDgNuy5RtiYGw7ElO8FgQLhqZlgT9ejp/CrQ== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id s69-20020a632c48000000b005dc1c542cfcsi2135685pgs.263.2024.02.09.12.30.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 12:30:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59914-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@tycho.pizza header.s=fm2 header.b=DAbw1HfX; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=yf1Pu1dw; arc=pass (i=1 spf=pass spfdomain=tycho.pizza dkim=pass dkdomain=tycho.pizza dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-59914-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59914-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id E75E6B24D87 for ; Fri, 9 Feb 2024 20:01:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CBD1D85299; Fri, 9 Feb 2024 20:01:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tycho.pizza header.i=@tycho.pizza header.b="DAbw1HfX"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="yf1Pu1dw" Received: from fout4-smtp.messagingengine.com (fout4-smtp.messagingengine.com [103.168.172.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD2B47FBBC; Fri, 9 Feb 2024 20:01:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.147 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707508902; cv=none; b=Z4ldSfn2RcyEcZzb0XbVRSQFmTn63j1NWO9Y+VwYJ4WA6CzGml5UHiW7zRfv4GYga5QY0UEfBKKZu/l+SY+7PHG3q7c1cqRv+ukOwhzlzVH8a1egZ759YVME/vn9QNoU+9hPh9XrYuHh/uY1/uMsd2PHmviKH3AahH+2WDxX/GI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707508902; c=relaxed/simple; bh=WL/rzBB2GfU053FLLg28Xuod+XynvPbNisV0axNODVs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gBcI/pVnZJPVD9pOIFfh/7iLhc7snywxai7jof2Kwbf8NBGLgjJa0bJH1L0uMzPmx7Hq//MkVkjBKfk6ucnFmVzfZ9MR8WwpZO0k1+Vs3dJIFOjL6SeAwYNUEilF5utZBYm/M75jjUmU/obyvS6MO3U9nTBsbO8BNYk2CfezBGQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tycho.pizza; spf=pass smtp.mailfrom=tycho.pizza; dkim=pass (2048-bit key) header.d=tycho.pizza header.i=@tycho.pizza header.b=DAbw1HfX; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=yf1Pu1dw; arc=none smtp.client-ip=103.168.172.147 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tycho.pizza Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tycho.pizza Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.nyi.internal (Postfix) with ESMTP id B16FC13800A0; Fri, 9 Feb 2024 15:01:39 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Fri, 09 Feb 2024 15:01:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tycho.pizza; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1707508899; x=1707595299; bh=7HHSZSBrGn vXlR9ji0eRnBBMyU/kYyPlTorpNyRe0mk=; b=DAbw1HfXp/TaIjcGplAzidZYB6 EiPtcvqgmuMJQrWJ7TOja4UNfLfrTPKV+zVNNVsaxEjcYxdWajt/NXlpHOUZ4TnQ p+u3CSb2urhqHRSi56ak2k4EQrPHkYrZoJIepyS5zRE1G/7YjhGXqpTdBuBZ3V2X FkqUeJQbc8tM1s2zyNDHPW0q4MoatML6zl40bOhGiFJAaMOV9sJH5lofuJKzm+sD D4XcyLBPzPf3GlsjWsRIV4HqSI1gbfqrHrQ3FWS56oeyPNdw4M7XAQysUP0dUmju L+3eQ55sdBArJKRwUGzgwkVaxgkYlfyDhFsQqy5lS/A0xCPtmszMe82wCsdw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1707508899; x=1707595299; bh=7HHSZSBrGnvXlR9ji0eRnBBMyU/k YyPlTorpNyRe0mk=; b=yf1Pu1dwEuy0SvpGiWStbqu7cGKH7y4QXdN8juMeDivS tSI0aKfAYEEdNEWDWT9sJl7pRxZnd5IfekY19SVg39IwEYhAm6oo9hG41W07p5qx cI5J0/qvJJTlHDmQQvk9pKFebKwNphxORxVbj11R/FVWpiXbhltzelp/GwLbAHAT 6EaIRqfxYWiZBMEKrWz4eC6GZTTpsyH5z8lBD0SbhvFf5UlqydWfoqufLeFyXFMg 5KSsoL+9zTBmPXqBNZeKaOEGatr6HRUe7/1WgUidCzoGHpDofcQwI71zQ/lQAPoj 3WOK8NHA8SyuZXZflQZCnaQIolfWAOqY15PoF3zcqg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrtdeigddufedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepvfihtghh ohcutehnuggvrhhsvghnuceothihtghhohesthihtghhohdrphhiiiiirgeqnecuggftrf grthhtvghrnhepleevudetgefhheekueekhfduffethfehteeftdfhvefgteelvedvudev teeufeehnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthigthhhosehthigthhhordhpihii iigr X-ME-Proxy: Feedback-ID: i21f147d5:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 9 Feb 2024 15:01:38 -0500 (EST) Date: Fri, 9 Feb 2024 13:01:36 -0700 From: Tycho Andersen To: Christian Brauner Cc: Oleg Nesterov , "Eric W. Biederman" , Andy Lutomirski , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] signal: add the "int si_code" arg to prepare_kill_siginfo() Message-ID: References: <20240209130620.GA8039@redhat.com> <87sf21zjy8.fsf@email.froward.int.ebiederm.org> <20240209163914.GE3282@redhat.com> <20240209-traben-geothermie-8c6aa7e1984f@brauner> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240209-traben-geothermie-8c6aa7e1984f@brauner> On Fri, Feb 09, 2024 at 08:36:24PM +0100, Christian Brauner wrote: > On Fri, Feb 09, 2024 at 05:39:14PM +0100, Oleg Nesterov wrote: > > On 02/09, Eric W. Biederman wrote: > > > > > > Could you can pass in the destination type instead of the si_code? > > > Something like I have shown below? > > > > ... > > > > > info->si_code = (type == PIDTYPE_PID) ? SI_TKILL : SI_USER; > > > > Yes, I considered this option too. > > > > OK, will send V3 tomorrow. > > Hm, I don't think that's necessary if you're happy to have me just fix > that up in tree. Here's the two patches updated. It was straightforward > but I have a baby on my lap so double check, please: > > From 05ffda39f6f5c887cae319274366cbf856c88fe5 Mon Sep 17 00:00:00 2001 > From: Oleg Nesterov > Date: Fri, 9 Feb 2024 14:06:20 +0100 > Subject: [PATCH 1/2] signal: fill in si_code in prepare_kill_siginfo() > > So that do_tkill() can use this helper too. This also simplifies > the next patch. > > TODO: perhaps we can kill prepare_kill_siginfo() and change the > callers to use SEND_SIG_NOINFO, but this needs some changes in > __send_signal_locked() and TP_STORE_SIGINFO(). > > Signed-off-by: Oleg Nesterov > Link: https://lore.kernel.org/r/20240209130620.GA8039@redhat.com > Signed-off-by: Christian Brauner Looks good to me as well, Reviewed-by: Tycho Andersen