Skip to contentSkip to conversation

'buf' pointer in ttm_bo_vm_access_kmap()

DISCUSSION Tom St Denis 4 participants 4 messages Jan 26, 2018 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): d3f92e9e-d0aa-1861-df8b-78320be94483-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Am 26.01.2018 um 15:31 schrieb Tom St Denis:

Quoted 3 lines

Hi all,

In the function ttm_bo_vm_access_kmap() it doesn't seem to me like the 'buf' pointer is incremented.  That seems like a bug no?

Yeah, looks suspicious to me as well. But TTM questions should CC the dri list as well.

And in this particular case I think Felix was the author that function.

Regards,
Christian.

Quoted 7 lines

Cheers,
Tom
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#3 lore raw
Quoted 9 lines · Christian König

Am 26.01.2018 um 15:31 schrieb Tom St Denis:

Quoted 3 lines

Hi all,

In the function ttm_bo_vm_access_kmap() it doesn't seem to me like the 'buf' pointer is incremented.  That seems like a bug no?

Yeah, looks suspicious to me as well. But TTM questions should CC the dri list as well.

And in this particular case I think Felix was the author that function.

Hi Christian,

I'm authoring a set of mostly NFC patches for TTM and already crafted a fix for this in the process.

If the fix (which is literally "buf += bytes" at the end of the while loop) doesn't get NAK'ed I'll submit it as part of my cleanup patches.

Cheers,
Tom
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

A message that is not in the archive (sent off-list or not yet received): eb4c173e-69ea-991e-2263-a06c7ab23702-5C7GfCeVMHo@public.gmane.org

#5 lore raw
Quoted 13 lines · Tom St Denis
Quoted 11 lines · Christian König

Am 26.01.2018 um 15:31 schrieb Tom St Denis:

Quoted 4 lines

Hi all,

In the function ttm_bo_vm_access_kmap() it doesn't seem to me like the 'buf' pointer is incremented.  That seems like a bug no?

Yeah, looks suspicious to me as well. But TTM questions should CC the dri list as well.

And in this particular case I think Felix was the author that function.

Quoted 7 lines

Hi Christian,

I'm authoring a set of mostly NFC patches for TTM and already crafted a fix for this in the process.

If the fix (which is literally "buf += bytes" at the end of the while loop) doesn't get NAK'ed I'll submit it as part of my cleanup patches.

Thanks for catching that. The fix sounds reasonable. Since buf is a void pointer, you may need to cast it to (uint8_t *) or (char *) for sane pointer arithmetics.

I'll update KFDTest to include ptace system memory accesses across page boundaries. I did a similar thing for the VRAM test crossing non-contiguous VRAM boundaries.

Regards,
  Felix

Quoted 3 lines

Cheers,
Tom

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx