From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 58F2E39D3FC for ; Mon, 6 Jul 2026 09:11:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783329106; cv=none; b=Bbol8Du4vq5mYIis6edTicABBajStt09S3IHqgX9ghlkaSm4jlqCPzPSq+/IpRCOaI2zGZ7jIuUnIKbYMi3GNm2NznKn+OcCCfbzfcNDnQ2tZv6NlGc2H8qhbpS//rYJrxp/BPdsqmVDpM8p0svh4WAkx5E85svBpxL2diG1bs0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783329106; c=relaxed/simple; bh=hQZqOqkwWLUKYUpid8o9EnigiNn6gGGU0fkTW+i+K2c=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nm7kYdYWjs546sxBAaub3yieQHOFoyQ2gtRhmSQnH/W4GXNoOoxqTFkCmp/EAcA1j7MCQoKWPl2nCJfcKMrIb5oGTPOlgcVtcC2y+EDM+B5btZ87ybTll1kTok55enBMyVmbIgG4pAo/5E5x7iqLY3OvNXZCcxUiz7Hr2VGb3ow= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aMA4JIB7; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aMA4JIB7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B46B1F000E9; Mon, 6 Jul 2026 09:11:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783329096; bh=hSQc+2+HAMjgXe7YaeV9OpWRiVUzpfdvp+q/zzwhb5g=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=aMA4JIB7KRD+2Lu4A7nDXyc0bdhszmd4mITA4T8bSUCvIvTeOKMo/ftFshARMHQrI 7j8mQSOhmjuuhLtVAfH0FWbc1zv1oluXJlwt7Qj3qKZwfseMEaTLy9wnvLrQ6lEas3 mGuKHoRx5MGwjiQaChuy8MjU72PeeUHlAQ7zyHax+CJLjiUjsazX53Lbb70i/jV+2u sm9awtp8IwHtbuv4k4at8Be4nsihZ/EqlB+tnp/wdthGxwWRFPHOkVL0kvbkpCXa2p K+fGSBaAL7Os/GWFzf2cFVzzjiFYRXsLpOCBSbkWKocVCw2G2Y38wtFg6mKZfI2kmd CJjMoW1fIw2DQ== Date: Mon, 6 Jul 2026 11:11:33 +0200 From: Christian Brauner To: Oleg Nesterov Cc: Andrew Morton , Bradley Morgan , "Eric W. Biederman" , linux-kernel@vger.kernel.org Subject: Re: [PATCH -mm 1/1] signal: avoid unconditional siginfo copy in send_signal_locked() Message-ID: <20260706-bewenden-mitverantwortlich-couch-4f2bc160dc96@brauner> References: 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=utf-8 Content-Disposition: inline In-Reply-To: On Sat, Jul 04, 2026 at 04:34:42PM +0200, Oleg Nesterov wrote: > send_signal_locked() unconditionally copies siginfo before the namespace > translation to avoid corrupting a shared siginfo. > > Not that I think this can actually hurt performance-wise, just it doesn't > look clean to me; the copy is only needed in the unlikely case when the > translation will actually change something. > > Defer it to the two cases where si_pid/si_uid are rewritten, and while at > it add #ifdef's just for completeness. > > Signed-off-by: Oleg Nesterov > --- Reviewed-by: Christian Brauner (Amutable)