# Re: Buggy commit tracked to: "Re: \[PATCH 2/9\] iov\_iter: move rw\_copy\_check\_uvector() into lib/iov\_iter.c"

- From: Christoph Hellwig \<hch@lst.de\>
- Date: 2020-10-22 13:23:55 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2020/10/191014
- Thread: https://ratatoskr.run/linux-arm-kernel/2020/09/189618/t.md

```text
On Thu, Oct 22, 2020 at 11:36:40AM +0200, David Hildenbrand wrote:
> My thinking: if the compiler that calls import_iovec() has garbage in
> the upper 32 bit
> 
> a) gcc will zero it out and not rely on it being zero.
> b) clang will not zero it out, assuming it is zero.
> 
> But
> 
> a) will zero it out when calling the !inlined variant
> b) clang will zero it out when calling the !inlined variant
> 
> When inlining, b) strikes. We access garbage. That would mean that we
> have calling code that's not generated by clang/gcc IIUC.

Most callchains of import_iovec start with the assembly syscall wrappers.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```
