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]
Date:   Wed, 20 Jun 2018 14:33:01 +0200
From:   Ilya Dryomov <idryomov@...il.com>
To:     allen.lkml@...il.com
Cc:     netdev <netdev@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        linux-kernel@...r.kernel.org,
        Ceph Development <ceph-devel@...r.kernel.org>,
        y2038@...ts.linaro.org
Subject: Re: [PATCH] ceph: use ktime_get_real_seconds()

On Wed, Jun 20, 2018 at 12:00 PM Allen Pais <allen.lkml@...il.com> wrote:
>
> Use ktime_get_real_seconds() as get_seconds() is deprecated.
>
> Signed-off-by: Allen Pais <allen.lkml@...il.com>
> ---
>  net/ceph/auth_x.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/net/ceph/auth_x.c b/net/ceph/auth_x.c
> index 2f4a1ba..99561c2 100644
> --- a/net/ceph/auth_x.c
> +++ b/net/ceph/auth_x.c
> @@ -154,7 +154,7 @@ static int process_one_ticket(struct ceph_auth_client *ac,
>         void **ptp;
>         struct ceph_crypto_key new_session_key = { 0 };
>         struct ceph_buffer *new_ticket_blob;
> -       unsigned long new_expires, new_renew_after;
> +       u32 new_expires, new_renew_after;
>         u64 new_secret_id;
>         int ret;
>
> @@ -191,9 +191,9 @@ static int process_one_ticket(struct ceph_auth_client *ac,
>
>         ceph_decode_timespec(&validity, dp);
>         dp += sizeof(struct ceph_timespec);
> -       new_expires = get_seconds() + validity.tv_sec;
> +       new_expires = (u32)ktime_get_real_seconds() + validity.tv_sec;

Why the change to u32 and this cast?  If the type has to change,
wouldn't time64_t make more sense?  ktime_get_real_seconds() returns
time64_t, after all.

Thanks,

                Ilya

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ