Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5751863rwr; Tue, 9 May 2023 06:02:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7i6bxFpwoU+uImiPUJqVaPBEG6CjJdkmsIyU+s0qF0nQJ0ZNiDLtbZY1JZ3gwEM6jmrd4F X-Received: by 2002:a05:6830:104d:b0:6ab:bec:592f with SMTP id b13-20020a056830104d00b006ab0bec592fmr1239021otp.17.1683637354271; Tue, 09 May 2023 06:02:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683637354; cv=none; d=google.com; s=arc-20160816; b=LwPbKLZFyBINuDQMzrrL5EFCPIOJQ/5lCfvs6/O/lUn7DpKNfuBT/mu45nefPJcjjO lWvtGhpzuaSdYbY7DIuMeXuiJHwUNMQBWocsyyvZ3Y6c+WBVC83S/6efgl6CBUUL55Uo dyPvqhwwKiBWWSPL8ejymrpIiW5WppdoCYIhmWBUQsmsQLbMi1INzBope6PJsmsSrxSV ixzMha2THPnx109MvIHosAXthsTeGuN//nnkIRCFXQ5ezPm8B6Y4GUr4wrfXMXo0UxrU UStRQCXo9GnPPzlih4j+/oYhwlggqj5U1otwGs83wmLqk2tbEX27BBjpCcvlNOCbv2iJ 16xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=4Uh4jLOK44sbSg0Nb75DjvHgNO2JDLb4jbcWIYet/JI=; b=QVkyYOqwVjcBeOa2ppOVEPq2TLuJ+pwORxzb1pMdHUNJ9Um0ZIHPSLZfFBha0cBoiQ gXaIG+0jJZH8485bxly/lLxy2qNJJAgGeIWaEkZKIx0YgZeRzZR5XqgF3kf4NJZZ7pNw B+0Q2xi2+iP/mb61t62LozkU+vaYYyz3wh5xDr5ggsdNE3hSCJkj0Lzeoup24BcOnafP 2fLZCVb9fJNI2ya6FnbOLQPvtpt70sEwzJ+e4HPJFXW/wxzF9CGUiDDx0AGBHmyhSrYv sOVsMwO757RCFD84dGXQfX92L+z4QEs4hD73rCKWoXkJ0JLZd4hJvKf0qQ/7R7HC2q44 RYww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=hgOcw7XF; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cg14-20020a056830630e00b006a5ed583c9esi6925752otb.52.2023.05.09.06.02.20; Tue, 09 May 2023 06:02:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=hgOcw7XF; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234641AbjEIMuv (ORCPT + 99 others); Tue, 9 May 2023 08:50:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230119AbjEIMuu (ORCPT ); Tue, 9 May 2023 08:50:50 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 298A94C31 for ; Tue, 9 May 2023 05:50:49 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1683636647; 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=4Uh4jLOK44sbSg0Nb75DjvHgNO2JDLb4jbcWIYet/JI=; b=hgOcw7XF4xOjLIWJToCM+L/7RqVmUwz85PD9XnEESMOdaXfd0i9sIv3/L7FqeRtwTPyGFr 0TlC4QeMJGfeiW7+gsfT2WXzKQFbpJxYuPHytmlzVWA3Za6eylJysDnRb2rNePFysMxNdQ JV7NMCm3KFA/cMWhFV9qyQ7BzvKkHIXQHVHXGYO5ChltBQ29edccSOLkArqUqjlNr739JE J+RWpGoBRt/hsVAb9ZJXqHHNDvgS2mN5+W05CxyhZK9ZdCrV1BnBuJ3pMOdfTMwAvQ/7Wh HfAszd2/peN1bN14buu8KFCYCNHmpsQHSxeNabYuDqBgN3AXfcJBpAV+yycZng== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1683636647; 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=4Uh4jLOK44sbSg0Nb75DjvHgNO2JDLb4jbcWIYet/JI=; b=GgIQecjNf2QB3cZ4HKd6HgY3iQOwZCCcXKHFD1+bREYhrmlVe93l15Aa7/oudLhNyfgUY1 eT9WIUJ1PtFfRYBA== To: Frederic Weisbecker Cc: LKML , Anna-Maria Behnsen , Peter Zijlstra , syzbot+5c54bd3eb218bb595aa9@syzkaller.appspotmail.com, Dmitry Vyukov , Sebastian Siewior , Michael Kerrisk , Andrei Vagin Subject: Re: [patch 02/20] posix-timers: Ensure timer ID search-loop limit is valid In-Reply-To: <87v8h126p2.ffs@tglx> References: <20230425181827.219128101@linutronix.de> <20230425183312.932345089@linutronix.de> <87zg6i2xn3.ffs@tglx> <87v8h62vwp.ffs@tglx> <878rdy32ri.ffs@tglx> <87v8h126p2.ffs@tglx> Date: Tue, 09 May 2023 14:50:47 +0200 Message-ID: <875y911xeg.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 09 2023 at 11:30, Thomas Gleixner wrote: > On Mon, May 08 2023 at 23:57, Thomas Gleixner wrote: >> More thoughts on this. If we go there and accept the extra page of >> memory then we can just go all the way and make the xarray per process, >> actually per signal. > > Thinking more about it. The current scheme how timer ID allocation works > is really interesting vs. CRIU. > > Assume a process creates/deletes timers frequently. It's not hard to > move the next ID close to INT_MAX, i.e. 2G > > Now checkpoint that thing and restore it which means to do the > create/delete dance to move next ID up to the last one-1. Will only take > a couple of hours.... I'm cursing myself for overlooking this back then when the CRIU changes to the timer ID management were made. Why? Because that created an ABI which CRIU relies on. The proper solution for this would be to make it possible to create a timer with a given ID. That's not rocket science, but we need buy in from the CRIU folks. Otherwise we are up the regression creek without a paddle. Thanks, tglx