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]
Message-ID: <eb87d3e8-a3fa-2359-24dc-012ee10543d8@paragon-software.com>
Date:   Wed, 15 Feb 2023 17:36:46 +0400
From:   Konstantin Komarov <almaz.alexandrovich@...agon-software.com>
To:     <ntfs3@...ts.linux.dev>
CC:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        <linux-fsdevel@...r.kernel.org>
Subject: [PATCH 05/11] fs/ntfs3: Undo endian changes

sbi->mft.reserved_bitmap is in-memory (not on-disk!) bitmap.
Assumed cpu endian is faster than fixed endian.

Signed-off-by: Konstantin Komarov <almaz.alexandrovich@...agon-software.com>
---
  fs/ntfs3/fsntfs.c | 11 +++++------
  1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/fs/ntfs3/fsntfs.c b/fs/ntfs3/fsntfs.c
index d888ba14237f..9ed9dd0d8edf 100644
--- a/fs/ntfs3/fsntfs.c
+++ b/fs/ntfs3/fsntfs.c
@@ -646,13 +646,13 @@ int ntfs_look_free_mft(struct ntfs_sb_info *sbi, 
CLST *rno, bool mft,
                           NULL, 0, NULL, NULL))
                      goto next;

-                __clear_bit_le(ir - MFT_REC_RESERVED,
+                __clear_bit(ir - MFT_REC_RESERVED,
                          &sbi->mft.reserved_bitmap);
              }
          }

          /* Scan 5 bits for zero. Bit 0 == MFT_REC_RESERVED */
-        zbit = find_next_zero_bit_le(&sbi->mft.reserved_bitmap,
+        zbit = find_next_zero_bit(&sbi->mft.reserved_bitmap,
                        MFT_REC_FREE, MFT_REC_RESERVED);
          if (zbit >= MFT_REC_FREE) {
              sbi->mft.next_reserved = MFT_REC_FREE;
@@ -720,7 +720,7 @@ int ntfs_look_free_mft(struct ntfs_sb_info *sbi, 
CLST *rno, bool mft,
      if (*rno >= MFT_REC_FREE)
          wnd_set_used(wnd, *rno, 1);
      else if (*rno >= MFT_REC_RESERVED && sbi->mft.reserved_bitmap_inited)
-        __set_bit_le(*rno - MFT_REC_RESERVED, &sbi->mft.reserved_bitmap);
+        __set_bit(*rno - MFT_REC_RESERVED, &sbi->mft.reserved_bitmap);

  out:
      if (!mft)
@@ -748,7 +748,7 @@ void ntfs_mark_rec_free(struct ntfs_sb_info *sbi, 
CLST rno, bool is_mft)
          else
              wnd_set_free(wnd, rno, 1);
      } else if (rno >= MFT_REC_RESERVED && 
sbi->mft.reserved_bitmap_inited) {
-        __clear_bit_le(rno - MFT_REC_RESERVED, &sbi->mft.reserved_bitmap);
+        __clear_bit(rno - MFT_REC_RESERVED, &sbi->mft.reserved_bitmap);
      }

      if (rno < wnd_zone_bit(wnd))
@@ -846,9 +846,8 @@ void ntfs_update_mftmirr(struct ntfs_sb_info *sbi, 
int wait)
  {
      int err;
      struct super_block *sb = sbi->sb;
-    u32 blocksize;
+    u32 blocksize, bytes;
      sector_t block1, block2;
-    u32 bytes;

      if (!sb)
          return;
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ