fs/smb/client/cifsglob.h
Source file repositories/reference/linux-study-clean/fs/smb/client/cifsglob.h
File Facts
- System
- Linux kernel
- Corpus path
fs/smb/client/cifsglob.h- Extension
.h- Size
- 82022 bytes
- Lines
- 2401
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/in.hlinux/in6.hlinux/inet.hlinux/slab.hlinux/scatterlist.hlinux/mm.hlinux/mempool.hlinux/workqueue.hlinux/utsname.hlinux/sched/mm.hlinux/netfs.hlinux/fcntl.hcifs_fs_sb.hcifsacl.huapi/linux/cifs/cifs_mount.h../common/smbglob.h../common/smb2pdu.h../common/fscc.hsmb2pdu.hsmb1pdu.hlinux/filelock.h
Detected Declarations
struct session_keystruct cifs_secmechstruct ntlmssp_authstruct cifs_credstruct cifs_open_info_datastruct smb_rqststruct mid_q_entrystruct TCP_Server_Infostruct cifsFileInfostruct cifs_sesstruct cifs_tconstruct dfs_info3_paramstruct cifs_fattrstruct smb3_fs_contextstruct cifs_fidstruct cifs_io_subrequeststruct cifs_io_parmsstruct cifs_search_infostruct cifsInodeInfostruct cifs_open_parmsstruct cifs_creditsstruct smb_version_operationsstruct cifs_mnt_datastruct TCP_Server_Infostruct cifs_creditsstruct cifs_server_ifacestruct cifs_chanstruct cifs_sesstruct cifs_fattrstruct cifs_tconstruct tcon_linkstruct cifs_pending_openstruct cifs_deferred_closestruct cifsLockInfostruct cifs_search_infostruct cifs_open_parmsstruct cifs_fidstruct cifs_fid_locksstruct cifsFileInfostruct cifs_io_parmsstruct cifs_io_requeststruct cifs_io_subrequeststruct cifsInodeInfostruct mid_q_entrystruct close_cancelled_openstruct dir_notify_reqstruct dfs_info3_paramstruct file_list
Annotated Snippet
struct session_key {
unsigned int len;
char *response;
};
/* encryption related structure/fields, not specific to a sec mech */
struct cifs_secmech {
struct crypto_aead *enc; /* smb3 encryption AEAD TFM (AES-CCM and AES-GCM) */
struct crypto_aead *dec; /* smb3 decryption AEAD TFM (AES-CCM and AES-GCM) */
};
/* per smb session structure/fields */
struct ntlmssp_auth {
bool sesskey_per_smbsess; /* whether session key is per smb session */
__u32 client_flags; /* sent by client in type 1 ntlmsssp exchange */
__u32 server_flags; /* sent by server in type 2 ntlmssp exchange */
unsigned char ciphertext[CIFS_CPHTXT_SIZE]; /* sent to server */
char cryptkey[CIFS_CRYPTO_KEY_SIZE]; /* used by ntlmssp */
};
struct cifs_cred {
int uid;
int gid;
int mode;
int cecount;
struct smb_sid osid;
struct smb_sid gsid;
struct cifs_ntace *ntaces;
struct smb_ace *aces;
};
struct cifs_open_info_data {
bool adjust_tz;
bool reparse_point;
bool contains_posix_file_info;
struct {
/* ioctl response buffer */
struct {
int buftype;
struct kvec iov;
} io;
__u32 tag;
struct reparse_data_buffer *buf;
} reparse;
struct {
__u8 eas[SMB2_WSL_MAX_QUERY_EA_RESP_SIZE];
unsigned int eas_len;
} wsl;
char *symlink_target;
struct smb_sid posix_owner;
struct smb_sid posix_group;
union {
struct smb2_file_all_info fi;
struct smb311_posix_qinfo posix_fi;
};
};
/*
*****************************************************************
* Except the CIFS PDUs themselves all the
* globally interesting structs should go here
*****************************************************************
*/
/*
* A smb_rqst represents a complete request to be issued to a server. It's
* formed by a kvec array, followed by an array of pages. Page data is assumed
* to start at the beginning of the first page.
*/
struct smb_rqst {
struct kvec *rq_iov; /* array of kvecs */
unsigned int rq_nvec; /* number of kvecs in array */
struct iov_iter rq_iter; /* Data iterator */
struct folio_queue *rq_buffer; /* Buffer for encryption */
};
struct mid_q_entry;
struct TCP_Server_Info;
struct cifsFileInfo;
struct cifs_ses;
struct cifs_tcon;
struct dfs_info3_param;
struct cifs_fattr;
struct smb3_fs_context;
struct cifs_fid;
struct cifs_io_subrequest;
struct cifs_io_parms;
struct cifs_search_info;
struct cifsInodeInfo;
struct cifs_open_parms;
Annotation
- Immediate include surface: `linux/in.h`, `linux/in6.h`, `linux/inet.h`, `linux/slab.h`, `linux/scatterlist.h`, `linux/mm.h`, `linux/mempool.h`, `linux/workqueue.h`.
- Detected declarations: `struct session_key`, `struct cifs_secmech`, `struct ntlmssp_auth`, `struct cifs_cred`, `struct cifs_open_info_data`, `struct smb_rqst`, `struct mid_q_entry`, `struct TCP_Server_Info`, `struct cifsFileInfo`, `struct cifs_ses`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.