[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] x86/debug: fix page-overflow bug in dbg_rw_guest_mem
- To: Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Sat, 30 Jan 2021 02:59:45 +0000
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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-SenderADCheck; bh=/ehm5WocJREES4kktI4IJlRiEaxQFeXfC8+q90Fthgc=; b=X+6SIyMhg+CKchHfDmcu9deRrrXq/9COH20wlWG4qiR6p+BDle+4b5YuKSKCDRCJ9rBFOuhZLG+6E4jZXtwWeNzAl7r4bZLdlWY2DsSHhO6qiu9F0iCqG7EIzpDwThX6xmtRW14yL3clJNzF6JU6xdXV5wqaFHZfWKOre7EUafboKeOArlPz9isHoE4S4HPUUntEwJ3Lk5fPHUNvdInbJVysTY7L/Jetk8Vb5tirijhmm8aockMG5zjt/mzoP7RGzFoLGV4CZYdb+tAMNMaCp7Y1ou5i+38t2WGKOaZBkcV/RT7VWqmQiuzUnZ7m2l6RTy1lRpyaOwtHP+7AfA3QDQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RYiJNkXD3smKIi4JHRCZtnte+qTzfT8d0+035DEnGYrNJmL92YE5zpfvpLrDVmfn+r/LHm1y2XyoJ5KYvViJ9Zthf49om4UZM8IvtYSdYaIpoYn26C8sxwNLqVXC7b00xeA2hCf6iqyRSWJrivR1Jl5hmrQiobLF3STYniZ7WyK+jBJuaHsVWA1q94kVVLvMHcYbqT3rJDPeBSTcuw56TsXDSYLE3ow+HF65AqnXmQaGF+0H5l+F/cE3ZWWfN9+kPpzWPeuGhNZsoUeP5z+CquMNuiXp80AiHszfxaDVd1ZZ1tj986QE/pqQYLzVjGVj/Zc0czUacJUNnX6Wjeuj6A==
- Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Elena Ufimtseva <elena.ufimtseva@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Sat, 30 Jan 2021 03:00:01 +0000
- Ironport-sdr: n5gEJ2EVnCbMzigPRJPVtEQyTdER2G0FCW111CYACbZqIhBf2ppLXAqaFqhJagux6UKSyDaJzd v0t4X8IUVY9AM7YNfGDD3RaMMDfsFbhn+otrNJUYIzORpaWWEsyVOaIWtyNSxpAGHr3DXQf6mv XlCKNpZG09UeyKz5PWq8lnn8ugmB8bzSff1/1DkliPG1qWWSKV7k08Y+i9UoJc/oaN5XVLivwq hj1zvAFLfLIbHJtCshkY3+sJxyDcVyOUcW76DWYgoMl2mPh76iAfdnBWEsjSaqHP9vVQfF6QAt mxk=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 30/01/2021 01:59, Tamas K Lengyel wrote:
> When using gdbsx dbg_rw_guest_mem is used to read/write guest memory. When the
> buffer being accessed is on a page-boundary, the next page needs to be grabbed
> to access the correct memory for the buffer's overflown parts. While
> dbg_rw_guest_mem has logic to handle that, it broke with 229492e210a. Instead
> of grabbing the next page the code right now is looping back to the
> start of the first page. This results in errors like the following while
> trying
> to use gdb with Linux' lx-dmesg:
>
> [ 0.114457] PM: hibernation: Registered nosave memory: [mem
> 0xfdfff000-0xffffffff]
> [ 0.114460] [mem 0x90000000-0xfbffffff] available for PCI demem 0
> [ 0.114462] f]f]
> Python Exception <class 'ValueError'> embedded null character:
> Error occurred in Python: embedded null character
>
> Fixing this bug by taking the variable assignment outside the loop.
>
> Signed-off-by: Tamas K Lengyel <tamas@xxxxxxxxxxxxx>
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Sorry for breaking this...
|