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-next>] [day] [month] [year] [list]
Message-Id: <20220902122928.632602-1-cezary.rojewski@intel.com>
Date:   Fri,  2 Sep 2022 14:29:26 +0200
From:   Cezary Rojewski <cezary.rojewski@...el.com>
To:     alsa-devel@...a-project.org, broonie@...nel.org
Cc:     tiwai@...e.com, perex@...ex.cz,
        amadeuszx.slawinski@...ux.intel.com,
        pierre-louis.bossart@...ux.intel.com, hdegoede@...hat.com,
        lgirdwood@...il.com, kai.vehmanen@...ux.intel.com,
        peter.ujfalusi@...ux.intel.com, ranjani.sridharan@...ux.intel.com,
        yung-chuan.liao@...ux.intel.com, willy@...radead.org,
        linux-kernel@...r.kernel.org, andy@...nel.org,
        intel-poland@...ists.intel.com, andy.shevchenko@...il.com,
        Cezary Rojewski <cezary.rojewski@...el.com>
Subject: [PATCH v4 0/2] lib/string_helpers: Introduce parse_int_array_user()

Continuation of recent upstream discussion [1] regarding user string
tokenization.

First, parse_int_array_user() is introduced to allow for splitting
specified user string into a sequence of integers. Makes use of
get_options() internally so the parsing logic is not duplicated.

With that done, redundant parts of the sound driver are removed.

Originally similar functionality was added for the SOF sound driver. As
more users are on the horizon, it is desirable to update existing
string_helpers code and provide a unified solution.


Changes in v4:
- renamed the function to parse_int_array_user()
- at the name several local variable names have been reworded to match
  the above

Changes in v3:
- relocated tokenize_user_input() implementation to string_helpers as
  requested by Matthew

Changes in v2:
- reused get_options() so no parsing logic is duplicated
- simplified __user variant with help of memdup_user_nul()
  Both suggested by Andy, thanks for thourough review


[1]: https://lore.kernel.org/alsa-devel/20220707091301.1282291-1-cezary.rojewski@intel.com/


Cezary Rojewski (2):
  lib/string_helpers: Introduce parse_int_array_user()
  ASoC: SOF: Remove strsplit_u32() and tokenize_input()

 include/linux/string_helpers.h    |   2 +
 lib/string_helpers.c              |  45 +++++++++++++
 sound/soc/sof/sof-client-probes.c | 104 ++++++------------------------
 3 files changed, 65 insertions(+), 86 deletions(-)

-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ