From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 37AEE3A963C for ; Wed, 24 Jun 2026 15:52:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782316349; cv=none; b=Bx440FeJA51g4LykJQB6V5QNP7Jj6KKJNgTl29V0Vs2Z5tC7D4pGrvnWjqSmk9zb2M7WNHecr5hkr1BfO8X/bHf5Bsz/Jw7V9PlEhEMNJBtw9pgQJukKuy/1XG+YWExK8cNGker+7hGoS9YMnbSnwvEZbh/s8HffcsYaH/Hy2d8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782316349; c=relaxed/simple; bh=bIHPCHPeTWyLWSSLg2Wih8mmuE/8TdUsbfVXadmZQoY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QD3FVkleCJRv46Lz9OKwNx8FLeJX/ulzmL900q6e4F9wK8eQdVPZ9vK6AK625AIqo+K0D9QBbpv5OJhfUvZkhsBHA1wCgSqEwHaayZ/tAYtN8vfld5hI7vaky3mU+tSm8dSzPhrP9A1SreIWRnvvHZkwkEVtmUZu9/XSmSSBaG4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=EtmQajCW; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="EtmQajCW" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1782316347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MDwgsSpIaXJqcgTFTiBzchXG7H7XwgMajj+pitRMm8Y=; b=EtmQajCWjGaP9B8hQaoRYq4P58ByxgYREvpUZaE/AS4K9XHujaN4Aln735xsbr64VCRblv GqQCPR36AZlg3BXeWEK+tazUfLCSQQ0YGiOGXu8/xbm+XGksnoqai38urnjlJsPb0vOSv/ MIhCXj9ZHx2NwYlJtOFWgWeQ1KEaouo= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-461-HQ8F8BMCMzKPj9Y2QCZbEA-1; Wed, 24 Jun 2026 11:52:21 -0400 X-MC-Unique: HQ8F8BMCMzKPj9Y2QCZbEA-1 X-Mimecast-MFC-AGG-ID: HQ8F8BMCMzKPj9Y2QCZbEA_1782316339 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A0D1B1805C05; Wed, 24 Jun 2026 15:52:18 +0000 (UTC) Received: from fedora (unknown [10.44.33.191]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id 99FD41956042; Wed, 24 Jun 2026 15:52:11 +0000 (UTC) Received: by fedora (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Wed, 24 Jun 2026 17:52:18 +0200 (CEST) Date: Wed, 24 Jun 2026 17:52:09 +0200 From: Oleg Nesterov To: "Eric W. Biederman" Cc: Bradley Morgan , Christian Brauner , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Andrew Morton , Peter Zijlstra , Marco Elver , Aleksandr Nogikh , Thomas Gleixner , Adrian Huang , Kexin Sun , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v2 1/2] signal: avoid shared siginfo namespace rewrites Message-ID: References: <20260622164029.11474-1-include@grrlz.net> <86a8857d58d43ee26a8b365b837fd24830343494.1782159692.git.include@grrlz.net> <87bjd0c5xk.fsf@email.froward.int.ebiederm.org> 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: <87bjd0c5xk.fsf@email.froward.int.ebiederm.org> X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 On 06/24, Eric W. Biederman wrote: > > Oleg Nesterov writes: > > > Add Eric. > > > > OK, I agree, it seems we need a simple fix. > > > > Acked-by: Oleg Nesterov > > > > ------------------------------------------------------------------------- > > But let me add some "offtopic" notes... Why do we actually need this fix? > > > > kill_something_info(). But at first glance sys_kill/kill_something_info > > can simply use SEND_SIG_NOINFO? If yes, this makes sense anyway, I will > > re-check... .... > So I think tracing the basic kill syscall is interesting. > > It uses an explicit siginfo. It does that so it can choose > between setting si_code to SI_TKILL and SI_USER. > > If the signal number is -1 it sends to every process in the > system (or at least the pid namespace). > > That will require translation. Most probably I was wrong, I didn't try to re-check yet. But at first glance kill_something_info() never use SI_TKILL, and __send_signal_locked(SEND_SIG_NOINFO) will do the necessary translation, in this case si_pid/si_uid are the current task's pid/uid. But again, I am not sure. Didn't have to to actually look at this code. > I suspect just fixing send_signal_locked looks the easiest, > especially if you make the siginfo parameter const. Yes, agreed, and I have already acked this patch. I think we can improve this unconditional rewrite later, on top of this fix. Oleg.