[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN v3] Xen: Ensure "xenheap_bits - PAGE_SHIFT" can be used as a rhs operand of shift operator
- To: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Fri, 2 Dec 2022 14:43:56 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ydpkwNE/PnKwc6t3EGScDF3xmChMLdvX3xDJajYe48E=; b=aqy4RU95c10uM5stQygTLM2H+w10nKBZIa+JrM9p7d+G0nRl4DTAgDE1LMaSuvPGmxACEva+UdRh4bbEfto/fseWh44S9FsqXrkA5qxClMpqQNHEOiE4koi2MM9mCyRCtYmTx0m3go8XFOXN3tmAUgHDdJ7Lg2bjEYn5/nIeoNf0KBO2oo91GtvD5boHrWsZkhktdy2sZ0Cr0heWg8KXCzzKUh4Qu2P9+F0dTOAigPOY47j3KKvt9I9/Rk199JQcyA4SuQMYi/GoWkwR8RGc5Ng0dtRz5P+IXWcXgkc3b4luhI6ahTqTlg335GTBMpT9k8M/IWpKkOJDa5BUD8BQBw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T+amODliqpvLHlpiA0M0Ts6yipD5mXPqGT0YPzbfpM0KJldMU2FA/Kz4wn8geTM1B4sAJC33rLBeA5BMenNcMSXb2mHfPczlRUUSIQBO4mYOhP9wXe0YDK5ZedPcS/Y7ZEYp/z2aWeV2PSMNxNNBV/3QVNZHRRCnCSRaEQm7Hx6Mm2IN5re1Fvpnj51CpOJcbrrwAheAxBgyyp4cyOgsU/qpP27lTv1Z728c0a7OwrgQSveW+HewumG/IhM8DNLcqSXj3UHUB4xGVQPzC/SMt1G5hKoed0pTH99LTSP5ucQDJrpgs9pAFeKfhMw4IyjoogjtZOIRmcbW+/oQVwMYSg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: sstabellini@xxxxxxxxxx, stefanos@xxxxxxxxxx, julien@xxxxxxx, andrew.cooper3@xxxxxxxxxx, george.dunlap@xxxxxxxxxx, bobbyeshleman@xxxxxxxxx, alistair.francis@xxxxxxx, connojdavis@xxxxxxxxx, wl@xxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Fri, 02 Dec 2022 13:44:18 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 02.12.2022 13:35, Ayan Kumar Halder wrote:
> We want to ensure that "xenheap_bits - PAGE_SHIFT" is strictly less than
> the number of bits to represent unsigned long as it is used a rhs operand
> to shift mfn.
> It is also important to note that the "xenheap_bits - PAGE_SHIFT" is never
> used to shift an address (rather than a frame number), and going forward
> then also shouldn't be (perhaps unless further precautions are taken).
Hmm, now you've lost why you are making the change in the first place:
The way things are before the patch is quite fine for the described
purpose. (This then also extends to the title. I should have noticed
this in v2 already, but didn't because I still had the v1 title in mind.)
Furthermore in the 2nd paragraph instead of 'the "xenheap_bits -
PAGE_SHIFT"' you mean '"xenheap_bits" alone'.
Jan
|