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: <20201114191158.GN17076@casper.infradead.org>
Date:   Sat, 14 Nov 2020 19:11:58 +0000
From:   Matthew Wilcox <willy@...radead.org>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     Hui Su <sh_def@....com>, hughd@...gle.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, pankaj.gupta.linux@...il.com,
        lkp@...el.com
Subject: Re: [PATCH v2] mm/shmem.c: make shmem_mapping() inline

On Sat, Nov 14, 2020 at 10:50:39AM -0800, Andrew Morton wrote:
> But really, shmem_mapping() isn't worth an out-of-line call from any
> callsite - it would be best to make it inlined everywhere.
> 
> - make shmem_aops global
> - declare shmem_aops in shmem_fs.h
> - export shmem_aops to modules for drivers/dma-buf/udmabuf.c
> - include linux/fs.h in shmem_fs.h for address_space_operations (we already
>   include fs.h via swap.h, but we shouldn't depend on that)
> - make shmem_mapping() a static inline in shmem_fs.h.

... or use an AS_ bit to make shmem_mapping() global inline without
exposing the shmem_aops symbol.  We're not short of AS_ bits, and it's
probably even cheaper than a pointer comparison.

A really good changelog would explain why we need shmem_mapping()
everywhere that we currently use it.  It's not immediately obvious why
so many places need to know.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ