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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJfuBxyaAG567-PFJo4DX12yUAOPQG4uJfhccgL0=xU9O4rzjA@mail.gmail.com>
Date:   Fri, 13 Aug 2021 11:14:54 -0600
From:   jim.cromie@...il.com
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Greg KH <gregkh@...uxfoundation.org>,
        Sean Paul <seanpaul@...omium.org>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Maxime Ripard <mripard@...nel.org>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Alex Deucher <alexander.deucher@....com>,
        Christian König <christian.koenig@....com>,
        "Pan, Xinhui" <Xinhui.Pan@....com>,
        Harry Wentland <harry.wentland@....com>,
        Leo Li <sunpeng.li@....com>,
        Zhenyu Wang <zhenyuw@...ux.intel.com>,
        Zhi Wang <zhi.a.wang@...el.com>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>,
        Jason Baron <jbaron@...mai.com>,
        Hawking Zhang <Hawking.Zhang@....com>,
        Tao Zhou <tao.zhou1@....com>, Huang Rui <ray.huang@....com>,
        Likun Gao <Likun.Gao@....com>,
        Chengming Gui <Jack.Gui@....com>,
        Aaron Liu <aaron.liu@....com>,
        John Clements <john.clements@....com>,
        Kevin Wang <kevin1.wang@....com>,
        Ashley Thomas <Ashley.Thomas2@....com>,
        Qingqing Zhuo <qingqing.zhuo@....com>,
        Wyatt Wood <Wyatt.Wood@....com>,
        Aurabindo Pillai <aurabindo.pillai@....com>,
        Johan Hovold <johan@...nel.org>, Jessica Yu <jeyu@...nel.org>,
        Nick Desaulniers <ndesaulniers@...ogle.com>,
        Joe Perches <joe@...ches.com>, Miguel Ojeda <ojeda@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        "Paul E. McKenney" <paulmck@...nel.org>,
        Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
        Thomas Gleixner <tglx@...utronix.de>,
        Vitor Massaru Iha <vitor@...saru.org>,
        Sedat Dilek <sedat.dilek@...il.com>,
        Zhen Lei <thunder.leizhen@...wei.com>,
        Marco Elver <elver@...gle.com>,
        Jarkko Sakkinen <jarkko@...nel.org>,
        Alexander Potapenko <glider@...gle.com>,
        Palmer Dabbelt <palmerdabbelt@...gle.com>,
        Patricia Alfonso <trishalfonso@...gle.com>,
        Jiri Olsa <jolsa@...nel.org>,
        James Bottomley <James.Bottomley@...senpartnership.com>,
        Arvind Sankar <nivedita@...m.mit.edu>,
        Johannes Berg <johannes.berg@...el.com>,
        Arnd Bergmann <arnd@...db.de>,
        LKML <linux-kernel@...r.kernel.org>,
        dri-devel <dri-devel@...ts.freedesktop.org>,
        amd-gfx mailing list <amd-gfx@...ts.freedesktop.org>,
        intel-gvt-dev@...ts.freedesktop.org,
        Intel Graphics Development <intel-gfx@...ts.freedesktop.org>
Subject: Re: [PATCH v5 2/9] moduleparam: add data member to struct kernel_param

On Fri, Aug 13, 2021 at 9:44 AM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
>
> On Fri, Aug 13, 2021 at 09:17:10AM -0600, Jim Cromie wrote:
> > Add a const void* data member to the struct, to allow attaching
> > private data that will be used soon by a setter method (via kp->data)
> > to perform more elaborate actions.
> >
> > To attach the data at compile time, add new macros:
> >
> > module_param_cbd() derives from module_param_cb(), adding data param,
> > and latter is redefined to use former.
> >
> > It calls __module_param_call_wdata(), which accepts a new data param
> > and inits .data with it. Re-define __module_param_call() to use it.
> >
> > Use of this new data member will be rare, it might be worth redoing
> > this as a separate/sub-type to de-bloat the base case.
>
> ...
>
> > +#define module_param_cbd(name, ops, arg, perm, data)                         \
> > +     __module_param_call_wdata(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0, data)
>
> Cryptic name. Moreover, inconsistent with the rest.
> What about module_param_cb_data() ?
>
> >  #define module_param_cb_unsafe(name, ops, arg, perm)                       \
> >       __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1,    \
> >                           KERNEL_PARAM_FL_UNSAFE)
>
> (above left for the above comment)
>
> ...
>
> > +#define __module_param_call_wdata(prefix, name, ops, arg, perm, level, flags, data) \
>
> Similar __module_param_call_with_data()
>
> --
> With Best Regards,
> Andy Shevchenko
>
>

yes to all renames, revised.
thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ