Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6575429rwr; Tue, 9 May 2023 17:58:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Qxa+Vbtiguq7vKozEiS0OUlEHXwEB9ojZYnvdqpgnHhQ62huOkarGPT8kg97Hz2k+YEHT X-Received: by 2002:a05:6a20:918e:b0:f2:45fd:1de2 with SMTP id v14-20020a056a20918e00b000f245fd1de2mr20423885pzd.19.1683680331959; Tue, 09 May 2023 17:58:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683680331; cv=none; d=google.com; s=arc-20160816; b=smkr/FwEO7oQs4NMPkxurLnsJ2tqFmXN1ajoA+mh2LlGjzvzq7lXPe9+lNUC6rkiIE FJkR6K8TpW62WjgiCqXnzvKn62pL5d2Pjg077oC3X7/HoVzETO5f/Dn1fc+ofwL4y18w zbGDhxecPVr1540p+XnBMKiyaHGKHSvbYXQMesPxbmGfrUJgvaoCVxqcIjbcQTCvZNhr p9QONGDMgzs41kcHoxXtVRRWTQsO4bemTbf673TQjkzPL1uk+twXKK1nMHn7LzDFJZdI abCg5KK3xxSnGjB7dEOuh3nfITpXv2DcCb2ub/Bii7w7NJFdx0aSsLdO1QQiBoXbfFMl QAXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=X+uCQalWW1wS5LZOuP8kAg50kMgeaRCjbS0orAl87h8=; b=xof/W5UMpH545pqdTkHqAVvbpQau40RyTA6nNUw84ZU/Aq6II5ki+eEXLRgVcZWE1Z Ov2tMYP2b3MpIbpejfNUewZAwsVVSvVPd2tyKV7Y3UoechXvm540mnR8oVZZac5xhnDb Q8xqgPpIGcjgnRk4kh7nanBncv37m18f9Xzm4ASnHXeivxhOw1e2wKZK+txYOLzYVyZk C9QRa/5b+ajbnw53raqgyu2x8aLc1oA0qPh3ht67ayzABw4aKCkKjbgkK/zCVmb+ldYq N9Ep0css4ej2Kzkiml64YUzmtSTUGzHxnekRhQnzvJciGM+eiHYP4LLWFI+fLpwqeUQi Vc6w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=openvz.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k123-20020a636f81000000b0050b8a7635dfsi2953304pgc.295.2023.05.09.17.58.39; Tue, 09 May 2023 17:58:51 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=openvz.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235240AbjEJAnA convert rfc822-to-8bit (ORCPT + 99 others); Tue, 9 May 2023 20:43:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229559AbjEJAm6 (ORCPT ); Tue, 9 May 2023 20:42:58 -0400 Received: from mail-ua1-f42.google.com (mail-ua1-f42.google.com [209.85.222.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4A45273E for ; Tue, 9 May 2023 17:42:57 -0700 (PDT) Received: by mail-ua1-f42.google.com with SMTP id a1e0cc1a2514c-77d049b9040so33576179241.1 for ; Tue, 09 May 2023 17:42:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683679377; x=1686271377; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CfRga80IFuib6OMLZt4mIA+A4rhSmfiaklSGZGPK0eo=; b=j6jM2RsRggsIUWWDWav+T+GSfgONKJ2cfTHzigFEsD4nVoLDhSJyO9nWLq6z3tiB29 5k5zHxnYxi6++Uc+cWX5diuWzdn2GNsZeCbh7UPeDubpSNqEC5PTPNpCd1Fz5NgYojeZ gs2ymbbyClB5Uy6pX5GVIHy4nbI6Ed1utcBUjmQc8ZBe2QNpKb9tXEnTf4YAeUdrpQWE RodTHexICk/ZRV+9hdHUz1iV6CaJJmBoQLfNJqi+vxfJ+LuhjiEzVDQguXY26VkclIUo 5qwoJWb1dmRMHgGK/ndxJgqspoFGj2iUQSnXnKRFKfK+Bb9zgJ79EaB1MYQ1TMqgWF3P JM8w== X-Gm-Message-State: AC+VfDxwC+5wgUXKl2zXAxkAeddy4iqCw0VPzcfHMS2Ln5/PUDQI0QpR 0cdqqh0udMoT26SMr2mYeLWdIEufa0TDotz5f94= X-Received: by 2002:a05:6122:dd:b0:440:4c82:6508 with SMTP id h29-20020a05612200dd00b004404c826508mr4556264vkc.3.1683679376495; Tue, 09 May 2023 17:42:56 -0700 (PDT) MIME-Version: 1.0 References: <20230425181827.219128101@linutronix.de> <20230425183312.932345089@linutronix.de> <87zg6i2xn3.ffs@tglx> <87v8h62vwp.ffs@tglx> <878rdy32ri.ffs@tglx> <87v8h126p2.ffs@tglx> <875y911xeg.ffs@tglx> In-Reply-To: <875y911xeg.ffs@tglx> From: Andrey Vagin Date: Tue, 9 May 2023 17:42:43 -0700 Message-ID: Subject: Re: [patch 02/20] posix-timers: Ensure timer ID search-loop limit is valid To: Thomas Gleixner Cc: Frederic Weisbecker , LKML , Anna-Maria Behnsen , Peter Zijlstra , syzbot+5c54bd3eb218bb595aa9@syzkaller.appspotmail.com, Dmitry Vyukov , Sebastian Siewior , Michael Kerrisk Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 9, 2023 at 5:50 AM Thomas Gleixner wrote: > > 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. Let's go with the proper solution. I will prepare CRIU changes when kernel patches are ready. Thanks, Andrei