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: <20180622184613.GC92912@dtor-ws>
Date:   Fri, 22 Jun 2018 11:46:13 -0700
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        agk@...hat.com, Mike Snitzer <snitzer@...hat.com>,
        device-mapper development <dm-devel@...hat.com>,
        shli@...nel.org, linux-raid@...r.kernel.org,
        "linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
        Yury Norov <ynorov@...iumnetworks.com>,
        lkml <linux-kernel@...r.kernel.org>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Joe Perches <joe@...ches.com>
Subject: Re: [PATCH v3 3/5] bitmap: Add bitmap_alloc(), bitmap_zalloc() and
 bitmap_free()

On Thu, Jun 21, 2018 at 05:13:39AM +0300, Andy Shevchenko wrote:
> On Tue, Jun 19, 2018 at 2:10 AM, Andrew Morton
> <akpm@...ux-foundation.org> wrote:
> > On Mon, 18 Jun 2018 15:01:43 -0700 Dmitry Torokhov <dmitry.torokhov@...il.com> wrote:
> 
> >> We can't as we end up including bitmap.h (by the way of cpumask.h)
> >> form slab.h, so we gen circular dependency.
> >
> 
> It's not just so easy. See below.
> 
> > That info should have been in the changelog, and probably a code
> > comment.
> >
> >> Maybe if we removed memcg
> >> stuff from slab.h so we do not need to include workqueue.h...
> >
> > Or move the basic slab API stuff out of slab.h into a new header.  Or
> > create a new, standalone work_struct.h - that looks pretty simple.
> 
> I tried to move out work_struct, it didn't help. There are actually
> several circular dependencies that ends in bitmap.h either way or
> another.
> 
> First one is
> 
> slab.h -> gfp.h -> mmzone.h -> nodemask.h -> bitmap.h
> 
> And so on...
> 
> Splitting out kXalloc stuff to a separate header won't help, I think,
> because of the above.
> Splitting out struct work_struct is just a tip of an iceberg.
> Splitting out memcg stuff won't help in the similar way.
> 
> I'm all ears for (a better) solution.

I think ultimately we'd want to untangle this, but allocating bitmaps is
not in any hot paths so having them as non-inlined functions should not
hurt us that much for time being.

Just my 2 cents...

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ