v9fs.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677
  1. /*
  2. * linux/fs/9p/v9fs.c
  3. *
  4. * This file contains functions assisting in mapping VFS to 9P2000
  5. *
  6. * Copyright (C) 2004-2008 by Eric Van Hensbergen <ericvh@gmail.com>
  7. * Copyright (C) 2002 by Ron Minnich <rminnich@lanl.gov>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2
  11. * as published by the Free Software Foundation.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to:
  20. * Free Software Foundation
  21. * 51 Franklin Street, Fifth Floor
  22. * Boston, MA 02111-1301 USA
  23. *
  24. */
  25. #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  26. #include <linux/module.h>
  27. #include <linux/errno.h>
  28. #include <linux/fs.h>
  29. #include <linux/sched.h>
  30. #include <linux/parser.h>
  31. #include <linux/idr.h>
  32. #include <linux/slab.h>
  33. #include <net/9p/9p.h>
  34. #include <net/9p/client.h>
  35. #include <net/9p/transport.h>
  36. #include "v9fs.h"
  37. #include "v9fs_vfs.h"
  38. #include "cache.h"
  39. static DEFINE_SPINLOCK(v9fs_sessionlist_lock);
  40. static LIST_HEAD(v9fs_sessionlist);
  41. struct kmem_cache *v9fs_inode_cache;
  42. /*
  43. * Option Parsing (code inspired by NFS code)
  44. * NOTE: each transport will parse its own options
  45. */
  46. enum {
  47. /* Options that take integer arguments */
  48. Opt_debug, Opt_dfltuid, Opt_dfltgid, Opt_afid,
  49. /* String options */
  50. Opt_uname, Opt_remotename, Opt_trans, Opt_cache, Opt_cachetag,
  51. /* Options that take no arguments */
  52. Opt_nodevmap,
  53. /* Cache options */
  54. Opt_cache_loose, Opt_fscache,
  55. /* Access options */
  56. Opt_access, Opt_posixacl,
  57. /* Error token */
  58. Opt_err
  59. };
  60. static const match_table_t tokens = {
  61. {Opt_debug, "debug=%x"},
  62. {Opt_dfltuid, "dfltuid=%u"},
  63. {Opt_dfltgid, "dfltgid=%u"},
  64. {Opt_afid, "afid=%u"},
  65. {Opt_uname, "uname=%s"},
  66. {Opt_remotename, "aname=%s"},
  67. {Opt_nodevmap, "nodevmap"},
  68. {Opt_cache, "cache=%s"},
  69. {Opt_cache_loose, "loose"},
  70. {Opt_fscache, "fscache"},
  71. {Opt_cachetag, "cachetag=%s"},
  72. {Opt_access, "access=%s"},
  73. {Opt_posixacl, "posixacl"},
  74. {Opt_err, NULL}
  75. };
  76. /* Interpret mount options for cache mode */
  77. static int get_cache_mode(char *s)
  78. {
  79. int version = -EINVAL;
  80. if (!strcmp(s, "loose")) {
  81. version = CACHE_LOOSE;
  82. p9_debug(P9_DEBUG_9P, "Cache mode: loose\n");
  83. } else if (!strcmp(s, "fscache")) {
  84. version = CACHE_FSCACHE;
  85. p9_debug(P9_DEBUG_9P, "Cache mode: fscache\n");
  86. } else if (!strcmp(s, "none")) {
  87. version = CACHE_NONE;
  88. p9_debug(P9_DEBUG_9P, "Cache mode: none\n");
  89. } else
  90. pr_info("Unknown Cache mode %s\n", s);
  91. return version;
  92. }
  93. /**
  94. * v9fs_parse_options - parse mount options into session structure
  95. * @v9ses: existing v9fs session information
  96. *
  97. * Return 0 upon success, -ERRNO upon failure.
  98. */
  99. static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)
  100. {
  101. char *options, *tmp_options;
  102. substring_t args[MAX_OPT_ARGS];
  103. char *p;
  104. int option = 0;
  105. char *s, *e;
  106. int ret = 0;
  107. /* setup defaults */
  108. v9ses->afid = ~0;
  109. v9ses->debug = 0;
  110. v9ses->cache = CACHE_NONE;
  111. #ifdef CONFIG_9P_FSCACHE
  112. v9ses->cachetag = NULL;
  113. #endif
  114. if (!opts)
  115. return 0;
  116. tmp_options = kstrdup(opts, GFP_KERNEL);
  117. if (!tmp_options) {
  118. ret = -ENOMEM;
  119. goto fail_option_alloc;
  120. }
  121. options = tmp_options;
  122. while ((p = strsep(&options, ",")) != NULL) {
  123. int token, r;
  124. if (!*p)
  125. continue;
  126. token = match_token(p, tokens, args);
  127. switch (token) {
  128. case Opt_debug:
  129. r = match_int(&args[0], &option);
  130. if (r < 0) {
  131. p9_debug(P9_DEBUG_ERROR,
  132. "integer field, but no integer?\n");
  133. ret = r;
  134. continue;
  135. }
  136. v9ses->debug = option;
  137. #ifdef CONFIG_NET_9P_DEBUG
  138. p9_debug_level = option;
  139. #endif
  140. break;
  141. case Opt_dfltuid:
  142. r = match_int(&args[0], &option);
  143. if (r < 0) {
  144. p9_debug(P9_DEBUG_ERROR,
  145. "integer field, but no integer?\n");
  146. ret = r;
  147. continue;
  148. }
  149. v9ses->dfltuid = make_kuid(current_user_ns(), option);
  150. if (!uid_valid(v9ses->dfltuid)) {
  151. p9_debug(P9_DEBUG_ERROR,
  152. "uid field, but not a uid?\n");
  153. ret = -EINVAL;
  154. continue;
  155. }
  156. break;
  157. case Opt_dfltgid:
  158. r = match_int(&args[0], &option);
  159. if (r < 0) {
  160. p9_debug(P9_DEBUG_ERROR,
  161. "integer field, but no integer?\n");
  162. ret = r;
  163. continue;
  164. }
  165. v9ses->dfltgid = make_kgid(current_user_ns(), option);
  166. if (!gid_valid(v9ses->dfltgid)) {
  167. p9_debug(P9_DEBUG_ERROR,
  168. "gid field, but not a gid?\n");
  169. ret = -EINVAL;
  170. continue;
  171. }
  172. break;
  173. case Opt_afid:
  174. r = match_int(&args[0], &option);
  175. if (r < 0) {
  176. p9_debug(P9_DEBUG_ERROR,
  177. "integer field, but no integer?\n");
  178. ret = r;
  179. continue;
  180. }
  181. v9ses->afid = option;
  182. break;
  183. case Opt_uname:
  184. kfree(v9ses->uname);
  185. v9ses->uname = match_strdup(&args[0]);
  186. if (!v9ses->uname) {
  187. ret = -ENOMEM;
  188. goto free_and_return;
  189. }
  190. break;
  191. case Opt_remotename:
  192. kfree(v9ses->aname);
  193. v9ses->aname = match_strdup(&args[0]);
  194. if (!v9ses->aname) {
  195. ret = -ENOMEM;
  196. goto free_and_return;
  197. }
  198. break;
  199. case Opt_nodevmap:
  200. v9ses->nodev = 1;
  201. break;
  202. case Opt_cache_loose:
  203. v9ses->cache = CACHE_LOOSE;
  204. break;
  205. case Opt_fscache:
  206. v9ses->cache = CACHE_FSCACHE;
  207. break;
  208. case Opt_cachetag:
  209. #ifdef CONFIG_9P_FSCACHE
  210. v9ses->cachetag = match_strdup(&args[0]);
  211. #endif
  212. break;
  213. case Opt_cache:
  214. s = match_strdup(&args[0]);
  215. if (!s) {
  216. ret = -ENOMEM;
  217. p9_debug(P9_DEBUG_ERROR,
  218. "problem allocating copy of cache arg\n");
  219. goto free_and_return;
  220. }
  221. ret = get_cache_mode(s);
  222. if (ret == -EINVAL) {
  223. kfree(s);
  224. goto free_and_return;
  225. }
  226. v9ses->cache = ret;
  227. kfree(s);
  228. break;
  229. case Opt_access:
  230. s = match_strdup(&args[0]);
  231. if (!s) {
  232. ret = -ENOMEM;
  233. p9_debug(P9_DEBUG_ERROR,
  234. "problem allocating copy of access arg\n");
  235. goto free_and_return;
  236. }
  237. v9ses->flags &= ~V9FS_ACCESS_MASK;
  238. if (strcmp(s, "user") == 0)
  239. v9ses->flags |= V9FS_ACCESS_USER;
  240. else if (strcmp(s, "any") == 0)
  241. v9ses->flags |= V9FS_ACCESS_ANY;
  242. else if (strcmp(s, "client") == 0) {
  243. v9ses->flags |= V9FS_ACCESS_CLIENT;
  244. } else {
  245. uid_t uid;
  246. v9ses->flags |= V9FS_ACCESS_SINGLE;
  247. uid = simple_strtoul(s, &e, 10);
  248. if (*e != '\0') {
  249. ret = -EINVAL;
  250. pr_info("Unknown access argument %s\n",
  251. s);
  252. kfree(s);
  253. goto free_and_return;
  254. }
  255. v9ses->uid = make_kuid(current_user_ns(), uid);
  256. if (!uid_valid(v9ses->uid)) {
  257. ret = -EINVAL;
  258. pr_info("Uknown uid %s\n", s);
  259. kfree(s);
  260. goto free_and_return;
  261. }
  262. }
  263. kfree(s);
  264. break;
  265. case Opt_posixacl:
  266. #ifdef CONFIG_9P_FS_POSIX_ACL
  267. v9ses->flags |= V9FS_POSIX_ACL;
  268. #else
  269. p9_debug(P9_DEBUG_ERROR,
  270. "Not defined CONFIG_9P_FS_POSIX_ACL. Ignoring posixacl option\n");
  271. #endif
  272. break;
  273. default:
  274. continue;
  275. }
  276. }
  277. free_and_return:
  278. kfree(tmp_options);
  279. fail_option_alloc:
  280. return ret;
  281. }
  282. /**
  283. * v9fs_session_init - initialize session
  284. * @v9ses: session information structure
  285. * @dev_name: device being mounted
  286. * @data: options
  287. *
  288. */
  289. struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses,
  290. const char *dev_name, char *data)
  291. {
  292. int retval = -EINVAL;
  293. struct p9_fid *fid;
  294. int rc;
  295. v9ses->uname = kstrdup(V9FS_DEFUSER, GFP_KERNEL);
  296. if (!v9ses->uname)
  297. return ERR_PTR(-ENOMEM);
  298. v9ses->aname = kstrdup(V9FS_DEFANAME, GFP_KERNEL);
  299. if (!v9ses->aname) {
  300. kfree(v9ses->uname);
  301. return ERR_PTR(-ENOMEM);
  302. }
  303. init_rwsem(&v9ses->rename_sem);
  304. rc = bdi_setup_and_register(&v9ses->bdi, "9p", BDI_CAP_MAP_COPY);
  305. if (rc) {
  306. kfree(v9ses->aname);
  307. kfree(v9ses->uname);
  308. return ERR_PTR(rc);
  309. }
  310. spin_lock(&v9fs_sessionlist_lock);
  311. list_add(&v9ses->slist, &v9fs_sessionlist);
  312. spin_unlock(&v9fs_sessionlist_lock);
  313. v9ses->uid = INVALID_UID;
  314. v9ses->dfltuid = V9FS_DEFUID;
  315. v9ses->dfltgid = V9FS_DEFGID;
  316. v9ses->clnt = p9_client_create(dev_name, data);
  317. if (IS_ERR(v9ses->clnt)) {
  318. retval = PTR_ERR(v9ses->clnt);
  319. v9ses->clnt = NULL;
  320. p9_debug(P9_DEBUG_ERROR, "problem initializing 9p client\n");
  321. goto error;
  322. }
  323. v9ses->flags = V9FS_ACCESS_USER;
  324. if (p9_is_proto_dotl(v9ses->clnt)) {
  325. v9ses->flags = V9FS_ACCESS_CLIENT;
  326. v9ses->flags |= V9FS_PROTO_2000L;
  327. } else if (p9_is_proto_dotu(v9ses->clnt)) {
  328. v9ses->flags |= V9FS_PROTO_2000U;
  329. }
  330. rc = v9fs_parse_options(v9ses, data);
  331. if (rc < 0) {
  332. retval = rc;
  333. goto error;
  334. }
  335. v9ses->maxdata = v9ses->clnt->msize - P9_IOHDRSZ;
  336. if (!v9fs_proto_dotl(v9ses) &&
  337. ((v9ses->flags & V9FS_ACCESS_MASK) == V9FS_ACCESS_CLIENT)) {
  338. /*
  339. * We support ACCESS_CLIENT only for dotl.
  340. * Fall back to ACCESS_USER
  341. */
  342. v9ses->flags &= ~V9FS_ACCESS_MASK;
  343. v9ses->flags |= V9FS_ACCESS_USER;
  344. }
  345. /*FIXME !! */
  346. /* for legacy mode, fall back to V9FS_ACCESS_ANY */
  347. if (!(v9fs_proto_dotu(v9ses) || v9fs_proto_dotl(v9ses)) &&
  348. ((v9ses->flags&V9FS_ACCESS_MASK) == V9FS_ACCESS_USER)) {
  349. v9ses->flags &= ~V9FS_ACCESS_MASK;
  350. v9ses->flags |= V9FS_ACCESS_ANY;
  351. v9ses->uid = INVALID_UID;
  352. }
  353. if (!v9fs_proto_dotl(v9ses) ||
  354. !((v9ses->flags & V9FS_ACCESS_MASK) == V9FS_ACCESS_CLIENT)) {
  355. /*
  356. * We support ACL checks on clinet only if the protocol is
  357. * 9P2000.L and access is V9FS_ACCESS_CLIENT.
  358. */
  359. v9ses->flags &= ~V9FS_ACL_MASK;
  360. }
  361. fid = p9_client_attach(v9ses->clnt, NULL, v9ses->uname, INVALID_UID,
  362. v9ses->aname);
  363. if (IS_ERR(fid)) {
  364. retval = PTR_ERR(fid);
  365. fid = NULL;
  366. p9_debug(P9_DEBUG_ERROR, "cannot attach\n");
  367. goto error;
  368. }
  369. if ((v9ses->flags & V9FS_ACCESS_MASK) == V9FS_ACCESS_SINGLE)
  370. fid->uid = v9ses->uid;
  371. else
  372. fid->uid = INVALID_UID;
  373. #ifdef CONFIG_9P_FSCACHE
  374. /* register the session for caching */
  375. v9fs_cache_session_get_cookie(v9ses);
  376. #endif
  377. return fid;
  378. error:
  379. bdi_destroy(&v9ses->bdi);
  380. return ERR_PTR(retval);
  381. }
  382. /**
  383. * v9fs_session_close - shutdown a session
  384. * @v9ses: session information structure
  385. *
  386. */
  387. void v9fs_session_close(struct v9fs_session_info *v9ses)
  388. {
  389. if (v9ses->clnt) {
  390. p9_client_destroy(v9ses->clnt);
  391. v9ses->clnt = NULL;
  392. }
  393. #ifdef CONFIG_9P_FSCACHE
  394. if (v9ses->fscache) {
  395. v9fs_cache_session_put_cookie(v9ses);
  396. kfree(v9ses->cachetag);
  397. }
  398. #endif
  399. kfree(v9ses->uname);
  400. kfree(v9ses->aname);
  401. bdi_destroy(&v9ses->bdi);
  402. spin_lock(&v9fs_sessionlist_lock);
  403. list_del(&v9ses->slist);
  404. spin_unlock(&v9fs_sessionlist_lock);
  405. }
  406. /**
  407. * v9fs_session_cancel - terminate a session
  408. * @v9ses: session to terminate
  409. *
  410. * mark transport as disconnected and cancel all pending requests.
  411. */
  412. void v9fs_session_cancel(struct v9fs_session_info *v9ses) {
  413. p9_debug(P9_DEBUG_ERROR, "cancel session %p\n", v9ses);
  414. p9_client_disconnect(v9ses->clnt);
  415. }
  416. /**
  417. * v9fs_session_begin_cancel - Begin terminate of a session
  418. * @v9ses: session to terminate
  419. *
  420. * After this call we don't allow any request other than clunk.
  421. */
  422. void v9fs_session_begin_cancel(struct v9fs_session_info *v9ses)
  423. {
  424. p9_debug(P9_DEBUG_ERROR, "begin cancel session %p\n", v9ses);
  425. p9_client_begin_disconnect(v9ses->clnt);
  426. }
  427. extern int v9fs_error_init(void);
  428. static struct kobject *v9fs_kobj;
  429. #ifdef CONFIG_9P_FSCACHE
  430. /**
  431. * caches_show - list caches associated with a session
  432. *
  433. * Returns the size of buffer written.
  434. */
  435. static ssize_t caches_show(struct kobject *kobj,
  436. struct kobj_attribute *attr,
  437. char *buf)
  438. {
  439. ssize_t n = 0, count = 0, limit = PAGE_SIZE;
  440. struct v9fs_session_info *v9ses;
  441. spin_lock(&v9fs_sessionlist_lock);
  442. list_for_each_entry(v9ses, &v9fs_sessionlist, slist) {
  443. if (v9ses->cachetag) {
  444. n = snprintf(buf, limit, "%s\n", v9ses->cachetag);
  445. if (n < 0) {
  446. count = n;
  447. break;
  448. }
  449. count += n;
  450. limit -= n;
  451. }
  452. }
  453. spin_unlock(&v9fs_sessionlist_lock);
  454. return count;
  455. }
  456. static struct kobj_attribute v9fs_attr_cache = __ATTR_RO(caches);
  457. #endif /* CONFIG_9P_FSCACHE */
  458. static struct attribute *v9fs_attrs[] = {
  459. #ifdef CONFIG_9P_FSCACHE
  460. &v9fs_attr_cache.attr,
  461. #endif
  462. NULL,
  463. };
  464. static struct attribute_group v9fs_attr_group = {
  465. .attrs = v9fs_attrs,
  466. };
  467. /**
  468. * v9fs_sysfs_init - Initialize the v9fs sysfs interface
  469. *
  470. */
  471. static int v9fs_sysfs_init(void)
  472. {
  473. v9fs_kobj = kobject_create_and_add("9p", fs_kobj);
  474. if (!v9fs_kobj)
  475. return -ENOMEM;
  476. if (sysfs_create_group(v9fs_kobj, &v9fs_attr_group)) {
  477. kobject_put(v9fs_kobj);
  478. return -ENOMEM;
  479. }
  480. return 0;
  481. }
  482. /**
  483. * v9fs_sysfs_cleanup - Unregister the v9fs sysfs interface
  484. *
  485. */
  486. static void v9fs_sysfs_cleanup(void)
  487. {
  488. sysfs_remove_group(v9fs_kobj, &v9fs_attr_group);
  489. kobject_put(v9fs_kobj);
  490. }
  491. static void v9fs_inode_init_once(void *foo)
  492. {
  493. struct v9fs_inode *v9inode = (struct v9fs_inode *)foo;
  494. #ifdef CONFIG_9P_FSCACHE
  495. v9inode->fscache = NULL;
  496. #endif
  497. memset(&v9inode->qid, 0, sizeof(v9inode->qid));
  498. inode_init_once(&v9inode->vfs_inode);
  499. }
  500. /**
  501. * v9fs_init_inode_cache - initialize a cache for 9P
  502. * Returns 0 on success.
  503. */
  504. static int v9fs_init_inode_cache(void)
  505. {
  506. v9fs_inode_cache = kmem_cache_create("v9fs_inode_cache",
  507. sizeof(struct v9fs_inode),
  508. 0, (SLAB_RECLAIM_ACCOUNT|
  509. SLAB_MEM_SPREAD),
  510. v9fs_inode_init_once);
  511. if (!v9fs_inode_cache)
  512. return -ENOMEM;
  513. return 0;
  514. }
  515. /**
  516. * v9fs_destroy_inode_cache - destroy the cache of 9P inode
  517. *
  518. */
  519. static void v9fs_destroy_inode_cache(void)
  520. {
  521. /*
  522. * Make sure all delayed rcu free inodes are flushed before we
  523. * destroy cache.
  524. */
  525. rcu_barrier();
  526. kmem_cache_destroy(v9fs_inode_cache);
  527. }
  528. static int v9fs_cache_register(void)
  529. {
  530. int ret;
  531. ret = v9fs_init_inode_cache();
  532. if (ret < 0)
  533. return ret;
  534. #ifdef CONFIG_9P_FSCACHE
  535. return fscache_register_netfs(&v9fs_cache_netfs);
  536. #else
  537. return ret;
  538. #endif
  539. }
  540. static void v9fs_cache_unregister(void)
  541. {
  542. v9fs_destroy_inode_cache();
  543. #ifdef CONFIG_9P_FSCACHE
  544. fscache_unregister_netfs(&v9fs_cache_netfs);
  545. #endif
  546. }
  547. /**
  548. * init_v9fs - Initialize module
  549. *
  550. */
  551. static int __init init_v9fs(void)
  552. {
  553. int err;
  554. pr_info("Installing v9fs 9p2000 file system support\n");
  555. /* TODO: Setup list of registered trasnport modules */
  556. err = v9fs_cache_register();
  557. if (err < 0) {
  558. pr_err("Failed to register v9fs for caching\n");
  559. return err;
  560. }
  561. err = v9fs_sysfs_init();
  562. if (err < 0) {
  563. pr_err("Failed to register with sysfs\n");
  564. goto out_cache;
  565. }
  566. err = register_filesystem(&v9fs_fs_type);
  567. if (err < 0) {
  568. pr_err("Failed to register filesystem\n");
  569. goto out_sysfs_cleanup;
  570. }
  571. return 0;
  572. out_sysfs_cleanup:
  573. v9fs_sysfs_cleanup();
  574. out_cache:
  575. v9fs_cache_unregister();
  576. return err;
  577. }
  578. /**
  579. * exit_v9fs - shutdown module
  580. *
  581. */
  582. static void __exit exit_v9fs(void)
  583. {
  584. v9fs_sysfs_cleanup();
  585. v9fs_cache_unregister();
  586. unregister_filesystem(&v9fs_fs_type);
  587. }
  588. module_init(init_v9fs)
  589. module_exit(exit_v9fs)
  590. MODULE_AUTHOR("Latchesar Ionkov <lucho@ionkov.net>");
  591. MODULE_AUTHOR("Eric Van Hensbergen <ericvh@gmail.com>");
  592. MODULE_AUTHOR("Ron Minnich <rminnich@lanl.gov>");
  593. MODULE_LICENSE("GPL");