lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 12 Sep 2023 11:18:13 +0100
From:   Ian Abbott <abbotti@....co.uk>
To:     Benjamin Gray <bgray@...ux.ibm.com>, linux-ia64@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
        llvm@...ts.linux.dev, linux-pm@...r.kernel.org,
        bpf@...r.kernel.org, linux-kselftest@...r.kernel.org
Cc:     Jonathan Corbet <corbet@....net>,
        H Hartley Sweeten <hsweeten@...ionengravers.com>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Tom Rix <trix@...hat.com>, Jan Kiszka <jan.kiszka@...mens.com>,
        Kieran Bingham <kbingham@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Ian Rogers <irogers@...gle.com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        linux-perf-users@...r.kernel.org,
        Todd E Brandt <todd.e.brandt@...ux.intel.com>,
        Andrii Nakryiko <andrii@...nel.org>,
        Mykola Lysenko <mykolal@...com>, Shuah Khan <shuah@...nel.org>
Subject: Re: [PATCH v2 3/7] drivers/comedi: fix Python string escapes

On 12/09/2023 07:07, Benjamin Gray wrote:
> Python 3.6 introduced a DeprecationWarning for invalid escape sequences.
> This is upgraded to a SyntaxWarning in Python 3.12, and will eventually
> be a syntax error.
> 
> Fix these now to get ahead of it before it's an error.
> 
> Signed-off-by: Benjamin Gray <bgray@...ux.ibm.com>
> ---
>   drivers/comedi/drivers/ni_routing/tools/convert_csv_to_c.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/comedi/drivers/ni_routing/tools/convert_csv_to_c.py b/drivers/comedi/drivers/ni_routing/tools/convert_csv_to_c.py
> index 90378fb50580..d19101fc2a94 100755
> --- a/drivers/comedi/drivers/ni_routing/tools/convert_csv_to_c.py
> +++ b/drivers/comedi/drivers/ni_routing/tools/convert_csv_to_c.py
> @@ -44,7 +44,7 @@ def routedict_to_structinit_single(name, D, return_name=False):
>   
>       lines.append('\t\t[B({})] = {{'.format(D0_sig))
>       for D1_sig, value in D1:
> -      if not re.match('[VIU]\([^)]*\)', value):
> +      if not re.match(r'[VIU]\([^)]*\)', value):
>           sys.stderr.write('Invalid register format: {}\n'.format(repr(value)))
>           sys.stderr.write(
>             'Register values should be formatted with V(),I(),or U()\n')

Looks good thanks!  I ran the modified script using 'make everything' in 
the directory (after setting up a python venv to install ctypesgen) and 
it didn't break anything. (There were some harmless errors output by 
ctypesgen due to failing to parse some GCC extensions, but those are 
nothing to do with this patch and the generated C files are OK.)

Reviewed-by: Ian Abbott <abbotti@....co.uk>

-- 
-=( Ian Abbott <abbotti@....co.uk> || MEV Ltd. is a company  )=-
-=( registered in England & Wales.  Regd. number: 02862268.  )=-
-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
-=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ