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]
Date:   Wed, 28 Jun 2023 02:14:36 +0100
From:   linux@...blig.org
To:     sfrench@...ba.org, linkinjeon@...nel.org,
        linux-cifs@...r.kernel.org
Cc:     jfs-discussion@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
        "Dr. David Alan Gilbert" <linux@...blig.org>
Subject: [PATCH 0/3] dedupe smb unicode files

From: "Dr. David Alan Gilbert" <linux@...blig.org>

The smb client and server code have (mostly) duplicated code
for unicode manipulation, in particular upper case handling.

Flatten this lot into shared code.

There's some code that's slightly different between the two, and
I've not attempted to share that - this should be strictly a no
behaviour change set.

I'd love to also boil out the same code from fs/jfs/ - but that's
a thought for another time (and harder since there's no good test
for it).

Lightly tested with a module and a monolithic build, and just mounting
itself.

This dupe was found using PMD:
  https://pmd.github.io/pmd/pmd_userdocs_cpd.html

Dave

Dr. David Alan Gilbert (3):
  fs/smb: Remove unicode 'lower' tables
  fs/smb: Swing unicode common code from server->common
  fs/smb/client: Use common code in client

 fs/smb/client/cifs_unicode.c                  |   1 -
 fs/smb/client/cifs_unicode.h                  | 313 +-----------------
 fs/smb/client/cifs_uniupr.h                   | 239 -------------
 fs/smb/common/Makefile                        |   1 +
 .../uniupr.h => common/cifs_unicode_common.c} | 156 +--------
 fs/smb/common/cifs_unicode_common.h           | 279 ++++++++++++++++
 fs/smb/server/unicode.c                       |   1 -
 fs/smb/server/unicode.h                       | 301 +----------------
 8 files changed, 298 insertions(+), 993 deletions(-)
 delete mode 100644 fs/smb/client/cifs_uniupr.h
 rename fs/smb/{server/uniupr.h => common/cifs_unicode_common.c} (50%)
 create mode 100644 fs/smb/common/cifs_unicode_common.h

-- 
2.41.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ