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: <CAEExFWun3LL8++PMvFzfuufXTK79BgS8-KS+gs=sR-icLnJDag@mail.gmail.com>
Date:   Tue, 20 Nov 2018 08:49:13 +0800
From:   Frank Lee <tiny.windzz@...il.com>
To:     dave.hansen@...el.com
Cc:     Kees Cook <keescook@...omium.org>, dave.hansen@...ux.intel.com,
        luto@...nel.org, peterz@...radead.org, tglx@...utronix.de,
        mingo@...hat.com, bp@...en8.de, hpa@...or.com, x86@...nel.org,
        linux-kernel@...r.kernel.org, Yangtao Li <tiny.windzz@...il.com>
Subject: Re: [PATCH] x86/mm/dump_pagetables: Change to use DEFINE_SHOW_ATTRIBUTE
 macro

Hi Dava:

How about just change the ptdump_fops and ptdump_open?

Yours,
    Yangtao
On Tue, Nov 20, 2018 at 1:06 AM Dave Hansen <dave.hansen@...el.com> wrote:
>
> On 11/19/18 7:43 AM, Yangtao Li wrote:
> > -static const struct file_operations ptdump_curusr_fops = {
> > -     .owner          = THIS_MODULE,
> > -     .open           = ptdump_open_curusr,
> > -     .read           = seq_read,
> > -     .llseek         = seq_lseek,
> > -     .release        = single_release,
> > -};
> > +DEFINE_SHOW_ATTRIBUTE(ptdump_curusr);
>
> FWIW, I rather dislike this conversion and the DEFINE_SHOW_ATTRIBUTE()
> approach in general.  It makes it basically impossible to go from
> ptdump_curusr to ptdump_open_curusr without opening up the macro and
> reverse-engineering it.
>
> My test is that for these macros to be sane, I need to be able to find
> "ptdump_open_curusr" by grepping for "ptdump_curusr".  This fails the test.
>
> I don't think saving a few lines of code is worth the obfuscation.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ