Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5734211rwr; Tue, 9 May 2023 05:48:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4iT5leJ4JghAWe26GvevQZWfDnuVKkTe+M0ZghobLOZPwzae8liBoSqXPeWTPyMqZNK5KZ X-Received: by 2002:a05:6a00:17a3:b0:636:f5f4:5308 with SMTP id s35-20020a056a0017a300b00636f5f45308mr20105178pfg.7.1683636512117; Tue, 09 May 2023 05:48:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683636512; cv=none; d=google.com; s=arc-20160816; b=Hmzgzxdin6tQgTuLuKhJbiPbsN0VgIz+77iSMMePRo0aq1ZSzq/VxjkOaQOTvRpceD xXUioSAmwWf8l5hW8D3aZVHI2FIBFNyGWFXs9MM7c+KaDek0ABbgkPWPkRV1tfpEokWF E1J/cMNt/qQr67tnjBdDH1edVUkCAf9/rioJ6USupl8mxCGrmijtsqKTenplDsyh+AE+ HdsJE2H+dvkpS5gZ6VGxplCMWk2Tj2rYGhZhb52TJXXu4XjwiWinAZ/g3sowpbRD/Day zzzeb3R8rh4+ebLDXAjPe60uj3aHrwxo0pI+CT/rnnMlyGXgMBaKs4rm6JlfF3hkfSyn Lv/A== 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=h4kxchsyaaVSqhuwSS07o+CGltQKN3utS5btQ5n6GOk=; b=S77yo8aOrWiOZ0yineA9g0/AbOL80wYY3A7SqrZrDY/D0aq5n6d30vgxu66dvMvOcB tGiLUi9TClGw6GQnRCHMJyiK2z0y21EavRwFER79wuxqJYwEx4JbB7IROdIWiOJcAdPJ Clsbk3LVVoqlsn8qDG21BWRxwr+hl02qPpm5zWPkZGbRpf8ZTx0aC9K2qD9bXg245iK6 mUvTG+m/dgtmI/6ToEG0A5+j7etUFIpuiRzOgc+vrn2scE43h4Qkp5huKbq8F+x1h2Or Nkrj4sBdUpMpaLZnwOlfoSFWpPjcKleMqWuJZyk4Ao5eruudv44rjJxqfwxiDmW4D/ON Iqgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=kqf931XB; 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 bv187-20020a632ec4000000b0050726756edesi1394530pgb.76.2023.05.09.05.48.18; Tue, 09 May 2023 05:48:32 -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=kqf931XB; 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 S235159AbjEIMiy (ORCPT + 99 others); Tue, 9 May 2023 08:38:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234580AbjEIMiw (ORCPT ); Tue, 9 May 2023 08:38:52 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEE1544A5 for ; Tue, 9 May 2023 05:38:51 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1683635930; 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=h4kxchsyaaVSqhuwSS07o+CGltQKN3utS5btQ5n6GOk=; b=kqf931XB/l6jJjbVcpDbGWQDpMM621I9GPKYunJEl668nK77PIuhcP4GdXWfy7qY3tO6KP GmMmJ6e1O3an0+tBKKQ5oOsBxgOB+P4Mg7EpCuOAYRBhmM+R4oCfHe170qzmaUIaEg0TzF 8RVXshJLLVFkMc94xD1CyIqxtZ9HcDtcdNObhmOTEbieR3hZSau2r5GK+UISYWcGbVUCqU E8qlze913J2n1NhJexrkF4GM5OYbJ/6WYbc1MzYs3Ijth3lLhCYycQ2RPMzjl0h1etuDKz 4D0td+usz48YwTBkw2cLC2F7iirw3WGozx8bFfiildaUTe+whvdVW6C8kEo9Gg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1683635930; 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=h4kxchsyaaVSqhuwSS07o+CGltQKN3utS5btQ5n6GOk=; b=l1LQnw/6lgglWF3xjlLVhCqPJtq2tJpF4pPi8QYaPx/H4p9L7oDJwnofJlOC9ga5T513p2 HtOMsyzH4gTyM9AQ== To: Frederic Weisbecker 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 In-Reply-To: References: <20230425181827.219128101@linutronix.de> <20230425183312.932345089@linutronix.de> <87zg6i2xn3.ffs@tglx> <87v8h62vwp.ffs@tglx> Date: Tue, 09 May 2023 14:38:50 +0200 Message-ID: <877cth1xyd.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: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? Thanks, tglx