xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86: partially undo "fix build with gcc 7"
@ 2017-05-31  7:51 Jan Beulich
  2017-05-31 12:24 ` Andrew Cooper
  2017-06-01 11:06 ` Julien Grall
  0 siblings, 2 replies; 5+ messages in thread
From: Jan Beulich @ 2017-05-31  7:51 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Julien Grall

[-- Attachment #1: Type: text/plain, Size: 803 bytes --]

While f32400e90c ("x86: fix build with gcc 7")'s change to
compat_array_access_ok() is necessary, I had blindly and needlessly
also added it to array_access_ok(). There's no conditional expression
involved there, so undo it.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
No ARM counterpart, as Julien means to remove the macro anyway.

--- a/xen/include/asm-x86/x86_64/uaccess.h
+++ b/xen/include/asm-x86/x86_64/uaccess.h
@@ -42,7 +42,7 @@ extern void *xlat_malloc(unsigned long *
 
 #define array_access_ok(addr, count, size) \
     (likely(((count) ?: 0UL) < (~0UL / (size))) && \
-     access_ok(addr, 0 + (count) * (size)))
+     access_ok(addr, (count) * (size)))
 
 #define __compat_addr_ok(d, addr) \
     ((unsigned long)(addr) < HYPERVISOR_COMPAT_VIRT_START(d))




[-- Attachment #2: gcc7-x86-refine.patch --]
[-- Type: text/plain, Size: 843 bytes --]

x86: partially undo "fix build with gcc 7"

While f32400e90c ("x86: fix build with gcc 7")'s change to
compat_array_access_ok() is necessary, I had blindly and needlessly
also added it to array_access_ok(). There's no conditional expression
involved there, so undo it.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
No ARM counterpart, as Julien means to remove the macro anyway.

--- a/xen/include/asm-x86/x86_64/uaccess.h
+++ b/xen/include/asm-x86/x86_64/uaccess.h
@@ -42,7 +42,7 @@ extern void *xlat_malloc(unsigned long *
 
 #define array_access_ok(addr, count, size) \
     (likely(((count) ?: 0UL) < (~0UL / (size))) && \
-     access_ok(addr, 0 + (count) * (size)))
+     access_ok(addr, (count) * (size)))
 
 #define __compat_addr_ok(d, addr) \
     ((unsigned long)(addr) < HYPERVISOR_COMPAT_VIRT_START(d))

[-- Attachment #3: Type: text/plain, Size: 127 bytes --]

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86: partially undo "fix build with gcc 7"
  2017-05-31  7:51 [PATCH] x86: partially undo "fix build with gcc 7" Jan Beulich
@ 2017-05-31 12:24 ` Andrew Cooper
  2017-06-01 11:06 ` Julien Grall
  1 sibling, 0 replies; 5+ messages in thread
From: Andrew Cooper @ 2017-05-31 12:24 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: Julien Grall

On 31/05/17 08:51, Jan Beulich wrote:
> While f32400e90c ("x86: fix build with gcc 7")'s change to
> compat_array_access_ok() is necessary, I had blindly and needlessly
> also added it to array_access_ok(). There's no conditional expression
> involved there, so undo it.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86: partially undo "fix build with gcc 7"
  2017-05-31  7:51 [PATCH] x86: partially undo "fix build with gcc 7" Jan Beulich
  2017-05-31 12:24 ` Andrew Cooper
@ 2017-06-01 11:06 ` Julien Grall
  2017-06-01 11:14   ` Jan Beulich
  1 sibling, 1 reply; 5+ messages in thread
From: Julien Grall @ 2017-06-01 11:06 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: Andrew Cooper

Hi Jan,

On 31/05/17 08:51, Jan Beulich wrote:
> While f32400e90c ("x86: fix build with gcc 7")'s change to
> compat_array_access_ok() is necessary, I had blindly and needlessly
> also added it to array_access_ok(). There's no conditional expression
> involved there, so undo it.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> ---
> No ARM counterpart, as Julien means to remove the macro anyway.

To double-check, I am CCed on this e-mail because you would like this 
patch in Xen 4.9, right?

Cheers,

-- 
Julien Grall

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86: partially undo "fix build with gcc 7"
  2017-06-01 11:06 ` Julien Grall
@ 2017-06-01 11:14   ` Jan Beulich
  2017-06-01 17:47     ` Julien Grall
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2017-06-01 11:14 UTC (permalink / raw)
  To: Julien Grall; +Cc: Andrew Cooper, xen-devel

>>> On 01.06.17 at 13:06, <julien.grall@arm.com> wrote:
> On 31/05/17 08:51, Jan Beulich wrote:
>> While f32400e90c ("x86: fix build with gcc 7")'s change to
>> compat_array_access_ok() is necessary, I had blindly and needlessly
>> also added it to array_access_ok(). There's no conditional expression
>> involved there, so undo it.
>>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>> ---
>> No ARM counterpart, as Julien means to remove the macro anyway.
> 
> To double-check, I am CCed on this e-mail because you would like this 
> patch in Xen 4.9, right?

No, because of the "No ARM counterpart ..." remark. Of course
I wouldn't mind this going into 4.9, but I did specifically not submit
the patch before branching because the code as is will do there. I
simply didn't want to leave this in place for the longer term.

Jan


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86: partially undo "fix build with gcc 7"
  2017-06-01 11:14   ` Jan Beulich
@ 2017-06-01 17:47     ` Julien Grall
  0 siblings, 0 replies; 5+ messages in thread
From: Julien Grall @ 2017-06-01 17:47 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Andrew Cooper, Stefano Stabellini, xen-devel

Hi,

On 01/06/17 12:14, Jan Beulich wrote:
>>>> On 01.06.17 at 13:06, <julien.grall@arm.com> wrote:
>> On 31/05/17 08:51, Jan Beulich wrote:
>>> While f32400e90c ("x86: fix build with gcc 7")'s change to
>>> compat_array_access_ok() is necessary, I had blindly and needlessly
>>> also added it to array_access_ok(). There's no conditional expression
>>> involved there, so undo it.
>>>
>>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>> ---
>>> No ARM counterpart, as Julien means to remove the macro anyway.
>>
>> To double-check, I am CCed on this e-mail because you would like this
>> patch in Xen 4.9, right?
>
> No, because of the "No ARM counterpart ..." remark. Of course
> I wouldn't mind this going into 4.9, but I did specifically not submit
> the patch before branching because the code as is will do there. I
> simply didn't want to leave this in place for the longer term.

Oh. Yes the patch has been sent and acked by Stefano. Hopefully it will 
get merged soon.

Regarding the patch, I would avoid to add it in Xen 4.9 if it is not 
fixing a regression/critical bug.

Cheers,

-- 
Julien Grall

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-06-01 17:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-31  7:51 [PATCH] x86: partially undo "fix build with gcc 7" Jan Beulich
2017-05-31 12:24 ` Andrew Cooper
2017-06-01 11:06 ` Julien Grall
2017-06-01 11:14   ` Jan Beulich
2017-06-01 17:47     ` Julien Grall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).