Message ID | 20200708081813.5311-1-rsalvaterra@gmail.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=dsdGNfqh; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=H0/3cfON; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (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) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B1shy45k9z9sDX for <incoming@patchwork.ozlabs.org>; Wed, 8 Jul 2020 18:21:37 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=WT+sWiQSi5qEkqsHdFVUAqrZlUBuhw/chvWa3vVPqok=; b=dsdGNfqhcfLiasJqICehbtugTY 5061y/LE7AQw7zlHzHDIVEhaHpbQwxz6QfnKRxHk2rcL5F5bQJqQ5T+1QVW2oz5Vcz0v1KljQheyL +xPoFMhT2GieCDbeDMEJPOmCUvIxBeQnwkYG5fUap2RSJynWiA0tJ4KB+kUjkN/IebntGWljLnijE 77IOhf8bq0A5ON4hMG+UMq6P4wvt8PYBbUk86Vcx/4wbU3bMNpU9bMIKmEgLuqpnr1t0Ge+sbi2IX 2xCNS4xufQmGg6KRGpAmaHP0bUqeojLNQjHnZpUKFOrBA9/F1+wwALKYZQsJMuBvNoB/Iooz88+c1 Bx2jrLuA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jt5I6-0007b9-Cz; Wed, 08 Jul 2020 08:18:54 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jt5I2-0007aV-On for openwrt-devel@lists.openwrt.org; Wed, 08 Jul 2020 08:18:52 +0000 Received: by mail-pf1-x443.google.com with SMTP id a14so15066618pfi.2 for <openwrt-devel@lists.openwrt.org>; Wed, 08 Jul 2020 01:18:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=B9FTkRIGGUy0QpFiFWxyscrxF20UqH2PzFh6STvRuvo=; b=H0/3cfONfsaS2sHqbGabYmJL4c2SJr1OI3mwuLP+dHs3S3blO2ZLziRDcutbboGfv1 Ru/BzyoZYMdbwbN2/yBqhhKV6tdtbJjiFogLk6IbNbqzCcNzcWcaWkLVxG6mhuDFfwL+ UG7jD/gq1xtDLurx/Q4nGwMrvY/gaHLv5lFV78oIxynHFa1NpYpT4AbYzc7KbvsfQspM hhHtLEvnnu4gtbRH3Es3lGhSo72i558XfjTYJuWHyDM2N/z8QnDxRiiFoi/Q0Ra8yxr4 mlBy0Co0HvxaHoac7AxC2zxLqHaLQ/jNR6wqIKZ5hl2692/37Vp0o5q/lddWXueC5j4I /KBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=B9FTkRIGGUy0QpFiFWxyscrxF20UqH2PzFh6STvRuvo=; b=o1IUO6GeJe2m+MzBDHPzbT7cZOYzOjb6cT0m7DFSqXtLFggT7LeDirqSoBQdRT/Gm9 VPBbMqqUzcsXl7fTmz8aoLuucjfY8UeyKSuTQXQomgSZT6pJlFo7isLHwvXkVwWT89y7 ycExfxn6H7GfrLTPpcanvf00AlUrjt0bM49zhgURsByYrZztRlu0KuE+8Ue0rWB5VsED IDQzcQG5VOgTbuih/1CsTT5VeIu/Lyq6g/jmZaPlOrKoEIHp72KlQJbC9RX5TiBKtQjn Qp9CgkhF2SYPsaTwqkqWKIbmHSyaqJfcBjj6PYYy13Pb3rVhBzkiJR6/jvZ97kjd6Ne/ q3iA== X-Gm-Message-State: AOAM532kO33pnSg7cE1bmsm76tNgfJrxG+nt4vfeQAf7MofnTlQPqFg+ jSwB3v2bb5fdTRIwKW0OwDTet/w= X-Google-Smtp-Source: ABdhPJzEcy4nKDVRSGr8znKsZbUN4UVzFlws0gbXiqv8wRxuTTNhe1KOUwo5XuwuKJE/Du9MeB9Lcw== X-Received: by 2002:a62:52cd:: with SMTP id g196mr52746549pfb.178.1594196328418; Wed, 08 Jul 2020 01:18:48 -0700 (PDT) Received: from presler.lan (a95-93-116-221.cpe.netcabo.pt. [95.93.116.221]) by smtp.gmail.com with ESMTPSA id a33sm3080320pgl.75.2020.07.08.01.18.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2020 01:18:47 -0700 (PDT) From: Rui Salvaterra <rsalvaterra@gmail.com> To: openwrt-devel@lists.openwrt.org Subject: [PATCH] busybox: use CLOCK_MONOTONIC instead of gettimeofday Date: Wed, 8 Jul 2020 09:18:14 +0100 Message-Id: <20200708081813.5311-1-rsalvaterra@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200708_041851_066169_A9C55429 X-CRM114-Status: GOOD ( 10.25 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [rsalvaterra[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:443 listed in] [list.dnswl.org] X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List <openwrt-devel.lists.openwrt.org> List-Unsubscribe: <https://lists.openwrt.org/mailman/options/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=unsubscribe> List-Archive: <http://lists.openwrt.org/pipermail/openwrt-devel/> List-Post: <mailto:openwrt-devel@lists.openwrt.org> List-Help: <mailto:openwrt-devel-request@lists.openwrt.org?subject=help> List-Subscribe: <https://lists.openwrt.org/mailman/listinfo/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=subscribe> Cc: Rui Salvaterra <rsalvaterra@gmail.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "openwrt-devel" <openwrt-devel-bounces@lists.openwrt.org> Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org |
Series |
busybox: use CLOCK_MONOTONIC instead of gettimeofday
|
expand
|
diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in index b45cf981ea..29724041f4 100644 --- a/package/utils/busybox/Config-defaults.in +++ b/package/utils/busybox/Config-defaults.in @@ -303,7 +303,7 @@ config BUSYBOX_DEFAULT_FEATURE_SKIP_ROOTFS default n config BUSYBOX_DEFAULT_MONOTONIC_SYSCALL bool - default n + default y config BUSYBOX_DEFAULT_IOCTL_HEX2STR_ERROR bool default y
The clock_gettime(CLOCK_MONOTONIC) syscall exists for so long that the first kernel version to support it is not even specified in the man page [1]. Let's enable it on BusyBox by default. Otherwise, gettimeofday will be used instead, which will give wrong results if the date/time is reset (time moving backwards). [1] https://linux.die.net/man/2/clock_gettime Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> --- package/utils/busybox/Config-defaults.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)