lkml.org 
[lkml]   [2018]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 00/18] xfrm: Add compat layer
<div dir="ltr"><b style="font-weight:normal" id="gmail-docs-internal-guid-e4b05990-dca1-4f17-94c5-d2141c339ad6"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">We (Android) are very interested in removing the restriction for 32-bit userspace processes accessing xfrm netlink on 64-bit kernels. IPsec support is required to pass Android conformance tests, and any manufacturer wishing to ship 32-bit userspace with a recent kernel needs out-of-tree changes (removing the compat_task check) to do so.</span></p><br><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">That said, it’s not difficult to work around alignment issues directly in userspace, so maybe we could just remove the check and make this the caller&#39;s responsibility? Here’s an example of the workaround currently in the Android tree:</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><a href="https://android.googlesource.com/platform/system/netd/+/refs/heads/master/server/XfrmController.h#257" style="text-decoration:none"><span style="font-size:11pt;font-family:Arial;color:rgb(17,85,204);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap">https://android.googlesource.com/platform/system/netd/+/refs/heads/master/server/XfrmController.h#257</span></a></p><br><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">We could also employ a (relatively simple) solution such as the one above in the uapi XFRM header itself, though it would require a caller to declare the target kernel ABI at compile time. Maybe that’s not unthinkable for an uncommon case?</span></p><br><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">-Nathan</span></p></b><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 27, 2018 at 7:51 AM, Dmitry Safonov <span dir="ltr">&lt;<a href="mailto:dima@arista.com" target="_blank">dima@arista.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Fri, 2018-07-27 at 16:19 +0200, Florian Westphal wrote:<br>
&gt; Dmitry Safonov &lt;<a href="mailto:dima@arista.com">dima@arista.com</a>&gt; wrote:<br>
&gt; &gt; 1. It will double copy netlink messages, making it O(n) instead of<br>
&gt; &gt; O(1), where n - is number of bind()s.. Probably we don&#39;t care much.<br>
&gt; <br>
&gt; About those bind() patches, I don&#39;t understand why they are needed.<br>
&gt; <br>
&gt; Why can&#39;t you just add the compat skb to the native skb when doing<br>
&gt; the multicast call?<br>
&gt; <br>
&gt; skb_shinfo(skb)-&gt;frag_list = compat_skb;<br>
&gt; xfrm_nlmsg_multicast(net, skb, 0, ...<br>
<br>
</div></div>Oh yeah, sorry, I think I misread the patch - will try to add compat<br>
skb in the multicast call.<br>
<span class="HOEnZb"><font color="#888888"><br>
-- <br>
Thanks,<br>
             Dmitry<br>
</font></span></blockquote></div><br></div>
\
 
 \ /
  Last update: 2018-07-27 18:55    [W:0.064 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site