Patches for NTFS: mmap() and Shadow File

PARMELAN Edouard (parmee@postecss.ncrfran.france.ncr.com)
Wed, 17 Jun 98 14:16:00 PDT


Hi Martin,
Hi everybody,
[This mail is cross posted to linux-ntfs and linux-kernel]

I have found two bugs in the NTFS driver for Linux (and 44bsd).
I also change the beavior of posix=0 for Linux-2.1.

1 - Shadow Files:
Symptom:
* my Mirror/Linux/kernel/v2.1 directory shows only one
file with ls [ie readdir()] but I can acces all files
only if I know each name.
* after a while, the linux kernel OOPS in free_inode().

Explanation:
* I found two memory corruptions with insert in an array,
the correction is to use memmove() in place of memcpy().

2 - mmap() SIGBUS:
Symptom:
* when I grep on NTFS files, I got a SIGBUS. Looking in
grep 2.2 sources, I found that it uses mmap() since grep 2.1.

Explanation:
* The function generic_file_map() use s_blocksize_bits
to setup the number of blocks, call ntfs_bmap() and send the
requests to ll_wr_block() with s_blocksize. But the NTFS
driver setups s_blocksize_bits from s_blocksize with one
more bit so 512 give 10 in place of 9.

3 - Change behavior of posix=0:
* The NTFS driver changes the mixedcase filenames to
lowercase ones with posix=0. With posix=1, filenames are
unchanged but the driver shows also short names.
I change the behavior of posix=0 for Linux-2.1:
long names are no longer lowercase.

The following file patches.tar.gz contains 3 patches files:

[[ PATCHE~1.GZ : 3081 dans PATCHE~1.GZ ]]
linux-ntfs.patch:
Shadow files and mmap() patches for linux-2.1.106

linux-ntfs-nolower.patch:
Change behavior of posix=0 for linux-2.1.106

ntfs-980526.patch:
Shadow files and mmap() patches for ntfs-980526.

Edouard.

PS: Martin, could you send these patches to Linus
with your latest release of the NTFS driver ?

---
Sorry, I am no longer in the mailing-list due to the
NCR Internet policy. Please, answer directly to
Edouard.Parmelan@France.NCR.COM

The following binary file has been uuencoded to ensure successful
transmission. Use UUDECODE to extract.

begin 600 PATCHE~1.GZ
M'XL(`````````^U7;6_;-A#N5_M7W%*T?I'DB)(EVW)EI%VRKL/6`+6+`NL*
M0[:HF(@L&9*<)AOZWW<DK5A^28)T:3.@N@1B1-Z=^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<!>BW8/C=9]`)9SI"3QE-6-4\`765S]>,RBE"99`[E55I@Y
MG4\75W46Q=J`NT\5IA"U^*JN%\?3>!EE&FLTD6"O[>?Q!;V_@U7=A93]36,L
MJMP95V&3948;J^9@PTQ1-B93+*HM3M\N?_0%^)[%P8OG#GANHPW\5M+"NCB8
M8M.Q$X6U2K*,0I9F"E=#./L7U)THW-M!'H7-W6EB=\UB:%9F,C`[WCYR@T^M
M:8A7%WN`U7B;*G[%Y61:?:1NM]"]WM'M$@($+X7NZ&1]RKM&1^V"(@>>:DES
M;R)L&>;(9A3.:1+1D!-;!A[X]()A.S`)X^DY;V$\T83`*E"2W-.)-DC'0H5'
MWKV(0VVPTN`3O"&5'<F6IKKU/IZP+.5M2Y\-!BYIX#&YGQW\Y`+)C7FSN$=/
MWH:49NOYNM1#K-N>&[=V%!M.L)/@VC]P!Y"?7,NPOUD#<`?_F\2V5OQOD(YM
M(O\3NU/R_W<161&3)10.PN$TQ@H?Y40OJM3&E"A^-QI4AEC(_L#_!@TL?J9C
M]IRVO2Y^N]XJ'_`?+%'\L!<PG';7(59)\27%_Q>*WSK0@G$-79*Y.('%F9WC
M7%RL#)%3Q6DVP2!.VW#,]M9IWE#?/,P66O0*3&Z*TRR'%9/?S<3P_^-BV8&P
MK^]`;DD3V4D3N2U-9#=-NF,21S?WIHGL39/A&.UUFGI&6]P[,90-UX,W7(]-
>>J644DHII9122BFEE%)**:64\H/)O[^RSD4`*```
`
end

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu