<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>cc Alex</p>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<br>
</div>
<span>From Alex: It's indeed the kernel restriction and it's a good idea to add a flag to make it configurable.
</span><br>
<br>
Igor<br>
<br>
<div style="color: rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> cfe-users <cfe-users-bounces@lists.llvm.org> on behalf of Steven Simpson via cfe-users <cfe-users@lists.llvm.org><br>
<b>Sent:</b> Wednesday, March 22, 2017 9:10 AM<br>
<b>To:</b> cfe-users@lists.llvm.org<br>
<b>Subject:</b> [cfe-users] BPF stack limit</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Hi,<br>
<br>
I'm using Clang to compile C to eBPF, not to run in the Linux kernel, <br>
but in ubpf.<br>
<br>
I occasionally encounter the error "Looks like the BPF stack limit of <br>
512 bytes is exceeded".  The limit seems to be hard-wired <br>
(llvm/lib/Target/BPF/BPFRegisterInfo.cpp):<br>
<br>
   if (Offset <= -512) {<br>
<br>
(I'm using "clang version 5.0.0 (trunk 294090)" built from SVN source.  <br>
Checked it's still there in r298510.)<br>
<br>
Is this an intrinsic limit of eBPF, or just one set by the kernel? If <br>
the latter, and since the kernel isn't the only place BPF could run, <br>
could an option be added to override it?  (For the moment, I've just <br>
disabled the check and rebuilt.  Plus there are still some changes to <br>
try with my code which might avoid the limit.)<br>
<br>
Thanks,<br>
<br>
Steven<br>
_______________________________________________<br>
cfe-users mailing list<br>
cfe-users@lists.llvm.org<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_cfe-2Dusers&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=LlbfLxvkyuVVPfVvG7EAbQ&m=On5jaYfY7XtHrHbnvpNvCTd5nJsIP5oS73Lyre_M7ds&s=-1jnm3HD6bQO8C8Cu71msJqTKLsQ9uAxEdZiPbABiwo&e=" id="LPlnk754820" previewremoved="true">https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_cfe-2Dusers&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=LlbfLxvkyuVVPfVvG7EAbQ&m=On5jaYfY7XtHrHbnvpNvCTd5nJsIP5oS73Lyre_M7ds&s=-1jnm3HD6bQO8C8Cu71msJqTKLsQ9uAxEdZiPbABiwo&e=</a>
<br>
</div>
</span></font></div>
</div>
</body>
</html>