VirtualBox

source: vbox/trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h@ 34364

Last change on this file since 34364 was 33940, checked in by vboxsync, 14 years ago

Support/linux: cosmetics

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 21.4 KB
Line 
1/* $Revision: 33940 $ */
2/** @file
3 * VirtualBox Support Driver - Internal header.
4 */
5
6/*
7 * Copyright (C) 2006-2007 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * The contents of this file may alternatively be used under the terms
18 * of the Common Development and Distribution License Version 1.0
19 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20 * VirtualBox OSE distribution, in which case the provisions of the
21 * CDDL are applicable instead of those of the GPL.
22 *
23 * You may elect to license modified versions of this file under the
24 * terms and conditions of either the GPL or the CDDL or both.
25 */
26
27#ifndef ___SUPDrvInternal_h
28#define ___SUPDrvInternal_h
29
30
31/*******************************************************************************
32* Header Files *
33*******************************************************************************/
34#include <VBox/cdefs.h>
35#include <VBox/types.h>
36#include <iprt/assert.h>
37#include <VBox/sup.h>
38#include <iprt/memobj.h>
39#include <iprt/time.h>
40#include <iprt/timer.h>
41#include <iprt/string.h>
42#include <iprt/err.h>
43
44#ifdef SUPDRV_AGNOSTIC
45/* do nothing */
46
47#elif defined(RT_OS_WINDOWS)
48 RT_C_DECLS_BEGIN
49# if (_MSC_VER >= 1400) && !defined(VBOX_WITH_PATCHED_DDK)
50# define _InterlockedExchange _InterlockedExchange_StupidDDKVsCompilerCrap
51# define _InterlockedExchangeAdd _InterlockedExchangeAdd_StupidDDKVsCompilerCrap
52# define _InterlockedCompareExchange _InterlockedCompareExchange_StupidDDKVsCompilerCrap
53# define _InterlockedAddLargeStatistic _InterlockedAddLargeStatistic_StupidDDKVsCompilerCrap
54# define _interlockedbittestandset _interlockedbittestandset_StupidDDKVsCompilerCrap
55# define _interlockedbittestandreset _interlockedbittestandreset_StupidDDKVsCompilerCrap
56# define _interlockedbittestandset64 _interlockedbittestandset64_StupidDDKVsCompilerCrap
57# define _interlockedbittestandreset64 _interlockedbittestandreset64_StupidDDKVsCompilerCrap
58# pragma warning(disable : 4163)
59# include <ntddk.h>
60# pragma warning(default : 4163)
61# undef _InterlockedExchange
62# undef _InterlockedExchangeAdd
63# undef _InterlockedCompareExchange
64# undef _InterlockedAddLargeStatistic
65# undef _interlockedbittestandset
66# undef _interlockedbittestandreset
67# undef _interlockedbittestandset64
68# undef _interlockedbittestandreset64
69# else
70# include <ntddk.h>
71# endif
72# include <memory.h>
73# define memcmp(a,b,c) mymemcmp(a,b,c)
74 int VBOXCALL mymemcmp(const void *, const void *, size_t);
75 RT_C_DECLS_END
76
77#elif defined(RT_OS_LINUX)
78# ifndef AUTOCONF_INCLUDED
79# include <linux/autoconf.h>
80# endif
81# include <linux/version.h>
82# if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS)
83# define MODVERSIONS
84# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 71)
85# include <linux/modversions.h>
86# endif
87# endif
88# if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 0)
89# undef ALIGN
90# endif
91# ifndef KBUILD_STR
92# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16)
93# define KBUILD_STR(s) s
94# else
95# define KBUILD_STR(s) #s
96# endif
97# endif
98# include <linux/string.h>
99# include <linux/spinlock.h>
100# include <linux/slab.h>
101# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
102# include <linux/semaphore.h>
103# else /* older kernels */
104# include <asm/semaphore.h>
105# endif /* older kernels */
106# include <linux/timer.h>
107
108#elif defined(RT_OS_DARWIN)
109# include <libkern/libkern.h>
110# include <iprt/string.h>
111
112#elif defined(RT_OS_OS2)
113
114#elif defined(RT_OS_FREEBSD)
115# define memset libkern_memset /** @todo these are just hacks to get it compiling, check out later. */
116# define memcmp libkern_memcmp
117# define strchr libkern_strchr
118# define strrchr libkern_strrchr
119# define ffsl libkern_ffsl
120# define fls libkern_fls
121# define flsl libkern_flsl
122# include <sys/libkern.h>
123# undef memset
124# undef memcmp
125# undef strchr
126# undef strrchr
127# undef ffs
128# undef ffsl
129# undef fls
130# undef flsl
131# include <iprt/string.h>
132
133#elif defined(RT_OS_SOLARIS)
134# include <sys/cmn_err.h>
135# include <iprt/string.h>
136
137#else
138# error "unsupported OS."
139#endif
140
141#include "SUPDrvIOC.h"
142#include "SUPDrvIDC.h"
143
144
145
146/*******************************************************************************
147* Defined Constants And Macros *
148*******************************************************************************/
149/*
150 * Hardcoded cookies.
151 */
152#define BIRD 0x64726962 /* 'bird' */
153#define BIRD_INV 0x62697264 /* 'drib' */
154
155
156#ifdef RT_OS_WINDOWS
157/** Use a normal mutex for the loader so we remain at the same IRQL after
158 * taking it.
159 * @todo fix the mutex implementation on linux and make this the default. */
160# define SUPDRV_USE_MUTEX_FOR_LDR
161
162/** Use a normal mutex for the GIP so we remain at the same IRQL after
163 * taking it.
164 * @todo fix the mutex implementation on linux and make this the default. */
165# define SUPDRV_USE_MUTEX_FOR_GIP
166#endif
167
168
169/**
170 * OS debug print macro.
171 */
172#define OSDBGPRINT(a) SUPR0Printf a
173
174
175/** @name Context values for the per-session handle tables.
176 * The context value is used to distinguish between the different kinds of
177 * handles, making the handle table API do all the work.
178 * @{ */
179/** Handle context value for single release event handles. */
180#define SUPDRV_HANDLE_CTX_EVENT ((void *)(uintptr_t)(SUPDRVOBJTYPE_SEM_EVENT))
181/** Handle context value for multiple release event handles. */
182#define SUPDRV_HANDLE_CTX_EVENT_MULTI ((void *)(uintptr_t)(SUPDRVOBJTYPE_SEM_EVENT_MULTI))
183/** @} */
184
185
186/**
187 * Validates a session pointer.
188 *
189 * @returns true/false accordingly.
190 * @param pSession The session.
191 */
192#define SUP_IS_SESSION_VALID(pSession) \
193 ( VALID_PTR(pSession) \
194 && pSession->u32Cookie == BIRD_INV)
195
196
197/*******************************************************************************
198* Structures and Typedefs *
199*******************************************************************************/
200/** Pointer to the device extension. */
201typedef struct SUPDRVDEVEXT *PSUPDRVDEVEXT;
202
203
204/**
205 * Memory reference types.
206 */
207typedef enum
208{
209 /** Unused entry */
210 MEMREF_TYPE_UNUSED = 0,
211 /** Locked memory (r3 mapping only). */
212 MEMREF_TYPE_LOCKED,
213 /** Continuous memory block (r3 and r0 mapping). */
214 MEMREF_TYPE_CONT,
215 /** Low memory block (r3 and r0 mapping). */
216 MEMREF_TYPE_LOW,
217 /** Memory block (r3 and r0 mapping). */
218 MEMREF_TYPE_MEM,
219 /** Locked memory (r3 mapping only) allocated by the support driver. */
220 MEMREF_TYPE_PAGE,
221 /** Blow the type up to 32-bit and mark the end. */
222 MEMREG_TYPE_32BIT_HACK = 0x7fffffff
223} SUPDRVMEMREFTYPE, *PSUPDRVMEMREFTYPE;
224
225
226/**
227 * Structure used for tracking memory a session
228 * references in one way or another.
229 */
230typedef struct SUPDRVMEMREF
231{
232 /** The memory object handle. */
233 RTR0MEMOBJ MemObj;
234 /** The ring-3 mapping memory object handle. */
235 RTR0MEMOBJ MapObjR3;
236 /** Type of memory. */
237 SUPDRVMEMREFTYPE eType;
238} SUPDRVMEMREF, *PSUPDRVMEMREF;
239
240
241/**
242 * Bundle of locked memory ranges.
243 */
244typedef struct SUPDRVBUNDLE
245{
246 /** Pointer to the next bundle. */
247 struct SUPDRVBUNDLE * volatile pNext;
248 /** Referenced memory. */
249 SUPDRVMEMREF aMem[64];
250 /** Number of entries used. */
251 uint32_t volatile cUsed;
252} SUPDRVBUNDLE, *PSUPDRVBUNDLE;
253
254
255/**
256 * Loaded image.
257 */
258typedef struct SUPDRVLDRIMAGE
259{
260 /** Next in chain. */
261 struct SUPDRVLDRIMAGE * volatile pNext;
262 /** Pointer to the image. */
263 void *pvImage;
264 /** Pointer to the allocated image buffer.
265 * pvImage is 32-byte aligned or it may governed by the native loader (this
266 * member is NULL then). */
267 void *pvImageAlloc;
268 /** Size of the image including the tables. This is mainly for verification
269 * of the load request. */
270 uint32_t cbImageWithTabs;
271 /** Size of the image. */
272 uint32_t cbImageBits;
273 /** The number of entries in the symbol table. */
274 uint32_t cSymbols;
275 /** Pointer to the symbol table. */
276 PSUPLDRSYM paSymbols;
277 /** The offset of the string table. */
278 char *pachStrTab;
279 /** Size of the string table. */
280 uint32_t cbStrTab;
281 /** Pointer to the optional module initialization callback. */
282 PFNR0MODULEINIT pfnModuleInit;
283 /** Pointer to the optional module termination callback. */
284 PFNR0MODULETERM pfnModuleTerm;
285 /** Service request handler. This is NULL for non-service modules. */
286 PFNSUPR0SERVICEREQHANDLER pfnServiceReqHandler;
287 /** The ldr image state. (IOCtl code of last operation.) */
288 uint32_t uState;
289 /** Usage count. */
290 uint32_t volatile cUsage;
291#ifdef RT_OS_WINDOWS
292 /** The section object for the loaded image (fNative=true). */
293 void *pvNtSectionObj;
294 /** Lock object. */
295 RTR0MEMOBJ hMemLock;
296#endif
297 /** Whether it's loaded by the native loader or not. */
298 bool fNative;
299 /** Image name. */
300 char szName[32];
301} SUPDRVLDRIMAGE, *PSUPDRVLDRIMAGE;
302
303
304/** Image usage record. */
305typedef struct SUPDRVLDRUSAGE
306{
307 /** Next in chain. */
308 struct SUPDRVLDRUSAGE * volatile pNext;
309 /** The image. */
310 PSUPDRVLDRIMAGE pImage;
311 /** Load count. */
312 uint32_t volatile cUsage;
313} SUPDRVLDRUSAGE, *PSUPDRVLDRUSAGE;
314
315
316/**
317 * Component factory registration record.
318 */
319typedef struct SUPDRVFACTORYREG
320{
321 /** Pointer to the next registration. */
322 struct SUPDRVFACTORYREG *pNext;
323 /** Pointer to the registered factory. */
324 PCSUPDRVFACTORY pFactory;
325 /** The session owning the factory.
326 * Used for deregistration and session cleanup. */
327 PSUPDRVSESSION pSession;
328 /** Length of the name. */
329 size_t cchName;
330} SUPDRVFACTORYREG;
331/** Pointer to a component factory registration record. */
332typedef SUPDRVFACTORYREG *PSUPDRVFACTORYREG;
333/** Pointer to a const component factory registration record. */
334typedef SUPDRVFACTORYREG const *PCSUPDRVFACTORYREG;
335
336
337/**
338 * Registered object.
339 * This takes care of reference counting and tracking data for access checks.
340 */
341typedef struct SUPDRVOBJ
342{
343 /** Magic value (SUPDRVOBJ_MAGIC). */
344 uint32_t u32Magic;
345 /** The object type. */
346 SUPDRVOBJTYPE enmType;
347 /** Pointer to the next in the global list. */
348 struct SUPDRVOBJ * volatile pNext;
349 /** Pointer to the object destructor.
350 * This may be set to NULL if the image containing the destructor get unloaded. */
351 PFNSUPDRVDESTRUCTOR pfnDestructor;
352 /** User argument 1. */
353 void *pvUser1;
354 /** User argument 2. */
355 void *pvUser2;
356 /** The total sum of all per-session usage. */
357 uint32_t volatile cUsage;
358 /** The creator user id. */
359 RTUID CreatorUid;
360 /** The creator group id. */
361 RTGID CreatorGid;
362 /** The creator process id. */
363 RTPROCESS CreatorProcess;
364} SUPDRVOBJ, *PSUPDRVOBJ;
365
366/** Magic number for SUPDRVOBJ::u32Magic. (Dame Agatha Mary Clarissa Christie). */
367#define SUPDRVOBJ_MAGIC 0x18900915
368/** Dead number magic for SUPDRVOBJ::u32Magic. */
369#define SUPDRVOBJ_MAGIC_DEAD 0x19760112
370
371/**
372 * The per-session object usage record.
373 */
374typedef struct SUPDRVUSAGE
375{
376 /** Pointer to the next in the list. */
377 struct SUPDRVUSAGE * volatile pNext;
378 /** Pointer to the object we're recording usage for. */
379 PSUPDRVOBJ pObj;
380 /** The usage count. */
381 uint32_t volatile cUsage;
382} SUPDRVUSAGE, *PSUPDRVUSAGE;
383
384
385/**
386 * Per session data.
387 * This is mainly for memory tracking.
388 */
389typedef struct SUPDRVSESSION
390{
391 /** Pointer to the device extension. */
392 PSUPDRVDEVEXT pDevExt;
393 /** Session Cookie. */
394 uint32_t u32Cookie;
395
396 /** The VM associated with the session. */
397 PVM pVM;
398 /** Handle table for IPRT semaphore wrapper APIs.
399 * Programmable from R0 and R3. */
400 RTHANDLETABLE hHandleTable;
401 /** Load usage records. (protected by SUPDRVDEVEXT::mtxLdr) */
402 PSUPDRVLDRUSAGE volatile pLdrUsage;
403
404 /** Spinlock protecting the bundles and the GIP members. */
405 RTSPINLOCK Spinlock;
406 /** The ring-3 mapping of the GIP (readonly). */
407 RTR0MEMOBJ GipMapObjR3;
408 /** Set if the session is using the GIP. */
409 uint32_t fGipReferenced;
410 /** Bundle of locked memory objects. */
411 SUPDRVBUNDLE Bundle;
412 /** List of generic usage records. (protected by SUPDRVDEVEXT::SpinLock) */
413 PSUPDRVUSAGE volatile pUsage;
414
415 /** The user id of the session. (Set by the OS part.) */
416 RTUID Uid;
417 /** The group id of the session. (Set by the OS part.) */
418 RTGID Gid;
419 /** The process (id) of the session. */
420 RTPROCESS Process;
421 /** Which process this session is associated with.
422 * This is NIL_RTR0PROCESS for kernel sessions and valid for user ones. */
423 RTR0PROCESS R0Process;
424#ifndef SUPDRV_AGNOSTIC
425# if defined(RT_OS_DARWIN)
426 /** Pointer to the associated org_virtualbox_SupDrvClient object. */
427 void *pvSupDrvClient;
428 /** Whether this session has been opened or not. */
429 bool fOpened;
430# endif
431# if defined(RT_OS_OS2)
432 /** The system file number of this session. */
433 uint16_t sfn;
434 uint16_t Alignment; /**< Alignment */
435# endif
436# if defined(RT_OS_DARWIN) || defined(RT_OS_OS2) || defined(RT_OS_SOLARIS)
437 /** Pointer to the next session with the same hash. */
438 PSUPDRVSESSION pNextHash;
439# endif
440#endif /* !SUPDRV_AGNOSTIC */
441} SUPDRVSESSION;
442
443
444/**
445 * Device extension.
446 */
447typedef struct SUPDRVDEVEXT
448{
449 /** Spinlock to serialize the initialization, usage counting and objects. */
450 RTSPINLOCK Spinlock;
451
452 /** List of registered objects. Protected by the spinlock. */
453 PSUPDRVOBJ volatile pObjs;
454 /** List of free object usage records. */
455 PSUPDRVUSAGE volatile pUsageFree;
456
457 /** Global cookie. */
458 uint32_t u32Cookie;
459 /** The actual size of SUPDRVSESSION. (SUPDRV_AGNOSTIC) */
460 uint32_t cbSession;
461
462 /** Loader mutex.
463 * This protects pvVMMR0, pvVMMR0Entry, pImages and SUPDRVSESSION::pLdrUsage. */
464#ifdef SUPDRV_USE_MUTEX_FOR_LDR
465 RTSEMMUTEX mtxLdr;
466#else
467 RTSEMFASTMUTEX mtxLdr;
468#endif
469
470 /** VMM Module 'handle'.
471 * 0 if the code VMM isn't loaded and Idt are nops. */
472 void * volatile pvVMMR0;
473 /** VMMR0EntryInt() pointer. */
474 DECLR0CALLBACKMEMBER(int, pfnVMMR0EntryInt, (PVM pVM, unsigned uOperation, void *pvArg));
475 /** VMMR0EntryFast() pointer. */
476 DECLR0CALLBACKMEMBER(void, pfnVMMR0EntryFast, (PVM pVM, VMCPUID idCpu, unsigned uOperation));
477 /** VMMR0EntryEx() pointer. */
478 DECLR0CALLBACKMEMBER(int, pfnVMMR0EntryEx, (PVM pVM, VMCPUID idCpu, unsigned uOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession));
479
480 /** Linked list of loaded code. */
481 PSUPDRVLDRIMAGE volatile pLdrImages;
482
483 /** GIP mutex.
484 * Any changes to any of the GIP members requires ownership of this mutex,
485 * except on driver init and termination. */
486#ifdef SUPDRV_USE_MUTEX_FOR_GIP
487 RTSEMMUTEX mtxGip;
488#else
489 RTSEMFASTMUTEX mtxGip;
490#endif
491 /** Pointer to the Global Info Page (GIP). */
492 PSUPGLOBALINFOPAGE pGip;
493 /** The physical address of the GIP. */
494 RTHCPHYS HCPhysGip;
495 /** Number of processes using the GIP.
496 * (The updates are suspend while cGipUsers is 0.)*/
497 uint32_t volatile cGipUsers;
498 /** The ring-0 memory object handle for the GIP page. */
499 RTR0MEMOBJ GipMemObj;
500 /** The GIP timer handle. */
501 PRTTIMER pGipTimer;
502 /** If non-zero we've successfully called RTTimerRequestSystemGranularity(). */
503 uint32_t u32SystemTimerGranularityGrant;
504 /** The CPU id of the GIP master.
505 * This CPU is responsible for the updating the common GIP data. */
506 RTCPUID volatile idGipMaster;
507
508 /** Component factory mutex.
509 * This protects pComponentFactoryHead and component factory querying. */
510 RTSEMFASTMUTEX mtxComponentFactory;
511 /** The head of the list of registered component factories. */
512 PSUPDRVFACTORYREG pComponentFactoryHead;
513
514#ifndef SUPDRV_AGNOSTIC
515# ifdef RT_OS_WINDOWS
516 /* Callback object returned by ExCreateCallback. */
517 PCALLBACK_OBJECT pObjPowerCallback;
518 /* Callback handle returned by ExRegisterCallback. */
519 PVOID hPowerCallback;
520# endif
521#endif
522} SUPDRVDEVEXT;
523
524
525RT_C_DECLS_BEGIN
526
527/*******************************************************************************
528* OS Specific Functions *
529*******************************************************************************/
530void VBOXCALL supdrvOSObjInitCreator(PSUPDRVOBJ pObj, PSUPDRVSESSION pSession);
531bool VBOXCALL supdrvOSObjCanAccess(PSUPDRVOBJ pObj, PSUPDRVSESSION pSession, const char *pszObjName, int *prc);
532bool VBOXCALL supdrvOSGetForcedAsyncTscMode(PSUPDRVDEVEXT pDevExt);
533int VBOXCALL supdrvOSEnableVTx(bool fEnabled);
534
535/**
536 * Try open the image using the native loader.
537 *
538 * @returns IPRT status code.
539 * @retval VERR_NOT_SUPPORTED if native loading isn't supported.
540 *
541 * @param pDevExt The device globals.
542 * @param pImage The image handle. pvImage should be set on
543 * success, pvImageAlloc can also be set if
544 * appropriate.
545 * @param pszFilename The file name - UTF-8, may containing UNIX
546 * slashes on non-UNIX systems.
547 */
548int VBOXCALL supdrvOSLdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename);
549
550/**
551 * Validates an entry point address.
552 *
553 * Called before supdrvOSLdrLoad.
554 *
555 * @returns IPRT status code.
556 * @param pDevExt The device globals.
557 * @param pImage The image data (still in the open state).
558 * @param pv The address within the image.
559 * @param pbImageBits The image bits as loaded by ring-3.
560 */
561int VBOXCALL supdrvOSLdrValidatePointer(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage,
562 void *pv, const uint8_t *pbImageBits);
563
564/**
565 * Load the image.
566 *
567 * @returns IPRT status code.
568 * @param pDevExt The device globals.
569 * @param pImage The image data (up to date except for some
570 * entry point pointers).
571 * @param pbImageBits The image bits as loaded by ring-3.
572 */
573int VBOXCALL supdrvOSLdrLoad(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const uint8_t *pbImageBits);
574
575
576/**
577 * Unload the image.
578 *
579 * @param pDevExt The device globals.
580 * @param pImage The image data (mostly still valid).
581 */
582void VBOXCALL supdrvOSLdrUnload(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage);
583
584
585/*******************************************************************************
586* Shared Functions *
587*******************************************************************************/
588/* SUPDrv.c */
589int VBOXCALL supdrvIOCtl(uintptr_t uIOCtl, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPREQHDR pReqHdr);
590int VBOXCALL supdrvIOCtlFast(uintptr_t uIOCtl, VMCPUID idCpu, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession);
591int VBOXCALL supdrvIDC(uintptr_t uIOCtl, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPDRVIDCREQHDR pReqHdr);
592int VBOXCALL supdrvInitDevExt(PSUPDRVDEVEXT pDevExt, size_t cbSession);
593void VBOXCALL supdrvDeleteDevExt(PSUPDRVDEVEXT pDevExt);
594int VBOXCALL supdrvCreateSession(PSUPDRVDEVEXT pDevExt, bool fUser, PSUPDRVSESSION *ppSession);
595void VBOXCALL supdrvCloseSession(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession);
596void VBOXCALL supdrvCleanupSession(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession);
597
598RT_C_DECLS_END
599
600#endif
601
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