lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e62b0766-3764-3cab-256c-1b5a0ca75d66@gmail.com>
Date:   Mon, 18 May 2020 09:38:22 -0600
From:   David Ahern <dsahern@...il.com>
To:     Jamal Hadi Salim <jhs@...atatu.com>,
        Roman Mashak <mrv@...atatu.com>
Cc:     stephen@...workplumber.org, netdev@...r.kernel.org,
        kernel@...atatu.com, xiyou.wangcong@...il.com, jiri@...nulli.us
Subject: Re: [PATCH iproute2-next 1/1] tc: report time an action was first
 used

On 5/18/20 7:10 AM, Jamal Hadi Salim wrote:
> On 2020-05-17 9:28 a.m., Roman Mashak wrote:
>> Have print_tm() dump firstuse value along with install, lastuse
>> and expires.
>>
>> Signed-off-by: Roman Mashak <mrv@...atatu.com>
>> ---
>>   tc/tc_util.c | 5 +++++
>>   1 file changed, 5 insertions(+)
>>
>> diff --git a/tc/tc_util.c b/tc/tc_util.c
>> index 12f865cc71bf..f6aa2ed552a9 100644
>> --- a/tc/tc_util.c
>> +++ b/tc/tc_util.c
>> @@ -760,6 +760,11 @@ void print_tm(FILE *f, const struct tcf_t *tm)
>>           print_uint(PRINT_FP, NULL, " used %u sec",
>>                  (unsigned int)(tm->lastuse/hz));
>>       }
>> +    if (tm->firstuse != 0) {
>> +        print_uint(PRINT_JSON, "first_used", NULL, tm->firstuse);
>> +        print_uint(PRINT_FP, NULL, " firstused %u sec",
>> +               (unsigned int)(tm->firstuse/hz));
>> +    }
> 
> Maybe an else as well to print something like "firstused NEVER"
> or alternatively just print 0 (to be backward compatible on old
> kernels it will never be zero).
> 

existing times do not, so shouldn't this be consistent?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ