From nobody Tue May 31 08:59:37 2022 X-Original-To: dev-commits-src-all@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 70DBC1B571E0; Tue, 31 May 2022 08:59:38 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LC5nP4B2tz4kk2; Tue, 31 May 2022 08:59:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653987577; 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=JMecGT0Ts7ruK3AnxR/G9VvQYn/HguqFE0CGoaP8CbM=; b=G/nAYc7DppxSy3Rm8F7mKAVkMb+17dK7mt3QPlt/MU8iB86cAsdP2kcfiDIlJUdrOb0HjA qoTNcH8A1dl+BZqTMgDddfAOfUl+7mANgGJbSIIPkJ6PFmWXvZDi8E8CjMcnvPVG3Ah8Ju tb+tNO9sY7CMboJWFl8qjpZe/dRJBCmhTEDHzde/OYB9+86esdn4Q/De0Fx2cp30NL0i5l iFuQ0+KT4/eTr/dqL/YYMX3btMCUdJc+GWto87s5wLxBKU4887KDmos5XhSyh8++lf2zB5 rQPFeDNSEjAUaMCHJBu/YtoZFa2zXs6XLz7r8WgLdIkZrdu7gZSrOETweO/eYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 5A4C588B; Tue, 31 May 2022 08:59:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 24V8xbIU047948; Tue, 31 May 2022 08:59:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24V8xb6Q047947; Tue, 31 May 2022 08:59:37 GMT (envelope-from git) Date: Tue, 31 May 2022 08:59:37 GMT Message-Id: <202205310859.24V8xb6Q047947@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 539fadb493d3 - main - linux(4): Return EINVAL when the clockid has invalid bits are set List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 539fadb493d34e6607f7492f018365bdc2abc23a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653987577; 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=JMecGT0Ts7ruK3AnxR/G9VvQYn/HguqFE0CGoaP8CbM=; b=UehG4qOr9pBvYXhjSKxoPkGB20ZgAKOSfmP1LXt3+q8dWSIMX0+9eXFaG8hNF08HlAe8Y8 HQiNHp/uSfZLW3H+F0jRjpyJo9aBe47y2oRhMZMqTxLC2I2sOFjh9K+/PJ9BhWPU+X3bWn gqLL/BW2hB2Rqkv8BNMTLDwR3IkO9CvJp3uwCSSjlmDi7xfaYZxJezKRlzYpOE0QQMd1Mw kuqDOd2OVn2Gx5zcu2rgacQ/vZl+1ooz99NEqLFEhia96IeQBwl9EW44d8ZrHvEZIVF9jT zhc1jhH7CTOdWttNsSAilOWzqxIb9SagnFk1JZJoWDr/k6Z4wPfORnFVNTs5fw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653987577; a=rsa-sha256; cv=none; b=ix6xJz5Xz2kEu+z5DtIJejBCJQ/4yddWwXTpi+CCIIo+HVb/fCMHF4Y7IM9MC76lYHslN4 h/EnGyU5LRRs5txDztdXMPRzYk61oWa5ZSeiyjBHu6qAPHkdWajK0K0QvuSS1w5gqJyKPr zid7cbATluzHXOjKdGuYWUrtaPkbcD7ZlDt7pS2qpzhDC4L3QHmdgwuxISzwAYL7oSWvwj WagiiFm148no+nXDDjgyiKZ1zJpHdDQk+sG8/dmE6FpqAI89aXlw4IYSzS8mqqde9sJEv9 h8Jwmxe1uAeVjEqz1sAKpasozn8NbowuPXVG8CAZ6WqTn/7+j5agg3L0tSnAaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=539fadb493d34e6607f7492f018365bdc2abc23a commit 539fadb493d34e6607f7492f018365bdc2abc23a Author: Dmitry Chagin AuthorDate: 2022-05-31 08:46:15 +0000 Commit: Dmitry Chagin CommitDate: 2022-05-31 08:46:15 +0000 linux(4): Return EINVAL when the clockid has invalid bits are set Linux forbids PERTHREAD bit set for CLOCKFD clock. MFC after: 2 weeks --- sys/compat/linux/linux_time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_time.c b/sys/compat/linux/linux_time.c index 5d2269190931..32db84a570b9 100644 --- a/sys/compat/linux/linux_time.c +++ b/sys/compat/linux/linux_time.c @@ -283,7 +283,7 @@ linux_to_native_clockid(clockid_t *n, clockid_t l) unsupported_clockid, l); return (ENOTSUP); } - if (LINUX_CPUCLOCK_WHICH(l) >= LINUX_CPUCLOCK_MAX) + if ((l & LINUX_CLOCKFD_MASK) == LINUX_CLOCKFD_MASK) return (EINVAL); if (LINUX_CPUCLOCK_PERTHREAD(l))