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: <87cz5zdaw2.fsf@yhuang6-desk2.ccr.corp.intel.com>
Date:   Fri, 24 Feb 2023 11:01:49 +0800
From:   "Huang, Ying" <ying.huang@...el.com>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Andrew Morton <akpm@...ux-foundation.org>, Jan Kara <jack@...e.cz>,
        Vishal Moola <vishal.moola@...il.com>,
        Paulo Alcantara <pc@....nz>,
        Matthew Wilcox <willy@...radead.org>,
        David Howells <dhowells@...hat.com>,
        Steve French <stfrench@...rosoft.com>,
        Baolin Wang <baolin.wang@...ux.alibaba.com>,
        Xin Hao <xhao@...ux.alibaba.com>, linux-mm@...ck.org,
        mm-commits@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [GIT PULL] MM updates for 6.3-rc1

Linus Torvalds <torvalds@...ux-foundation.org> writes:

>
>  - gcc 12.2.1 quite reasonable complains about some of the new MM code:
>
>     mm/migrate.c: In function ‘__migrate_folio_extract’:
>     mm/migrate.c:1050:20: note: randstruct: casting between randomized
> structure pointer types (ssa): ‘struct anon_vma’ and ‘struct
> address_space’
>
>      1050 |         *anon_vmap = (void *)dst->mapping;
>           |         ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
>
>    and while this doesn't cause a build failure ("note" is different
> from "warning"), I do think something needs to be done. Gcc is right.
> This code seems to *work* simply because it's intentionally
> mis-casting pointers,

Yes.  The mis-casting is intentional.  I just need some place to hold
the data temporarily (save in __migrate_folio_record() and clear in
__migrate_folio_extract()).  And "dst" is newly allocated folio.

> but I think it needs to be seriously looked at and something done to
> make gcc happy (and a *LARGE* comment about it).

Sure.  I will check whether there's some way to make gcc happy and add
some comments about that.  There's some comments for
__migrate_folio_extract(), but that's isn't enough apprently.)

> That last note is not some merge result, it's purely about the new MM code.
>

[snip]

Best Regards,
Huang, Ying

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ