[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220818192852.0934313f@gandalf.local.home>
Date: Thu, 18 Aug 2022 19:28:52 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Abhishek Shah <abhishek.shah@...umbia.edu>
Cc: linux-kernel@...r.kernel.org, mingo@...hat.com,
Gabriel Ryan <gabe@...columbia.edu>
Subject: Re: data-race in pcpu_alloc / pcpu_nr_pages
On Thu, 18 Aug 2022 18:29:00 -0400
Abhishek Shah <abhishek.shah@...umbia.edu> wrote:
> Hi all,
>
> We found a race involving the *pcpu_nr_populated *variable. We discovered
> that the racing variable is used in meminfo_proc_show
> <https://elixir.bootlin.com/linux/v5.18-rc5/source/fs/proc/meminfo.c#L123>,
> but we were not sure if there were other security-relevant implications of
> this race. Please let us know what you think.
So you see that the number displayed in meminfo can be written to while
it's being read? As it's a long value, it is likely to be accurate (the
value before or after the update). pcpu_nr_pages() is only used to display
the number of pages in meminfo.
I don't see any problem here.
-- Steve
Powered by blists - more mailing lists