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:   Thu, 21 Jun 2018 18:01:24 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     y2038 Mailman List <y2038@...ts.linaro.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        Linux API <linux-api@...r.kernel.org>,
        linux-arch <linux-arch@...r.kernel.org>,
        Paul Eggert <eggert@...ucla.edu>,
        "Eric W . Biederman" <ebiederm@...ssion.com>,
        Richard Henderson <rth@...ddle.net>,
        Ivan Kokshaysky <ink@...assic.park.msu.ru>,
        Matt Turner <mattst88@...il.com>,
        Al Viro <viro@...iv.linux.org.uk>,
        Dominik Brodowski <linux@...inikbrodowski.net>,
        Thomas Gleixner <tglx@...utronix.de>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-alpha@...r.kernel.org,
        Deepa Dinamani <deepa.kernel@...il.com>
Subject: Re: [PATCH v2 2/2] rusage: allow 64-bit times ru_utime/ru_stime

On Thu, Jun 21, 2018 at 5:49 PM, Ingo Molnar <mingo@...nel.org> wrote:
> * Arnd Bergmann <arnd@...db.de> wrote:
>
>> +int put_compat_rusage_time64(const struct __kernel_rusage *r,
>> +                          struct compat_rusage_time64 __user *ru)
>> +{
>> +     struct compat_rusage_time64 r32;
>> +     memset(&r32, 0, sizeof(r32));
>> +     r32.ru_utime.tv_sec = r->ru_utime.tv_sec;
>> +     r32.ru_utime.tv_usec = r->ru_utime.tv_usec;
>> +     r32.ru_stime.tv_sec = r->ru_stime.tv_sec;
>> +     r32.ru_stime.tv_usec = r->ru_stime.tv_usec;
>> +     r32.ru_maxrss = r->ru_maxrss;
>> +     r32.ru_ixrss = r->ru_ixrss;
>> +     r32.ru_idrss = r->ru_idrss;
>> +     r32.ru_isrss = r->ru_isrss;
>> +     r32.ru_minflt = r->ru_minflt;
>> +     r32.ru_majflt = r->ru_majflt;
>> +     r32.ru_nswap = r->ru_nswap;
>> +     r32.ru_inblock = r->ru_inblock;
>> +     r32.ru_oublock = r->ru_oublock;
>> +     r32.ru_msgsnd = r->ru_msgsnd;
>> +     r32.ru_msgrcv = r->ru_msgrcv;
>> +     r32.ru_nsignals = r->ru_nsignals;
>> +     r32.ru_nvcsw = r->ru_nvcsw;
>> +     r32.ru_nivcsw = r->ru_nivcsw;
>
> Could you please vertically align the right side of the initialization as well?
> Much easier to check at a glance.
...

> Which tabulated form made me notice the info.cause / si_code asymmetry - and a
> brief check of the source shows that it's correct. No way would I have noticed it
> in the jumbled up form above, so I think aligning such mass-initializations makes
> sense.

Sure, no problem. Do you have an opinion on the question I raised in the
first patch [1], i.e. whether we actually want this to be done this way in the
kernel, or one of the other approaches I described there?

Thanks for taking a look here already!

      Arnd

[1] https://patchwork.kernel.org/patch/10352507/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ