IOMMU, or just not having bus mastering. But yeah. Problem is none of their IOMMUs work. They don't fail closed.
-
-
Why is that? I haven't looked at how one actually programs an IOMMU. Is it a fundamental limitation or some sort of "we can't break existing devices relying on being able to read/write anywhere"?
2 replies 0 retweets 0 likes -
See here for an account of how historically broken this stuff is on Linux and how the solutions are still prioritizing performance over getting it obviously safely right.https://lwn.net/Articles/786558/ …
1 reply 0 retweets 2 likes -
You don't have to tell me about drivers fucking up IOMMU mappings. That's how we owned the PS4. The solution isn't forcing bounce buffers on everything, it's better software frameworks for getting this right without just dumbly copying data.
1 reply 0 retweets 3 likes -
If final destination is userspace you can't. Other data may be in same page. Based on the LWN summary I posted it looks like they're doing bounce buffer mappings only for first/last partial pages...
2 replies 0 retweets 0 likes -
Replying to @RichFelker @marcan42 and
I've seen well-written DPDK drivers that manage to do a decent job
1 reply 0 retweets 0 likes -
Replying to @HarperMitchell @RichFelker and
Maybe there's something more fundamental I'm missing or being obtuse about
1 reply 0 retweets 0 likes -
Replying to @HarperMitchell @RichFelker and
The only thing you need to do is make sure all your DMA allocations are page-aligned and that you never store control structures not intended for the hardware in them. Any mapped pages are treated as untrusted data subject to change at any time.
1 reply 0 retweets 3 likes -
Replying to @marcan42 @RichFelker and
Right, also I don't see how the user/kernelspace distinction is relevant
2 replies 0 retweets 0 likes -
Replying to @HarperMitchell @marcan42 and
Because the kernel can't control the alignment of buffers userspace passes to recv.
2 replies 0 retweets 0 likes
Yes, you need to use bounce buffers for the first/last pages when that happens. That is expected. Userspace that wants performance needs to align.
-
-
Replying to @marcan42 @RichFelker and
There is a distinction here between e.g. standard socket APIs (you pretty much always need to copy anyway) and high performance stuff where userspace should know what it's doing. Same with graphics, ultimately GPU contexts can 1:1 map userspace contexts for stuff like games.
1 reply 0 retweets 1 like -
Replying to @marcan42 @RichFelker and
(and this is how it's done for secure game consoles, by the way, which are optimized for security *and* GPU perf)
1 reply 0 retweets 1 like - Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.