All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	Xen-devel <xen-devel@lists.xen.org>
Cc: Juergen Gross <jgross@suse.com>,
	Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: PING ARM [PATCH v2] xen/cmdline: Fix buggy strncmp(s, LITERAL, ss - s) construct
Date: Mon, 14 Jan 2019 16:07:17 +0000	[thread overview]
Message-ID: <4f1859e5-c901-3e3e-ffc2-0e7233d1c794@arm.com> (raw)
In-Reply-To: <8161196e-b6ff-2ab1-eaa8-cdb5341ae178@citrix.com>

Hi Andrew,

On 14/01/2019 15:17, Andrew Cooper wrote:
>> diff --git a/xen/arch/arm/efi/efi-boot.h b/xen/arch/arm/efi/efi-boot.h
>> index ca655ff..22a86ec 100644
>> --- a/xen/arch/arm/efi/efi-boot.h
>> +++ b/xen/arch/arm/efi/efi-boot.h
>> @@ -212,7 +212,7 @@ EFI_STATUS __init fdt_add_uefi_nodes(EFI_SYSTEM_TABLE *sys_table,
>>               break;
>>   
>>           type = fdt_getprop(fdt, node, "device_type", &len);
>> -        if ( type && strncmp(type, "memory", len) == 0 )
>> +        if ( type && len == 6 && strncmp(type, "memory", 6) == 0 )

string property terminates with NUL and is included in the len. So I don't think 
this change is correct.

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-01-14 16:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-04 17:17 [PATCH v2] xen/cmdline: Fix buggy strncmp(s, LITERAL, ss - s) construct Andrew Cooper
2019-01-07  8:59 ` Jan Beulich
2019-01-07 17:28   ` Andrew Cooper
2019-01-08  8:31     ` Jan Beulich
2019-01-16 12:08       ` George Dunlap
2019-01-16 12:48         ` Jan Beulich
2019-01-14 15:17 ` PING ARM " Andrew Cooper
2019-01-14 16:07   ` Julien Grall [this message]
2019-01-14 16:59     ` Andrew Cooper
2019-01-14 17:16       ` Julien Grall
2019-01-14 17:43         ` Andrew Cooper
2019-01-15 11:39           ` Julien Grall
2019-01-15  8:47         ` Jan Beulich
2019-01-15 11:11           ` Julien Grall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4f1859e5-c901-3e3e-ffc2-0e7233d1c794@arm.com \
    --to=julien.grall@arm.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jgross@suse.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.