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] [day] [month] [year] [list]
Message-ID: <659f2fb8-97de-4a3e-9d8d-0a61f8ad552d@linux.intel.com>
Date: Thu, 20 Mar 2025 10:31:04 -0700
From: Marc Herbert <marc.herbert@...ux.intel.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Muchun Song <muchun.song@...ux.dev>, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/hugetlb: move hugetlb_sysctl_init() to the __init
 section

Hi Andrew,

On 2025-03-19 00:22, Andrew Morton wrote:
> On Wed, 19 Mar 2025 06:00:30 +0000 marc.herbert@...ux.intel.com wrote:
> 
>> hugetlb_sysctl_init() is only invoked once by an __init function and is
>> merely a wrapper around another __init function so there is not reason
>> to keep it.
>>
>> Fixes the following warning when toning down some GCC inline options:
>>
>>  WARNING: modpost: vmlinux: section mismatch in reference:
>>    hugetlb_sysctl_init+0x1b (section: .text) ->
>>      __register_sysctl_init (section: .init.text)
>>
> 
> Huh.  I wonder why this just started happening.

As I just mentioned, I see this warning only because I'm playing with
GCC flags.

Not sure how good is that page but its name is perfect here:
https://stackoverflow.com/questions/59388740/gcc-shows-different-warnings-depending-on-optimisation-level

Also, https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html
> The effectiveness of some warnings depends on optimizations also being
> enabled. For example -Wsuggest-final-types is more effective with
> link-time optimization and some instances of other warnings may not be
> issued at all unless optimization is enabled. While optimization in
> general improves the efficacy of control and data flow sensitive
> warnings, in some cases it may also cause false positives.

That particular warning was very minor but simple and valid; not a false 
positive. It was also the only "section mismatch" warning found in my
entire configuration.

Marc

PS: who needs expensive static analysis tools when unusual combination of
compiler flags can find issues? :-D

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ