Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/49879/?format=api
http://patches.dpdk.org/api/patches/49879/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/e749b4c6e38c0f87bbef130aabdf1d1aa6b90d2c.1547640738.git.anatoly.burakov@intel.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<e749b4c6e38c0f87bbef130aabdf1d1aa6b90d2c.1547640738.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/e749b4c6e38c0f87bbef130aabdf1d1aa6b90d2c.1547640738.git.anatoly.burakov@intel.com", "date": "2019-01-16T12:12:53", "name": "eal: check string parameter lengths", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "61bada95e27bebc86a55f4105b04c1a33d5cb85a", "submitter": { "id": 4, "url": "http://patches.dpdk.org/api/people/4/?format=api", "name": "Anatoly Burakov", "email": "anatoly.burakov@intel.com" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/e749b4c6e38c0f87bbef130aabdf1d1aa6b90d2c.1547640738.git.anatoly.burakov@intel.com/mbox/", "series": [ { "id": 3211, "url": "http://patches.dpdk.org/api/series/3211/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=3211", "date": "2019-01-16T12:12:53", "name": "eal: check string parameter lengths", "version": 1, "mbox": "http://patches.dpdk.org/series/3211/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/49879/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/49879/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E69EF1041;\n\tWed, 16 Jan 2019 13:13:05 +0100 (CET)", "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n\tby dpdk.org (Postfix) with ESMTP id 9993EDE3;\n\tWed, 16 Jan 2019 13:13:01 +0100 (CET)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t16 Jan 2019 04:12:59 -0800", "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby fmsmga006.fm.intel.com with ESMTP; 16 Jan 2019 04:12:58 -0800", "from sivswdev05.ir.intel.com (sivswdev05.ir.intel.com\n\t[10.243.17.64])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tx0GCCvop022173; Wed, 16 Jan 2019 12:12:57 GMT", "from sivswdev05.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev05.ir.intel.com with ESMTP id x0GCCvcw002918;\n\tWed, 16 Jan 2019 12:12:57 GMT", "(from aburakov@localhost)\n\tby sivswdev05.ir.intel.com with LOCAL id x0GCCrZN002910;\n\tWed, 16 Jan 2019 12:12:53 GMT" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.56,486,1539673200\"; d=\"scan'208\";a=\"310884365\"", "From": "Anatoly Burakov <anatoly.burakov@intel.com>", "To": "dev@dpdk.org", "Cc": "thomas@monjalon.net, yuwei1.zhang@intel.com, bruce.richardson@intel.com, \n\tstable@dpdk.org", "Date": "Wed, 16 Jan 2019 12:12:53 +0000", "Message-Id": "<e749b4c6e38c0f87bbef130aabdf1d1aa6b90d2c.1547640738.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 1.7.0.7", "Subject": "[dpdk-dev] [PATCH] eal: check string parameter lengths", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "When specifying parameters such as hugefile prefix from the\ncommand-line, it is possibly to supply an empty string. This may\nlead to various problems: for example, if hugefile prefix is\nempty, the runtime config path construction may end up\nlooking like \"/var/run/dpdk//_config\", which will technically\nwork, but is wrong and places files in the wrong place.\n\nTo fix it, check lengths of such user-specified parameters for\nhugefile prefix, as well as hugepage dir and user-specified\nmbuf pool ops string.\n\nCc: stable@dpdk.org\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n lib/librte_eal/common/eal_common_options.c | 15 +++++++++++++++\n 1 file changed, 15 insertions(+)", "diff": "diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c\nindex 3796dbf48..02de3b73e 100644\n--- a/lib/librte_eal/common/eal_common_options.c\n+++ b/lib/librte_eal/common/eal_common_options.c\n@@ -1408,6 +1408,21 @@ eal_check_common_options(struct internal_config *internal_cfg)\n \t\tRTE_LOG(ERR, EAL, \"Invalid process type specified\\n\");\n \t\treturn -1;\n \t}\n+\tif (internal_cfg->hugefile_prefix != NULL &&\n+\t\t\tstrlen(internal_cfg->hugefile_prefix) < 1) {\n+\t\tRTE_LOG(ERR, EAL, \"Invalid length of --\" OPT_FILE_PREFIX \" option\\n\");\n+\t\treturn -1;\n+\t}\n+\tif (internal_cfg->hugepage_dir != NULL &&\n+\t\t\tstrlen(internal_cfg->hugepage_dir) < 1) {\n+\t\tRTE_LOG(ERR, EAL, \"Invalid length of --\" OPT_HUGE_DIR\" option\\n\");\n+\t\treturn -1;\n+\t}\n+\tif (internal_cfg->user_mbuf_pool_ops_name != NULL &&\n+\t\t\tstrlen(internal_cfg->user_mbuf_pool_ops_name) < 1) {\n+\t\tRTE_LOG(ERR, EAL, \"Invalid length of --\" OPT_MBUF_POOL_OPS_NAME\" option\\n\");\n+\t\treturn -1;\n+\t}\n \tif (index(eal_get_hugefile_prefix(), '%') != NULL) {\n \t\tRTE_LOG(ERR, EAL, \"Invalid char, '%%', in --\"OPT_FILE_PREFIX\" \"\n \t\t\t\"option\\n\");\n", "prefixes": [] }{ "id": 49879, "url": "