From patchwork Sun Dec 29 18:43:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 182586 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp5506144ild; Sun, 29 Dec 2019 10:44:50 -0800 (PST) X-Google-Smtp-Source: APXvYqwEGfbcyara9As9qX0FbTZrO6+Rc5XxVNp5SRkpJgqFmdOKqwIRsA3eFqg81EXbAJ25K7D+ X-Received: by 2002:a17:90a:300b:: with SMTP id g11mr40568293pjb.123.1577645090564; Sun, 29 Dec 2019 10:44:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577645090; cv=none; d=google.com; s=arc-20160816; b=sxO3vPAUK1Y49fgiTWx/A3WtMf9bOVMxVwiVifohuEbKMRB8iZSj2t48RDmcG0ni+G 8GE/GPCaBcZQmIbqOVFcfMpmexBb/wwGMWqdSy6MC9tW5d0ZxM8kyM4BfXZpSiE6tUzw S+7aPpYNzBIuaauV5DL+xvUQ5FFf96YuKE/2kAtJTem6hMAgGfGQYe0jS8slBEPV0aR7 3l1hlYaLJvM3uYtgykTXDNDgn9zjuvjJPOnnSyQiKvFH8MV/17NrPLEz7h17l1WWrRxq AUMyYvnRrAf8J5Ew6zvB1hn5Lw9dYBtSdsddb9aLyXD2O6apMHnNnhRqCWTFsKXIZls0 CfcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=8P0KL4d/uMzmE1orio9Bvlqc4PgRV0ONBGnCpyxL0zA=; b=oLzoSMNPYcY+nuj6eTTyVdvLQUeo0U4ACIVVgThSFNCnqJNE1FIN+IjVVWkqcAoS+m CAfiufHMce0BMrLij7KhnMFJrnxQl+EIkGWpaPomDbCrDiNhzoJ8V2KmUrzY3FiE+l/o mte9s6BrOZJHHom0AoTErARx4TrwOfGO7u0MWfCsJWNvzMFttLJYFjQNH17XtDsxjvB/ Hh4aSIutDzvIuTuH20FTrDcmPrRf5metxT7hmFdzZ6jjhIlvj2sg9s7j75zV+pIK1Q06 zlIcoFmt6eB3DupVOcLRAGstnXHw2csIh1zZkOwj/svv7AcPjvXGtw/o/P6a9mRoYj9u +lQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=VA0ucwKd; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id b12si19477194pjn.103.2019.12.29.10.44.50; Sun, 29 Dec 2019 10:44:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=VA0ucwKd; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 7EB217F87B; Sun, 29 Dec 2019 18:44:48 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by mail.openembedded.org (Postfix) with ESMTP id A8ED27F7BD for ; Sun, 29 Dec 2019 18:44:29 +0000 (UTC) Received: by mail-pg1-f193.google.com with SMTP id 6so17011218pgk.0 for ; Sun, 29 Dec 2019 10:44:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Biw9SMTCtcNY0Nt2RJ0levHZuB6d5Wv0kxGjTPa178Y=; b=VA0ucwKdn3+KhQ06Q2BHskQnY21/kYRQburxMcaVRrr3ShalQGNZA3xew8YhddBv1u R+SgKiGEX9hAVDIrvY5bXfacnQJlCk79VCbwA3y4jYZUd+JoNzcXJizqPri+sc7WfxVA 7cUzMYqGNc+YMhiIg9VRt2qolpf0wwKdHJswRB3FKExWeKzwICKoGTFr74EmjShe+K4q b8na8pukSldeY3OvCf6B5koVBTmeD50DW+VIdurl7Kr8C3b996bwPerggdkG4cH+2MG7 9JPCgAQK3lXn5dEYW6ES/t9yB8SUDGgpW62/Sec7jiDR/pQF8I6CATL/fLgcIca9gcz5 TldA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=Biw9SMTCtcNY0Nt2RJ0levHZuB6d5Wv0kxGjTPa178Y=; b=rDvMZnm3QeaJbwlSLMJiN9jOIU1bOUxBtAU3p1ii7bPJTaidHx2dT+t+NefDEwnaMt k0//OhzmD68sunKrM1mslVG0iFT1gn6ekC63DaDcWLEJYKKGeudt5MYvbl7cfxyF9Ly4 zz1ULPAZMs7SOYHyqtqSpiFq6Sm3FIbiJ/ga6ONqfxSeqVD/gkUIEtJmxWdf7Qt1pHV7 d0ahCtAcyMcTZQFDXnKhUnsCvHDSQ0orlqrx1t99ySw1ZR2cHCCrpGLEbeUO2P5MsCkK n5T4qs6RNU3aEZyc7RsdcCgRYJxJOe4wWMlFE83w4jfZCVrpOWMbf2liU5cLmDgmIv8L Yc5g== X-Gm-Message-State: APjAAAVNJ4D4WcOYTsiw5PphL3Oftiufj42CtmRv893b/eWN0En50cZr PgLmmCFn/jgtpIW5aa76pckmpmtnRAA= X-Received: by 2002:a62:1552:: with SMTP id 79mr66933743pfv.156.1577645070469; Sun, 29 Dec 2019 10:44:30 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9200:4e0::2f83]) by smtp.gmail.com with ESMTPSA id bo19sm21257085pjb.25.2019.12.29.10.44.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2019 10:44:30 -0800 (PST) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Sun, 29 Dec 2019 10:43:58 -0800 Message-Id: <20191229184415.19514-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229184415.19514-1-raj.khem@gmail.com> References: <20191229184415.19514-1-raj.khem@gmail.com> MIME-Version: 1.0 Subject: [OE-core] [PATCH 02/19] systemd: Fix time_t size assumptions X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- ...ead-of-TIME_T_MAX-for-timerfd_settim.patch | 31 +++++++++++++++++++ meta/recipes-core/systemd/systemd_243.2.bb | 1 + 2 files changed, 32 insertions(+) create mode 100644 meta/recipes-core/systemd/systemd/0022-Use-INT_MAX-instead-of-TIME_T_MAX-for-timerfd_settim.patch -- 2.24.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-core/systemd/systemd/0022-Use-INT_MAX-instead-of-TIME_T_MAX-for-timerfd_settim.patch b/meta/recipes-core/systemd/systemd/0022-Use-INT_MAX-instead-of-TIME_T_MAX-for-timerfd_settim.patch new file mode 100644 index 0000000000..76a1c7364d --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0022-Use-INT_MAX-instead-of-TIME_T_MAX-for-timerfd_settim.patch @@ -0,0 +1,31 @@ +From 6bcf562bd1e541c7aa46923d9a14201c7f785261 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 16 Dec 2019 12:49:07 -0800 +Subject: [PATCH] Use INT_MAX instead of TIME_T_MAX for timerfd_settime timeout + +kernel prior to 64bit time_t support might not entertain such large +timeout therefore reduce it to INT_MAX which would set timer expiration +event after 68 years of uptime, should be good for all practical +purposes + +Signed-off-by: Khem Raj +--- + src/basic/time-util.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/basic/time-util.c b/src/basic/time-util.c +index bfe2c60da1..8cf682b36a 100644 +--- a/src/basic/time-util.c ++++ b/src/basic/time-util.c +@@ -1486,7 +1486,7 @@ int time_change_fd(void) { + + /* We only care for the cancellation event, hence we set the timeout to the latest possible value. */ + static const struct itimerspec its = { +- .it_value.tv_sec = TIME_T_MAX, ++ .it_value.tv_sec = INT_MAX, + }; + + _cleanup_close_ int fd; +-- +2.24.1 + diff --git a/meta/recipes-core/systemd/systemd_243.2.bb b/meta/recipes-core/systemd/systemd_243.2.bb index ac7a5f86b3..3f68604a5c 100644 --- a/meta/recipes-core/systemd/systemd_243.2.bb +++ b/meta/recipes-core/systemd/systemd_243.2.bb @@ -46,6 +46,7 @@ SRC_URI_MUSL = "\ file://0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch \ file://0020-missing_type.h-add-__compar_d_fn_t-definition.patch \ file://0021-avoid-redefinition-of-prctl_mm_map-structure.patch \ + file://0022-Use-INT_MAX-instead-of-TIME_T_MAX-for-timerfd_settim.patch \ file://0024-test-json.c-define-M_PIl.patch \ file://0001-do-not-disable-buffer-in-writing-files.patch \ file://0002-src-login-brightness.c-include-sys-wait.h.patch \