<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div>Hi Li,</div><br><div>Thanks for the review and pointing to the Richard's update, haven't seen that before. </div><br><div>Regards,</div><div>Bogdan</div><br><div class="gmail_quote_attribution">On Dec 31 2020, at 6:01 am, Li Wang <liwang@redhat.com> wrote:</div><blockquote><div><div><div class="gmail_default"><font style="font-size:small">Hi Bogdan,</font></div></div><br><img class="mailspring-open" alt="Sent from Mailspring" width="0" height="0" style="border:0; width:0; height:0;" src="https://link.getmailspring.com/open/96F5BFE2-CF01-480E-B607-807A87003ABF@getmailspring.com?me=bf88d46f&recipient=bHRwQGxpc3RzLmxpbnV4Lml0"><div class="gmail_quote"><div class="gmail_attr"><div>On Wed, Dec 30, 2020 at 11:49 PM Bogdan Lezhepekov via ltp <<a href="mailto:ltp@lists.linux.it" title="mailto:ltp@lists.linux.it">ltp@lists.linux.it</a>> wrote:</div></div><blockquote><div>Macros PATH_TMP_CG_CST and PATH_TMP_CG_MEM defined cgroup</div><div>temporary directory paths to be in /tmp that can be a mount point.</div><br><div>Enable an option to set PATH_TMP_CG_CST and PATH_TMP_CG_MEM</div><div>through TMPDIR environment variable keeping old paths as default ones.</div><br><div>Signed-off-by: Bogdan Lezhepekov <<a href="mailto:bogdan.lezhepekov@suse.com" title="mailto:bogdan.lezhepekov@suse.com">bogdan.lezhepekov@suse.com</a>></div><div>---</div><div> include/tst_cgroup.h | 5 +++--</div><div> 1 file changed, 3 insertions(+), 2 deletions(-)</div><br><div>diff --git a/include/tst_cgroup.h b/include/tst_cgroup.h</div><div>index bfd848260..0f7db5487 100644</div><div>--- a/include/tst_cgroup.h</div><div>+++ b/include/tst_cgroup.h</div><div>@@ -7,8 +7,9 @@</div><div> #ifndef TST_CGROUP_H</div><div> #define TST_CGROUP_H</div><br><div>-#define PATH_TMP_CG_MEM        "/tmp/cgroup_mem"</div><div>-#define PATH_TMP_CG_CST        "/tmp/cgroup_cst"</div><div>+#define PATH_BASE (getenv("TMPDIR") ? getenv("TMPDIR") : "/tmp")</div><div>+#define PATH_TMP_CG_CST (strcat(PATH_BASE, "/cgroup_cst"))</div><div>+#define PATH_TMP_CG_MEM (strcat(PATH_BASE, "/cgroup_mem"))</div></blockquote><div><br></div><div><div class="gmail_default"><font style="font-size:small">As described on strcat() manual page, the potential risk is that buffer overruns might cause an unpredictable problem.</font></div></div><div class="gmail_default"><br></div><div class="gmail_default"><font style="font-size:small">I won't like to merge this patch because, Richard raised a new method to refactor the whole CGroup API. And the patchset is pending on reviewing.</font></div><div class="gmail_default"><br></div><div class="gmail_default"><div><font style="font-size:small"><a href="http://lists.linux.it/pipermail/ltp/2020-December/020274.html" title="http://lists.linux.it/pipermail/ltp/2020-December/020274.html">http://lists.linux.it/pipermail/ltp/2020-December/020274.html</a></font></div></div></div><div><br></div><div>--</div><div><div><div><div>Regards,</div></div><div><div>Li Wang</div></div></div></div></div></blockquote>