[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen: Modify domain_crash() to take a print string


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 23 Mar 2023 23:15:34 +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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Zh/JyFdlR6wywtguwedVtP9BEr3jtmvAJA3r2nKpPac=; b=SHjgHANDmRKskgKxRsIXLvcrHZc0lxxaaptY0d8GcLcPAZL+/XQ1Q7Wj7ny/xdEdaCxqDLTMHwzsrv9crjaAsUV7mPspoTjr6UXLuxquALvaSLpEQfIgdMAbhYI3it4dgK2qTfI6mW219r8Zr+zxieGovKMEMv1+crXfzDaDsXiM7zZyNzjawqUPBcRxt8myCmY8WZtkPt20Nqmg0MiNr5DF2jJZkogPHtXVFHeDORCB2iF7H+22o75BhVVpG81DT8+L4FXloi/CmkMfWenQQh2LPfBS+R7Kmr9NzIfzmLF2ubOmkdj2tt1qoqTkEd6yS6YpTV7/wpJ2w/G2gjY5Dg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ibw88twzpD8/TzcaJpHeRiXL4egJ7RA8a1OV7oCRzp5tLuls3fROTIe7Mp+1X1n4hl2oVpR2AWQO4NLngNM/z4SAIYinHbXvYcUlWUzskR7JBr27K77+KD0cKtylZ4m8z8oSBV1VyzHoYaFNWiltNEUFsvJ2Az7dw0C9Bm3dcWyeZTj5aYQ+GG/NDI3va2YYnQmtuf5D9qfy4Gt9hndiZ4V+uufuibcxYxtt4K4rObB1I9O2OjAcHgVtfz1eMTN91K0/NNx4ZjDC7qmdJyZtDAhpvruOv8duj1lSyRVchQc8mEY+ev8+s8Ud/DXrYBv8qh0bxSn601zp2YDM9V9JAQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 23 Mar 2023 23:16:15 +0000
  • Ironport-data: A9a23:C7wHaa//7EUbWeFMB7/NDrUDA3+TJUtcMsCJ2f8bNWPcYEJGY0x3y zBKWDrVOKzeZGqhf9x3boq+90IE6sDWzNI1SwBr/no8E34SpcT7XtnIdU2Y0wF+jCHgZBk+s 5hBMImowOQcFCK0SsKFa+C5xZVE/fjUAOG6UKicYXoZqTZMEE8JkQhkl/MynrlmiN24BxLlk d7pqojUNUTNNwRcawr40Ire7kI/1BjOkGlA5AdmPqoQ5AS2e0Q9V/rzG4ngdxMUfaEMdgKKb 76r5K20+Grf4yAsBruN+losWhRXKlJ6FVHmZkt+A8BOsDAbzsAB+v9T2M4nQVVWk120c+VZk 72hg3ASpTABZcUgkMxFO/VR/roX0aduoNcrKlDn2SCfItGvn9IBDJyCAWlvVbD09NqbDkkUy NoSNnchSyuPoP2T4raqZ/Bvt+4aeZyD0IM34hmMzBn/JNN/G9XpZfWP4tVVmjAtmspJAPDSI dIDbiZiZwjBZBsJPUoLDJU5n6GjgXyXnz9w8QrJ4/ZopTWOilUuj9ABM/KMEjCObexTklyVu STt+GPhDwtBHNee1SCE4jSngeqncSbTAdpISeTpr6Ax6LGV7j0DMTcfWGTgndDnpny1dIliE Rcm3jV7+MDe82TuFLERRSaQonSJoxodUNp4CPAh5UeGza+8yxmdLngJSHhGctNOnNQtWTUg2 1uNntXoLT9iqruYTTSa7Lj8hTGvPSkYK0cSaClCShEKi/Hdp4U0ggPKX8xUOqe/hd3oGhn92 zmP6iM5gt07h8MRy7+y+1yBhju2v4XIVSY8/ACRVWWghitpaYjga4G25Fzz6fdbMJ3fXlSHp GIDmcWV8KYJF57lqcCWaOAEHbXs7fDVNjTZ2ARrB8N4qGvr/GO/d4dN5j04PF1uLssPZT7uZ gnUpB9V45hQenCtaMebfr6MNijj9oC4ffyNaxweRoAmjkRZHONfwBxTWA==
  • Ironport-hdrordr: A9a23:LEtX7K0rsB4+6LXEAYylSQqjBJAkLtp133Aq2lEZdPU1SL36qy nKpp8mPHDP6Qr5NEtQ/OxoQZPwOU80i6QFm7X5TI3DYOCOggLBQL2KwrGN/9SKIVydygcy79 YFT0BiY+eeMbDI4PyKmTVRW74bquVuusiT6Ns3gRxWPGZXgzAK1XYeNu56encGPzV7OQ==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 04/02/2022 12:54 pm, Jan Beulich wrote:
> On 03.02.2022 14:38, Andrew Cooper wrote:
>> --- a/xen/arch/x86/domain.c
>> +++ b/xen/arch/x86/domain.c
>> @@ -1693,11 +1693,8 @@ static void load_segments(struct vcpu *n)
>>                   put_guest(uregs->fs,   esp - 5) |
>>                   put_guest(uregs->es,   esp - 6) |
>>                   put_guest(uregs->ds,   esp - 7) )
>> -            {
>> -                gprintk(XENLOG_ERR,
>> -                        "error while creating compat failsafe
>> callback frame\n");
>> -                domain_crash(n->domain);
>> -            }
>> +                domain_crash(n->domain,
>> +                             "Error creating compat failsafe
>> callback frame\n");
>>  
>>              if ( n->arch.pv.vgc_flags & VGCF_failsafe_disables_events )
>>                  vcpu_info(n, evtchn_upcall_mask) = 1;
>> @@ -1732,11 +1729,8 @@ static void load_segments(struct vcpu *n)
>>               put_guest(uregs->ds,   rsp -  9) |
>>               put_guest(regs->r11,   rsp - 10) |
>>               put_guest(regs->rcx,   rsp - 11) )
>> -        {
>> -            gprintk(XENLOG_ERR,
>> -                    "error while creating failsafe callback frame\n");
>> -            domain_crash(n->domain);
>> -        }
>> +            domain_crash(n->domain,
>> +                         "Error creating failsafe callback frame\n");
>
> I assume it wasn't really intended to hide potentially relevant
> information
> (the subject vCPU) by this change, which - by way of gprintk() - did get
> logged before (since we already have n == current at this point)?

The information is not lost.  __domain_crash() prints current too,
albeit in a long-winded way.

~Andrew



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.