From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via GNU coreutils Bug Reports Newsgroups: gmane.comp.gnu.core-utils.bugs,gmane.comp.lib.gnulib.bugs,gmane.emacs.devel Subject: bug#64937: boot time on Linux Date: Thu, 10 Aug 2023 20:23:34 +0800 Message-ID: <87cyzvrsqh.fsf@yahoo.com> References: <87tttmpt5h.fsf@turtle.gmx.de> <5962135.d8TiXCRyrx@nimes> <875y5nve2k.fsf@yahoo.com> <5521870.8Rdponrqg9@nimes> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7939"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Paul Eggert , bug-gnulib@gnu.org, Thorsten Kukuk , Robert Pluim , Emacs-devel@gnu.org, Natanael Copa , =?UTF-8?Q?P=C3=A1draig?= Brady , Sven Joachim , 64937@debbugs.gnu.org To: Bruno Haible Original-X-From: bug-coreutils-bounces+gcgcb-bug-coreutils-616=m.gmane-mx.org@gnu.org Thu Aug 10 14:24:26 2023 Return-path: Envelope-to: gcgcb-bug-coreutils-616@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qU4iI-0001rD-3c for gcgcb-bug-coreutils-616@m.gmane-mx.org; Thu, 10 Aug 2023 14:24:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qU4hw-0003Su-1e; Thu, 10 Aug 2023 08:24:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qU4hu-0003Sa-K8 for bug-coreutils@gnu.org; Thu, 10 Aug 2023 08:24:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qU4hu-0004Jp-C6 for bug-coreutils@gnu.org; Thu, 10 Aug 2023 08:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qU4ht-0008CR-So for bug-coreutils@gnu.org; Thu, 10 Aug 2023 08:24:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 10 Aug 2023 12:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64937 X-GNU-PR-Package: coreutils Original-Received: via spool by 64937-submit@debbugs.gnu.org id=B64937.169167023531506 (code B ref 64937); Thu, 10 Aug 2023 12:24:01 +0000 Original-Received: (at 64937) by debbugs.gnu.org; 10 Aug 2023 12:23:55 +0000 Original-Received: from localhost ([127.0.0.1]:41618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qU4hm-0008C4-UU for submit@debbugs.gnu.org; Thu, 10 Aug 2023 08:23:55 -0400 Original-Received: from sonic311-23.consmr.mail.ne1.yahoo.com ([66.163.188.204]:40371) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qU4hh-0008Bn-Ou for 64937@debbugs.gnu.org; Thu, 10 Aug 2023 08:23:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1691670224; bh=62eCWbrop+0SjGWDBOMBKEMaoKCsyRFh0EUF7nBZIic=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=rqbZHemvt0yv7dpa79FhJesDcWz3KShT5wo5w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QqBTtZsojPVtYOcEutahQYh5ih.VComl4 U1q19TVTtwr4Ajb6ntajKq4m9J.hUiBOJ0S7.pal7scMp1tMEbufQSV.8gqIGzuNroR804hAma28 xXXv6xIG_bfvTPxpiTSRkXsduaRkM33egvRJttaBaoIDBPZjx6vQeUCvmr66TsuoEcH__JtPpSRJ NEpeKoEvxjsu3QTewfXkQLQ7K7VHM5m_8evW83H_sEV48v3XxYrmUww3Mk049Ql15ydrRz3tMlZi NP8l55xaI3b3spKCfMSm.Sv59Mf.lv1TrtHlaUYxg8AisljhyWsW6wMG8D00_WWbbSch7160asdM TGDDT_XIEwsvNPfntPb7zTUhdysUp3Uo_qWeS9iA7BkEt.vuYawUQLXpqXG1jafRWO8pqwvrol8e KAmph1lHzIpC5smw.b4tILxJZJMM9ITk8.NhCW4itlpn4m3W2tcrO.PgHP_fObAma2Wovb1juc5e uPGbNjavkDdNJ0bviArvJ3XsNVVdNsclyXQiVTjQ85RgigDiRogeK5bANBccnPcHMxKDIU9qWbeT BjsqBwuXFFA61f5P28gMSJ_JEnFt_QFdD7CU.xSCM9 X-Sonic-MF: X-Sonic-ID: 46e0f145-8b81-4df7-8156-59d9cf47aa23 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.ne1.yahoo.com with HTTP; Thu, 10 Aug 2023 12:23:44 +0000 Original-Received: by hermes--production-sg3-69654d8bd-d8v2r (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 06ece06b546e5704a9ec07de429d6bb9; Thu, 10 Aug 2023 12:23:40 +0000 (UTC) In-Reply-To: <5521870.8Rdponrqg9@nimes> (Bruno Haible's message of "Thu, 10 Aug 2023 12:30:26 +0200") X-Mailer: WebService/1.1.21695 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-coreutils@gnu.org List-Id: GNU coreutils Bug Reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-coreutils-bounces+gcgcb-bug-coreutils-616=m.gmane-mx.org@gnu.org Original-Sender: bug-coreutils-bounces+gcgcb-bug-coreutils-616=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.comp.gnu.core-utils.bugs:32678 gmane.comp.lib.gnulib.bugs:48144 gmane.emacs.devel:308524 Archived-At: Bruno Haible writes: > I wrote: >> > No, it isn't. The attached file, when compiled and run under Termux (which >> > doesn't have particular permissions), prints e.g.: >> > >> > from clock : 1691616762.476870660 = 2023-08-09 21:32:42.476870660 >> > from sysinfo: 1691616762.329261637 = 2023-08-09 21:32:42.329261637 >> > >> > Note that this uses the kernel's uptime counter, so it will not work well >> > when the user changes the current time manually. But this is rare on Android. > > It works well enough, that I'm adding it to Gnulib, through the attached patch. > > Po Lu wrote: >> This uses the uptime counter (which also results in an SELinux denial >> for me, but different Android distributions have SELinux policies of >> varying strictness) > > How did you run the program, and which of the two calls (clock_gettime, sysinfo) > failed for you? Maybe it depends not only on the Android version and device, > but also on the permissions required by the app? Both clock_gettime (CLOCK_BOOTIME, ... sysinfo fail with AVC denial errors and errno set to EACCESS. I think it is a bit of a stretch to ascribe this to an app's requested permissions, though, since none of the listed permissions available to user programs seems pertinent.