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: <20240703221700.dd699b48a395bdc27ddeb827@linux-foundation.org>
Date: Wed, 3 Jul 2024 22:17:00 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Suren Baghdasaryan <surenb@...gle.com>
Cc: mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
 vincent.guittot@...aro.org, kent.overstreet@...ux.dev,
 linux-kernel@...r.kernel.org, kernel test robot <lkp@...el.com>
Subject: Re: [PATCH 1/1] sched.h: always_inline alloc_tag_{save|restore} to
 fix modpost warnings

On Wed, 3 Jul 2024 21:25:30 -0700 Suren Baghdasaryan <surenb@...gle.com> wrote:

> > > I don't think it's really a problem. __init function is executing, it
> > > calls a function from .text (say alloc_tag_save() that was not
> > > inlined) which in turn calls get_current(), which returns a pointer
> > > somewhere inside __initdata. That should be fine since this can only
> > > happen during init stage. If this call happens after init,
> > > get_current() can't return a pointer from __initdata. If it does then
> > > we have a much bigger problem.
> >
> > So I think you're saying "yes, the warning is legitimate and this might
> > be a problem, but it isn't in this case, so the checking code is OK so
> > let's just work around it"?
> 
> Yes, that's my understanding. If get_current() always returns a valid
> pointer for the given execution stage (during init/after init) then it
> should be safe to call it even from a function residing in the .text
> section during init.

Make sense, thanks for confirming.  I'll await the v2 series, if
you think it remains appropriate?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ