All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Thomas Huth <thuth@redhat.com>
Cc: "Laurent Vivier" <laurent@vivier.eu>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	qemu-devel@nongnu.org, "Cleber Rosa" <crosa@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Richard Henderson" <rth@twiddle.net>
Subject: Re: [PATCH 7/7] linux-user: limit check to HOST_LONG_BITS < TARGET_ABI_BITS
Date: Thu, 28 May 2020 09:31:55 +0100	[thread overview]
Message-ID: <87y2pc4g04.fsf@linaro.org> (raw)
In-Reply-To: <037520b7-e17d-b516-a2da-a41ee8a1624a@redhat.com>


Thomas Huth <thuth@redhat.com> writes:

> On 27/05/2020 18.36, Alex Bennée wrote:
>> 
>> Thomas Huth <thuth@redhat.com> writes:
>> 
>>> On 27/05/2020 16.44, Laurent Vivier wrote:
>>>> Le 25/05/2020 à 15:18, Thomas Huth a écrit :
>>>>> From: Alex Bennée <alex.bennee@linaro.org>
>>>>>
>>>>> Newer clangs rightly spot that you can never exceed the full address
>>>>> space of 64 bit hosts with:
>>>>>
>>>>>   linux-user/elfload.c:2076:41: error: result of comparison 'unsigned
>>>>>   long' > 18446744073709551615 is always false
>>>>>   [-Werror,-Wtautological-type-limit-compare]
>>>>>   4685         if ((guest_hiaddr - guest_base) > ~(uintptr_t)0) {
>>>>>   4686             ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~
>>>>>   4687 1 error generated.
>>>>>
>>>>> So lets limit the check to 32 bit hosts only.
>>>>>
>>>>> Fixes: ee94743034bf
>>>>> Reported-by: Thomas Huth <thuth@redhat.com>
>>>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>>>> [thuth: Use HOST_LONG_BITS < TARGET_ABI_BITS instead of HOST_LONG_BITS == 32]
>>>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>>>> ---
>>>>>  linux-user/elfload.c | 2 ++
>>>>>  1 file changed, 2 insertions(+)
>>>>>
>>>>> diff --git a/linux-user/elfload.c b/linux-user/elfload.c
>>>>> index 01a9323a63..ebc663ea0b 100644
>>>>> --- a/linux-user/elfload.c
>>>>> +++ b/linux-user/elfload.c
>>>>> @@ -2073,12 +2073,14 @@ static void pgb_have_guest_base(const char *image_name, abi_ulong guest_loaddr,
>>>>>              exit(EXIT_FAILURE);
>>>>>          }
>>>>>      } else {
>>>>> +#if HOST_LONG_BITS < TARGET_ABI_BITS
>>>>>          if ((guest_hiaddr - guest_base) > ~(uintptr_t)0) {
>>>>>              error_report("%s: requires more virtual address space "
>>>>>                           "than the host can provide (0x%" PRIx64 ")",
>>>>>                           image_name, (uint64_t)guest_hiaddr - guest_base);
>>>>>              exit(EXIT_FAILURE);
>>>>>          }
>>>>> +#endif
>>>>>      }
>>>>>  
>>>>>      /*
>>>>>
>>>>
>>>> Philippe sent the same patch:
>>>>
>>>> https://www.mail-archive.com/qemu-devel@nongnu.org/msg699796.html
>>>
>>> Indeed, but looking more closely, he's using slightly different
>>> locations for the #if and #endif ... not sure what's better though...?
>> 
>> Richard was more inclined to suppress the warning:
>> 
>>   Subject: Re: [PATCH v2] linux-user: limit check to HOST_LONG_BITS == 32
>>   From: Richard Henderson <richard.henderson@linaro.org>
>>   Message-ID: <3069bc1b-115d-f361-8271-c775bf6957ea@linaro.org>
>>   Date: Thu, 21 May 2020 20:15:51 -0700
>> 
>> One reason I dropped the f32 patch from my last PR was because this
>> wasn't the only warning the latest clang picks up.
>
> ... but this is currently the only spot that is required to get the
> gitlab CI going again, so I think we should include this patch until we
> have a final decision whether to disable the warning or not (and we can
> still revert this patch after we disabled the warning). Ok?

I'm certainly happy with that if it gets gitlab working.

My experience with make docker-test-vlang@fedora (with 32) was there
where more things to fix. I guess gitlab didn't trigger them.

-- 
Alex Bennée


      reply	other threads:[~2020-05-28  8:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-25 13:18 [PATCH 0/7] Gitlab CI improvements and fixes Thomas Huth
2020-05-25 13:18 ` [PATCH 1/7] MAINTAINERS: Add Philippe, Alex and Wainer to the Gitlab-CI section Thomas Huth
2020-05-25 13:18 ` [PATCH 2/7] gitlab-ci: Remove flex/bison packages Thomas Huth
2020-05-27 16:47   ` Alex Bennée
2020-05-25 13:18 ` [PATCH 3/7] GitLab CI: avoid calling before_scripts on unintended jobs Thomas Huth
2020-05-27 17:33   ` Alex Bennée
2020-05-25 13:18 ` [PATCH 4/7] gitlab-ci: Move edk2 and opensbi YAML files to .gitlab-ci.d folder Thomas Huth
2020-05-25 13:32   ` Philippe Mathieu-Daudé
2020-05-27 17:34   ` Alex Bennée
2020-05-25 13:18 ` [PATCH 5/7] gitlab-ci: Do not use the standard container images from gitlab Thomas Huth
2020-05-28  8:37   ` Alex Bennée
2020-05-25 13:18 ` [PATCH 6/7] gitlab-ci: Determine the number of jobs dynamically Thomas Huth
2020-05-28  8:41   ` Alex Bennée
2020-05-28  9:11     ` Thomas Huth
2020-05-25 13:18 ` [PATCH 7/7] linux-user: limit check to HOST_LONG_BITS < TARGET_ABI_BITS Thomas Huth
2020-05-27 14:44   ` Laurent Vivier
2020-05-27 14:51     ` Thomas Huth
2020-05-27 16:36       ` Alex Bennée
2020-05-28  6:45         ` Thomas Huth
2020-05-28  8:31           ` Alex Bennée [this message]

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=87y2pc4g04.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=crosa@redhat.com \
    --cc=laurent@vivier.eu \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=thuth@redhat.com \
    --cc=wainersm@redhat.com \
    /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.