public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Alexander Lobakin <aleksander.lobakin@intel.com>,
	Yury Norov <yury.norov@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Alexander Lobakin <alexandr.lobakin@intel.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Claudio Imbrenda <imbrenda@linux.ibm.com>,
	David Hildenbrand <david@redhat.com>,
	Heiko Carstens <hca@linux.ibm.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Sven Schnelle <svens@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	linux-s390@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH 3/5] lib/bitmap: add test for bitmap_{from,to}_arr64
Date: Mon, 27 Feb 2023 06:59:12 -0800	[thread overview]
Message-ID: <19587ea3-e54c-e3b0-5341-eb7ee486474b@roeck-us.net> (raw)
In-Reply-To: <95377047-6b26-b434-fc90-2289fccc2a0b@intel.com>

On 2/27/23 06:46, Alexander Lobakin wrote:
> From: Yury Norov <yury.norov@gmail.com>
> Date: Sat, 25 Feb 2023 16:06:45 -0800
> 
>> On Sat, Feb 25, 2023 at 04:05:02PM -0800, Yury Norov wrote:
>>> On Sat, Feb 25, 2023 at 10:47:02AM -0800, Guenter Roeck wrote:
>>>> Hi,
>>>>
>>>> On Thu, Apr 28, 2022 at 01:51:14PM -0700, Yury Norov wrote:
>>>>> Test newly added bitmap_{from,to}_arr64() functions similarly to
>>>>> already existing bitmap_{from,to}_arr32() tests.
>>>>>
>>>>> Signed-off-by: Yury Norov <yury.norov@gmail.com>
>>>>
>>>> Ever since this test is in the tree, several of my boot tests show
>>>> lots of messages such as
>>>>
>>>> test_bitmap: bitmap_to_arr64(nbits == 1): tail is not safely cleared: 0xa5a5a5a500000001 (must be 0x0000000000000001)
> 
> Hmmm, the whole 4 bytes weren't touched.
> 
>>>> test_bitmap: bitmap_to_arr64(nbits == 2): tail is not safely cleared: 0xa5a5a5a500000001 (must be 0x0000000000000003)
>>>> test_bitmap: bitmap_to_arr64(nbits == 3): tail is not safely cleared: 0xa5a5a5a500000001 (must be 0x0000000000000007)
> 
> This is where it gets worse...
> 
>>>> ...
>>>> test_bitmap: bitmap_to_arr64(nbits == 927): tail is not safely cleared: 0xa5a5a5a500000000 (must be 0x000000007fffffff)
>>>> test_bitmap: bitmap_to_arr64(nbits == 928): tail is not safely cleared: 0xa5a5a5a580000000 (must be 0x00000000ffffffff)
> 
> I don't see the pattern how the actual result gets generated. But the
> problem is in the bitmap code rather than in the subtest -- "must be"s
> are fully correct.
> 
> Given that the 0xa5s are present in the upper 32 bits, it is Big Endian
> I guess? Maybe even 32-bit Big Endian? Otherwise I'd start concerning
> how comes it doesn't reproduce on x86_64s :D
> 

It does reproduce on 32-bit x86 builds, and as far as I can see
it is only seen with 32-bit little endian systems.

Guenter

>>>
>>> This may be a real problem. Can you share what's the system is? What's
>>> endianness and register length?
>>>
>>> + Alexander Lobakin, the author of the exact subtest.
>>
>> Forgot to add
> 
> Oh, thanks for letting me know!
> 
>>    
>>>> but then:
>>>>
>>>> test_bitmap: all 6550 tests passed
>>>
>>> It's because corresponding error path doesn't increment failed_tests
>>> counter. I'll send a fix shortly.
> 
> [...]
> 
> Thanks,
> Olek


  reply	other threads:[~2023-02-27 14:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 20:51 [PATCH v2 0/5] bitmap: fix conversion from/to fix-sized arrays Yury Norov
2022-04-28 20:51 ` [PATCH 1/5] lib/bitmap: extend comment for bitmap_(from,to)_arr32() Yury Norov
2022-04-28 20:51 ` [PATCH 2/5] lib: add bitmap_{from,to}_arr64 Yury Norov
2022-04-29 12:59   ` Andy Shevchenko
2022-04-29 15:45     ` Yury Norov
2022-05-02 20:06       ` Yury Norov
2022-05-03  9:56         ` Andy Shevchenko
2022-04-28 20:51 ` [PATCH 3/5] lib/bitmap: add test for bitmap_{from,to}_arr64 Yury Norov
2022-05-19 15:09   ` Guenter Roeck
2022-05-19 16:01     ` Yury Norov
2022-05-19 18:04       ` Guenter Roeck
2022-05-20 16:18         ` Yury Norov
2022-05-21  7:38     ` Yury Norov
2023-02-25 18:47   ` Guenter Roeck
2023-02-26  0:04     ` Yury Norov
2023-02-26  0:06       ` Yury Norov
2023-02-27 14:46         ` Alexander Lobakin
2023-02-27 14:59           ` Guenter Roeck [this message]
2023-02-27 19:24             ` Yury Norov
2023-02-27 20:12               ` Guenter Roeck
2023-02-27 20:23                 ` Yury Norov
2023-02-26  0:42       ` Guenter Roeck
2022-04-28 20:51 ` [PATCH 4/5] KVM: s390: replace bitmap_copy with bitmap_{from,to}_arr64 where appropriate Yury Norov
2022-04-28 20:51 ` [PATCH 5/5] drm/amd/pm: use bitmap_{from,to}_arr32 " Yury Norov

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=19587ea3-e54c-e3b0-5341-eb7ee486474b@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=agordeev@linux.ibm.com \
    --cc=aleksander.lobakin@intel.com \
    --cc=alexandr.lobakin@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=svens@linux.ibm.com \
    --cc=yury.norov@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox