Re: VM_BUG_ON_PGFLAGS with CONFIG_DEBUG_VM_PGFLAGS=n

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 05, 2018 at 08:48:00AM +0200, Michal Hocko wrote:
> Hi Kirill,
> while looking at something unrelated I have stumbled over %subj and I
> simply do not understand how BUILD_BUG_ON_INVALID is supposed to work
> for page flags checks which are dynamic by definition.
> BUILD_BUG_ON_INVALID is noop without any side effects unless __CHECKER__
> is enabled when it evaluates to ((void )(sizeof((__force long )(e)))).

You've read it backwards. BUILD_BUG_ON_INVALID() is not if __CHECKER__ is
enabled.

> How is this supposed to work? Am I just confused or BUILD_BUG_ON_INVALID
> is simply not a good fit here and all you wanted is the no side-effect
> nature of it?

Without CONFIG_DEBUG_VM_PGFLAGS() is basically nop. BUILD_BUG_ON_INVALID()
here is fance version of nop that check that what you've wrote inside
parses fine. That's it.

-- 
 Kirill A. Shutemov




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux