git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Unaligned accesses in sha1dc

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 1, 2017, 09:53 UTC
Message-ID
<xmqqwp8w3uff.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<5100A096-EBAC-4B01-A94D-69D31093148D@gmail.com>
Lars Schneider <larsxschneider@gmail.com> writes:
Show 13 quoted lines
>> On 01 Jun 2017, at 10:28, Andreas Schwab <schwab@suse.de> wrote:
>> 
>> The sh1dc implementation is making unaligned accesses, which will crash
>> on some architectures, others have to emulate them in software.
>
> Is SPARC an architecture that would run into this problem? I think
> there was a thread a few days ago about this...
>
> What architectures are affected by this? I think I read somewhere
> that ARM requires aligned accesses, too, right?
>
> I wonder if it makes sense to emulate SPARC/ARM/... with QEMU on TravisCI [1].
> Is this what you had in mind with "emulate" or do you see a better way?

I think Andreas's "emulate" is that on these architectures often the kernel catches the hardware trap and makes the unaligned access appear to "just work" to the userland software, just like in very old days, i386 and i486 without 387/487 used software floating point "emulation" to give illusion to the userland softare that the co processor was available.

Having to trap and emulate of course costs cycles, and if the userland is written in such a way not to do an unaligned access in the first place.

Depending on the model of "ARM" (or "SPARC") emulated with QEMU, and depending on the OS that runs on such an "ARM" or "SPARC", we may not see this---if the emulated OS has the "software unaligned-access emulation" our userland may not see a SIGBUS.

Previous: Lars SchneiderNext: Andreas Schwab
Message 8 of 28 in “Unaligned accesses in sha1dc”
  1. Andreas SchwabJun 1, 2017
  2. Junio C HamanoJun 1, 2017
  3. Andreas SchwabJun 1, 2017
  4. Junio C HamanoJun 1, 2017
  5. brian m. carlsonJun 1, 2017
  6. Andreas SchwabJun 1, 2017
  7. Lars SchneiderJun 1, 2017
  8. Junio C HamanoJun 1, 2017
  9. Andreas SchwabJun 1, 2017
  10. Martin ÅgrenJun 1, 2017
  11. Ævar Arnfjörð BjarmasonJun 1, 2017
  12. Martin ÅgrenJun 1, 2017
  13. Martin ÅgrenJun 1, 2017
  14. Junio C HamanoJun 2, 2017
  15. Ævar Arnfjörð BjarmasonJun 2, 2017
  16. Martin ÅgrenJun 2, 2017
  17. Ævar Arnfjörð BjarmasonJun 2, 2017
  18. Martin ÅgrenJun 2, 2017
  19. Ævar Arnfjörð BjarmasonJun 2, 2017
  20. demerphqJun 2, 2017
  21. demerphqJun 2, 2017
  22. Ævar Arnfjörð BjarmasonJun 2, 2017
  23. Linus TorvaldsJun 2, 2017
  24. Junio C HamanoJun 3, 2017
  25. Liam R. HowlettJun 2, 2017
  26. Ævar Arnfjörð BjarmasonJun 2, 2017
  27. Junio C HamanoJun 3, 2017
  28. Andreas SchwabJun 1, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.