mbings</title>
<meta name='generator' content='cgit v1.2.3-54-g00ecf'/>
<meta name='robots' content='noindex, nofollow'/>
<link rel='stylesheet' type='text/css' href='/cgit.css'/>
<script type='text/javascript' src='/cgit.js'></script>
<link rel='shortcut icon' href='http://distanz.ch/favicon.ico'/>
<link rel='alternate' title='Atom feed' href='https://git.distanz.ch/cgit.cgi/linux/net-next.git/atom/drivers/usb/gadget/udc/bdc?h=master' type='application/atom+xml'/>
<link rel='vcs-git' href='git://git.distanz.ch/linux/net-next.git' title='net-next.git Git repository'/>
<link rel='vcs-git' href='http:///git.distanz.ch/cgit.cgi/linux/net-next.git' title='net-next.git Git repository'/>
</head>
<body>
<div id='cgit'><table id='header'>
<tr>
<td class='logo' rowspan='2'><a href='/cgit.cgi/'><img src='/cgit.png' alt='cgit logo'/></a></td>
<td class='main'><a href='/cgit.cgi/'>index</a> : <a href='/cgit.cgi/linux/net-next.git/'>net-next.git</a></td><td class='form'><form method='get'>
<input type='hidden' name='id' value='02608e02fbec04fccf2eb0cc8d8082f65c0a4286'/><select name='h' onchange='this.form.submit();'>
<option value='emaclite-cleanup'>emaclite-cleanup</option>
<option value='master' selected='selected'>master</option>
<option value='nds-private-remove'>nds-private-remove</option>
<option value='packet-loop-back'>packet-loop-back</option>
<option value='packet-rx-pump-back'>packet-rx-pump-back</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>net-next plumbings</td><td class='sub right'>Tobias Klauser</td></tr></table>
<table class='tabs'><tr><td>
<a href='/cgit.cgi/linux/net-next.git/'>summary</a><a href='/cgit.cgi/linux/net-next.git/refs/?id=02608e02fbec04fccf2eb0cc8d8082f65c0a4286'>refs</a><a href='/cgit.cgi/linux/net-next.git/log/drivers/usb/gadget/udc/bdc'>log</a><a href='/cgit.cgi/linux/net-next.git/tree/drivers/usb/gadget/udc/bdc?id=02608e02fbec04fccf2eb0cc8d8082f65c0a4286'>tree</a><a class='active' href='/cgit.cgi/linux/net-next.git/commit/drivers/usb/gadget/udc/bdc?id=02608e02fbec04fccf2eb0cc8d8082f65c0a4286'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/drivers/usb/gadget/udc/bdc?id=02608e02fbec04fccf2eb0cc8d8082f65c0a4286'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/drivers/usb/gadget/udc/bdc'>
<input type='hidden' name='id' value='02608e02fbec04fccf2eb0cc8d8082f65c0a4286'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/commit/?id=02608e02fbec04fccf2eb0cc8d8082f65c0a4286'>root</a>/<a href='/cgit.cgi/linux/net-next.git/commit/drivers?id=02608e02fbec04fccf2eb0cc8d8082f65c0a4286'>drivers</a>/<a href='/cgit.cgi/linux/net-next.git/commit/drivers/usb?id=02608e02fbec04fccf2eb0cc8d8082f65c0a4286'>usb</a>/<a href='/cgit.cgi/linux/net-next.git/commit/drivers/usb/gadget?id=02608e02fbec04fccf2eb0cc8d8082f65c0a4286'>gadget</a>/<a href='/cgit.cgi/linux/net-next.git/commit/drivers/usb/gadget/udc?id=02608e02fbec04fccf2eb0cc8d8082f65c0a4286'>udc</a>/<a href='/cgit.cgi/linux/net-next.git/commit/drivers/usb/gadget/udc/bdc?id=02608e02fbec04fccf2eb0cc8d8082f65c0a4286'>bdc</a></div><div class='content'><div class='cgit-panel'><b>diff options</b><form method='get'><input type='hidden' name='id' value='02608e02fbec04fccf2eb0cc8d8082f65c0a4286'/><table><tr><td colspan='2'/></tr><tr><td class='label'>context:</td><td class='ctrl'><select name='context' onchange='this.form.submit();'><option value='1'>1</option><option value='2'>2</option><option value='3' selected='selected'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option><option value='8'>8</option><option value='9'>9</option><option value='10'>10</option><option value='15'>15</option><option value='20'>20</option><option value='25'>25</option><option value='30'>30</option><option value='35'>35</option><option value='40'>40</option></select></td></tr><tr><td class='label'>space:</td><td class='ctrl'><select name='ignorews' onchange='this.form.submit();'><option value='0' selected='selected'>include</option><option value='1'>ignore</option></select></td></tr><tr><td class='label'>mode:</td><td class='ctrl'><select name='dt' onchange='this.form.submit();'><option value='0' selected='selected'>unified</option><option value='1'>ssdiff</option><option value='2'>stat only</option></select></td></tr><tr><td/><td class='ctrl'><noscript><input type='submit' value='reload'/></noscript></td></tr></table></form></div><table summary='commit info' class='commit-info'>
<tr><th>author</th><td>Laura Abbott &lt;labbott@redhat.com&gt;</td><td class='right'>2016-12-21 12:32:54 -0800</td></tr>
<tr><th>committer</th><td>Herbert Xu &lt;herbert@gondor.apana.org.au&gt;</td><td class='right'>2016-12-27 17:32:11 +0800</td></tr>
<tr><th>commit</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/drivers/usb/gadget/udc/bdc?id=02608e02fbec04fccf2eb0cc8d8082f65c0a4286'>02608e02fbec04fccf2eb0cc8d8082f65c0a4286</a> (<a href='/cgit.cgi/linux/net-next.git/patch/drivers/usb/gadget/udc/bdc?id=02608e02fbec04fccf2eb0cc8d8082f65c0a4286'>patch</a>)</td></tr>
<tr><th>tree</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/tree/?id=02608e02fbec04fccf2eb0cc8d8082f65c0a4286'>37ff0410d130cfe77185f591b07cd6403f207f0c</a> /<a href='/cgit.cgi/linux/net-next.git/tree/drivers/usb/gadget/udc/bdc?id=02608e02fbec04fccf2eb0cc8d8082f65c0a4286'>drivers/usb/gadget/udc/bdc</a></td></tr>
<tr><th>parent</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/drivers/usb/gadget/udc/bdc?id=7ce7d89f48834cefece7804d38fc5d85382edf77'>7ce7d89f48834cefece7804d38fc5d85382edf77</a> (<a href='/cgit.cgi/linux/net-next.git/diff/drivers/usb/gadget/udc/bdc?id=02608e02fbec04fccf2eb0cc8d8082f65c0a4286&amp;id2=7ce7d89f48834cefece7804d38fc5d85382edf77'>diff</a>)</td></tr></table>
<div class='commit-subject'>crypto: testmgr - Use heap buffer for acomp test input</div><div class='commit-msg'>Christopher Covington reported a crash on aarch64 on recent Fedora
kernels:

kernel BUG at ./include/linux/scatterlist.h:140!
Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
Modules linked in:
CPU: 2 PID: 752 Comm: cryptomgr_test Not tainted 4.9.0-11815-ge93b1cc #162
Hardware name: linux,dummy-virt (DT)
task: ffff80007c650080 task.stack: ffff800008910000
PC is at sg_init_one+0xa0/0xb8
LR is at sg_init_one+0x24/0xb8
...
[&lt;ffff000008398db8&gt;] sg_init_one+0xa0/0xb8
[&lt;ffff000008350a44&gt;] test_acomp+0x10c/0x438
[&lt;ffff000008350e20&gt;] alg_test_comp+0xb0/0x118
[&lt;ffff00000834f28c&gt;] alg_test+0x17c/0x2f0
[&lt;ffff00000834c6a4&gt;] cryptomgr_test+0x44/0x50
[&lt;ffff0000080dac70&gt;] kthread+0xf8/0x128
[&lt;ffff000008082ec0&gt;] ret_from_fork+0x10/0x50

The test vectors used for input are part of the kernel image. These
inputs are passed as a buffer to sg_init_one which eventually blows up
with BUG_ON(!virt_addr_valid(buf)). On arm64, virt_addr_valid returns
false for the kernel image since virt_to_page will not return the
correct page. Fix this by copying the input vectors to heap buffer
before setting up the scatterlist.

Reported-by: Christopher Covington &lt;cov@codeaurora.org&gt;
Fixes: d7db7a882deb ("crypto: acomp - update testmgr with support for acomp")
Signed-off-by: Laura Abbott &lt;labbott@redhat.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</div><div class='diffstat-header'><a href='/cgit.cgi/linux/net-next.git/diff/?id=02608e02fbec04fccf2eb0cc8d8082f65c0a4286'>Diffstat</a> (limited to 'drivers/usb/gadget/udc/bdc')</div><table summary='diffstat' class='diffstat'>