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, 2 Oct 2019 17:13:37 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     linux-kernel@...r.kernel.org,
        Trond Myklebust <trond.myklebust@...merspace.com>,
        Anna Schumaker <anna.schumaker@...app.com>,
        "Paul E. McKenney" <paulmck@...nel.org>,
        Josh Triplett <josh@...htriplett.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH v1] kernel.h: Split out mathematical helpers

On Tue, 10 Sep 2019 13:51:05 +0300 Andy Shevchenko <andriy.shevchenko@...ux.intel.com> wrote:

> kernel.h is being used as a dump for all kinds of stuff for a long time.
> Here is the attempt to start cleaning it up by splitting out mathematical
> helpers.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
>  fs/nfs/callback_proc.c        |   1 +
>  include/linux/bitops.h        |   3 +-
>  include/linux/dcache.h        |   1 +
>  include/linux/iommu-helper.h  |   1 +
>  include/linux/kernel.h        | 143 --------------------------------
>  include/linux/math.h          | 149 ++++++++++++++++++++++++++++++++++
>  include/linux/rcu_node_tree.h |   2 +

I'm not really understanding how this works, apart from "dumb luck".

Random example: mm/percpu.c needs roundup(), so how does it include the
new math.h?

....... ./arch/x86/include/asm/uprobes.h
........ ./include/linux/notifier.h
......... ./include/linux/mutex.h
......... ./include/linux/srcu.h
.......... ./include/linux/workqueue.h
........... ./include/linux/timer.h
............ ./include/linux/ktime.h
............. ./include/linux/time.h
.............. ./include/linux/time32.h
............... ./include/linux/timex.h
................ ./include/uapi/linux/timex.h
................. ./include/linux/time.h
................ ./include/uapi/linux/param.h
................. ./arch/x86/include/generated/uapi/asm/param.h
.................. ./include/asm-generic/param.h
................... ./include/uapi/asm-generic/param.h
................ ./arch/x86/include/asm/timex.h
................. ./arch/x86/include/asm/tsc.h
............. ./include/linux/jiffies.h
.............. ./arch/x86/include/generated/uapi/asm/param.h
.............. ./include/generated/timeconst.h
............. ./include/linux/timekeeping.h
............. ./include/linux/timekeeping32.h
............ ./include/linux/debugobjects.h
.......... ./include/linux/rcu_segcblist.h
.......... ./include/linux/srcutree.h
........... ./include/linux/rcu_node_tree.h
............ ./include/linux/math.h

oh, like that.

It seems rather unreliable.  Perhaps a "#include <linux/math.h>" was
intended in kernel.h?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ