[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <CU4H43P3H35X.1BCA3CE4D1250@seitikki>
Date: Mon, 17 Jul 2023 13:15:19 +0000
From: "Jarkko Sakkinen" <jarkko@...nel.org>
To: "Haitao Huang" <haitao.huang@...ux.intel.com>,
<dave.hansen@...ux.intel.com>, <tj@...nel.org>,
<linux-kernel@...r.kernel.org>, <linux-sgx@...r.kernel.org>,
<cgroups@...r.kernel.org>, "Zefan Li" <lizefan.x@...edance.com>,
"Johannes Weiner" <hannes@...xchg.org>
Cc: <kai.huang@...el.com>, <reinette.chatre@...el.com>,
<zhiquan1.li@...el.com>, <kristen@...ux.intel.com>
Subject: Re: [PATCH v3 18/28] cgroup/misc: Fix an overflow
On Wed Jul 12, 2023 at 11:01 PM UTC, Haitao Huang wrote:
> Overflow may happen in misc_cg_try_charge if new_usage becomes above
> INT_MAX, for example, on platforms with large SGX EPC sizes.
>
> Change type of new_usage to long from int and check overflow.
>
> Signed-off-by: Haitao Huang <haitao.huang@...ux.intel.com>
As are bug fixes, this is also precursory work that SGX cgroups patches
should build on top of. Therefore, it should be in the very beginning,
right after any possible bug fixes to the existing code.
BR, Jarkko
Powered by blists - more mailing lists