<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1525090577;
        mso-list-type:hybrid;
        mso-list-template-ids:-1955149064 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Hi there, <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I’m trying to build a kernel live patch for Linux kernel 4.4.27 version within a docker.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I did use the following link to install necessary dependencies.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><a href="https://github.com/dynup/kpatch">https://github.com/dynup/kpatch</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Since we are building inside docker against an older kernel, my understanding is<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Kpatch-build will try to build older format of live patch using  create-kpatch-module.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I do see both original .o and patched .o in the relevant directories inside docker.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.5pt;font-family:"Arial",sans-serif;color:#242729;background:white">But create-kpatch-module is not being called and I'm getting an error
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.5pt;font-family:"Arial",sans-serif;color:#242729;background:white">indicating "Makefile target missing".  <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.5pt;font-family:"Arial",sans-serif;color:#242729;background:white"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt;background:white;vertical-align:baseline">
<span style="font-size:11.5pt;font-family:"Arial",sans-serif;color:#242729">Upon further inspection (with -d oputput and from the script itself)<o:p></o:p></span></p>
<p class="MsoNormal" style="background:#EFF0F1;vertical-align:baseline"><span style="font-size:10.0pt;font-family:Consolas;color:#242729;border:none windowtext 1.0pt;padding:0in;background:#EFF0F1">+ /usr/local/libexec/kpatch/create-kpatch-module /home/xyz/.kpatch/tmp/patch/tmp_output.o
 /home/xyz/.kpatch/tmp/patch/output.o<o:p></o:p></span></p>
<p class="MsoNormal" style="background:#EFF0F1;vertical-align:baseline"><span style="font-size:10.0pt;font-family:Consolas;color:#242729;border:none windowtext 1.0pt;padding:0in;background:#EFF0F1">+ local to_stdout=1<o:p></o:p></span></p>
<p class="MsoNormal" style="background:#EFF0F1;vertical-align:baseline"><span style="font-size:10.0pt;font-family:Consolas;color:#242729;border:none windowtext 1.0pt;padding:0in;background:#EFF0F1">+ [[ 1 -ge 2 ]]<o:p></o:p></span></p>
<p class="MsoNormal" style="background:#EFF0F1;vertical-align:baseline"><span style="font-size:10.0pt;font-family:Consolas;color:#242729;border:none windowtext 1.0pt;padding:0in;background:#EFF0F1">+ [[ 1 -eq 1 ]]<o:p></o:p></span></p>
<p class="MsoNormal" style="background:#EFF0F1;vertical-align:baseline"><span style="font-size:10.0pt;font-family:Consolas;color:#242729;border:none windowtext 1.0pt;padding:0in;background:#EFF0F1">+ tee -a /home/racker/.kpatch/build.log<o:p></o:p></span></p>
<p class="MsoNormal" style="background:#EFF0F1;vertical-align:baseline"><span style="font-size:10.0pt;font-family:Consolas;color:#242729;border:none windowtext 1.0pt;padding:0in;background:#EFF0F1">+ check_pipe_status create-kpatch-module<o:p></o:p></span></p>
<p class="MsoNormal" style="background:#EFF0F1;vertical-align:baseline"><span style="font-size:10.0pt;font-family:Consolas;color:#242729;border:none windowtext 1.0pt;padding:0in;background:#EFF0F1">+ rc=0<o:p></o:p></span></p>
<p class="MsoNormal" style="background:#EFF0F1;vertical-align:baseline"><span style="font-size:10.0pt;font-family:Consolas;color:#242729;border:none windowtext 1.0pt;padding:0in;background:#EFF0F1">+ [[ 0 = 139 ]]<o:p></o:p></span></p>
<p class="MsoNormal" style="background:#EFF0F1;vertical-align:baseline"><span style="font-size:10.0pt;font-family:Consolas;color:#242729;border:none windowtext 1.0pt;padding:0in;background:#EFF0F1">+ cd /home/xyz/.kpatch/tmp/patch<o:p></o:p></span></p>
<p class="MsoNormal" style="background:#EFF0F1;vertical-align:baseline"><span style="font-size:10.0pt;font-family:Consolas;color:#242729;border:none windowtext 1.0pt;padding:0in;background:#EFF0F1">+ logger<o:p></o:p></span></p>
<p class="MsoNormal" style="background:#EFF0F1;vertical-align:baseline"><span style="font-size:10.0pt;font-family:Consolas;color:#242729;border:none windowtext 1.0pt;padding:0in;background:#EFF0F1">+ KPATCH_BUILD=/source/linux<o:p></o:p></span></p>
<p class="MsoNormal" style="background:#EFF0F1;vertical-align:baseline"><span style="font-size:10.0pt;font-family:Consolas;color:#242729;border:none windowtext 1.0pt;padding:0in;background:#EFF0F1">+ KPATCH_NAME=kpatch-4-4-0-2-modules-0-3-2-3-x86_64<o:p></o:p></span></p>
<p class="MsoNormal" style="background:#EFF0F1;vertical-align:baseline"><span style="font-size:10.0pt;font-family:Consolas;color:#242729;border:none windowtext 1.0pt;padding:0in;background:#EFF0F1">+ KBUILD_EXTRA_SYMBOLS=/usr/lib/modules/4.4.0+2/extra/kpatch/Module.symvers<o:p></o:p></span></p>
<p class="MsoNormal" style="background:#EFF0F1;vertical-align:baseline"><span style="font-size:10.0pt;font-family:Consolas;color:#242729;border:none windowtext 1.0pt;padding:0in;background:#EFF0F1">+ KPATCH_LDFLAGS=<o:p></o:p></span></p>
<p class="MsoNormal" style="background:#EFF0F1;vertical-align:baseline"><span style="font-size:10.0pt;font-family:Consolas;color:#242729;border:none windowtext 1.0pt;padding:0in;background:#EFF0F1">+ make</span><span style="font-size:10.0pt;font-family:Consolas;color:#242729"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">This is where it’s failing. The script comparison is with “139” which is SIGSEGV. I don’t see<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">any core files either in the working directory.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Questions are<o:p></o:p></span></p>
<ol style="margin-top:0in" start="1" type="1">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1"><span style="font-size:11.0pt">Is building live patches for older version using docker a good idea?<o:p></o:p></span></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1"><span style="font-size:11.0pt">Is building live patch on actual VM instead of docker recommended?<o:p></o:p></span></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1"><span style="font-size:11.0pt">Is the Makefile target missing error, known bug? I would like to open a bug<o:p></o:p></span></li></ol>
<p class="MsoNormal" style="margin-left:.25in"><span style="font-size:11.0pt">If possible. Or am I missing something here?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">-Ajey<o:p></o:p></span></p>
</div>
</body>
</html>