From patchwork Tue Apr 18 21:22:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9686415 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D5A56602C2 for ; Tue, 18 Apr 2017 21:23:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C67A82094F for ; Tue, 18 Apr 2017 21:23:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B9996252D5; Tue, 18 Apr 2017 21:23:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47DB2269DA for ; Tue, 18 Apr 2017 21:23:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757999AbdDRVXD (ORCPT ); Tue, 18 Apr 2017 17:23:03 -0400 Received: from mail-co1nam03on0049.outbound.protection.outlook.com ([104.47.40.49]:51241 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757886AbdDRVWM (ORCPT ); Tue, 18 Apr 2017 17:22:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=h3f/coTeQ1KS76hSyraF0xgbRUrP0MlwXVxJgYYUBko=; b=oOSbj0vV648T6cSl2c63FlNB79IYIUiqd3Yz/f3Os5iL8cOFdvMjzr5UUSi3RjaPeqsgEId7Xk2wuAUIADIttGoBmAzoAeE5fAIojcy2R3/cvkwJHKP8bJIAtKRHOBv/icgRENN2FC7dZNgKkhvtmGXBOO2WCwvInynHu3m7jFI= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=amd.com; Received: from tlendack-t1.amdoffice.net (165.204.77.1) by DM5PR12MB1145.namprd12.prod.outlook.com (10.168.236.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.10; Tue, 18 Apr 2017 21:22:04 +0000 From: Tom Lendacky Subject: [PATCH v5 30/32] x86/boot: Add early cmdline parsing for options with arguments To: , , , , , , , , , CC: Rik van Riel , Radim =?utf-8?b?S3LEjW3DocWZ?= , Toshimitsu Kani , Arnd Bergmann , Jonathan Corbet , Matt Fleming , "Michael S. Tsirkin" , Joerg Roedel , Konrad Rzeszutek Wilk , Paolo Bonzini , Larry Woodman , Brijesh Singh , Ingo Molnar , Borislav Petkov , Andy Lutomirski , "H. Peter Anvin" , Andrey Ryabinin , Alexander Potapenko , Dave Young , Thomas Gleixner , Dmitry Vyukov Date: Tue, 18 Apr 2017 16:22:00 -0500 Message-ID: <20170418212200.10190.18044.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <20170418211612.10190.82788.stgit@tlendack-t1.amdoffice.net> References: <20170418211612.10190.82788.stgit@tlendack-t1.amdoffice.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: MWHPR22CA0060.namprd22.prod.outlook.com (10.171.142.22) To DM5PR12MB1145.namprd12.prod.outlook.com (10.168.236.140) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fdea0708-a07f-43c5-7567-08d486a0f795 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(201703131423075)(201703031133081); SRVR:DM5PR12MB1145; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1145; 3:NKTBt9qIqYN91hXqbTM/CNMMu9HxPwi07debB65ntU8dG3Tlg8+8Bbv+hJ6mm7Bg0X9QTT6GJXoQPV/h6L1FTMZa3YgPYyV3myzgHCuIf6/pGeyJsQdWcZ+S2nP0ujdZ4JyR51mjsGLSo56xRR72sqEvXl/2hCXqqYdlcv520Dfms0UXa9KvIcaYpTpn+18nlzvjEb+6gwVoxS2gh4IFVw9uhokgdj8nEqxEwUvXlLJE/Hu0rVX+FalkwA630VmDsBMEn1e2QQNcUZlI2f7Mx3Z/KFaxj5f4S6iOQVPAStAo7XLBwXvgZLicPljJNIJP/3Wp1ZlluUDhg/sGIZcjx1YCcLvRUZjQp+McWBK+Yds=; 25:xW7qRsSwa9UilsRLVAWKU1CUrNTWVtRkyIpJCB1Q92985N/awBcjeMZSlNpWvfOW3akbvKhNUQcBla2eobgXHQwzG4h5FtSj1+iNLaRcX0Kf0fspTxsJYO5IZ8tX7gSX9UOEV2J5tYd8OpwnG4TZ4LnTFRyH3vqRslG80T5RwHH759xPjYeqgUqXCU0X695t/r3adyDX2Qml1TlhfVWITgNbLQF4QdQwI0WkurmYi/AlK8RxcIwmelbJXHoTnAn2fdabkS3LDXXFhwai+F2QfsxOMb5NmRmoegTZnKZ6ht7X2ihy+NG6mHWjKtAfR1WDxwuuuyI1eKbtHE0iPQd4knk8Vr8pDXyTYjkT68N0uwdCt4P4G8j5bRUEiju7wUj3m3kkwwWma71yLQ0cK5gikzPO78+a+NMyQJIOhl/L12qN+gDb6GynJ8SJetT7VAfM+iowwZATjiZmlxv66tnW0w== X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1145; 31:PFESgwkC8yzCj6kXolC3/gR4TFDY+JP4vDm1UWXtEw4wdK8GBv9GZc0J7nirmsB9A6+Rgt2nobiL03dPayu9mxavvkdI7UOA7l5/lt1R8FR/TejNKhPiPR8SXi6dLKbgRMc0wspwvTfUYwZPqzNzVudqd4Iy84Lp2elukKXqpddfFT2Wa3txu2F1RwskPlm08S5xZnN0Psr4Lws4aHEFh3TUCoWTnwOd3/2FIdWz7PBUVTV+dMjWgo7t2khLYAmp; 20:tVtEU179umzekAo/BPREsW/jfqUT59RCUtOKRFiENT4lcJm8Zn8ZOCsHIguEDHPF68QajSWsm2eBQFvjQJito2JKi7Hg3jHyb9+0G8i9tKx31aP4gI5NZjelWhHDXPfACUuP5wp4JNqD2MNhaQpR1fyRP56OFp+XmaLLApruPbroAOgYIkoDSSgUlwVM1Ji6O/nMTP1KVjijpR6veOpYiIpLbHti6h3NE6duOQzN4YcN/NYs/JJPFsFhXV46UgAVl+KIrifpMVDbRkrSNv8zXWwlq1IIB5Tg9YgrGPmTnZhlm0ByC0YJpdh6KBFtOA56mB4UGCj2E2xTI4G0WzZz6tDGWL8kbpXkEeS6FqhK4FtJPlgcfW/SoaMt0bVPoBvAQCKf4DtxCQTsvlIKCYNA/Y6YZ0BLz8JAG6BD9NRM7DoPW58xrKaMSjoyEQIqpPwz4LEe8uxFnNhsXrWhkPRQZOMhGJ2VL0qnzsRnpJsFKDypepmcPD7Z7W99cTjDfVUc X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041248)(20161123555025)(20161123562025)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(6072148); SRVR:DM5PR12MB1145; BCL:0; PCL:0; RULEID:; SRVR:DM5PR12MB1145; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1145; 4:c93KPu1bMldxvHnuP3U6h6Wv712gETgONKfijxKGyHg+f1U61YoxktYJM52569XR0F+xa7Kb7heqK6d3WVETv4rCiyCqCJC/PXin27K9k46WboeFYX5fa35/OBmMr3ukgNfZRCFADvjP2Z1CkMopRoY8rOSy/tJaGKTSKHGijd0PgY1pYTjiGP1f+f3q4JU3tpTjuzK+35bjVsSEhd5nIYDe3NuaJe9uDGL0TwQsJ0eS6953BnfmOmhzTbdLo0BmVTpkYmbjOo9yUYjUjydDRtVQ7y52JVthi5BJPrlRSSzm9LkbaBJ81LOtqVEcun2sAFVskvDjLD4X/qEArXYuPvhEnk2R9o9x6P/RnS+kR7jrTXR8K1ciFDzMOA2pyLWECewv0Q6oo+SIrZEJdznCmX9qHByR4xJIKHKEoEpXYAyCgfpqCWG9g1+04BgVX32rBJVFdojyc8RZrzPSyrRM2X+I7+G2qDfA5/dhTMJhDgsNfcgWDtXxHKoEJKMCc7lB8Lgh8xlkrx13l1r/3OkZxpsses7Tg5FSRQbdDEgFXkwu3076Geegmlzz5w9bpquGw1t/kfYALfioaPwAlKFOo0Ie5HyBLqHAyQSdAWYBFJQcTel94RQsGIoizP4ZKQSCMUOQ0fyEXc3//WHy0NBvz9sDlFQ3nqm/XDSUOUG1aQQCj9i9R65qxFASIhd/DAukrDlTe62VzcT9o7qXE3jajH821q8Mu2D126Q4HoIif8I2QFbrRqrvjmA8v4bBZfnZll411CM8/OwZznzgjPdPhQ== X-Forefront-PRVS: 028166BF91 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39450400003)(39860400002)(39850400002)(39400400002)(39410400002)(39840400002)(230700001)(7416002)(55016002)(54906002)(25786009)(5660300001)(33646002)(3846002)(4326008)(66066001)(1076002)(53936002)(47776003)(7406005)(4001350100001)(6116002)(2201001)(305945005)(7736002)(97746001)(83506001)(189998001)(2906002)(103116003)(86362001)(38730400002)(8676002)(23676002)(76176999)(81166006)(54356999)(6666003)(50986999)(6506006)(53416004)(50466002)(42186005)(2950100002)(9686003)(921003)(71626007)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB1145; H:tlend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m6bOsErKMy1R9op9AxQJnu8+b8bDKdOlA4RpaKkoQe/rPcmqLjPAVDKGBNRxNzdV/4XjjAOd/8lVbNkE2j6ALoji7JQ==; 20:lHx1clYVB1uFYfML8HZWFuTUyTpK34uHgeMz6EdO75Fh4qmSchF+xvh1v/jmKOr1Cn7FZbZO6eIC76IyzAoBru3hlxIAIhou0gqoe3YNFJ20iqmwbHsmMNtYX8jUVK5i2HHeA0Y69rP7qt4jhNUb//WvOzspFIg0hCOm8UMYCqkmF7Ia/hiFuIH/aqG2JM2jmGmR4uRxl/d7ky2SrLUftGGHV8IZB0p+d+breBfM0Q0C5fuOqc4+oeufb+dl3Pbd X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2017 21:22:04.2093 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1145 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a cmdline_find_option() function to look for cmdline options that take arguments. The argument is returned in a supplied buffer and the argument length (regardless of whether it fits in the supplied buffer) is returned, with -1 indicating not found. Signed-off-by: Tom Lendacky --- arch/x86/include/asm/cmdline.h | 2 + arch/x86/lib/cmdline.c | 105 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) diff --git a/arch/x86/include/asm/cmdline.h b/arch/x86/include/asm/cmdline.h index e01f7f7..84ae170 100644 --- a/arch/x86/include/asm/cmdline.h +++ b/arch/x86/include/asm/cmdline.h @@ -2,5 +2,7 @@ #define _ASM_X86_CMDLINE_H int cmdline_find_option_bool(const char *cmdline_ptr, const char *option); +int cmdline_find_option(const char *cmdline_ptr, const char *option, + char *buffer, int bufsize); #endif /* _ASM_X86_CMDLINE_H */ diff --git a/arch/x86/lib/cmdline.c b/arch/x86/lib/cmdline.c index 5cc78bf..3261abb 100644 --- a/arch/x86/lib/cmdline.c +++ b/arch/x86/lib/cmdline.c @@ -104,7 +104,112 @@ static inline int myisspace(u8 c) return 0; /* Buffer overrun */ } +/* + * Find a non-boolean option (i.e. option=argument). In accordance with + * standard Linux practice, if this option is repeated, this returns the + * last instance on the command line. + * + * @cmdline: the cmdline string + * @max_cmdline_size: the maximum size of cmdline + * @option: option string to look for + * @buffer: memory buffer to return the option argument + * @bufsize: size of the supplied memory buffer + * + * Returns the length of the argument (regardless of if it was + * truncated to fit in the buffer), or -1 on not found. + */ +static int +__cmdline_find_option(const char *cmdline, int max_cmdline_size, + const char *option, char *buffer, int bufsize) +{ + char c; + int pos = 0, len = -1; + const char *opptr = NULL; + char *bufptr = buffer; + enum { + st_wordstart = 0, /* Start of word/after whitespace */ + st_wordcmp, /* Comparing this word */ + st_wordskip, /* Miscompare, skip */ + st_bufcpy, /* Copying this to buffer */ + } state = st_wordstart; + + if (!cmdline) + return -1; /* No command line */ + + /* + * This 'pos' check ensures we do not overrun + * a non-NULL-terminated 'cmdline' + */ + while (pos++ < max_cmdline_size) { + c = *(char *)cmdline++; + if (!c) + break; + + switch (state) { + case st_wordstart: + if (myisspace(c)) + break; + + state = st_wordcmp; + opptr = option; + /* fall through */ + + case st_wordcmp: + if ((c == '=') && !*opptr) { + /* + * We matched all the way to the end of the + * option we were looking for, prepare to + * copy the argument. + */ + len = 0; + bufptr = buffer; + state = st_bufcpy; + break; + } else if (c == *opptr++) { + /* + * We are currently matching, so continue + * to the next character on the cmdline. + */ + break; + } + state = st_wordskip; + /* fall through */ + + case st_wordskip: + if (myisspace(c)) + state = st_wordstart; + break; + + case st_bufcpy: + if (myisspace(c)) { + state = st_wordstart; + } else { + /* + * Increment len, but don't overrun the + * supplied buffer and leave room for the + * NULL terminator. + */ + if (++len < bufsize) + *bufptr++ = c; + } + break; + } + } + + if (bufsize) + *bufptr = '\0'; + + return len; +} + int cmdline_find_option_bool(const char *cmdline, const char *option) { return __cmdline_find_option_bool(cmdline, COMMAND_LINE_SIZE, option); } + +int cmdline_find_option(const char *cmdline, const char *option, char *buffer, + int bufsize) +{ + return __cmdline_find_option(cmdline, COMMAND_LINE_SIZE, option, + buffer, bufsize); +}