370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 1) // SPDX-License-Identifier: GPL-2.0-or-later
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 2) /*
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 3) * Copyright (C) 2012-2013 Samsung Electronics Co., Ltd.
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 4) */
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 5)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 6) #include <linux/string.h>
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 7) #include <linux/slab.h>
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 8) #include <linux/buffer_head.h>
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 9) #include <asm/unaligned.h>
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 10)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 11) #include "exfat_raw.h"
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 12) #include "exfat_fs.h"
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 13)
9e456aeaacb6b (Namjae Jeon 2020-08-14 11:03:46 +0900 14) /* Upcase table macro */
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 15) #define EXFAT_NUM_UPCASE (2918)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 16) #define UTBL_COUNT (0x10000)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 17)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 18) /*
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 19) * Upcase table in compressed format (7.2.5.1 Recommended Up-case Table
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 20) * in exfat specification, See:
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 21) * https://docs.microsoft.com/en-us/windows/win32/fileio/exfat-specification).
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 22) */
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 23) static const unsigned short uni_def_upcase[EXFAT_NUM_UPCASE] = {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 24) 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 25) 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 26) 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 27) 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 28) 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 29) 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 30) 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 31) 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 32) 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 33) 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 34) 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 35) 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 36) 0x0060, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 37) 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 38) 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 39) 0x0058, 0x0059, 0x005a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 40) 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 41) 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 42) 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 43) 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 44) 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 45) 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 46) 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 47) 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 48) 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 49) 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 50) 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 51) 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 52) 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 53) 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 54) 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00f7,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 55) 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x0178,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 56) 0x0100, 0x0100, 0x0102, 0x0102, 0x0104, 0x0104, 0x0106, 0x0106,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 57) 0x0108, 0x0108, 0x010a, 0x010a, 0x010c, 0x010c, 0x010e, 0x010e,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 58) 0x0110, 0x0110, 0x0112, 0x0112, 0x0114, 0x0114, 0x0116, 0x0116,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 59) 0x0118, 0x0118, 0x011a, 0x011a, 0x011c, 0x011c, 0x011e, 0x011e,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 60) 0x0120, 0x0120, 0x0122, 0x0122, 0x0124, 0x0124, 0x0126, 0x0126,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 61) 0x0128, 0x0128, 0x012a, 0x012a, 0x012c, 0x012c, 0x012e, 0x012e,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 62) 0x0130, 0x0131, 0x0132, 0x0132, 0x0134, 0x0134, 0x0136, 0x0136,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 63) 0x0138, 0x0139, 0x0139, 0x013b, 0x013b, 0x013d, 0x013d, 0x013f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 64) 0x013f, 0x0141, 0x0141, 0x0143, 0x0143, 0x0145, 0x0145, 0x0147,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 65) 0x0147, 0x0149, 0x014a, 0x014a, 0x014c, 0x014c, 0x014e, 0x014e,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 66) 0x0150, 0x0150, 0x0152, 0x0152, 0x0154, 0x0154, 0x0156, 0x0156,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 67) 0x0158, 0x0158, 0x015a, 0x015a, 0x015c, 0x015c, 0x015e, 0x015e,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 68) 0x0160, 0x0160, 0x0162, 0x0162, 0x0164, 0x0164, 0x0166, 0x0166,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 69) 0x0168, 0x0168, 0x016a, 0x016a, 0x016c, 0x016c, 0x016e, 0x016e,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 70) 0x0170, 0x0170, 0x0172, 0x0172, 0x0174, 0x0174, 0x0176, 0x0176,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 71) 0x0178, 0x0179, 0x0179, 0x017b, 0x017b, 0x017d, 0x017d, 0x017f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 72) 0x0243, 0x0181, 0x0182, 0x0182, 0x0184, 0x0184, 0x0186, 0x0187,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 73) 0x0187, 0x0189, 0x018a, 0x018b, 0x018b, 0x018d, 0x018e, 0x018f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 74) 0x0190, 0x0191, 0x0191, 0x0193, 0x0194, 0x01f6, 0x0196, 0x0197,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 75) 0x0198, 0x0198, 0x023d, 0x019b, 0x019c, 0x019d, 0x0220, 0x019f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 76) 0x01a0, 0x01a0, 0x01a2, 0x01a2, 0x01a4, 0x01a4, 0x01a6, 0x01a7,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 77) 0x01a7, 0x01a9, 0x01aa, 0x01ab, 0x01ac, 0x01ac, 0x01ae, 0x01af,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 78) 0x01af, 0x01b1, 0x01b2, 0x01b3, 0x01b3, 0x01b5, 0x01b5, 0x01b7,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 79) 0x01b8, 0x01b8, 0x01ba, 0x01bb, 0x01bc, 0x01bc, 0x01be, 0x01f7,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 80) 0x01c0, 0x01c1, 0x01c2, 0x01c3, 0x01c4, 0x01c5, 0x01c4, 0x01c7,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 81) 0x01c8, 0x01c7, 0x01ca, 0x01cb, 0x01ca, 0x01cd, 0x01cd, 0x01cf,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 82) 0x01cf, 0x01d1, 0x01d1, 0x01d3, 0x01d3, 0x01d5, 0x01d5, 0x01d7,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 83) 0x01d7, 0x01d9, 0x01d9, 0x01db, 0x01db, 0x018e, 0x01de, 0x01de,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 84) 0x01e0, 0x01e0, 0x01e2, 0x01e2, 0x01e4, 0x01e4, 0x01e6, 0x01e6,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 85) 0x01e8, 0x01e8, 0x01ea, 0x01ea, 0x01ec, 0x01ec, 0x01ee, 0x01ee,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 86) 0x01f0, 0x01f1, 0x01f2, 0x01f1, 0x01f4, 0x01f4, 0x01f6, 0x01f7,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 87) 0x01f8, 0x01f8, 0x01fa, 0x01fa, 0x01fc, 0x01fc, 0x01fe, 0x01fe,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 88) 0x0200, 0x0200, 0x0202, 0x0202, 0x0204, 0x0204, 0x0206, 0x0206,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 89) 0x0208, 0x0208, 0x020a, 0x020a, 0x020c, 0x020c, 0x020e, 0x020e,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 90) 0x0210, 0x0210, 0x0212, 0x0212, 0x0214, 0x0214, 0x0216, 0x0216,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 91) 0x0218, 0x0218, 0x021a, 0x021a, 0x021c, 0x021c, 0x021e, 0x021e,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 92) 0x0220, 0x0221, 0x0222, 0x0222, 0x0224, 0x0224, 0x0226, 0x0226,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 93) 0x0228, 0x0228, 0x022a, 0x022a, 0x022c, 0x022c, 0x022e, 0x022e,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 94) 0x0230, 0x0230, 0x0232, 0x0232, 0x0234, 0x0235, 0x0236, 0x0237,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 95) 0x0238, 0x0239, 0x2c65, 0x023b, 0x023b, 0x023d, 0x2c66, 0x023f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 96) 0x0240, 0x0241, 0x0241, 0x0243, 0x0244, 0x0245, 0x0246, 0x0246,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 97) 0x0248, 0x0248, 0x024a, 0x024a, 0x024c, 0x024c, 0x024e, 0x024e,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 98) 0x0250, 0x0251, 0x0252, 0x0181, 0x0186, 0x0255, 0x0189, 0x018a,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 99) 0x0258, 0x018f, 0x025a, 0x0190, 0x025c, 0x025d, 0x025e, 0x025f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 100) 0x0193, 0x0261, 0x0262, 0x0194, 0x0264, 0x0265, 0x0266, 0x0267,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 101) 0x0197, 0x0196, 0x026a, 0x2c62, 0x026c, 0x026d, 0x026e, 0x019c,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 102) 0x0270, 0x0271, 0x019d, 0x0273, 0x0274, 0x019f, 0x0276, 0x0277,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 103) 0x0278, 0x0279, 0x027a, 0x027b, 0x027c, 0x2c64, 0x027e, 0x027f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 104) 0x01a6, 0x0281, 0x0282, 0x01a9, 0x0284, 0x0285, 0x0286, 0x0287,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 105) 0x01ae, 0x0244, 0x01b1, 0x01b2, 0x0245, 0x028d, 0x028e, 0x028f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 106) 0x0290, 0x0291, 0x01b7, 0x0293, 0x0294, 0x0295, 0x0296, 0x0297,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 107) 0x0298, 0x0299, 0x029a, 0x029b, 0x029c, 0x029d, 0x029e, 0x029f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 108) 0x02a0, 0x02a1, 0x02a2, 0x02a3, 0x02a4, 0x02a5, 0x02a6, 0x02a7,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 109) 0x02a8, 0x02a9, 0x02aa, 0x02ab, 0x02ac, 0x02ad, 0x02ae, 0x02af,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 110) 0x02b0, 0x02b1, 0x02b2, 0x02b3, 0x02b4, 0x02b5, 0x02b6, 0x02b7,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 111) 0x02b8, 0x02b9, 0x02ba, 0x02bb, 0x02bc, 0x02bd, 0x02be, 0x02bf,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 112) 0x02c0, 0x02c1, 0x02c2, 0x02c3, 0x02c4, 0x02c5, 0x02c6, 0x02c7,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 113) 0x02c8, 0x02c9, 0x02ca, 0x02cb, 0x02cc, 0x02cd, 0x02ce, 0x02cf,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 114) 0x02d0, 0x02d1, 0x02d2, 0x02d3, 0x02d4, 0x02d5, 0x02d6, 0x02d7,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 115) 0x02d8, 0x02d9, 0x02da, 0x02db, 0x02dc, 0x02dd, 0x02de, 0x02df,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 116) 0x02e0, 0x02e1, 0x02e2, 0x02e3, 0x02e4, 0x02e5, 0x02e6, 0x02e7,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 117) 0x02e8, 0x02e9, 0x02ea, 0x02eb, 0x02ec, 0x02ed, 0x02ee, 0x02ef,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 118) 0x02f0, 0x02f1, 0x02f2, 0x02f3, 0x02f4, 0x02f5, 0x02f6, 0x02f7,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 119) 0x02f8, 0x02f9, 0x02fa, 0x02fb, 0x02fc, 0x02fd, 0x02fe, 0x02ff,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 120) 0x0300, 0x0301, 0x0302, 0x0303, 0x0304, 0x0305, 0x0306, 0x0307,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 121) 0x0308, 0x0309, 0x030a, 0x030b, 0x030c, 0x030d, 0x030e, 0x030f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 122) 0x0310, 0x0311, 0x0312, 0x0313, 0x0314, 0x0315, 0x0316, 0x0317,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 123) 0x0318, 0x0319, 0x031a, 0x031b, 0x031c, 0x031d, 0x031e, 0x031f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 124) 0x0320, 0x0321, 0x0322, 0x0323, 0x0324, 0x0325, 0x0326, 0x0327,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 125) 0x0328, 0x0329, 0x032a, 0x032b, 0x032c, 0x032d, 0x032e, 0x032f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 126) 0x0330, 0x0331, 0x0332, 0x0333, 0x0334, 0x0335, 0x0336, 0x0337,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 127) 0x0338, 0x0339, 0x033a, 0x033b, 0x033c, 0x033d, 0x033e, 0x033f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 128) 0x0340, 0x0341, 0x0342, 0x0343, 0x0344, 0x0345, 0x0346, 0x0347,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 129) 0x0348, 0x0349, 0x034a, 0x034b, 0x034c, 0x034d, 0x034e, 0x034f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 130) 0x0350, 0x0351, 0x0352, 0x0353, 0x0354, 0x0355, 0x0356, 0x0357,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 131) 0x0358, 0x0359, 0x035a, 0x035b, 0x035c, 0x035d, 0x035e, 0x035f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 132) 0x0360, 0x0361, 0x0362, 0x0363, 0x0364, 0x0365, 0x0366, 0x0367,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 133) 0x0368, 0x0369, 0x036a, 0x036b, 0x036c, 0x036d, 0x036e, 0x036f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 134) 0x0370, 0x0371, 0x0372, 0x0373, 0x0374, 0x0375, 0x0376, 0x0377,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 135) 0x0378, 0x0379, 0x037a, 0x03fd, 0x03fe, 0x03ff, 0x037e, 0x037f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 136) 0x0380, 0x0381, 0x0382, 0x0383, 0x0384, 0x0385, 0x0386, 0x0387,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 137) 0x0388, 0x0389, 0x038a, 0x038b, 0x038c, 0x038d, 0x038e, 0x038f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 138) 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 139) 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 140) 0x03a0, 0x03a1, 0x03a2, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 141) 0x03a8, 0x03a9, 0x03aa, 0x03ab, 0x0386, 0x0388, 0x0389, 0x038a,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 142) 0x03b0, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 143) 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 144) 0x03a0, 0x03a1, 0x03a3, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 145) 0x03a8, 0x03a9, 0x03aa, 0x03ab, 0x038c, 0x038e, 0x038f, 0x03cf,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 146) 0x03d0, 0x03d1, 0x03d2, 0x03d3, 0x03d4, 0x03d5, 0x03d6, 0x03d7,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 147) 0x03d8, 0x03d8, 0x03da, 0x03da, 0x03dc, 0x03dc, 0x03de, 0x03de,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 148) 0x03e0, 0x03e0, 0x03e2, 0x03e2, 0x03e4, 0x03e4, 0x03e6, 0x03e6,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 149) 0x03e8, 0x03e8, 0x03ea, 0x03ea, 0x03ec, 0x03ec, 0x03ee, 0x03ee,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 150) 0x03f0, 0x03f1, 0x03f9, 0x03f3, 0x03f4, 0x03f5, 0x03f6, 0x03f7,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 151) 0x03f7, 0x03f9, 0x03fa, 0x03fa, 0x03fc, 0x03fd, 0x03fe, 0x03ff,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 152) 0x0400, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 153) 0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x040d, 0x040e, 0x040f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 154) 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 155) 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 156) 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 157) 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 158) 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 159) 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 160) 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 161) 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 162) 0x0400, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 163) 0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x040d, 0x040e, 0x040f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 164) 0x0460, 0x0460, 0x0462, 0x0462, 0x0464, 0x0464, 0x0466, 0x0466,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 165) 0x0468, 0x0468, 0x046a, 0x046a, 0x046c, 0x046c, 0x046e, 0x046e,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 166) 0x0470, 0x0470, 0x0472, 0x0472, 0x0474, 0x0474, 0x0476, 0x0476,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 167) 0x0478, 0x0478, 0x047a, 0x047a, 0x047c, 0x047c, 0x047e, 0x047e,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 168) 0x0480, 0x0480, 0x0482, 0x0483, 0x0484, 0x0485, 0x0486, 0x0487,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 169) 0x0488, 0x0489, 0x048a, 0x048a, 0x048c, 0x048c, 0x048e, 0x048e,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 170) 0x0490, 0x0490, 0x0492, 0x0492, 0x0494, 0x0494, 0x0496, 0x0496,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 171) 0x0498, 0x0498, 0x049a, 0x049a, 0x049c, 0x049c, 0x049e, 0x049e,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 172) 0x04a0, 0x04a0, 0x04a2, 0x04a2, 0x04a4, 0x04a4, 0x04a6, 0x04a6,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 173) 0x04a8, 0x04a8, 0x04aa, 0x04aa, 0x04ac, 0x04ac, 0x04ae, 0x04ae,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 174) 0x04b0, 0x04b0, 0x04b2, 0x04b2, 0x04b4, 0x04b4, 0x04b6, 0x04b6,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 175) 0x04b8, 0x04b8, 0x04ba, 0x04ba, 0x04bc, 0x04bc, 0x04be, 0x04be,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 176) 0x04c0, 0x04c1, 0x04c1, 0x04c3, 0x04c3, 0x04c5, 0x04c5, 0x04c7,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 177) 0x04c7, 0x04c9, 0x04c9, 0x04cb, 0x04cb, 0x04cd, 0x04cd, 0x04c0,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 178) 0x04d0, 0x04d0, 0x04d2, 0x04d2, 0x04d4, 0x04d4, 0x04d6, 0x04d6,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 179) 0x04d8, 0x04d8, 0x04da, 0x04da, 0x04dc, 0x04dc, 0x04de, 0x04de,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 180) 0x04e0, 0x04e0, 0x04e2, 0x04e2, 0x04e4, 0x04e4, 0x04e6, 0x04e6,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 181) 0x04e8, 0x04e8, 0x04ea, 0x04ea, 0x04ec, 0x04ec, 0x04ee, 0x04ee,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 182) 0x04f0, 0x04f0, 0x04f2, 0x04f2, 0x04f4, 0x04f4, 0x04f6, 0x04f6,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 183) 0x04f8, 0x04f8, 0x04fa, 0x04fa, 0x04fc, 0x04fc, 0x04fe, 0x04fe,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 184) 0x0500, 0x0500, 0x0502, 0x0502, 0x0504, 0x0504, 0x0506, 0x0506,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 185) 0x0508, 0x0508, 0x050a, 0x050a, 0x050c, 0x050c, 0x050e, 0x050e,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 186) 0x0510, 0x0510, 0x0512, 0x0512, 0x0514, 0x0515, 0x0516, 0x0517,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 187) 0x0518, 0x0519, 0x051a, 0x051b, 0x051c, 0x051d, 0x051e, 0x051f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 188) 0x0520, 0x0521, 0x0522, 0x0523, 0x0524, 0x0525, 0x0526, 0x0527,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 189) 0x0528, 0x0529, 0x052a, 0x052b, 0x052c, 0x052d, 0x052e, 0x052f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 190) 0x0530, 0x0531, 0x0532, 0x0533, 0x0534, 0x0535, 0x0536, 0x0537,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 191) 0x0538, 0x0539, 0x053a, 0x053b, 0x053c, 0x053d, 0x053e, 0x053f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 192) 0x0540, 0x0541, 0x0542, 0x0543, 0x0544, 0x0545, 0x0546, 0x0547,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 193) 0x0548, 0x0549, 0x054a, 0x054b, 0x054c, 0x054d, 0x054e, 0x054f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 194) 0x0550, 0x0551, 0x0552, 0x0553, 0x0554, 0x0555, 0x0556, 0x0557,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 195) 0x0558, 0x0559, 0x055a, 0x055b, 0x055c, 0x055d, 0x055e, 0x055f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 196) 0x0560, 0x0531, 0x0532, 0x0533, 0x0534, 0x0535, 0x0536, 0x0537,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 197) 0x0538, 0x0539, 0x053a, 0x053b, 0x053c, 0x053d, 0x053e, 0x053f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 198) 0x0540, 0x0541, 0x0542, 0x0543, 0x0544, 0x0545, 0x0546, 0x0547,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 199) 0x0548, 0x0549, 0x054a, 0x054b, 0x054c, 0x054d, 0x054e, 0x054f,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 200) 0x0550, 0x0551, 0x0552, 0x0553, 0x0554, 0x0555, 0x0556, 0xffff,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 201) 0x17f6, 0x2c63, 0x1d7e, 0x1d7f, 0x1d80, 0x1d81, 0x1d82, 0x1d83,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 202) 0x1d84, 0x1d85, 0x1d86, 0x1d87, 0x1d88, 0x1d89, 0x1d8a, 0x1d8b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 203) 0x1d8c, 0x1d8d, 0x1d8e, 0x1d8f, 0x1d90, 0x1d91, 0x1d92, 0x1d93,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 204) 0x1d94, 0x1d95, 0x1d96, 0x1d97, 0x1d98, 0x1d99, 0x1d9a, 0x1d9b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 205) 0x1d9c, 0x1d9d, 0x1d9e, 0x1d9f, 0x1da0, 0x1da1, 0x1da2, 0x1da3,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 206) 0x1da4, 0x1da5, 0x1da6, 0x1da7, 0x1da8, 0x1da9, 0x1daa, 0x1dab,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 207) 0x1dac, 0x1dad, 0x1dae, 0x1daf, 0x1db0, 0x1db1, 0x1db2, 0x1db3,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 208) 0x1db4, 0x1db5, 0x1db6, 0x1db7, 0x1db8, 0x1db9, 0x1dba, 0x1dbb,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 209) 0x1dbc, 0x1dbd, 0x1dbe, 0x1dbf, 0x1dc0, 0x1dc1, 0x1dc2, 0x1dc3,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 210) 0x1dc4, 0x1dc5, 0x1dc6, 0x1dc7, 0x1dc8, 0x1dc9, 0x1dca, 0x1dcb,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 211) 0x1dcc, 0x1dcd, 0x1dce, 0x1dcf, 0x1dd0, 0x1dd1, 0x1dd2, 0x1dd3,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 212) 0x1dd4, 0x1dd5, 0x1dd6, 0x1dd7, 0x1dd8, 0x1dd9, 0x1dda, 0x1ddb,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 213) 0x1ddc, 0x1ddd, 0x1dde, 0x1ddf, 0x1de0, 0x1de1, 0x1de2, 0x1de3,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 214) 0x1de4, 0x1de5, 0x1de6, 0x1de7, 0x1de8, 0x1de9, 0x1dea, 0x1deb,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 215) 0x1dec, 0x1ded, 0x1dee, 0x1def, 0x1df0, 0x1df1, 0x1df2, 0x1df3,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 216) 0x1df4, 0x1df5, 0x1df6, 0x1df7, 0x1df8, 0x1df9, 0x1dfa, 0x1dfb,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 217) 0x1dfc, 0x1dfd, 0x1dfe, 0x1dff, 0x1e00, 0x1e00, 0x1e02, 0x1e02,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 218) 0x1e04, 0x1e04, 0x1e06, 0x1e06, 0x1e08, 0x1e08, 0x1e0a, 0x1e0a,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 219) 0x1e0c, 0x1e0c, 0x1e0e, 0x1e0e, 0x1e10, 0x1e10, 0x1e12, 0x1e12,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 220) 0x1e14, 0x1e14, 0x1e16, 0x1e16, 0x1e18, 0x1e18, 0x1e1a, 0x1e1a,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 221) 0x1e1c, 0x1e1c, 0x1e1e, 0x1e1e, 0x1e20, 0x1e20, 0x1e22, 0x1e22,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 222) 0x1e24, 0x1e24, 0x1e26, 0x1e26, 0x1e28, 0x1e28, 0x1e2a, 0x1e2a,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 223) 0x1e2c, 0x1e2c, 0x1e2e, 0x1e2e, 0x1e30, 0x1e30, 0x1e32, 0x1e32,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 224) 0x1e34, 0x1e34, 0x1e36, 0x1e36, 0x1e38, 0x1e38, 0x1e3a, 0x1e3a,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 225) 0x1e3c, 0x1e3c, 0x1e3e, 0x1e3e, 0x1e40, 0x1e40, 0x1e42, 0x1e42,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 226) 0x1e44, 0x1e44, 0x1e46, 0x1e46, 0x1e48, 0x1e48, 0x1e4a, 0x1e4a,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 227) 0x1e4c, 0x1e4c, 0x1e4e, 0x1e4e, 0x1e50, 0x1e50, 0x1e52, 0x1e52,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 228) 0x1e54, 0x1e54, 0x1e56, 0x1e56, 0x1e58, 0x1e58, 0x1e5a, 0x1e5a,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 229) 0x1e5c, 0x1e5c, 0x1e5e, 0x1e5e, 0x1e60, 0x1e60, 0x1e62, 0x1e62,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 230) 0x1e64, 0x1e64, 0x1e66, 0x1e66, 0x1e68, 0x1e68, 0x1e6a, 0x1e6a,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 231) 0x1e6c, 0x1e6c, 0x1e6e, 0x1e6e, 0x1e70, 0x1e70, 0x1e72, 0x1e72,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 232) 0x1e74, 0x1e74, 0x1e76, 0x1e76, 0x1e78, 0x1e78, 0x1e7a, 0x1e7a,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 233) 0x1e7c, 0x1e7c, 0x1e7e, 0x1e7e, 0x1e80, 0x1e80, 0x1e82, 0x1e82,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 234) 0x1e84, 0x1e84, 0x1e86, 0x1e86, 0x1e88, 0x1e88, 0x1e8a, 0x1e8a,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 235) 0x1e8c, 0x1e8c, 0x1e8e, 0x1e8e, 0x1e90, 0x1e90, 0x1e92, 0x1e92,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 236) 0x1e94, 0x1e94, 0x1e96, 0x1e97, 0x1e98, 0x1e99, 0x1e9a, 0x1e9b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 237) 0x1e9c, 0x1e9d, 0x1e9e, 0x1e9f, 0x1ea0, 0x1ea0, 0x1ea2, 0x1ea2,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 238) 0x1ea4, 0x1ea4, 0x1ea6, 0x1ea6, 0x1ea8, 0x1ea8, 0x1eaa, 0x1eaa,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 239) 0x1eac, 0x1eac, 0x1eae, 0x1eae, 0x1eb0, 0x1eb0, 0x1eb2, 0x1eb2,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 240) 0x1eb4, 0x1eb4, 0x1eb6, 0x1eb6, 0x1eb8, 0x1eb8, 0x1eba, 0x1eba,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 241) 0x1ebc, 0x1ebc, 0x1ebe, 0x1ebe, 0x1ec0, 0x1ec0, 0x1ec2, 0x1ec2,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 242) 0x1ec4, 0x1ec4, 0x1ec6, 0x1ec6, 0x1ec8, 0x1ec8, 0x1eca, 0x1eca,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 243) 0x1ecc, 0x1ecc, 0x1ece, 0x1ece, 0x1ed0, 0x1ed0, 0x1ed2, 0x1ed2,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 244) 0x1ed4, 0x1ed4, 0x1ed6, 0x1ed6, 0x1ed8, 0x1ed8, 0x1eda, 0x1eda,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 245) 0x1edc, 0x1edc, 0x1ede, 0x1ede, 0x1ee0, 0x1ee0, 0x1ee2, 0x1ee2,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 246) 0x1ee4, 0x1ee4, 0x1ee6, 0x1ee6, 0x1ee8, 0x1ee8, 0x1eea, 0x1eea,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 247) 0x1eec, 0x1eec, 0x1eee, 0x1eee, 0x1ef0, 0x1ef0, 0x1ef2, 0x1ef2,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 248) 0x1ef4, 0x1ef4, 0x1ef6, 0x1ef6, 0x1ef8, 0x1ef8, 0x1efa, 0x1efb,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 249) 0x1efc, 0x1efd, 0x1efe, 0x1eff, 0x1f08, 0x1f09, 0x1f0a, 0x1f0b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 250) 0x1f0c, 0x1f0d, 0x1f0e, 0x1f0f, 0x1f08, 0x1f09, 0x1f0a, 0x1f0b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 251) 0x1f0c, 0x1f0d, 0x1f0e, 0x1f0f, 0x1f18, 0x1f19, 0x1f1a, 0x1f1b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 252) 0x1f1c, 0x1f1d, 0x1f16, 0x1f17, 0x1f18, 0x1f19, 0x1f1a, 0x1f1b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 253) 0x1f1c, 0x1f1d, 0x1f1e, 0x1f1f, 0x1f28, 0x1f29, 0x1f2a, 0x1f2b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 254) 0x1f2c, 0x1f2d, 0x1f2e, 0x1f2f, 0x1f28, 0x1f29, 0x1f2a, 0x1f2b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 255) 0x1f2c, 0x1f2d, 0x1f2e, 0x1f2f, 0x1f38, 0x1f39, 0x1f3a, 0x1f3b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 256) 0x1f3c, 0x1f3d, 0x1f3e, 0x1f3f, 0x1f38, 0x1f39, 0x1f3a, 0x1f3b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 257) 0x1f3c, 0x1f3d, 0x1f3e, 0x1f3f, 0x1f48, 0x1f49, 0x1f4a, 0x1f4b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 258) 0x1f4c, 0x1f4d, 0x1f46, 0x1f47, 0x1f48, 0x1f49, 0x1f4a, 0x1f4b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 259) 0x1f4c, 0x1f4d, 0x1f4e, 0x1f4f, 0x1f50, 0x1f59, 0x1f52, 0x1f5b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 260) 0x1f54, 0x1f5d, 0x1f56, 0x1f5f, 0x1f58, 0x1f59, 0x1f5a, 0x1f5b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 261) 0x1f5c, 0x1f5d, 0x1f5e, 0x1f5f, 0x1f68, 0x1f69, 0x1f6a, 0x1f6b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 262) 0x1f6c, 0x1f6d, 0x1f6e, 0x1f6f, 0x1f68, 0x1f69, 0x1f6a, 0x1f6b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 263) 0x1f6c, 0x1f6d, 0x1f6e, 0x1f6f, 0x1fba, 0x1fbb, 0x1fc8, 0x1fc9,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 264) 0x1fca, 0x1fcb, 0x1fda, 0x1fdb, 0x1ff8, 0x1ff9, 0x1fea, 0x1feb,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 265) 0x1ffa, 0x1ffb, 0x1f7e, 0x1f7f, 0x1f88, 0x1f89, 0x1f8a, 0x1f8b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 266) 0x1f8c, 0x1f8d, 0x1f8e, 0x1f8f, 0x1f88, 0x1f89, 0x1f8a, 0x1f8b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 267) 0x1f8c, 0x1f8d, 0x1f8e, 0x1f8f, 0x1f98, 0x1f99, 0x1f9a, 0x1f9b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 268) 0x1f9c, 0x1f9d, 0x1f9e, 0x1f9f, 0x1f98, 0x1f99, 0x1f9a, 0x1f9b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 269) 0x1f9c, 0x1f9d, 0x1f9e, 0x1f9f, 0x1fa8, 0x1fa9, 0x1faa, 0x1fab,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 270) 0x1fac, 0x1fad, 0x1fae, 0x1faf, 0x1fa8, 0x1fa9, 0x1faa, 0x1fab,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 271) 0x1fac, 0x1fad, 0x1fae, 0x1faf, 0x1fb8, 0x1fb9, 0x1fb2, 0x1fbc,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 272) 0x1fb4, 0x1fb5, 0x1fb6, 0x1fb7, 0x1fb8, 0x1fb9, 0x1fba, 0x1fbb,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 273) 0x1fbc, 0x1fbd, 0x1fbe, 0x1fbf, 0x1fc0, 0x1fc1, 0x1fc2, 0x1fc3,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 274) 0x1fc4, 0x1fc5, 0x1fc6, 0x1fc7, 0x1fc8, 0x1fc9, 0x1fca, 0x1fcb,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 275) 0x1fc3, 0x1fcd, 0x1fce, 0x1fcf, 0x1fd8, 0x1fd9, 0x1fd2, 0x1fd3,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 276) 0x1fd4, 0x1fd5, 0x1fd6, 0x1fd7, 0x1fd8, 0x1fd9, 0x1fda, 0x1fdb,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 277) 0x1fdc, 0x1fdd, 0x1fde, 0x1fdf, 0x1fe8, 0x1fe9, 0x1fe2, 0x1fe3,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 278) 0x1fe4, 0x1fec, 0x1fe6, 0x1fe7, 0x1fe8, 0x1fe9, 0x1fea, 0x1feb,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 279) 0x1fec, 0x1fed, 0x1fee, 0x1fef, 0x1ff0, 0x1ff1, 0x1ff2, 0x1ff3,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 280) 0x1ff4, 0x1ff5, 0x1ff6, 0x1ff7, 0x1ff8, 0x1ff9, 0x1ffa, 0x1ffb,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 281) 0x1ff3, 0x1ffd, 0x1ffe, 0x1fff, 0x2000, 0x2001, 0x2002, 0x2003,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 282) 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200a, 0x200b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 283) 0x200c, 0x200d, 0x200e, 0x200f, 0x2010, 0x2011, 0x2012, 0x2013,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 284) 0x2014, 0x2015, 0x2016, 0x2017, 0x2018, 0x2019, 0x201a, 0x201b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 285) 0x201c, 0x201d, 0x201e, 0x201f, 0x2020, 0x2021, 0x2022, 0x2023,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 286) 0x2024, 0x2025, 0x2026, 0x2027, 0x2028, 0x2029, 0x202a, 0x202b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 287) 0x202c, 0x202d, 0x202e, 0x202f, 0x2030, 0x2031, 0x2032, 0x2033,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 288) 0x2034, 0x2035, 0x2036, 0x2037, 0x2038, 0x2039, 0x203a, 0x203b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 289) 0x203c, 0x203d, 0x203e, 0x203f, 0x2040, 0x2041, 0x2042, 0x2043,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 290) 0x2044, 0x2045, 0x2046, 0x2047, 0x2048, 0x2049, 0x204a, 0x204b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 291) 0x204c, 0x204d, 0x204e, 0x204f, 0x2050, 0x2051, 0x2052, 0x2053,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 292) 0x2054, 0x2055, 0x2056, 0x2057, 0x2058, 0x2059, 0x205a, 0x205b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 293) 0x205c, 0x205d, 0x205e, 0x205f, 0x2060, 0x2061, 0x2062, 0x2063,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 294) 0x2064, 0x2065, 0x2066, 0x2067, 0x2068, 0x2069, 0x206a, 0x206b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 295) 0x206c, 0x206d, 0x206e, 0x206f, 0x2070, 0x2071, 0x2072, 0x2073,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 296) 0x2074, 0x2075, 0x2076, 0x2077, 0x2078, 0x2079, 0x207a, 0x207b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 297) 0x207c, 0x207d, 0x207e, 0x207f, 0x2080, 0x2081, 0x2082, 0x2083,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 298) 0x2084, 0x2085, 0x2086, 0x2087, 0x2088, 0x2089, 0x208a, 0x208b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 299) 0x208c, 0x208d, 0x208e, 0x208f, 0x2090, 0x2091, 0x2092, 0x2093,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 300) 0x2094, 0x2095, 0x2096, 0x2097, 0x2098, 0x2099, 0x209a, 0x209b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 301) 0x209c, 0x209d, 0x209e, 0x209f, 0x20a0, 0x20a1, 0x20a2, 0x20a3,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 302) 0x20a4, 0x20a5, 0x20a6, 0x20a7, 0x20a8, 0x20a9, 0x20aa, 0x20ab,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 303) 0x20ac, 0x20ad, 0x20ae, 0x20af, 0x20b0, 0x20b1, 0x20b2, 0x20b3,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 304) 0x20b4, 0x20b5, 0x20b6, 0x20b7, 0x20b8, 0x20b9, 0x20ba, 0x20bb,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 305) 0x20bc, 0x20bd, 0x20be, 0x20bf, 0x20c0, 0x20c1, 0x20c2, 0x20c3,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 306) 0x20c4, 0x20c5, 0x20c6, 0x20c7, 0x20c8, 0x20c9, 0x20ca, 0x20cb,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 307) 0x20cc, 0x20cd, 0x20ce, 0x20cf, 0x20d0, 0x20d1, 0x20d2, 0x20d3,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 308) 0x20d4, 0x20d5, 0x20d6, 0x20d7, 0x20d8, 0x20d9, 0x20da, 0x20db,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 309) 0x20dc, 0x20dd, 0x20de, 0x20df, 0x20e0, 0x20e1, 0x20e2, 0x20e3,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 310) 0x20e4, 0x20e5, 0x20e6, 0x20e7, 0x20e8, 0x20e9, 0x20ea, 0x20eb,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 311) 0x20ec, 0x20ed, 0x20ee, 0x20ef, 0x20f0, 0x20f1, 0x20f2, 0x20f3,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 312) 0x20f4, 0x20f5, 0x20f6, 0x20f7, 0x20f8, 0x20f9, 0x20fa, 0x20fb,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 313) 0x20fc, 0x20fd, 0x20fe, 0x20ff, 0x2100, 0x2101, 0x2102, 0x2103,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 314) 0x2104, 0x2105, 0x2106, 0x2107, 0x2108, 0x2109, 0x210a, 0x210b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 315) 0x210c, 0x210d, 0x210e, 0x210f, 0x2110, 0x2111, 0x2112, 0x2113,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 316) 0x2114, 0x2115, 0x2116, 0x2117, 0x2118, 0x2119, 0x211a, 0x211b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 317) 0x211c, 0x211d, 0x211e, 0x211f, 0x2120, 0x2121, 0x2122, 0x2123,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 318) 0x2124, 0x2125, 0x2126, 0x2127, 0x2128, 0x2129, 0x212a, 0x212b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 319) 0x212c, 0x212d, 0x212e, 0x212f, 0x2130, 0x2131, 0x2132, 0x2133,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 320) 0x2134, 0x2135, 0x2136, 0x2137, 0x2138, 0x2139, 0x213a, 0x213b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 321) 0x213c, 0x213d, 0x213e, 0x213f, 0x2140, 0x2141, 0x2142, 0x2143,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 322) 0x2144, 0x2145, 0x2146, 0x2147, 0x2148, 0x2149, 0x214a, 0x214b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 323) 0x214c, 0x214d, 0x2132, 0x214f, 0x2150, 0x2151, 0x2152, 0x2153,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 324) 0x2154, 0x2155, 0x2156, 0x2157, 0x2158, 0x2159, 0x215a, 0x215b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 325) 0x215c, 0x215d, 0x215e, 0x215f, 0x2160, 0x2161, 0x2162, 0x2163,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 326) 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x216a, 0x216b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 327) 0x216c, 0x216d, 0x216e, 0x216f, 0x2160, 0x2161, 0x2162, 0x2163,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 328) 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x216a, 0x216b,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 329) 0x216c, 0x216d, 0x216e, 0x216f, 0x2180, 0x2181, 0x2182, 0x2183,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 330) 0x2183, 0xffff, 0x034b, 0x24b6, 0x24b7, 0x24b8, 0x24b9, 0x24ba,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 331) 0x24bb, 0x24bc, 0x24bd, 0x24be, 0x24bf, 0x24c0, 0x24c1, 0x24c2,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 332) 0x24c3, 0x24c4, 0x24c5, 0x24c6, 0x24c7, 0x24c8, 0x24c9, 0x24ca,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 333) 0x24cb, 0x24cc, 0x24cd, 0x24ce, 0x24cf, 0xffff, 0x0746, 0x2c00,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 334) 0x2c01, 0x2c02, 0x2c03, 0x2c04, 0x2c05, 0x2c06, 0x2c07, 0x2c08,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 335) 0x2c09, 0x2c0a, 0x2c0b, 0x2c0c, 0x2c0d, 0x2c0e, 0x2c0f, 0x2c10,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 336) 0x2c11, 0x2c12, 0x2c13, 0x2c14, 0x2c15, 0x2c16, 0x2c17, 0x2c18,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 337) 0x2c19, 0x2c1a, 0x2c1b, 0x2c1c, 0x2c1d, 0x2c1e, 0x2c1f, 0x2c20,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 338) 0x2c21, 0x2c22, 0x2c23, 0x2c24, 0x2c25, 0x2c26, 0x2c27, 0x2c28,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 339) 0x2c29, 0x2c2a, 0x2c2b, 0x2c2c, 0x2c2d, 0x2c2e, 0x2c5f, 0x2c60,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 340) 0x2c60, 0x2c62, 0x2c63, 0x2c64, 0x2c65, 0x2c66, 0x2c67, 0x2c67,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 341) 0x2c69, 0x2c69, 0x2c6b, 0x2c6b, 0x2c6d, 0x2c6e, 0x2c6f, 0x2c70,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 342) 0x2c71, 0x2c72, 0x2c73, 0x2c74, 0x2c75, 0x2c75, 0x2c77, 0x2c78,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 343) 0x2c79, 0x2c7a, 0x2c7b, 0x2c7c, 0x2c7d, 0x2c7e, 0x2c7f, 0x2c80,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 344) 0x2c80, 0x2c82, 0x2c82, 0x2c84, 0x2c84, 0x2c86, 0x2c86, 0x2c88,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 345) 0x2c88, 0x2c8a, 0x2c8a, 0x2c8c, 0x2c8c, 0x2c8e, 0x2c8e, 0x2c90,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 346) 0x2c90, 0x2c92, 0x2c92, 0x2c94, 0x2c94, 0x2c96, 0x2c96, 0x2c98,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 347) 0x2c98, 0x2c9a, 0x2c9a, 0x2c9c, 0x2c9c, 0x2c9e, 0x2c9e, 0x2ca0,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 348) 0x2ca0, 0x2ca2, 0x2ca2, 0x2ca4, 0x2ca4, 0x2ca6, 0x2ca6, 0x2ca8,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 349) 0x2ca8, 0x2caa, 0x2caa, 0x2cac, 0x2cac, 0x2cae, 0x2cae, 0x2cb0,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 350) 0x2cb0, 0x2cb2, 0x2cb2, 0x2cb4, 0x2cb4, 0x2cb6, 0x2cb6, 0x2cb8,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 351) 0x2cb8, 0x2cba, 0x2cba, 0x2cbc, 0x2cbc, 0x2cbe, 0x2cbe, 0x2cc0,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 352) 0x2cc0, 0x2cc2, 0x2cc2, 0x2cc4, 0x2cc4, 0x2cc6, 0x2cc6, 0x2cc8,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 353) 0x2cc8, 0x2cca, 0x2cca, 0x2ccc, 0x2ccc, 0x2cce, 0x2cce, 0x2cd0,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 354) 0x2cd0, 0x2cd2, 0x2cd2, 0x2cd4, 0x2cd4, 0x2cd6, 0x2cd6, 0x2cd8,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 355) 0x2cd8, 0x2cda, 0x2cda, 0x2cdc, 0x2cdc, 0x2cde, 0x2cde, 0x2ce0,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 356) 0x2ce0, 0x2ce2, 0x2ce2, 0x2ce4, 0x2ce5, 0x2ce6, 0x2ce7, 0x2ce8,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 357) 0x2ce9, 0x2cea, 0x2ceb, 0x2cec, 0x2ced, 0x2cee, 0x2cef, 0x2cf0,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 358) 0x2cf1, 0x2cf2, 0x2cf3, 0x2cf4, 0x2cf5, 0x2cf6, 0x2cf7, 0x2cf8,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 359) 0x2cf9, 0x2cfa, 0x2cfb, 0x2cfc, 0x2cfd, 0x2cfe, 0x2cff, 0x10a0,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 360) 0x10a1, 0x10a2, 0x10a3, 0x10a4, 0x10a5, 0x10a6, 0x10a7, 0x10a8,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 361) 0x10a9, 0x10aa, 0x10ab, 0x10ac, 0x10ad, 0x10ae, 0x10af, 0x10b0,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 362) 0x10b1, 0x10b2, 0x10b3, 0x10b4, 0x10b5, 0x10b6, 0x10b7, 0x10b8,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 363) 0x10b9, 0x10ba, 0x10bb, 0x10bc, 0x10bd, 0x10be, 0x10bf, 0x10c0,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 364) 0x10c1, 0x10c2, 0x10c3, 0x10c4, 0x10c5, 0xffff, 0xd21b, 0xff21,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 365) 0xff22, 0xff23, 0xff24, 0xff25, 0xff26, 0xff27, 0xff28, 0xff29,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 366) 0xff2a, 0xff2b, 0xff2c, 0xff2d, 0xff2e, 0xff2f, 0xff30, 0xff31,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 367) 0xff32, 0xff33, 0xff34, 0xff35, 0xff36, 0xff37, 0xff38, 0xff39,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 368) 0xff3a, 0xff5b, 0xff5c, 0xff5d, 0xff5e, 0xff5f, 0xff60, 0xff61,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 369) 0xff62, 0xff63, 0xff64, 0xff65, 0xff66, 0xff67, 0xff68, 0xff69,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 370) 0xff6a, 0xff6b, 0xff6c, 0xff6d, 0xff6e, 0xff6f, 0xff70, 0xff71,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 371) 0xff72, 0xff73, 0xff74, 0xff75, 0xff76, 0xff77, 0xff78, 0xff79,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 372) 0xff7a, 0xff7b, 0xff7c, 0xff7d, 0xff7e, 0xff7f, 0xff80, 0xff81,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 373) 0xff82, 0xff83, 0xff84, 0xff85, 0xff86, 0xff87, 0xff88, 0xff89,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 374) 0xff8a, 0xff8b, 0xff8c, 0xff8d, 0xff8e, 0xff8f, 0xff90, 0xff91,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 375) 0xff92, 0xff93, 0xff94, 0xff95, 0xff96, 0xff97, 0xff98, 0xff99,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 376) 0xff9a, 0xff9b, 0xff9c, 0xff9d, 0xff9e, 0xff9f, 0xffa0, 0xffa1,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 377) 0xffa2, 0xffa3, 0xffa4, 0xffa5, 0xffa6, 0xffa7, 0xffa8, 0xffa9,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 378) 0xffaa, 0xffab, 0xffac, 0xffad, 0xffae, 0xffaf, 0xffb0, 0xffb1,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 379) 0xffb2, 0xffb3, 0xffb4, 0xffb5, 0xffb6, 0xffb7, 0xffb8, 0xffb9,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 380) 0xffba, 0xffbb, 0xffbc, 0xffbd, 0xffbe, 0xffbf, 0xffc0, 0xffc1,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 381) 0xffc2, 0xffc3, 0xffc4, 0xffc5, 0xffc6, 0xffc7, 0xffc8, 0xffc9,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 382) 0xffca, 0xffcb, 0xffcc, 0xffcd, 0xffce, 0xffcf, 0xffd0, 0xffd1,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 383) 0xffd2, 0xffd3, 0xffd4, 0xffd5, 0xffd6, 0xffd7, 0xffd8, 0xffd9,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 384) 0xffda, 0xffdb, 0xffdc, 0xffdd, 0xffde, 0xffdf, 0xffe0, 0xffe1,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 385) 0xffe2, 0xffe3, 0xffe4, 0xffe5, 0xffe6, 0xffe7, 0xffe8, 0xffe9,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 386) 0xffea, 0xffeb, 0xffec, 0xffed, 0xffee, 0xffef, 0xfff0, 0xfff1,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 387) 0xfff2, 0xfff3, 0xfff4, 0xfff5, 0xfff6, 0xfff7, 0xfff8, 0xfff9,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 388) 0xfffa, 0xfffb, 0xfffc, 0xfffd, 0xfffe, 0xffff,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 389) };
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 390)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 391) /*
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 392) * Allow full-width illegal characters :
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 393) * "MS windows 7" supports full-width-invalid-name-characters.
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 394) * So we should check half-width-invalid-name-characters(ASCII) only
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 395) * for compatibility.
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 396) *
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 397) * " * / : < > ? \ |
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 398) */
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 399) static unsigned short bad_uni_chars[] = {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 400) 0x0022, 0x002A, 0x002F, 0x003A,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 401) 0x003C, 0x003E, 0x003F, 0x005C, 0x007C,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 402) 0
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 403) };
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 404)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 405) static int exfat_convert_char_to_ucs2(struct nls_table *nls,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 406) const unsigned char *ch, int ch_len, unsigned short *ucs2,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 407) int *lossy)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 408) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 409) int len;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 410)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 411) *ucs2 = 0x0;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 412)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 413) if (ch[0] < 0x80) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 414) *ucs2 = ch[0];
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 415) return 1;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 416) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 417)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 418) len = nls->char2uni(ch, ch_len, ucs2);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 419) if (len < 0) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 420) /* conversion failed */
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 421) if (lossy != NULL)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 422) *lossy |= NLS_NAME_LOSSY;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 423) *ucs2 = '_';
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 424) return 1;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 425) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 426) return len;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 427) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 428)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 429) static int exfat_convert_ucs2_to_char(struct nls_table *nls,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 430) unsigned short ucs2, unsigned char *ch, int *lossy)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 431) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 432) int len;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 433)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 434) ch[0] = 0x0;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 435)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 436) if (ucs2 < 0x0080) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 437) ch[0] = ucs2;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 438) return 1;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 439) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 440)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 441) len = nls->uni2char(ucs2, ch, MAX_CHARSET_SIZE);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 442) if (len < 0) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 443) /* conversion failed */
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 444) if (lossy != NULL)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 445) *lossy |= NLS_NAME_LOSSY;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 446) ch[0] = '_';
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 447) return 1;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 448) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 449) return len;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 450) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 451)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 452) unsigned short exfat_toupper(struct super_block *sb, unsigned short a)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 453) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 454) struct exfat_sb_info *sbi = EXFAT_SB(sb);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 455)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 456) return sbi->vol_utbl[a] ? sbi->vol_utbl[a] : a;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 457) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 458)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 459) static unsigned short *exfat_wstrchr(unsigned short *str, unsigned short wchar)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 460) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 461) while (*str) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 462) if (*(str++) == wchar)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 463) return str;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 464) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 465) return NULL;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 466) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 467)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 468) int exfat_uniname_ncmp(struct super_block *sb, unsigned short *a,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 469) unsigned short *b, unsigned int len)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 470) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 471) int i;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 472)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 473) for (i = 0; i < len; i++, a++, b++)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 474) if (exfat_toupper(sb, *a) != exfat_toupper(sb, *b))
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 475) return 1;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 476) return 0;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 477) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 478)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 479) static int exfat_utf16_to_utf8(struct super_block *sb,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 480) struct exfat_uni_name *p_uniname, unsigned char *p_cstring,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 481) int buflen)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 482) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 483) int len;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 484) const unsigned short *uniname = p_uniname->name;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 485)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 486) /* always len >= 0 */
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 487) len = utf16s_to_utf8s(uniname, MAX_NAME_LENGTH, UTF16_HOST_ENDIAN,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 488) p_cstring, buflen);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 489) p_cstring[len] = '\0';
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 490) return len;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 491) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 492)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 493) static int exfat_utf8_to_utf16(struct super_block *sb,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 494) const unsigned char *p_cstring, const int len,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 495) struct exfat_uni_name *p_uniname, int *p_lossy)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 496) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 497) int i, unilen, lossy = NLS_NAME_NO_LOSSY;
db415f7aae07c (Ilya Ponetayev 2020-07-16 17:27:53 +0900 498) __le16 upname[MAX_NAME_LENGTH + 1];
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 499) unsigned short *uniname = p_uniname->name;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 500)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 501) WARN_ON(!len);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 502)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 503) unilen = utf8s_to_utf16s(p_cstring, len, UTF16_HOST_ENDIAN,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 504) (wchar_t *)uniname, MAX_NAME_LENGTH + 2);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 505) if (unilen < 0) {
d1727d55c0327 (Joe Perches 2020-04-24 13:31:12 +0900 506) exfat_err(sb, "failed to %s (err : %d) nls len : %d",
d1727d55c0327 (Joe Perches 2020-04-24 13:31:12 +0900 507) __func__, unilen, len);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 508) return unilen;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 509) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 510)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 511) if (unilen > MAX_NAME_LENGTH) {
d1727d55c0327 (Joe Perches 2020-04-24 13:31:12 +0900 512) exfat_err(sb, "failed to %s (estr:ENAMETOOLONG) nls len : %d, unilen : %d > %d",
d1727d55c0327 (Joe Perches 2020-04-24 13:31:12 +0900 513) __func__, len, unilen, MAX_NAME_LENGTH);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 514) return -ENAMETOOLONG;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 515) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 516)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 517) for (i = 0; i < unilen; i++) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 518) if (*uniname < 0x0020 ||
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 519) exfat_wstrchr(bad_uni_chars, *uniname))
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 520) lossy |= NLS_NAME_LOSSY;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 521)
db415f7aae07c (Ilya Ponetayev 2020-07-16 17:27:53 +0900 522) upname[i] = cpu_to_le16(exfat_toupper(sb, *uniname));
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 523) uniname++;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 524) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 525)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 526) *uniname = '\0';
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 527) p_uniname->name_len = unilen;
5875bf287d953 (Tetsuhiro Kohada 2020-05-29 19:14:59 +0900 528) p_uniname->name_hash = exfat_calc_chksum16(upname, unilen << 1, 0,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 529) CS_DEFAULT);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 530)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 531) if (p_lossy)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 532) *p_lossy = lossy;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 533) return unilen;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 534) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 535)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 536) #define SURROGATE_MASK 0xfffff800
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 537) #define SURROGATE_PAIR 0x0000d800
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 538) #define SURROGATE_LOW 0x00000400
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 539)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 540) static int __exfat_utf16_to_nls(struct super_block *sb,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 541) struct exfat_uni_name *p_uniname, unsigned char *p_cstring,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 542) int buflen)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 543) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 544) int i, j, len, out_len = 0;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 545) unsigned char buf[MAX_CHARSET_SIZE];
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 546) const unsigned short *uniname = p_uniname->name;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 547) struct nls_table *nls = EXFAT_SB(sb)->nls_io;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 548)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 549) i = 0;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 550) while (i < MAX_NAME_LENGTH && out_len < (buflen - 1)) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 551) if (*uniname == '\0')
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 552) break;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 553) if ((*uniname & SURROGATE_MASK) != SURROGATE_PAIR) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 554) len = exfat_convert_ucs2_to_char(nls, *uniname, buf,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 555) NULL);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 556) } else {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 557) /* Process UTF-16 surrogate pair as one character */
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 558) if (!(*uniname & SURROGATE_LOW) &&
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 559) i+1 < MAX_NAME_LENGTH &&
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 560) (*(uniname+1) & SURROGATE_MASK) == SURROGATE_PAIR &&
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 561) (*(uniname+1) & SURROGATE_LOW)) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 562) uniname++;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 563) i++;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 564) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 565)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 566) /*
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 567) * UTF-16 surrogate pair encodes code points above
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 568) * U+FFFF. Code points above U+FFFF are not supported
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 569) * by kernel NLS framework therefore use replacement
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 570) * character
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 571) */
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 572) len = 1;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 573) buf[0] = '_';
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 574) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 575)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 576) if (out_len + len >= buflen)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 577) len = buflen - 1 - out_len;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 578) out_len += len;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 579)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 580) if (len > 1) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 581) for (j = 0; j < len; j++)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 582) *p_cstring++ = buf[j];
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 583) } else { /* len == 1 */
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 584) *p_cstring++ = *buf;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 585) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 586)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 587) uniname++;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 588) i++;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 589) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 590)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 591) *p_cstring = '\0';
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 592) return out_len;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 593) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 594)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 595) static int exfat_nls_to_ucs2(struct super_block *sb,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 596) const unsigned char *p_cstring, const int len,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 597) struct exfat_uni_name *p_uniname, int *p_lossy)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 598) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 599) int i = 0, unilen = 0, lossy = NLS_NAME_NO_LOSSY;
db415f7aae07c (Ilya Ponetayev 2020-07-16 17:27:53 +0900 600) __le16 upname[MAX_NAME_LENGTH + 1];
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 601) unsigned short *uniname = p_uniname->name;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 602) struct nls_table *nls = EXFAT_SB(sb)->nls_io;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 603)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 604) WARN_ON(!len);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 605)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 606) while (unilen < MAX_NAME_LENGTH && i < len) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 607) i += exfat_convert_char_to_ucs2(nls, p_cstring + i, len - i,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 608) uniname, &lossy);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 609)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 610) if (*uniname < 0x0020 ||
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 611) exfat_wstrchr(bad_uni_chars, *uniname))
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 612) lossy |= NLS_NAME_LOSSY;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 613)
db415f7aae07c (Ilya Ponetayev 2020-07-16 17:27:53 +0900 614) upname[unilen] = cpu_to_le16(exfat_toupper(sb, *uniname));
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 615) uniname++;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 616) unilen++;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 617) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 618)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 619) if (p_cstring[i] != '\0')
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 620) lossy |= NLS_NAME_OVERLEN;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 621)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 622) *uniname = '\0';
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 623) p_uniname->name_len = unilen;
5875bf287d953 (Tetsuhiro Kohada 2020-05-29 19:14:59 +0900 624) p_uniname->name_hash = exfat_calc_chksum16(upname, unilen << 1, 0,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 625) CS_DEFAULT);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 626)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 627) if (p_lossy)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 628) *p_lossy = lossy;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 629) return unilen;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 630) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 631)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 632) int exfat_utf16_to_nls(struct super_block *sb, struct exfat_uni_name *uniname,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 633) unsigned char *p_cstring, int buflen)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 634) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 635) if (EXFAT_SB(sb)->options.utf8)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 636) return exfat_utf16_to_utf8(sb, uniname, p_cstring,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 637) buflen);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 638) return __exfat_utf16_to_nls(sb, uniname, p_cstring, buflen);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 639) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 640)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 641) int exfat_nls_to_utf16(struct super_block *sb, const unsigned char *p_cstring,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 642) const int len, struct exfat_uni_name *uniname, int *p_lossy)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 643) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 644) if (EXFAT_SB(sb)->options.utf8)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 645) return exfat_utf8_to_utf16(sb, p_cstring, len,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 646) uniname, p_lossy);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 647) return exfat_nls_to_ucs2(sb, p_cstring, len, uniname, p_lossy);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 648) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 649)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 650) static int exfat_load_upcase_table(struct super_block *sb,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 651) sector_t sector, unsigned long long num_sectors,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 652) unsigned int utbl_checksum)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 653) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 654) struct exfat_sb_info *sbi = EXFAT_SB(sb);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 655) unsigned int sect_size = sb->s_blocksize;
5875bf287d953 (Tetsuhiro Kohada 2020-05-29 19:14:59 +0900 656) unsigned int i, index = 0;
5875bf287d953 (Tetsuhiro Kohada 2020-05-29 19:14:59 +0900 657) u32 chksum = 0;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 658) int ret;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 659) unsigned char skip = false;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 660) unsigned short *upcase_table;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 661)
9eb78c2532754 (Artem Labazov 2020-12-07 09:04:36 +0900 662) upcase_table = kvcalloc(UTBL_COUNT, sizeof(unsigned short), GFP_KERNEL);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 663) if (!upcase_table)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 664) return -ENOMEM;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 665)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 666) sbi->vol_utbl = upcase_table;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 667) num_sectors += sector;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 668)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 669) while (sector < num_sectors) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 670) struct buffer_head *bh;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 671)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 672) bh = sb_bread(sb, sector);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 673) if (!bh) {
d1727d55c0327 (Joe Perches 2020-04-24 13:31:12 +0900 674) exfat_err(sb, "failed to read sector(0x%llx)\n",
d1727d55c0327 (Joe Perches 2020-04-24 13:31:12 +0900 675) (unsigned long long)sector);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 676) ret = -EIO;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 677) goto free_table;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 678) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 679) sector++;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 680) for (i = 0; i < sect_size && index <= 0xFFFF; i += 2) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 681) unsigned short uni = get_unaligned_le16(bh->b_data + i);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 682)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 683) if (skip) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 684) index += uni;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 685) skip = false;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 686) } else if (uni == index) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 687) index++;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 688) } else if (uni == 0xFFFF) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 689) skip = true;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 690) } else { /* uni != index , uni != 0xFFFF */
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 691) upcase_table[index] = uni;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 692) index++;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 693) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 694) }
5875bf287d953 (Tetsuhiro Kohada 2020-05-29 19:14:59 +0900 695) chksum = exfat_calc_chksum32(bh->b_data, i, chksum, CS_DEFAULT);
fc961522ddbdf (Dan Carpenter 2020-06-08 17:16:29 +0300 696) brelse(bh);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 697) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 698)
5875bf287d953 (Tetsuhiro Kohada 2020-05-29 19:14:59 +0900 699) if (index >= 0xFFFF && utbl_checksum == chksum)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 700) return 0;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 701)
d1727d55c0327 (Joe Perches 2020-04-24 13:31:12 +0900 702) exfat_err(sb, "failed to load upcase table (idx : 0x%08x, chksum : 0x%08x, utbl_chksum : 0x%08x)",
5875bf287d953 (Tetsuhiro Kohada 2020-05-29 19:14:59 +0900 703) index, chksum, utbl_checksum);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 704) ret = -EINVAL;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 705) free_table:
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 706) exfat_free_upcase_table(sbi);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 707) return ret;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 708) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 709)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 710) static int exfat_load_default_upcase_table(struct super_block *sb)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 711) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 712) int i, ret = -EIO;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 713) struct exfat_sb_info *sbi = EXFAT_SB(sb);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 714) unsigned char skip = false;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 715) unsigned short uni = 0, *upcase_table;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 716) unsigned int index = 0;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 717)
9eb78c2532754 (Artem Labazov 2020-12-07 09:04:36 +0900 718) upcase_table = kvcalloc(UTBL_COUNT, sizeof(unsigned short), GFP_KERNEL);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 719) if (!upcase_table)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 720) return -ENOMEM;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 721)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 722) sbi->vol_utbl = upcase_table;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 723)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 724) for (i = 0; index <= 0xFFFF && i < EXFAT_NUM_UPCASE; i++) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 725) uni = uni_def_upcase[i];
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 726) if (skip) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 727) index += uni;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 728) skip = false;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 729) } else if (uni == index) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 730) index++;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 731) } else if (uni == 0xFFFF) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 732) skip = true;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 733) } else {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 734) upcase_table[index] = uni;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 735) index++;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 736) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 737) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 738)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 739) if (index >= 0xFFFF)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 740) return 0;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 741)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 742) /* FATAL error: default upcase table has error */
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 743) exfat_free_upcase_table(sbi);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 744) return ret;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 745) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 746)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 747) int exfat_create_upcase_table(struct super_block *sb)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 748) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 749) int i, ret;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 750) unsigned int tbl_clu, type;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 751) sector_t sector;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 752) unsigned long long tbl_size, num_sectors;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 753) unsigned char blksize_bits = sb->s_blocksize_bits;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 754) struct exfat_chain clu;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 755) struct exfat_dentry *ep;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 756) struct exfat_sb_info *sbi = EXFAT_SB(sb);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 757) struct buffer_head *bh;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 758)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 759) clu.dir = sbi->root_dir;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 760) clu.flags = ALLOC_FAT_CHAIN;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 761)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 762) while (clu.dir != EXFAT_EOF_CLUSTER) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 763) for (i = 0; i < sbi->dentries_per_clu; i++) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 764) ep = exfat_get_dentry(sb, &clu, i, &bh, NULL);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 765) if (!ep)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 766) return -EIO;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 767)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 768) type = exfat_get_entry_type(ep);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 769) if (type == TYPE_UNUSED) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 770) brelse(bh);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 771) break;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 772) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 773)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 774) if (type != TYPE_UPCASE) {
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 775) brelse(bh);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 776) continue;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 777) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 778)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 779) tbl_clu = le32_to_cpu(ep->dentry.upcase.start_clu);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 780) tbl_size = le64_to_cpu(ep->dentry.upcase.size);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 781)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 782) sector = exfat_cluster_to_sector(sbi, tbl_clu);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 783) num_sectors = ((tbl_size - 1) >> blksize_bits) + 1;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 784) ret = exfat_load_upcase_table(sb, sector, num_sectors,
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 785) le32_to_cpu(ep->dentry.upcase.checksum));
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 786)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 787) brelse(bh);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 788) if (ret && ret != -EIO)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 789) goto load_default;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 790)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 791) /* load successfully */
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 792) return ret;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 793) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 794)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 795) if (exfat_get_next_cluster(sb, &(clu.dir)))
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 796) return -EIO;
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 797) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 798)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 799) load_default:
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 800) /* load default upcase table */
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 801) return exfat_load_default_upcase_table(sb);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 802) }
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 803)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 804) void exfat_free_upcase_table(struct exfat_sb_info *sbi)
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 805) {
9eb78c2532754 (Artem Labazov 2020-12-07 09:04:36 +0900 806) kvfree(sbi->vol_utbl);
370e812b3ec19 (Namjae Jeon 2020-03-02 15:21:41 +0900 807) }