VirtualBox

source: vbox/trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.c@ 76563

Last change on this file since 76563 was 76553, checked in by vboxsync, 6 years ago

scm --update-copyright-year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 16.3 KB
Line 
1/** @file
2 *
3 * vboxsf -- VirtualBox Guest Additions for Linux:
4 * Virtual File System for VirtualBox Shared Folders
5 *
6 * Module initialization/finalization
7 * File system registration/deregistration
8 * Superblock reading
9 * Few utility functions
10 */
11
12/*
13 * Copyright (C) 2006-2019 Oracle Corporation
14 *
15 * Permission is hereby granted, free of charge, to any person
16 * obtaining a copy of this software and associated documentation
17 * files (the "Software"), to deal in the Software without
18 * restriction, including without limitation the rights to use,
19 * copy, modify, merge, publish, distribute, sublicense, and/or sell
20 * copies of the Software, and to permit persons to whom the
21 * Software is furnished to do so, subject to the following
22 * conditions:
23 *
24 * The above copyright notice and this permission notice shall be
25 * included in all copies or substantial portions of the Software.
26 *
27 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
28 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
29 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
30 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
31 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
32 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
33 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
34 * OTHER DEALINGS IN THE SOFTWARE.
35 */
36
37/**
38 * @note Anyone wishing to make changes here might wish to take a look at
39 * https://github.com/torvalds/linux/blob/master/Documentation/filesystems/vfs.txt
40 * which seems to be the closest there is to official documentation on
41 * writing filesystem drivers for Linux.
42 */
43
44#include "vfsmod.h"
45#include "version-generated.h"
46#include "revision-generated.h"
47#include "product-generated.h"
48#include "VBoxGuestR0LibInternal.h"
49
50MODULE_DESCRIPTION(VBOX_PRODUCT " VFS Module for Host File System Access");
51MODULE_AUTHOR(VBOX_VENDOR);
52MODULE_LICENSE("GPL and additional rights");
53#ifdef MODULE_ALIAS_FS
54MODULE_ALIAS_FS("vboxsf");
55#endif
56#ifdef MODULE_VERSION
57MODULE_VERSION(VBOX_VERSION_STRING " r" RT_XSTR(VBOX_SVN_REV));
58#endif
59
60/* globals */
61VBGLSFCLIENT client_handle;
62
63/* forward declarations */
64static struct super_operations sf_super_ops;
65
66/* allocate global info, try to map host share */
67static int sf_glob_alloc(struct vbsf_mount_info_new *info,
68 struct sf_glob_info **sf_gp)
69{
70 int err, rc;
71 SHFLSTRING *str_name;
72 size_t name_len, str_len;
73 struct sf_glob_info *sf_g;
74
75 TRACE();
76 sf_g = kmalloc(sizeof(*sf_g), GFP_KERNEL);
77 if (!sf_g) {
78 err = -ENOMEM;
79 LogRelFunc(("could not allocate memory for global info\n"));
80 goto fail0;
81 }
82
83 RT_ZERO(*sf_g);
84
85 if (info->nullchar != '\0'
86 || info->signature[0] != VBSF_MOUNT_SIGNATURE_BYTE_0
87 || info->signature[1] != VBSF_MOUNT_SIGNATURE_BYTE_1
88 || info->signature[2] != VBSF_MOUNT_SIGNATURE_BYTE_2) {
89 err = -EINVAL;
90 goto fail1;
91 }
92
93 info->name[sizeof(info->name) - 1] = 0;
94 info->nls_name[sizeof(info->nls_name) - 1] = 0;
95
96 name_len = strlen(info->name);
97 str_len = offsetof(SHFLSTRING, String.utf8) + name_len + 1;
98 str_name = kmalloc(str_len, GFP_KERNEL);
99 if (!str_name) {
100 err = -ENOMEM;
101 LogRelFunc(("could not allocate memory for host name\n"));
102 goto fail1;
103 }
104
105 str_name->u16Length = name_len;
106 str_name->u16Size = name_len + 1;
107 memcpy(str_name->String.utf8, info->name, name_len + 1);
108
109#define _IS_UTF8(_str) \
110 (strcmp(_str, "utf8") == 0)
111#define _IS_EMPTY(_str) \
112 (strcmp(_str, "") == 0)
113
114 /* Check if NLS charset is valid and not points to UTF8 table */
115 if (info->nls_name[0]) {
116 if (_IS_UTF8(info->nls_name))
117 sf_g->nls = NULL;
118 else {
119 sf_g->nls = load_nls(info->nls_name);
120 if (!sf_g->nls) {
121 err = -EINVAL;
122 LogFunc(("failed to load nls %s\n",
123 info->nls_name));
124 kfree(str_name);
125 goto fail1;
126 }
127 }
128 } else {
129#ifdef CONFIG_NLS_DEFAULT
130 /* If no NLS charset specified, try to load the default
131 * one if it's not points to UTF8. */
132 if (!_IS_UTF8(CONFIG_NLS_DEFAULT)
133 && !_IS_EMPTY(CONFIG_NLS_DEFAULT))
134 sf_g->nls = load_nls_default();
135 else
136 sf_g->nls = NULL;
137#else
138 sf_g->nls = NULL;
139#endif
140
141#undef _IS_UTF8
142#undef _IS_EMPTY
143 }
144
145 rc = VbglR0SfMapFolder(&client_handle, str_name, &sf_g->map);
146 kfree(str_name);
147
148 if (RT_FAILURE(rc)) {
149 err = -EPROTO;
150 LogFunc(("VbglR0SfMapFolder failed rc=%d\n", rc));
151 goto fail2;
152 }
153
154 sf_g->ttl = info->ttl;
155 sf_g->uid = info->uid;
156 sf_g->gid = info->gid;
157
158 if ((unsigned)info->length >= RT_UOFFSETOF(struct vbsf_mount_info_new, tag)) {
159 /* new fields */
160 sf_g->dmode = info->dmode;
161 sf_g->fmode = info->fmode;
162 sf_g->dmask = info->dmask;
163 sf_g->fmask = info->fmask;
164 } else {
165 sf_g->dmode = ~0;
166 sf_g->fmode = ~0;
167 }
168
169 if ((unsigned)info->length >= sizeof(struct vbsf_mount_info_new)) {
170 AssertCompile(sizeof(sf_g->tag) >= sizeof(info->tag));
171 memcpy(sf_g->tag, info->tag, sizeof(info->tag));
172 sf_g->tag[sizeof(sf_g->tag) - 1] = '\0';
173 } else {
174 sf_g->tag[0] = '\0';
175 }
176
177 *sf_gp = sf_g;
178 return 0;
179
180 fail2:
181 if (sf_g->nls)
182 unload_nls(sf_g->nls);
183
184 fail1:
185 kfree(sf_g);
186
187 fail0:
188 return err;
189}
190
191/* unmap the share and free global info [sf_g] */
192static void sf_glob_free(struct sf_glob_info *sf_g)
193{
194 int rc;
195
196 TRACE();
197 rc = VbglR0SfUnmapFolder(&client_handle, &sf_g->map);
198 if (RT_FAILURE(rc))
199 LogFunc(("VbglR0SfUnmapFolder failed rc=%d\n", rc));
200
201 if (sf_g->nls)
202 unload_nls(sf_g->nls);
203
204 kfree(sf_g);
205}
206
207/**
208 * This is called (by sf_read_super_[24|26] when vfs mounts the fs and
209 * wants to read super_block.
210 *
211 * calls [sf_glob_alloc] to map the folder and allocate global
212 * information structure.
213 *
214 * initializes [sb], initializes root inode and dentry.
215 *
216 * should respect [flags]
217 */
218static int sf_read_super_aux(struct super_block *sb, void *data, int flags)
219{
220 int err;
221 struct dentry *droot;
222 struct inode *iroot;
223 struct sf_inode_info *sf_i;
224 struct sf_glob_info *sf_g;
225 SHFLFSOBJINFO fsinfo;
226 struct vbsf_mount_info_new *info;
227 bool fInodePut = true;
228
229 TRACE();
230 if (!data) {
231 LogFunc(("no mount info specified\n"));
232 return -EINVAL;
233 }
234
235 info = data;
236
237 if (flags & MS_REMOUNT) {
238 LogFunc(("remounting is not supported\n"));
239 return -ENOSYS;
240 }
241
242 err = sf_glob_alloc(info, &sf_g);
243 if (err)
244 goto fail0;
245
246 sf_i = kmalloc(sizeof(*sf_i), GFP_KERNEL);
247 if (!sf_i) {
248 err = -ENOMEM;
249 LogRelFunc(("could not allocate memory for root inode info\n"));
250 goto fail1;
251 }
252
253 sf_i->handle = SHFL_HANDLE_NIL;
254 sf_i->path = kmalloc(sizeof(SHFLSTRING) + 1, GFP_KERNEL);
255 if (!sf_i->path) {
256 err = -ENOMEM;
257 LogRelFunc(("could not allocate memory for root inode path\n"));
258 goto fail2;
259 }
260
261 sf_i->path->u16Length = 1;
262 sf_i->path->u16Size = 2;
263 sf_i->path->String.utf8[0] = '/';
264 sf_i->path->String.utf8[1] = 0;
265 sf_i->force_reread = 0;
266
267 err = sf_stat(__func__, sf_g, sf_i->path, &fsinfo, 0);
268 if (err) {
269 LogFunc(("could not stat root of share\n"));
270 goto fail3;
271 }
272
273 sb->s_magic = 0xface;
274 sb->s_blocksize = 1024;
275#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 3)
276 /* Required for seek/sendfile.
277 *
278 * Must by less than or equal to INT64_MAX despite the fact that the
279 * declaration of this variable is unsigned long long. See determination
280 * of 'loff_t max' in fs/read_write.c / do_sendfile(). I don't know the
281 * correct limit but MAX_LFS_FILESIZE (8TB-1 on 32-bit boxes) takes the
282 * page cache into account and is the suggested limit. */
283#if defined MAX_LFS_FILESIZE
284 sb->s_maxbytes = MAX_LFS_FILESIZE;
285#else
286 sb->s_maxbytes = 0x7fffffffffffffffULL;
287#endif
288#endif
289 sb->s_op = &sf_super_ops;
290
291#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 25)
292 iroot = iget_locked(sb, 0);
293#else
294 iroot = iget(sb, 0);
295#endif
296 if (!iroot) {
297 err = -ENOMEM; /* XXX */
298 LogFunc(("could not get root inode\n"));
299 goto fail3;
300 }
301
302 if (sf_init_backing_dev(sf_g)) {
303 err = -EINVAL;
304 LogFunc(("could not init bdi\n"));
305#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 25)
306 unlock_new_inode(iroot);
307#endif
308 goto fail4;
309 }
310
311 sf_init_inode(sf_g, iroot, &fsinfo);
312 SET_INODE_INFO(iroot, sf_i);
313
314#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 25)
315 unlock_new_inode(iroot);
316#endif
317
318#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0)
319 droot = d_make_root(iroot);
320#else
321 droot = d_alloc_root(iroot);
322#endif
323 if (!droot) {
324 err = -ENOMEM; /* XXX */
325 LogFunc(("d_alloc_root failed\n"));
326#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0)
327 fInodePut = false;
328#endif
329 goto fail5;
330 }
331
332 sb->s_root = droot;
333 SET_GLOB_INFO(sb, sf_g);
334 return 0;
335
336 fail5:
337 sf_done_backing_dev(sf_g);
338
339 fail4:
340 if (fInodePut)
341 iput(iroot);
342
343 fail3:
344 kfree(sf_i->path);
345
346 fail2:
347 kfree(sf_i);
348
349 fail1:
350 sf_glob_free(sf_g);
351
352 fail0:
353 return err;
354}
355
356#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
357static struct super_block *sf_read_super_24(struct super_block *sb, void *data,
358 int flags)
359{
360 int err;
361
362 TRACE();
363 err = sf_read_super_aux(sb, data, flags);
364 if (err)
365 return NULL;
366
367 return sb;
368}
369#endif
370
371/* this is called when vfs is about to destroy the [inode]. all
372 resources associated with this [inode] must be cleared here */
373#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
374static void sf_clear_inode(struct inode *inode)
375{
376 struct sf_inode_info *sf_i;
377
378 TRACE();
379 sf_i = GET_INODE_INFO(inode);
380 if (!sf_i)
381 return;
382
383 BUG_ON(!sf_i->path);
384 kfree(sf_i->path);
385 kfree(sf_i);
386 SET_INODE_INFO(inode, NULL);
387}
388#else
389static void sf_evict_inode(struct inode *inode)
390{
391 struct sf_inode_info *sf_i;
392
393 TRACE();
394 truncate_inode_pages(&inode->i_data, 0);
395#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
396 clear_inode(inode);
397#else
398 end_writeback(inode);
399#endif
400
401 sf_i = GET_INODE_INFO(inode);
402 if (!sf_i)
403 return;
404
405 BUG_ON(!sf_i->path);
406 kfree(sf_i->path);
407 kfree(sf_i);
408 SET_INODE_INFO(inode, NULL);
409}
410#endif
411
412/* this is called by vfs when it wants to populate [inode] with data.
413 the only thing that is known about inode at this point is its index
414 hence we can't do anything here, and let lookup/whatever with the
415 job to properly fill then [inode] */
416#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25)
417static void sf_read_inode(struct inode *inode)
418{
419}
420#endif
421
422/* vfs is done with [sb] (umount called) call [sf_glob_free] to unmap
423 the folder and free [sf_g] */
424static void sf_put_super(struct super_block *sb)
425{
426 struct sf_glob_info *sf_g;
427
428 sf_g = GET_GLOB_INFO(sb);
429 BUG_ON(!sf_g);
430 sf_done_backing_dev(sf_g);
431 sf_glob_free(sf_g);
432}
433
434#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
435static int sf_statfs(struct super_block *sb, STRUCT_STATFS * stat)
436{
437 return sf_get_volume_info(sb, stat);
438}
439#else
440static int sf_statfs(struct dentry *dentry, STRUCT_STATFS * stat)
441{
442 struct super_block *sb = dentry->d_inode->i_sb;
443 return sf_get_volume_info(sb, stat);
444}
445#endif
446
447static int sf_remount_fs(struct super_block *sb, int *flags, char *data)
448{
449#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 23)
450 struct sf_glob_info *sf_g;
451 struct sf_inode_info *sf_i;
452 struct inode *iroot;
453 SHFLFSOBJINFO fsinfo;
454 int err;
455
456 sf_g = GET_GLOB_INFO(sb);
457 BUG_ON(!sf_g);
458 if (data && data[0] != 0) {
459 struct vbsf_mount_info_new *info =
460 (struct vbsf_mount_info_new *)data;
461 if (info->signature[0] == VBSF_MOUNT_SIGNATURE_BYTE_0
462 && info->signature[1] == VBSF_MOUNT_SIGNATURE_BYTE_1
463 && info->signature[2] == VBSF_MOUNT_SIGNATURE_BYTE_2) {
464 sf_g->uid = info->uid;
465 sf_g->gid = info->gid;
466 sf_g->ttl = info->ttl;
467 if ((unsigned)info->length >= RT_UOFFSETOF(struct vbsf_mount_info_new, tag)) {
468 sf_g->dmode = info->dmode;
469 sf_g->fmode = info->fmode;
470 sf_g->dmask = info->dmask;
471 sf_g->fmask = info->fmask;
472 } else {
473 sf_g->dmode = ~0;
474 sf_g->fmode = ~0;
475 }
476 if ((unsigned)info->length >= sizeof(struct vbsf_mount_info_new)) {
477 AssertCompile(sizeof(sf_g->tag) >= sizeof(info->tag));
478 memcpy(sf_g->tag, info->tag, sizeof(info->tag));
479 sf_g->tag[sizeof(sf_g->tag) - 1] = '\0';
480 } else {
481 sf_g->tag[0] = '\0';
482 }
483 }
484 }
485
486 iroot = ilookup(sb, 0);
487 if (!iroot)
488 return -ENOSYS;
489
490 sf_i = GET_INODE_INFO(iroot);
491 err = sf_stat(__func__, sf_g, sf_i->path, &fsinfo, 0);
492 BUG_ON(err != 0);
493 sf_init_inode(sf_g, iroot, &fsinfo);
494 /*unlock_new_inode(iroot); */
495 return 0;
496#else
497 return -ENOSYS;
498#endif
499}
500
501/** Show mount options. */
502#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
503static int sf_show_options(struct seq_file *m, struct vfsmount *mnt)
504#else
505static int sf_show_options(struct seq_file *m, struct dentry *root)
506#endif
507{
508#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
509 struct super_block *sb = mnt->mnt_sb;
510#else
511 struct super_block *sb = root->d_sb;
512#endif
513 struct sf_glob_info *sf_g = GET_GLOB_INFO(sb);
514 if (sf_g) {
515 seq_printf(m, ",uid=%u,gid=%u,ttl=%u,dmode=0%o,fmode=0%o,dmask=0%o,fmask=0%o",
516 sf_g->uid, sf_g->gid, sf_g->ttl, sf_g->dmode, sf_g->fmode, sf_g->dmask, sf_g->fmask);
517 if (sf_g->tag[0] != '\0') {
518 seq_puts(m, ",tag=");
519 seq_escape(m, sf_g->tag, " \t\n\\");
520 }
521 }
522
523 return 0;
524}
525
526/** @todo Implement show_options (forever) or maybe set s_options (2.6.25+).
527 * Necessary for the automounter tagging. */
528static struct super_operations sf_super_ops = {
529#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
530 .clear_inode = sf_clear_inode,
531#else
532 .evict_inode = sf_evict_inode,
533#endif
534#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25)
535 .read_inode = sf_read_inode,
536#endif
537 .put_super = sf_put_super,
538 .statfs = sf_statfs,
539 .remount_fs = sf_remount_fs,
540 .show_options = sf_show_options
541};
542
543#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
544static DECLARE_FSTYPE(vboxsf_fs_type, "vboxsf", sf_read_super_24, 0);
545#else
546static int sf_read_super_26(struct super_block *sb, void *data, int flags)
547{
548 int err;
549
550 TRACE();
551 err = sf_read_super_aux(sb, data, flags);
552 if (err)
553 printk(KERN_DEBUG "sf_read_super_aux err=%d\n", err);
554
555 return err;
556}
557
558#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
559static struct super_block *sf_get_sb(struct file_system_type *fs_type,
560 int flags, const char *dev_name,
561 void *data)
562{
563 TRACE();
564 return get_sb_nodev(fs_type, flags, data, sf_read_super_26);
565}
566#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
567static int sf_get_sb(struct file_system_type *fs_type, int flags,
568 const char *dev_name, void *data, struct vfsmount *mnt)
569{
570 TRACE();
571 return get_sb_nodev(fs_type, flags, data, sf_read_super_26, mnt);
572}
573#else
574static struct dentry *sf_mount(struct file_system_type *fs_type, int flags,
575 const char *dev_name, void *data)
576{
577 TRACE();
578 return mount_nodev(fs_type, flags, data, sf_read_super_26);
579}
580#endif
581
582static struct file_system_type vboxsf_fs_type = {
583 .owner = THIS_MODULE,
584 .name = "vboxsf",
585#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
586 .get_sb = sf_get_sb,
587#else
588 .mount = sf_mount,
589#endif
590 .kill_sb = kill_anon_super
591};
592#endif
593
594#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
595static int follow_symlinks = 0;
596module_param(follow_symlinks, int, 0);
597MODULE_PARM_DESC(follow_symlinks,
598 "Let host resolve symlinks rather than showing them");
599#endif
600
601/* Module initialization/finalization handlers */
602static int __init init(void)
603{
604 int rcVBox;
605 int rcRet = 0;
606 int err;
607
608 TRACE();
609
610 if (sizeof(struct vbsf_mount_info_new) > PAGE_SIZE) {
611 printk(KERN_ERR
612 "Mount information structure is too large %lu\n"
613 "Must be less than or equal to %lu\n",
614 (unsigned long)sizeof(struct vbsf_mount_info_new),
615 (unsigned long)PAGE_SIZE);
616 return -EINVAL;
617 }
618
619 err = register_filesystem(&vboxsf_fs_type);
620 if (err) {
621 LogFunc(("register_filesystem err=%d\n", err));
622 return err;
623 }
624
625 rcVBox = VbglR0HGCMInit();
626 if (RT_FAILURE(rcVBox)) {
627 LogRelFunc(("VbglR0HGCMInit failed, rc=%d\n", rcVBox));
628 rcRet = -EPROTO;
629 goto fail0;
630 }
631
632 rcVBox = VbglR0SfConnect(&client_handle);
633 if (RT_FAILURE(rcVBox)) {
634 LogRelFunc(("VbglR0SfConnect failed, rc=%d\n", rcVBox));
635 rcRet = -EPROTO;
636 goto fail1;
637 }
638
639 rcVBox = VbglR0SfSetUtf8(&client_handle);
640 if (RT_FAILURE(rcVBox)) {
641 LogRelFunc(("VbglR0SfSetUtf8 failed, rc=%d\n", rcVBox));
642 rcRet = -EPROTO;
643 goto fail2;
644 }
645#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
646 if (!follow_symlinks) {
647 rcVBox = VbglR0SfSetSymlinks(&client_handle);
648 if (RT_FAILURE(rcVBox)) {
649 printk(KERN_WARNING
650 "vboxsf: Host unable to show symlinks, rc=%d\n",
651 rcVBox);
652 }
653 }
654#endif
655
656 printk(KERN_DEBUG
657 "vboxsf: Successfully loaded version " VBOX_VERSION_STRING
658 " (interface " RT_XSTR(VMMDEV_VERSION) ")\n");
659
660 return 0;
661
662 fail2:
663 VbglR0SfDisconnect(&client_handle);
664
665 fail1:
666 VbglR0HGCMTerminate();
667
668 fail0:
669 unregister_filesystem(&vboxsf_fs_type);
670 return rcRet;
671}
672
673static void __exit fini(void)
674{
675 TRACE();
676
677 VbglR0SfDisconnect(&client_handle);
678 VbglR0HGCMTerminate();
679 unregister_filesystem(&vboxsf_fs_type);
680}
681
682module_init(init);
683module_exit(fini);
684
685/* C++ hack */
686int __gxx_personality_v0 = 0xdeadbeef;
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette