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

Re: [PATCH v1 05/18] x86: refactor xen cmdline into general framework


  • To: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 25 Jul 2022 09:09:15 +0200
  • 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=+PIj7R1l1yRdtgBX2XEGtcGEBOffcS42TzhMTVJ3Ok4=; b=lAWcJ2XYBBHWLoMOcFjzxCTAIoWsaACbN72EeKp2TetA9KBY8ZdsGL/folVSAA23ya8RU72+7q41YPDIhQCOhXcv8lk6jayy/o3vDISkRteLhM9l9QugAf16nbztS7WfehShLJ6+4mR3XnPqu3AKt+LnoeFdvHWvjMbX5f6PIYTKDv5QLzMlToQsJj+kckdyatmZIRoyhos2B5vJn9YGUGY66xGkwvLDaR4aGul4rBua7QtvSf2fynelMvdTpKL/i/QOV+s44ZSOO7cSLvWDU7hV7HFpWfKth9+apN9Fmz1w/T5RzAkVLeLugwyGnaUpZ+SkyiNs82IVt3tG7r6g8w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P+/7acfxsIQK2M/5jZC0tweC4YBF+WRhAqGntcgb0c233cYicCHQHDfvFlaYNtQHHH7/x74VBHq18GFKjGF5C/uL+LNaJPM97vF6IFx/y5/p3/qlciTzk2Ts7rC0Wao6GvcjZtmMohsdQYZY2QpLKAGpVJ6REKohqWP47nTpXwSqtQfvMy5fTcRUhJvrtT+KyRQN3eiCdJwT/HldnF/Rms8cCa05F0Rt6hqQlOfJXVwELKTVZ/LHS0So8aQBo1BPD0sKStozMPCrmpMpf5PEyyLtAWUKfvfEoxRMAh84SWcKs8YGLXRb4O91XZaVDDwbFizidIeX4ouIjNMNq/Z0wg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: scott.davis@xxxxxxxxxx, christopher.clark@xxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Mon, 25 Jul 2022 07:09:19 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 22.07.2022 15:12, Daniel P. Smith wrote:
> On 7/19/22 09:26, Jan Beulich wrote:
>> On 06.07.2022 23:04, Daniel P. Smith wrote:
>>> --- a/xen/include/xen/bootinfo.h
>>> +++ b/xen/include/xen/bootinfo.h
>>> @@ -53,6 +53,17 @@ struct __packed boot_info {
>>>  
>>>  extern struct boot_info *boot_info;
>>>  
>>> +static inline char *bootinfo_prepare_cmdline(struct boot_info *bi)
>>> +{
>>> +    bi->cmdline = arch_bootinfo_prepare_cmdline(bi->cmdline, bi->arch);
>>> +
>>> +    if ( *bi->cmdline == ' ' )
>>> +        printk(XENLOG_WARNING "%s: leading whitespace left on cmdline\n",
>>> +               __func__);
>>
>> Just a remark and a question on this one: I don't view the use of
>> __func__ here (and in fact in many other cases as well) as very
>> useful. And why do we need such a warning all of the sudden in the
>> first place?
> 
> This started as just a debug print, thus why __func__ is in place, but
> later decided to leave it. This is because after this point, the code
> assumes that all leading space was stripped, but there was never a check
> that logic did the job correct. I don't believe a failure to do so
> warranted a halt to the boot process, but at least provide a warning
> into the log should the trimming fail. Doing so would allow an admin to
> have a clue should an unexpected behavior occur as a result of leading
> space making it through and breaking the fully trimmed assumption made
> elsewhere.

All fine, but then such a change wants doing on its own, not in the middle
of pretty involved refactoring work.

Jan



 


Rackspace

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