Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5878382rwr; Tue, 9 May 2023 07:26:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7VAemhfA7u7mGVH7AKqmUe7yagmN2Se1j1rh6y3fJF/leiDshY828MiNFYXvYvLGeqH6++ X-Received: by 2002:a05:6a20:8e06:b0:101:ab2:eaa8 with SMTP id y6-20020a056a208e0600b001010ab2eaa8mr5347905pzj.18.1683642409614; Tue, 09 May 2023 07:26:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683642409; cv=none; d=google.com; s=arc-20160816; b=Sd5aR74F23BzdN2HZsEUROSXBihAbm5s2qKkJeA4vOsnwGwY6jdj5fmqhVRLpBxusD /fRMJ4nD2QH8dM/IlE/hYI2azApGQtQNDPDSEE7QGFwdkMwIqN1jZflO8slyYBrnstW+ 0iAgLozq8NrOuu1RQ4IPN824h61YUk7xqxkzuo3lWP8yiSAsdSLIzdoHq41KomQ303Dl ehj9FOt6/NlptQiJt7aavKuv6KIIghM5VTL5TT77ukSxdlnl3vPB44XhlgsF8qq8yHC1 NqNjI/pL/D8GrxT7dOfqIsaUXMXVsfK8qJr4tOMYGt5v1LGDkAi9P5nuK+QRnQ6nOKtg Re3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=k1RXcpz50QMlDh4wXGvTdOvp0PuvMfU4te+U/r1tRCI=; b=OFQWqlj7RcW4i2LEJfG9dwexIlAoP6FKr2KfvfAkSPhsjENjOY6Cem1K/eO7Lqsgit 7QvpWZkN4t/9tQNcOnGjT12tDk3e0nYdQGF9RB12LubC6z3drtDUYHNx9bbUCCd0Xyer vP24+6Fkfxs3+lmwa3sQP2z7WcF0qRyJeFrK+vcpWs7ZfSSroomXitOglyf550KLJzlM hVIWLxmq5Ic7Th86dRRQKRJ/REIig1xQ4ljD0GIJV7fAd6G70s50MEB4On1uqxBppC1K XjQGaNwm89WmRfCBhhIr6APn3nzMl9EP8m27nD6pAGj0hL0zqApX2x9UVWX6beZMB0io 63lQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ro98zdmy; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e1-20020a636901000000b0051b4f835d4dsi1547091pgc.515.2023.05.09.07.26.37; Tue, 09 May 2023 07:26:49 -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=@kernel.org header.s=k20201202 header.b=Ro98zdmy; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235138AbjEIOSp (ORCPT + 99 others); Tue, 9 May 2023 10:18:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235510AbjEIOSe (ORCPT ); Tue, 9 May 2023 10:18:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6232E198 for ; Tue, 9 May 2023 07:18:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BC6C662DDD for ; Tue, 9 May 2023 14:18:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC0EBC4339B; Tue, 9 May 2023 14:18:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683641911; bh=FgcLdJUu6stLQ0xpuvit88CceYDhfEW12tIoP9y3M0Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ro98zdmyVGQHMTLoHsCjKyjsoiXWZetDmV/4qkZfcBNyK+hwUZU+P0QXXBxfvK2bb vsQKr1pzKj90sbuMDxhRHj1ZRTYCybkCAsL/EOdbjqd5tRdq1R+0KuZPyWGhXwH9hN W3OYhEseqFiKKij2WMb6klzOzdsxqycNitDFsGqD4oxBkLPBKggFKYksaOAeSzVsIu V1y1ePbgh1LDTBADAS+rQR0gdRc6WfLckoy9D52cey6z1npiExIBvgOKuTg426aQWu e2/FXsmV8QU/VZAvX5wAQYMeC2lrPiTvzpOszTDhII5H0kbKtiWeK+kiguPTN8rtEt Hq+ZCp+G1s77g== Date: Tue, 9 May 2023 16:18:28 +0200 From: Frederic Weisbecker To: Thomas Gleixner Cc: LKML , Anna-Maria Behnsen , Peter Zijlstra , syzbot+5c54bd3eb218bb595aa9@syzkaller.appspotmail.com, Dmitry Vyukov , Sebastian Siewior , Michael Kerrisk Subject: Re: [patch 02/20] posix-timers: Ensure timer ID search-loop limit is valid Message-ID: References: <20230425181827.219128101@linutronix.de> <20230425183312.932345089@linutronix.de> <87zg6i2xn3.ffs@tglx> <87v8h62vwp.ffs@tglx> <877cth1xyd.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <877cth1xyd.ffs@tglx> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 02:38:50PM +0200, Thomas Gleixner wrote: > On Tue, May 09 2023 at 11:42, Frederic Weisbecker wrote: > > On Sat, May 06, 2023 at 01:36:22AM +0200, Thomas Gleixner wrote: > >> Unless you think about the theoretical case of an unlimited number of > >> threads sharing the signal_struct which all concurrently try to allocate > >> a timer id and then releasing it immediately again (to avoid resource > >> limit exhaustion). Theoretically possible, but is this a real concern > >> with a timer ID space of 2G? > > > > I didn't go that far actually, it was just me misunderstanding that loop and > > especially the (id =~start) part. Now I got it. > > > > I guess the for statement can just be: > > > > for (; start != id; id++) > > My brain based compiler complains about uninitialized usage of @id. I'm > pretty sure it's rightfully complaining and a real compiler would agree, > no? *sigh* I should think more before pressing answer these days :)