Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp109371lqt; Thu, 18 Apr 2024 09:40:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXhGHABIRaqN5NUgZmQEQ0Jhk/POR6BFftZcz4KDBde19E4Q54JhdjEx0XuLEFj9NpxUxhat/FI1VdAxgFeKJimrOl2PRdJDu3UcItOMw== X-Google-Smtp-Source: AGHT+IGTZbbxgVacQa0c33ZyWi5sVWqN8e1c2jDOSPzgwuu81YCUQXNL79jVYDTgkifFGlAfVDFx X-Received: by 2002:a05:620a:27cd:b0:78e:ca15:9126 with SMTP id i13-20020a05620a27cd00b0078eca159126mr4249424qkp.62.1713458409538; Thu, 18 Apr 2024 09:40:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713458409; cv=pass; d=google.com; s=arc-20160816; b=GR46FMYBaMAYw9hia1s4khLzV2sRAm/tt7mhR8C5WmY8c3XOaWkSU15TPFFVOgNZvN S7SRTSoxi6Jecq4B6FfixlGJ6Xdknu87asebriVClF+8hhFq6xCq/91mxaH7tcXOLT80 qF1xA35/u00b32mxXZxcxCVzNNdeLKbFAV6mWxQjFNk6zOPUwuO1NF/kzDTu5q06W3cJ JhNz2hh/dDDiRRDId3H+wzCaJ8I86/vZ8s0XqKpJVIO1mnloO5V7pHqD/MjF5a5aXpDd qSA9mRcTnqSZZsosZE6GBBsoljyMz0tXfOF+q+Hjos7+QSRNR1wzB+eaRA6U5spA9hw9 BflQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=+7Ta3iQIct248tsu1U+JX3MhnFMLBvhD6niHZD7BgJE=; fh=34NfmAEzJOJaceHohYxDFsWIDaICnelwXMlFcm2Aay8=; b=IP+EBlY+YpkwsTkRCYTt0eCeXx99KK7X/kkmkrGfl1XRe7Dfl3qqcKlmaLJUUD1ETZ oLL4hh/MjtFijOdS9RPeBGQj7BoSLtVPkShrmUY63q1bbdguPW6YarC2qt1Ol8M3dNfT K5liPro/8qPNp97CUgOwcz3j8PTzPq9r/eTNRhtNAmCqm2AbsOV2d1vdEXcupkpEwOiI yhULwN9O0nrsdEsIeH810MAzILheBjMPC2BgypNqkNgQK44hjAj/sETsRHxHcdcK8Fyy WrYD+A9ZHq35PSUliNtA+16acnRoZXOXtApysyn8ab/XRRMc9vzK242GV9VhMo3ldyUr qJag==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="I/G2yRUH"; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-150511-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150511-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ee25-20020a05620a801900b0078eee1f7905si1898121qkb.473.2024.04.18.09.40.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 09:40:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-150511-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="I/G2yRUH"; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-150511-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150511-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 46E2F1C22622 for ; Thu, 18 Apr 2024 16:40:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 70873171643; Thu, 18 Apr 2024 16:39:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="I/G2yRUH" 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 283B016F855 for ; Thu, 18 Apr 2024 16:39:46 +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=1713458388; cv=none; b=G7pcou6norSAn4V86dyBBcnEpcU78mBT5Nskaugq4hZT9iZ0j1ZHUP4HghezVr0J5VBTGuPs0XxShJNT/rWghrzcXnbOqBvMOlsuVVBQMvtzKqIc0wHtyJtvwiKG2bAjvYUGTXrPTWQQ4QycY66k9V4qf2sNCHmQUhPddi0GkX4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713458388; c=relaxed/simple; bh=ks+gYRlgMWjelNLaqSdEzg0InsxM+LPkXXjPq760u0w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Q7h1l7qDrlrxXop3P5K2vgiq0NwUAaNEYnADZMyF/aN2paZC+ZpOSp0lQZWN4NF7OIH60SvyY6SSYSL6VZQE7bgJBqovQWU5gCroY3xx97yZRh7nHn9I5/P+CLsdFbMLlYmy9HhiDJjLT3OsFr5xtqll3ganxq21XVHxbavVdOg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none 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=I/G2yRUH; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713458385; 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=+7Ta3iQIct248tsu1U+JX3MhnFMLBvhD6niHZD7BgJE=; b=I/G2yRUHOIf3N0iA2j11yr7Ev1eFi5jswPLW9Z2pbJo1qHsRMZFwVSDxR24o1+fcMGYi3B I3lgYs25bVslu40eIBCya8u8ywXLjGYOpfCTBRlopZHhLFyg7vmhxJ3U5HkZmo1SSZgkOi eBGG8ZrN8+htDh0HyExOT4T6mmjs94w= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-439-90jbMu4_M02DbE-Ne4_P2A-1; Thu, 18 Apr 2024 12:39:42 -0400 X-MC-Unique: 90jbMu4_M02DbE-Ne4_P2A-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0D00E1C0432F; Thu, 18 Apr 2024 16:39:42 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.226.182]) by smtp.corp.redhat.com (Postfix) with SMTP id 1704D20296D3; Thu, 18 Apr 2024 16:39:37 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Thu, 18 Apr 2024 18:38:16 +0200 (CEST) Date: Thu, 18 Apr 2024 18:38:11 +0200 From: Oleg Nesterov To: Thomas Gleixner Cc: LKML , Anna-Maria Behnsen , Frederic Weisbecker , John Stultz , Peter Zijlstra , Ingo Molnar , Stephen Boyd , Eric Biederman Subject: Re: [patch V2 26/50] signal: Get rid of resched_timer logic Message-ID: <20240418163811.GA23440@redhat.com> References: <20240410164558.316665885@linutronix.de> <20240410165552.572304080@linutronix.de> 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: <20240410165552.572304080@linutronix.de> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 On 04/11, Thomas Gleixner wrote: > > There is no reason for handing the *resched pointer argument through > several functions just to check whether the signal is related to a self > rearming posix timer. Agreed, these changes looks good to me. But, > SI_TIMER is only used by the posix timer code and cannot be queued from > user space. Why? I think sigqueueinfo() can certainly use si_code = SI_TIMER, so > @@ -1011,6 +1001,9 @@ static int __send_signal_locked(int sig, > > lockdep_assert_held(&t->sighand->siglock); > > + if (WARN_ON_ONCE(!is_si_special(info) && info->si_code == SI_TIMER)) > + return 0; this can be easily triggered by userspace and thus looks wrong. Oleg.