Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1191914imm; Tue, 5 Jun 2018 10:26:29 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKB232ExhRlFP9fcs29kpslUgA50kKh8uOdC7xms6hqVAlXKr2gNOf9UABn70toAMGwT6/Y X-Received: by 2002:a17:902:778e:: with SMTP id o14-v6mr16078780pll.214.1528219589365; Tue, 05 Jun 2018 10:26:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528219589; cv=none; d=google.com; s=arc-20160816; b=Ny7NT63dlByA31dvURH9RVETVfxTOWYykllDov/CSfcGrhe+uE6huRx+2+IOSKV2lh fG7ca9S8rtKxy+Cb2G5XV1obVAewLv4zML6q7xwa1nxdC25r4jf003KFBHTv1X4uxB8c X2acmvy2sMCBVSJwuZNBYqB6I2Zjn56PZZiOTQS53Tubz7RP4bvloxpjjpXm3lkLYr6X ZfwgHmv9fk2B85pI7SxqRuB+ZWz0rClnrWVRl0XNM01qQo1KTPZAGtBihK+SDG8fAKuU S0FXuvTWtmd2BZ0KVhz4jTDySJYe0vwq2IB41R0L5uCKPzjfsSUf9MZ31mv2XfnW821l aj6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=lZmPIFBMGUOhc7TNZULT3btbtHqw81qUPUuREgIOxpo=; b=qbZqt6TZ1Xe8Q+rvV7gIbWi6Q5O+B/MWxl0rQwxqn+JcQ+mNXT7yV3KNUaNrCFjdRL xXaEAXu1UlO867Jfa9WS3YY8Zoswu849IPpIzfCv08XF7KylZKra1mr8EOHohJaIaNJj xma5VYGfXbcZD2plzENvKfBLpCHzTRRY872jcU1nyv0qYgfqHue9h2RgsMKvE7L4Uu0d sO0T2KO4Iyh86phKIUx2zAmjDJWBI0zA5sInuqtWqtcte2DdQl88Zxuv7sdb2n13l6iB NmWLTs4v6Xmtb5xw89ce+XQ8rz4IeAZVcmQgxxtVs06Hu2M+ekCIALWkucVMDYNTpM6f I7Vg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v184-v6si23461614pgb.117.2018.06.05.10.26.14; Tue, 05 Jun 2018 10:26:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752377AbeFERZx (ORCPT + 99 others); Tue, 5 Jun 2018 13:25:53 -0400 Received: from mx2.suse.de ([195.135.220.15]:54191 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752028AbeFERZv (ORCPT ); Tue, 5 Jun 2018 13:25:51 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id AD627AC3B; Tue, 5 Jun 2018 17:25:49 +0000 (UTC) Date: Tue, 5 Jun 2018 19:25:48 +0200 From: Michal =?UTF-8?B?U3VjaMOhbmVr?= To: Andy Shevchenko Cc: Jonathan Corbet , Arnd Bergmann , Frederic Weisbecker , Ingo Molnar , Aaron Wu , Tony Luck , Andrew Morton , Thomas Gleixner , "Steven Rostedt," , Laura Abbott , Dominik Brodowski , Alexey Dobriyan , Tom Lendacky , Jeffrey Hugo , Baoquan He , Ilya Matveychikov , Linux Documentation List , Linux Kernel Mailing List Subject: Re: [PATCH v10 0/5] Kernel parameter parser cleanup/enhancement Message-ID: <20180605192548.4ff64b3e@kitsune.suse.cz> In-Reply-To: References: Organization: SUSE Linux X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 5 Jun 2018 20:05:50 +0300 Andy Shevchenko wrote: > On Tue, Jun 5, 2018 at 7:43 PM, Michal Suchanek > wrote: > > Hello, > > > > due to work on the fadump_extra_args I looked at the kernel > > parameter parser and found its grammar rather curious. > > > > It supports double quotes but not any other quoting characters so > > double quotes cannot be quoted. What's more, the quotes can be > > anywhere in the parameter name or value and are interpteted but are > > removed only from start and end of the parameter value. > > > > These are the patches not specific to fadump which somewhat > > straighten the qouting grammar to make it on par with common shell > > interpreters. > > I didn't notice any use of string_unescape_*() functionality. So, your > patch is kinda very specific to some narrow subset of escaping and > unescaping stuff. It does what it says. It cannot use string_unescape because it needs to determine the boundaries of quoted strings. > Thus, it's still not on par with shell, right? It does not interpret special character sequences other than quoting. The feature would not be hard to add but I do not see the need. Unfortunately, the existing string_unescape is totally not fitting to be integrated into the parser for the purpose. Thanks Michal > > > > > Specifically double and single quotes can be used for quoting as > > well as backslashes with the usual shell semantic. All quoting > > characters are removed while the parameters are parsed. > >