Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp24055575rwd; Sat, 1 Jul 2023 11:44:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlGImKdJFRZqUfGfICNEXxvWrfliqJgguQEfDwJ0chLYk8IUtL+i4ikqDiYi6LeNEFNpE0eQ X-Received: by 2002:a17:90a:4b:b0:262:df8e:fcb6 with SMTP id 11-20020a17090a004b00b00262df8efcb6mr6437469pjb.43.1688237044379; Sat, 01 Jul 2023 11:44:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688237044; cv=none; d=google.com; s=arc-20160816; b=iVbsxJUwak72+XeaS85PGExZInx32dwscRoYJz1YBY7Mybpm8l8uQMkJHM8ab2eCZe zjyRlEC8iTqyYg9XhjudM+yLt8CO6gf7/5Spfw4qhqUGC4CWroipBuPRTriklBfou1Ap FI9Jqi3Qxaj/d0PFWVUFXPcx8/EYPc0FxOtLdQ7Dcpfa6Ib8rjBAVM3MdxivcBnnvz5l l/dgq99gBbWFvvFof3MZZshubMpLrVuDwptA1d7ua/T1/Dx9D7ORvErAJ5nPJoj5C+wm 0Hh7+5NCv4CH32Ggnc+HbnwXhvOB8jBYy91JC0eL3HY3uGaXO0vbAZAw4v+rBmnfvikY xM3Q== 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=ffUL6AuqBbv/oAgPmf6xSbMiUnyyc6NBmi2IZwk4Jw8=; fh=7+BSne7+Nsu2Q4IouaoanoIP6ArVtkXIHqdpI0+dNj0=; b=q3/dG/kxGBClCwvNZaTxYul/oWXgVbZrn9TV2rI+ZB0q/uik5ZJWb0Q6Gr7ik+d2WE JtrtOy1ZGIGQVCkzXwO1d9acnpmK89PUSZNr+d9a13zhX5X0wgqtHy/e+IEdFj+z51Oa GoPdFX13h+Vqimj5w3KCPmS8E+rzMcjbKfORKvImbyvtGryFcaMJ0Q1sEYCVnu6RXum2 A86EihY8eiuaqh2qIGcXuFpd007FBo+xlgm3rD7ugJXBY2oNOwGb5kkUpOxNPWYzmZhV 6+g/xahuNdrlck7T3Odqcxe7FlVZWHhd+Bunl6WCRXN7mj1yf25bB+DiX7y+OA33q/RH mt/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=wI4v+eqt; dkim=neutral (no key) header.i=@linutronix.de header.b=ceRZEItG; 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 mw17-20020a17090b4d1100b00262ebe643a2si13522388pjb.186.2023.07.01.11.43.40; Sat, 01 Jul 2023 11:44:04 -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=wI4v+eqt; dkim=neutral (no key) header.i=@linutronix.de header.b=ceRZEItG; 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 S229550AbjGASBF (ORCPT + 99 others); Sat, 1 Jul 2023 14:01:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjGASBE (ORCPT ); Sat, 1 Jul 2023 14:01:04 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73B9919B7 for ; Sat, 1 Jul 2023 11:01:03 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1688234462; 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=ffUL6AuqBbv/oAgPmf6xSbMiUnyyc6NBmi2IZwk4Jw8=; b=wI4v+eqt1BDE/7iODtZTUIjacN0KQ4lIbfzlpHp/A9oVV+50ZoI7adt7kV8OW2TaaJdUXG RKVlofajPCI9r7nWYvd284/2bczvGMwYJcF2PjgzdvRZBv0nXeNlL3lpBDRQydK6kjwn0C MC+/Exsc6w4G/RsLyPWMOuHLzyInCuwxDGBnwUA+Iapu6Z2vfRszRBHQ9SLmfRCVOHVlA0 4qF/SW4K1zs72qjTBgNcWI/kv1OLxwXPuk2PkkYYoVmqlrd5IfS0He1F7zBiURx2Gcuao/ gubvSsRRQH8IaW8QhZ858c4/hwwGss/jGuQTDEgfQetMbeopD57LZGMl6j/EKw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1688234462; 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=ffUL6AuqBbv/oAgPmf6xSbMiUnyyc6NBmi2IZwk4Jw8=; b=ceRZEItGp9k3IKJOXgJV85owqjTCXkwy5nppK1MbfTr2ThdelTycC+HCuxLIL7mQKgrIzM Riu4oHkPaRx3LqCw== To: Frederic Weisbecker Cc: LKML , Anna-Maria Behnsen , John Stultz , Peter Zijlstra , Ingo Molnar , Stephen Boyd , Eric Biederman , Oleg Nesterov Subject: Re: [patch 14/45] posix-timers: Consolidate interval retrieval In-Reply-To: References: <20230606132949.068951363@linutronix.de> <20230606142031.816970056@linutronix.de> <87ttuq14xp.ffs@tglx> <875y75yu7u.ffs@tglx> Date: Sat, 01 Jul 2023 20:01:01 +0200 Message-ID: <87bkgvy0iq.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 Fri, Jun 30 2023 at 16:04, Frederic Weisbecker wrote: > On Fri, Jun 30, 2023 at 03:07:17PM +0200, Thomas Gleixner wrote: >> How exactly does this end up being copied to user space if ret != 0? > > kc->timer_get() doesn't return any value. > > So before the patch, interval is retrieved only if the target is not reaped: > > timer_gettime() { > do_timer_gettime() { > posix_cpu_timer_get() { > p = cpu_timer_task_rcu(timer); > if (p) > itp->interval = .... > } > } > } > > After the patch it's retrieved unconditionally: > > timer_gettime() { > do_timer_gettime() { > //unconditionally set > itp->interval = .... > posix_cpu_timer_get() { > p = cpu_timer_task_rcu(timer); > if (!p) > //doesn't return any value so no failure reported Duh. you are right ...