From nobody Fri Jan 16 06:36:21 2026 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dsqr60Xj2z6NqQw for ; Fri, 16 Jan 2026 06:36:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dsqr605Xxz3J0x for ; Fri, 16 Jan 2026 06:36:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768545382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sk6RVtoi2qxN59shb6WG8KTtbHMIFcPX4Css9hYFQjE=; b=LBzSAGhNJ0k2vejtuY/E7DDIWL+hQWWENFGfLKtQ3DebcLinPLLaGiqbaC5AbH1W+QAROs 0+WzdB19gUjRlGDiwZJJ/ntYmJqKgynyAFCW1BgCecfucESgjVbSDA5vOMTonxlWE3/rW6 zpS9Fye69PrUy7ck94jFLeZkoGFmuZZ4MCw2enwnof8dw632E6/euwlw8Z/ktp+aC8kIp4 0mNoqKL7NhJVPr0pJUdA8zMCF1svsS0ruQ4UXXASRC1sTm/xXyf2YEnxi3Wyjx0hHIpFBC FGPAfb5LtdBxPak/H02SFUX/MYmkiM6Wb9d16CQWHmXnMgvXt5PhH0kNlyg1Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768545382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sk6RVtoi2qxN59shb6WG8KTtbHMIFcPX4Css9hYFQjE=; b=vaMQlj+tzGNtldho0mXOBnhzyOjQBWy+u46TO+Rk6hjmJgqjGl7KobldOvVfA2k5NDYLIg kAryhEt2DajjtDoBAlmgbd4Ut2kX0FPzYD5FnYl0esNwqmye7ro9C34Vyw0j2WWet7rS+d jkaWjVKfKtU3qheNSLrtTYeWidhtOMMMyIDGmJBtMh6wgUtMnMkk4W4KwVlVKi3nPbQrAa c8VZOXkZDwN49Jbvfpyr8k3Td6iyqzr0DKHvaTYqBJ/h4AuQ76lRr1YhCmsU1M/otUsa9h smNrTjtdvjfESA7ZmNwLUdQ206/mV7T5idpm/dZ3YTxEfI2EUcQOPOj5lCXrlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768545382; a=rsa-sha256; cv=none; b=G4NLXKq6sLfIrD9cPH9Ulw6C2A8TrD63LlTQH1p3DPPX5HPI/Q+9dxldfLGaje8IkxUWrz 7Na+fo+Ie226poyuh/r5TXEaczUZkaVGTdSt5i1IKnGWTFlVqQO2bVNQvlTPBKiLD+bALZ ICMDhItI2XMZUJUNr8PQvGIQGSHqmjqY/UfD5JWT3jHBG9LzqTLy6ildq4AczKimeb3MUD qjwC3UA1S/Dc4rl/UijfMF+0MnmQKs/UP7KcV6leM8idmxWF4j/JVk4ijdSXMhtxTW6Hji D94ZS+h6esOsRg3RQlRZo4WPZTEV1o2kP7wYJ47qpTy9Ub0sfieByQnPrJjmgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4dsqr56fr1z12Vt for ; Fri, 16 Jan 2026 06:36:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 60G6aLMB068796 for ; Fri, 16 Jan 2026 06:36:21 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 60G6aLPR068795 for bugs@FreeBSD.org; Fri, 16 Jan 2026 06:36:21 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 292496] linux_timer_create error when using LINUX_CLOCK_MONOTONIC Date: Fri, 16 Jan 2026 06:36:21 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 15.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: andrey.antufyev@yandex.ru X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D292496 Bug ID: 292496 Summary: linux_timer_create error when using LINUX_CLOCK_MONOTONIC Product: Base System Version: 15.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: andrey.antufyev@yandex.ru CC: val@packett.cool *How to Reproduce* The bug was discovered while attempting to use PVS-Studio (linux compat). For testing purposes, I created a primitive script: https://gist.github.com/darkvision77/2ebebced40d7333626f4a9cade1b2178. (PVS-Studio is also available in ports: devel/linux-pvs-studio, but it is currently broken due to this bug.) Two analyzer diagnostics are expected to be output, but an error occurs on = the affected kernels. *Affected kernel versions* Anything above 15. To be more precise, after commit 108de784513d: review D39270. *Description* During execution, linux_timer_create (sys/compat/linux/linux_timer.c) is called. LINUX_CLOCK_MONOTONIC is used as clock_id. Further, clock_id is translated into native using linux_to_native_clockid. Before commit 108de784513d, it returned CLOCK_MONOTONIC and everything work= ed fine. After the commit, linux_to_native_clockid started returning CLOCK_UPTIME. N= ext, CLOCK_UPTIME is passed to kern_ktimer_create (sys/kern/kern_time.c), which returns EINVAL when checking if (clock_id < 0 || clock_id >=3D MAX_CLOCKS),= since MAX_CLOCKS =3D 5 and CLOCK_UPTIME is also equal to 5. --=20 You are receiving this mail because: You are the assignee for the bug.=