<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 1/28/22 23:29, Jakub Kicinski wrote:<br>
</div>
<blockquote type="cite"
cite="mid:20220128142955.047bd9d4@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text -->
<style>.EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; }</style>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">On Fri, 28 Jan 2022 16:36:42 +0100
Camel Guo wrote:<br>
> From: Camel Guo <a class="moz-txt-link-rfc2396E" href="mailto:camelg@axis.com"><camelg@axis.com></a><br>
> <br>
> Unlike gmac100, gmac1000, gmac4 has 27 DMA registers
and they are<br>
> located at DMA_CHAN_BASE_ADDR (0x1100). In order for
ethtool to dump<br>
> gmac4 DMA registers correctly, this commit checks if a
net_device has<br>
> gmac4 and uses different logic to dump its DMA
registers.<br>
> <br>
> This fixes the following KASAN warning, which can
normally be triggered<br>
> by a command similar like "ethtool -d eth0":<br>
> <br>
> BUG: KASAN: vmalloc-out-of-bounds in
dwmac4_dump_dma_regs+0x6d4/0xb30<br>
> Write of size 4 at addr ffffffc010177100 by task
ethtool/1839<br>
> kasan_report+0x200/0x21c<br>
> __asan_report_store4_noabort+0x34/0x60<br>
> dwmac4_dump_dma_regs+0x6d4/0xb30<br>
> stmmac_ethtool_gregs+0x110/0x204<br>
> ethtool_get_regs+0x200/0x4b0<br>
> dev_ethtool+0x1dac/0x3800<br>
> dev_ioctl+0x7c0/0xb50<br>
> sock_ioctl+0x298/0x6c4<br>
> ...<br>
> <br>
> Signed-off-by: Camel Guo <a class="moz-txt-link-rfc2396E" href="mailto:camelg@axis.com"><camelg@axis.com></a><br>
<br>
Can we get a Fixes tag for this? If it was always broken the
Fixes tag<br>
should point to the commit which added gmac4 support.<br>
</div>
</span></font>
</blockquote>
<p>Done in v2. Please review PATCH v2 instead. <br>
</p>
</body>
</html>