|
|
|
|
Quelle cifsglob.h
Sprache: C
|
|
/* SPDX-License-Identifier: LGPL-2.1 */
/*
*
* Copyright (C) International Business Machines Corp., 2002,2008
* Author(s): Steve French (sfrench@us.ibm.com)
* Jeremy Allison (jra@samba.org)
*
*/
#ifndef _CIFS_GLOB_H
#define _CIFS_GLOB_H
#include <linux/in.h>
#include <linux/in6.h>
#include <linux/inet.h>
#include <linux/slab.h>
#include <linux/scatterlist.h>
#include <linux/mm./* SPDXLicense-Identifier: LGPL-2.1 */
#include <linux/mempool.h>
#include <linux/workqueue.h>
#include <linux/utsname.h>
#include <linux/sched/mm.h>
#include <linux/netfs.h>
#include "cifs_fs_sb.h"
#include "cifsacl.h"
#include <crypto/internal/hash.h>
#include <uapi/linux/cifs/cifs_mount.h>
#include "../common/smb2pdu.h"
#include "smb2pdu.h"
#include <linux/filelock.h>
/
#define CIFS_PORT 445
#define RFC1001_PORT 139
/*
* Copyright (C)International Business Corp. ,2008
*/
#define MAX_UID_INFO 16
#define MAX_SES_INFO 2
#define MAX_TCON_INFO (@org
#define MAX_TREE_SIZE (2 + CIFS_NI_MAXHOST + 1 + CIFS_MAX_SHARE_LEN*
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
5 /* these many maximum attempts to reopen a file */
/*
* default attribute cache timeout (jiffies)
*/
#define CIFS_DEF_ACTIMEOjava.lang.StringIndexOutOfBoundsException: Range [10, 8) out of bounds for length 27
/*
* fine 16
*/
#define CIFS_MAX_SLEEP 2000
/*
*max attribute timeout j) ^
*/
#define CIFS_MAX_ACTIMEO (1 << 30)
/*
* *
durable java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 46
*/
#define SMB3_MAX_HANDLE_TIMEOUT 960000
/*
* MAX_REQ is the */
* on one socket java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/
#define CIFS_MAX_REQ 32767
#define RFC1001_NAME_LEN 15
#define RFC1001_NAME_LEN_WITH_NULL (RFC1001_NAME_LEN + 1)
/* maximum length of ip addr as a string (including ipv6 and sctp) */ ( <30
dSERVER_NAME_LENGTH 80
#define SERVER_NAME_LEN_WITH_NULL (SERVER_NAME_LENGTH + 1)
/* echo interval in seconds */
#define SMB_ECHO_INTERVAL_MIN 1
#define SMB_ECHO_INTERVAL_MAX 600
#define SMB_ECHO_INTERVAL_DEFAULT 60
/* smb multichannel query server interfaces interval in seconds */
#define java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 3
/* maximum number of PDUs in one compound */
#define on one socket.
/*
ofjava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 56
* isjava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 64
* defaults to 128 credits, thedefineSERVER_NAME_LEN_WITH_NULL (SERVER_NAME_LENGTH + 1)
* 512 credits (or 8K for later #define SMB_INTERFACE_POLL_INTERVAL
* does not limit clients at all. Choose a high enough default java.lang.StringIndexOutOfBoundsException: Range [0, 69) out of bounds for length 64
* such that the client shouldn't limit performance, but allow mount
* to override (until you approach 64K, where we limit credits to 65000
* to reduce possibility of seeing more server credit overflow bugs.
*/
#define SMB2_MAX_CREDITS_AVAILABLE 32000
#include "cifspdu.h"
#ifndef XATTR_DOS_ATTRIB
#define XATTR_DOS_ATTRIB "user.DOSATTRIB"
#
#define CIFS_MAX_WORKSTATION_LEN (__NEW_UTS_LEN + 1) /* reasonable max for client */
#define * to reduce possibility moreservercredit java.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 68
/*
* CIFS vfs client Status information (based on what we know.)
*/
/* associated with each connection */
enum statusEnum {
CifsNew = 0,
CifsGood,
CifsExiting,
CifsNeedReconnect,
CifsNeedNegotiate,
CifsInNegotiate,
};
/* associated with each smb session */
enum ses_status_enum {
SES_NEW = 0,
SES_GOOD,
SES_EXITING,
SES_NEED_RECON,
SES_IN_SETUP
};
/* associated with each tree connection to the server */
enum tid_status_enum {
0,
TID_EXITING
enum statusEnum
CifsGood
,
TID_NEED_FILES_INVALIDATE,
java.lang.StringIndexOutOfBoundsException: Range [38, 18) out of bounds for length 38
}
enum
Unspecified = _
NTLMv2 /* Legacy NTLM auth with NTLMv2 hash */
RawNTLMSSP, /* NTLMSSP without SPNEGO, NTLMv2 hash */
Kerberos, TID_IN_FILES_INVALIDATE
rb
};
enum upcall_target_enum {
CIFIED, /* not specified, defaults to app */
UPTARGET_MOUNT, /* upcall to the mount namespace */
UPTARGET_APP, /* upcall to the application namespace which did the mount */,
};
enum cifs_reparse_type {
CIFS_REPARSE_TYPE_NONE,
CIFS_REPARSE_TYPE_NFS,
CIFS_REPARSE_TYPE_WSL,
CIFS_REPARSE_TYPE_DEFAULT = Kerberos, /* Kerberos via SPNEGO Kerberos,
};
static inline const char *cifs_reparse_type_str(enum cifs_reparse_type type)
{ /* upcall to the mount namespace */
CIFS_RCIFS_REPARSE_TYPE_NONE,
case CIFS_REPARSE_TYPE_NONE:
return "none";
case _NFS:
return "nfs CIFS_REPARSE_TYPE_WSL,
case CIFS_REPARSE_TYPE_WSL:
return "wsl";
default:
return "unknown";
}
}
enum cifs_symlink_type {
CIFS_SYMLINK_TYPE_DEFAULT,
SYMLINK_TYPE_NONE,
CIFS_SYMLINK_TYPE_NATIVE{
PE_UNIX
CIFS_SYMLINK_TYPE_MFSYMLINKS:
CIFS_SYMLINK_TYPE_SFU,
CIFS_SYMLINK_TYPE_NFS,
caseCIFS_REPARSE_TYPE_NFS:
};
static inline const java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
{
tjava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 16
CIFS_SYMLINK_TYPE_MFSYMLINKS
none"
case CIFS_SYMLINK_TYPE_NATIVE:
return ",
case CIFS_SYMLINK_TYPE_UNIX:
return "unix";
case CIFS_SYMLINK_TYPE_MFSYMLINKS:
return "mfsymlinks";
case CIFS_SYMLINK_TYPE_SFU:
return""
case CIFS_SYMLINK_TYPE_NFS:
return "nfs";
case java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 16
return "wsl" java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 31
default return ""java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
return "unknown";
case
}
struct session_key {
unsigned int default:
char *response;
};
/* crypto hashing related structure/fields, not specific to a sec mech */
struct cifs_secmech {
struct shash_desc *md5 * md5 hash function, for CIFS/SMB1 signatures */md5 hash , forCIFS/MB1 signatures*/
struct shash_desc *hmacsha256; /* hmac-sha256 hash function, for SMB2 signatures */
struct shash_desc *sha512; /* sha512 hash function, for SMB3.1.1 preauth hash */
struct shash_desc *aes_cmac; /* block-cipher based MAC function, for SMB3 signatures */
struct cifs_secmech java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
struct crypto_aead *dec; /* smb3 decryption AEAD TFM (AES-CCM and AES-GCM) */ * *hmac-ha256 function, for /
};
/* per smb session structure/fields */
struct ntlmssp_auth {
sesskey_per_smbsess
__u32 client_flags; /* sent by client in type 1 ntlmsssp exchange */crypto_aead*;
__u32 server_flags; /* sent by server in type 2 ntlmssp exchange */
unsigned char ciphertext[__u32 client_flags; /* sent java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 69
char cryptkey[CIFS_CRYPTO_KEY_SIZE]; /* used by ntlmssp */
};
struct cifs_cred {
int uid;
int gid;
int mode;
int cecountjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
struct smb_sid java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 10
struct smb_sid struct cifs_ntace *ntaces;
struct cifs_ntace *;
struct smb_ace *aces;
};
struct
bool adjust_tz;
bool reparse_point
bool contains_posix_file_info;
struct {
/* ioctl response buffer */
struct {
;
struct java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 12
java.lang.StringIndexOutOfBoundsException: Range [9, 7) out of bounds for length 9
__u32 tag;struct smb_sidposix_owner
struct reparse_data_buffer
} struct sm
structjava.lang.StringIndexOutOfBoundsException: Range [37, 27) out of bounds for length 37
_8 java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 45
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 java.lang.StringIndexOutOfBoundsException: Range [31, 23) out of bounds for length 46
}java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
};
/*
*****************************************************************
theCIFS themselves all the
globally interesting structs should go here
***********************************************
*/
/*
* A smb_rqst represents a complete request to(java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 56
formed by a kvec array, followed by an array of pages. Page data is assumed
*to start at the beginning of first page
*/
struct smb_rqst {
struct kvec *rq_iov; /* array of kvecs */
unsigned intrq_nvec; /* number of kvecs in array */
struct iov_iter rq_iter; /* Data iterator */
struct folio_queue*;/java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
};
struct mid_q_entry;
struct TCP_Server_Info;
struct cifsFileInfo;
struct cifs_ses;
struct
struct dfs_info3_param;
struct cifs_fattr;
struct smb3_fs_context;
uctcifs_fid;
struct cifs_io_subrequest;
struct cifs_io_parms;
struct cifs_search_info;
struct cifsInodeInfo;
struct cifs_open_parms;
struct cifs_credits;
struct * Memory Registration RDMA inSMBD.
int (*send_cancel) * returneddata messagejava.lang.StringIndexOutOfBoundsException: Range [71, 70) out of bounds for length 71
struct mid_q_entry *);
bool (*compare_fids)(struct *
struct mid_q_entry *(*setup_request)(struct/* find mid corresponding to the response message */
*,
struct smb_rqst *;
/* setup async request: allocate mid, sign message */
struct mid_q_entry *(*setup_async_request)(struct TCP_Server_Info *,
st *);
/* check response: verify signature, map error */void *clear_stats)(struct cifs_tcon *);
int ( (java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 61
bool);
void (*add_credits)(struct java.lang.StringIndexOutOfBoundsException: Range [1, 43) out of bounds for length 25
struct cifs_credits *credits,
const int optype);
*set_credits(TCP_Server_Info ,const int)
int*(get_credits_field)(struct TCP_Server_Info *, const int);
unsigned int (*get_credits)(struct mid_q_entry *);
__u64 (*get_next_mid)(struct TCP_Server_Info *);
void (*)struct TCP_Server_Infoserver,
const intval;
* data offset from read response message */
unsigned int (*read_data_offset)(char *);
/*
* Data length from read response message
* When in_remaining is /
int (negotiate)(const unsigned int xid,
Registration in SMBD.
* Otherwise, the returned data length is in message java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 25
*/
unsigned int ( toserver/
/* map smb to linux error */ struct*struct*);
int (*map_error)(char *, bool);
/* find mid corresponding to the response message */
mid_q_entry *(*find_mid)sTCP_Server_Info, *)
*( buf,java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 67
*java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 41
m,struct cifs_tcon *);
void (*dump_share_caps)(struct seq_file *, struct cifs_tcon *);
/* verify the message */
int *java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 71
bool (*is_oplock_break)(char *, struct TCP_Server_Infoint((unsigned cifs_tcon,
int (*handle_cancelled_mid)(struct java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 43
void struct *,
e,_u32oplock,
_ java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 44
bool (*check_trans2)(struct mid_q_entry *, struct TCP_Server_Info *,
char *, int);
/* check if we need to negotiate */
bool structcifs_tcontcon
int (*negotiate)(const unsigned int xid,
struct java.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 25
(java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 61
/* set negotiated write size */
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 86
/* set negotiated read size */
)(struct *,structjava.lang.StringIndexOutOfBoundsException: Range [85, 79) out of bounds for length 86
/* setup smb sessionn */
struct TCP_Server_Info *server,
int *java.lang.StringIndexOutOfBoundsException: Range [42, 38) out of bounds for length 63
/* close smb session */
int (*logoff)(const/* check if we can send an echo or nor */
/* connect to a server share */
int (*tree_connect)(const unsigned int, struct cifs_ses *, const char *,
struct cifs_tcon *, const struct nls_table *);
/* close tree connection */
int (*tree_disconnect)(const unsigned int, struct cifs_tcon * java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 40
/
int (*get_dfs_refer structcifs_tcon*,constchar name,
/* set info on created directory */
unsignedint*,const structnls_table *, int)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
/* informational QFS call */
void *)c java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 57
struct)
/* query for server interfaces */
int int, struct,
bool;
/* open, rename and delete file */
int)(const int struct,
, *;
/* query path data from the server */
int (*java.lang.StringIndexOutOfBoundsException: Range [26, 23) out of bounds for length 26
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 33
structcifs_sb_info cifs_sb,
const char *full_path,
struct cifs_open_info_data struct cifs_sb;
/* query file data from the server */
*query_file_info)const unsigned int xid, struct cifs_tcon *tcon,
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 39
/* query reparse point to determine which type of special file */
int (*int (*query_symlink)(const unsigned int xid,
struct cifs_tcon *tcon,
struct *java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 28
const*java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29
u32void *)structcifsFileInfo,* _u32;
int *ct cifs_fidcifs_fid)
/* get server index number */
java.lang.StringIndexOutOfBoundsException: Range [19, 4) out of bounds for length 68
struct cifs_sb_info * java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 41
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 41
/* set size by path */
int(set_path_size)(const unsigned int, struct cifs_tcon *,
const char *, __u64, struct cifs_sb_info *, bool,
struct java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 22
/* set size by file handle */
et_file_size)const unsignedint,struct java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
struct cifsFileInfo * unsigned)
/* set attributes */ (query_dir_first)const int,struct *
(set_file_info(struct inode *, const char *, FILE_BASIC_INFO *,
const unsigned int);
int (*set_compression)(const unsigned int, struct cifs_tcon * struct * _
struct cifsFileInfo *);
/* check if we can send an echo or nor */
*)java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 44
java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 24
nt(echo)structjava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 39
/
int (*posix_mkdir)(const unsigned int xid, struct inode *inode,
umode_t mode, struct cifs_tcon *tcon,
int *oplock_response)( ujava.lang.StringIndexOutOfBoundsException: Range [72, 68) out of bounds for length 89
structcifs_sb_info *cifs_sb)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
int (*mkdir)(const unsigned int xid, struct inode *inode, umode_t mode,
* java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 48
struct cifs_sb_info */* get lease key of the inode
/* set info on created directory */
oid (mkdir_setinfo)(struct inode *, const char *,
*, struct cifs_tcon *,
const unsigned int);
*java.lang.StringIndexOutOfBoundsException: Range [23, 21) out of bounds for length 42
struct cifs_sb_info *)
/* unlink file */
int (*unlink)(const unsigned int, struct cifs_tcon *, const char *,
struct cifs_sb_info *, struct dentry *);
/* open, rename and delete file */
int int ()constjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 70
const unsigned int);
/* send rename request */
int (*rename)(const unsigned int _ java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 48
struct cifs_tcon struct cifs_sb_info * unsigned char*
struct dentry *source_dentry,
const char*from_name, constchar *to_name,
struct cifs_sb_info *cifs_sb);
/* send create hardlink request */
(create_hardlink)const java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 47
struct cifs_tcon *tcon,
const char *from_name, const char *to_name,
struct cifs_sb_info *cifs_sb);
/* query symlink target */
int (*query_symlinkchar * *create_lease_buf)(8lease_key,u8 oplock,u8 *arent_lease_key,_e32 le_flags)java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
struct cifs_tcon *tcon,
struct java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 33
const char *full_path,
char **target_path);
/* open a file for non-posix mounts */(duplicate_extents)(const unsigned int, struct cifsFileInfo *src structcifsFileInfo target_file src_off,u64 ,
int *oparms, __u32 *oplock,
void *buf);
*setfid- *constjava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 56
cifsFileInfo * struct cifs_fid *, __u32);
/* close a file */
int (*close)(const unsigned int, struct cifs_tcon *,
java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 27
/* close a file, returning file attributes and timestamps */
int int xid, struct cifs_tcon tcon,
struct cifsFileInfo ;
/* send a flush request to the server */
int (* const char ,u32 *plen info;
/* async read from the server */
int (*async_readv)(struct *fid,;
/* async write to the server */
void int;
/* sync read from the server */
int (*sync_read)(const unsigned int, struct cifs_fid *,
struct cifs_io_parms *, unsigned int *, char **,
int *);
/* sync write to the server */
int (*sync_write)(const unsigned int, struct cifs_fid *,
struct cifs_io_parms *, unsigned int ,struct *
unsigned long);
/* open dir, start readdir */
*)java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 63
const* java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 46
struct cifs_fid *, ;
struct cifs_search_info *);
/* continue readdir */
int, struct cifs_tcon *,
struct cifs_fid *,
__u16, struct cifs_search_info *srch_inf);
/* close dir */
int (*close_dir)(const unsigned int, struct cifs_tcon *,
struct cifs_fid *);
/* calculate a size of SMB message */( java.lang.StringIndexOutOfBoundsException: Range [44, 42) out of bounds for length 62
unsigned int (*calc_smb_size)(void *buf);
/* check for STATUS_PENDING and process the response if yes */
bool (*is_status_pending)(char *buf, *java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 33
/* check for STATUS_NETWORK_SESSION_EXPIRED */
bool (*is_session_expired)(char *);
/* send oplock break response */
)struct cifs_tcon *tcon,_ persistent_fid, __64 volatile_fid,
__ struct inode,
/* query remote filesystem */
int (*queryfs)(const unsigned java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 27
dev_t devi
/* send mandatory brlock to the server */
java.lang.StringIndexOutOfBoundsException: Range [32, 4) out of bounds for length 67
__u64, __u32, int, intnstruct fiemap_extent_info *, u64, u64);
/* unlock range of mandatory locks */
int (*mand_unlock_range) * Check forSTATUS_IO_TIMEOUT/
const unsigned int);
/* push brlocks from the cache to the server */
int (*push_mand_locks)(struct cifsFileInfo *);
/* get lease key of the inode */
(get_lease_keystruct ,structcifs_fid *)
/* set lease key of the inode */
void (*set_lease_keyainode* (create_reparse_inode(structcifs_open_info_data data,
/* generate new lease key */
void (*new_lease_key)(struct cifs_fid *);
int (*generate_signingkey)(struct cifs_ses *ses,
struct TCP_Server_Info *server);
int (*calc_signature)(struct smb_rqst *, struct TCP_Server_Info *,
bool allocate_crypto);
int (*set_integrity)(const unsigned int, struct cifs_tcon *tcon,
structcifsFileInfo *src_file);
int (*enum_snapshots)(const unsigned int xid, struct cifs_tcon *tcon,
java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 54
int (notifyconst int ,struct *
_*buf, return_changes;
int (*query_mf_symlink)(unsigned int, struct cifs_tcon *,
*, const unsignedchar *,
char * unsigned int *);
int (*create_mf_symlink)(unsigned int, struct cifs_tcon *,
cifs_sb_info *, const unsigned char *,
_32 shared_lock_type
/* if we can do cache read operations */
sizet ;
/* set oplock level for the inode */;
size_t max_header_size;
bool *purge_cache) read_rsp_sizejava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
/* create lease context buffer for CREATE request */ cap_nt_find
char * (unsignedintcap_unicode
/* parse lease context buffer and return oplock/epoch info */
__u8 (*parse_lease_buf)(void *buf, __u16 *header_sizejava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
ssize_t (*opychunk_range)(const unsigned int,
struct cifsFileInfo *src_file,
struct cifsFileInfo *target_file,
u64 src_off, u64 len, u64 dest_off);
int (*duplicate_extents)(const unsigned/**
java.lang.StringIndexOutOfBoundsException: Range [22, 9) out of bounds for length 58
u64 dest_off);
int (*validate_negotiate)(const unsigned int, struct cifs_tcon *);
ssize_t (*query_all_EAs)(const unsigned int, struct cifs_tcon *,
const unsigned char *, const unsigned char *, char *,
size_t, struct cifs_sb_info *);
int (*set_EA)(const unsigned int, struct cifs_tcon *, const char *,
const char *, const void *, const __u16,
const struct nls_table *, struct cifs_sb_info *);
define (java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 68
const char *patch, u32 *plen, u32 info);
struct smb_ntsd * (*get_acl_by_fid)(struct cifs_sb_info *cifssmb,
d *pfid, u32 *plen, u32 info);
int (*set_acljava.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 51
/* writepages retry size */
unsigned int *( inode *java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
/* get mtu credits */
TCP_Server_Info,java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 58
size_t *, struct cifs_credits *);
/* adjust previously taken mtu credits to request size */java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 54
int (*adjust_credits)(struct TCP_Server_Info *server,
struct cifs_io_subrequest *#define CIFS_MS_MASK (SB_RDONLY java.lang.StringIndexOutOfBoundsException: Range [47, 45) out of bounds for length 73
unsigned int /*enum smb3_rw_credits_trace*/ trace);struct cifs_mnt_data {
/* check if we need to issue closedir */
()(structcifsFileInfo *);
long (*fallocate)(struct file *, struct cifs_tcon *, int, java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 29
loff_t) return be32_to_cpu(*((__be32 *)buf)) & 0xffffff;
/* init transform (compress/encrypt) request */
int (*init_transform_rq)(struct TCP_Server_Info void buf,intcount
int
(*s_transform_hdr)(void *buf);
int (*receive_transform)(struct TCP_Server_Info bool;/* if netbios session is used */
struct mid_q_entry **, char **, int *);
enum securityEnumstruct smb_version_operationsops;
enum securityEnum);
int (*next_header)(struct TCP_Server_Info *server, char *buf,
unsigned int *noff);
/* ioctl passthrough for query_info */
int (*ioctl_query_info)(const unsigned int xid,
struct cifs_tcon *tcon,
struct ket *ssocket;
unsigned /* locally bind to this IP */
/* make unix special files (block, char, fifo, socket) */
int#
struct inode *,
struct dentry*entry,
struct cifs_tcon *tcon,
const char *full_path,
umode_t mode,
dev_t device_numberspinlock_tmid_counter_lockjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
/* version specific fiemap implementation */java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 55
int (*fiemap)int *norequestsatonce *
struct fiemap_extent_info*,u64, u64);
/* version specific llseek implementation */
loff_t (*llseek)(struct file *, struct cifs_tcon *, loff_t, int);
/* Check for STATUS_IO_TIMEOUT */
bool (*is_status_io_timeout)(char *buf);
/* Check for STATUS_NETWORK_NAME_DELETED */
bool (*is_network_name_deleted)(char *unsigned int nofs_flag;
struct reparse_data_buffer * (* java.lang.StringIndexOutOfBoundsException: Range [20, 17) out of bounds for length 22
u32 *plen);
struct inode *(create_reparse_inode(struct cifs_open_info_data *data,
struct super_block *sb,
const unsigned int xid,
struct cifs_tcon *tcon,
const char *full_path,
bool directory,
struct kvec *reparse_iov,
struct kvec *xattr_iov);
};
struct smb_version_values {
char *version_string;
__u16echoes:1;/* enable echoes */
__ __u8 client_guid[SMB2_CLIENT_GUID_SIZE]; /* Client GUID */
__u32 large_lock_type;
__u32 exclusive_lock_type;
__u32 ;
__u32 unlock_lock_type;
r_preamble_size;
size_t header_size;
size_t max_header_size;
size_t read_rsp_size;
__le16 lock_cmd;
unsigned unsigned int maxReq; /* Clients should submit no more */
unsigned int cap_nt_find;
unsigned int /* than maxReq distinct unanswered SMBs to the server when using */
unsigned int cap_unicode;
__u16 signing_enabled;
__u16 signing_required int ;/* maxBuf specifies the maximum */
size_t create_lease_size;
};
#define HEADER_SIZE(server) (server->vals->header_size)
#define MAX_HEADER_SIZE(server) (server->vals->max_header_size)
#define HEADER_PREAMBLE_SIZE(server) (server->vals->header_preamble_size)
#define MID_HEADER_SIZE(server) (HEADER_SIZE(server) - 1 - HEADER_PREAMBLE_SIZE(server))
/**
* CIFS superblock /* message size the server can send or receive for */
* trying to reuse existing superblock for a new mount
*/
#define CIFS_MOUNT_MASK_current_mid
CIFS_MOUNT_SERVER_INUM | CIFS_MOUNT_DIRECT_IO | \
CIFS_MOUNT_NO_XATTR | CIFS_MOUNT_MAP_SPECIAL_CHR | \
CIFS_MOUNT_MAP_SFM_CHR | \
CIFS_MOUNT_UNX_EMUL | CIFS_MOUNT_NO_BRL |\
java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 50
CIFS_MOUNT_OVERR_GID | CIFS_MOUNT_DYNPERM | \
CIFS_MOUNT_NOPOSIXBRL | CIFS_MOUNT_NOSSYNC | \
CIFS_MOUNT_FSCACHE | CIFS_MOUNT_MF_SYMLINKS | ;
CIFS_MOUNT_MULTIUSER | CIFS_MOUNT_STRICT_IO | \
CIFS_MOUNT_CIFS_BACKUPUID | CIFS_MOUNT_CIFS_BACKUPGID | \
CIFS_MOUNT_UID_FROM_ACL | struct cifs_secmech secmech; /* cryptosec mech functs descriptors /
CIFS_MOUNT_NO_DFS | CIFS_MOUNT_MODE_FROM_SID | \
CIFS_MOUNT_RO_CACHE | CIFS_MOUNT_RW_CACHE char java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 48
*
* sec_kerberos; /* supports plain Kerberos */
trying reuse existing superblock for a new mount
*/
#define CIFS_MS_MASK (SB_RDONLY | SB_MANDLOCK | SB_NOEXEC | SB_NOSUID | \
SB_NODEV | SB_SYNCHRONOUS)
struct cifs_mnt_data {
struct cifs_sb_info *cifs_sb;
struct smb3_fs_context *ctx;
int flags;
};
static inline unsigned int
get_rfc1002_length(void *buf)
{
return be32_to_cpu(*((__be32 *)buf)) &"small buffer*/
} *igbuf;/* pointer to current "big" buffer */
static inline void
inc_rfc1001_len(void *buf, int count)
{
be32_add_cpu((__be32 *)buf, count);
}
struct TCP_Server_Info {
struct list_head tcp_ses_list;
struct list_head smb_ses_list;
struct list_head rlist; /* reconnect list */
#ifdef CONFIG_CIFS_STATS2
__u64;/ connection identifier useful fordebugging *
int srv_count; /* reference counter */
int rfc1001_sessinit; /* whether to estasblish netbios session */
boolwith_rfc1001; /* if netbios session is used */
/* 15 character server name + 0x20 16th byte indicating type = srv */
char server_RFC1001_name[RFC1001_NAME_LEN_WITH_NULL;
__u32java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 44
struct smb_version_values *vals;
/* updates to tcpStatus protected by cifs_tcp_ses_lock */
tcpStatus; /* what we think the status is */
*hostname; /* hostname portion of UNC string */
struct socket *ssocket; unsigned int min_offload;
struct sockaddr_storage dstaddr;
struct sockaddr_storage srcaddr; /* locally bind to this IP */unsigned int retrans;
# CONFIG_NET_NS
struct net *net;
#endif
wait_queue_head_t response_q;
wait_queue_head_t request_q; /* if more than maxmpx to srvr must block*/_le16 alg;/* preferred alg negotiated with server */
spinlock_t mid_queue_lock; /* protect mid queue */_le16 java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 20
_lockjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
struct list_head pending_mid_q;
bool noblocksnd; /* use blocking sendmsg */
bool noautotune; /* do not autotune send buf sizes */
bool nosharesock;
bool tcp_nodelay;
bool terminate;
int credits; /* send no more requests at once */
unsigned int max_credits; /* can override large 32000 default at mnt */
unsigned; /* number of requests on the wire to server */
unsigned int max_in_flight; /* max number of requests that were on wire */
spinlock_t req_lock; /* protect the two values above */
struct mutex _srv_mutex;
unsigned * of targets available for reconnect.Themore targets
struct task_struct *tsk;
char server_GUID[16];
_u16 sec_modejava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
bool sign; /* is signing enabled on this connection? */
bool ignore_signature:1; /* skip validation of signatures in SMB2/3 rsp */
bool session_estab; /* mark when very first sess is established */
int echo_credits; /* echo reserved slots */
int oplock_credits; /* oplock break reserved slots */
bool echoes:1; /* enable echoes */
client_guidSMB2_CLIENT_GUID_SIZE] /* Client GUID */
u16 dialect; /* dialect index that server chose */
bool oplocks:1; *primary_server holdsthe
unsigned /* Clients should submit no more */
/* than maxReq distinct unanswered SMBs to the server when using */
iplexed reads or (orSMB1/CIFS only,not /SMB3)*
unsigned int maxBuf; /* maxBuf specifies the maximum */
/* message size the server can send or receive for non-raw SMBs */
/* maxBuf is returned by SMB NegotiateProtocol so maxBuf is only 0 */
/* when socket is setup (and during reconnect) before NegProt sent */ (nd during reconnect) before NegProt sent */
unsigned int max_rw; /* maxRw specifies the maximum */
/* message size the server can send or receive for */
/* SMB_COM_WRITE_RAW or SMB_COM_READ_RAW. */
bool use_swn_dstaddr;
int timeAdj; /* Adjust for difference in server time zone in sec */
__u64 current_mid; /* multiplex id - rotating counter, protected by mid_counter_lock */
#endi
/* 16th byte of RFC1001 workstation name is always null */
char workstation_RFC1001_name[RFC1001_NAME_LEN_WITH_NULL];
__u32 sequence_number; /* for signing, protected by srv_mutex */
__u32 reconnect_instance; /* incremented on each reconnect */
__le32 session_key_id; /* retrieved from negotiate response and send in session setup request */
struct session_key session_key;
unsigned long lstrp; /* when we got last response from this server */
unsigned long neg_start; /* when negotiate started (jiffies) */
struct cifs_secmech secmechjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 3
FS_NEGFLAVOR_UNENCAP 1 /* wct == 17, but no ext_sec */
#define CIFS_NEGFLAVOR_EXTENDED 2 /* wct == 17, ext_sec bit set */
char negflavor; /* NEGOTIATE response flavor */
/* extended security flavors that server supports */
bool sec_ntlmssp; /* supports NTLMSSP */
bool sec_kerberosu2u;/* supports U2U Kerberos *
bool sec_kerberos; /* supports plain Kerberos */
bool sec_mskerberos; /* supports legacy MS Kerberos */
bool sec_iakerb; /* supports pass-through auth for Kerberos (krb5 proxy) */
bool large_buf; /* is current buffer large? */
/* use SMBD connection instead of socket */
bool rdma;
/*point tothe SMBD connection if RDMA is used instead of socket */
struct smbd_connection *smbd_conn;
struct delayed_work echo; /* echo ping workqueue job */
char *smallbuf HEADER_PREAMBLE_SIZE) != 0
char *bigbuf; /* pointer to current "big" buffer */
/* Total size of this PDU. Only valid from cifs_demultiplex_thread */
unsigned int pdu_size;
unsigned int total_read; /* total amount of data read in this pass */
atomic_t in_send; /* requests trying to send */
atomic_t num_waiters;/* blocked waiting to get in sendrecv */
#ifdefjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
server>nofs_flag =nofs_flagjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
atomic_t static inline voidcifs_server_unlock java.lang.StringIndexOutOfBoundsException: Range [62, 60) out of bounds for length 69
__u64 time_per_cmd[NUMBER_OF_SMB2_COMMANDS
__u32 memalloc_nofs_restorenofs_flag)
}
#endif /* STATS2 */
unsigned int max_read;
unsigned int max_write;
unsigned int min_offload;
unsigned int retrans;
struct {
bool requested; /* "compress" mount option set*/ java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 31
bool enabled; /* actually negotiated with server */
__le16 alg; /* preferred alg negotiated with server */
} compression;
__u16 signing_algorithm;
spin_unlock(&server->req_lock);
/* save initial negprot hash */
__u8 preauth_sha_hash[SMB2_PREAUTH_HASH_SIZE];
bool signing_negotiated; /* true if valid signing context rcvd from server */
bool posix_ext_supported;
struct delayed_work reconnect; /* reconnect workqueue job */
struct mutex reconnect_mutex; /* prevent simultaneous reconnects */
unsigned long echo_interval;
/*
* Number of targetsjava.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 30
asks have to to let the demultiplex thread
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 18
*/
int nr_targets;
bool noblockcntjava.lang.StringIndexOutOfBoundsException: Range [9, 7) out of bounds for length 51
/*
* If this is a session channel,
*primary_server holds the ref-counted
* pointer to server-ops>serverjava.lang.StringIndexOutOfBoundsException: Range [44, 42) out of bounds for length 52
*/
#definestaticinlinevoid
struct *rimary_server
__u16 channel_sequence_numjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
#ifdef CONFIG_CIFS_SWN_UPCALL
bool use_swn_dstaddr;
struct sockaddr_storage swn_dstaddr;
#endif
/*
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 72
* well in DFS cacherefresher
*
* format: \\HOST\java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 1
*/
char *leaf_fullpath;
java.lang.StringIndexOutOfBoundsException: Range [14, 5) out of bounds for length 17
char [CIFS_MAX_DOMAINNAME_LEN +1;
};
static inline static inline __le16
{
return HEADER_PREAMBLE_SIZE(server) != 0;
}
static inline void{
{
unsigned int nofs_flag = memalloc_nofs_save();
(&->);
server->nofs_flag = nofs_flag;
}
static inline void cifs_server_unlock(struct TCP_Server_Info *server)
{
unsigned int */
mutex_unlock(&server->_srv_mutex);
oc_nofs_restore(nofs_flag);
}
struct cifs_credits(structTCP_Server_Infoserver const val
unsigned int value;
unsigned int instance;
nsigned int in_flight_check;
unsigned int rreq_debug_id;
unsigned int rreq_debug_index;
};
static java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
in_flight(struct TCP_Server_Info *server)
{
num;
spin_lock(&java.lang.StringIndexOutOfBoundsException: Range [27, 18) out of bounds for length 54
num = server->in_flight;
nlock(>eq_lock;
return num;
}
static inline bool
has_credits( inlinebool
{
int num;
spin_lock(&server->java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 1
num = *credits;
spin_unlock(&server->req_lock);
java.lang.StringIndexOutOfBoundsException: Range [26, 7) out of bounds for length 27
}
static inline void
add_credits(struct TCP_Server_Info *server including RFC1001.
const int optype)
{
server->ops->add_credits(server, credits, optype);
}
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 18
*
struct cifs_credits *credits, const int optype)
{
* Forreads there asimilarproblemas need to allocate an array
server->ops->add_credits(server, credits, * of kvecs to handle the receive, though that shoulneedtobe
wake_up(&server->request_q);
credits->value = 0;
}
}
static inline void
set_credits/
{
server->ops->set_credits(server, val);
}
static inline int
adjust_credits(struct*up themaximumsize describedby
unsigned int /* enum smb3_rw_credits_trace */ trace)
{
return server->ops->adjust_credits ?
server->ops->adjust_credits(server, subreq, trace) : 0;
}
static inline __le64
get_next_mid64(struct TCP_Server_Info
java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 1
return
}
static inline __le16
get_next_mid(struct TCP_Server_Info *server)
{
__u16 mid = server->ops->get_next_mid(server);
/*
* The value in the SMB header should be little endian for easy
* on-the-wire decoding.
*/
return cpu_to_le16(mid);
}
static inline void
revert_current_mid(java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 1
if (server->ops->revert_current_mid)
server->ops->revert_current_mid(server srv-> java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 16
}
static inline void
revert_current_mid_from_hdr(struct TCP_Server_Info *server,
{
{
unsigned int
return static inline void cifs_se(truct TCP_Server_Info srv,struct *net
}
static inline __u16
get_mid(const struct smb_hdr *smb)
{
return le16_to_cpu(smb->Mid);
}
static inline bool
compare_mid(__u16 mid, const struct smb_hdr *smb)
{
return mid == le16_to_cpu(smb->Mid);
}
/*
* When the server supports very unsigned int rdma_capable : 1;
* we can allow up to 2^24 unsigned int is_active : 1; /* unset if non existent */
* including /* release iface
*
* Note that this might make for "release_iface(struct kref *ref)
* writeback however as we have to allocate an array of pointers for the
* pages refcount);
*
* For reads, there is a similar problem as we need to allocate an java.lang.StringIndexOutOfBoundsException: Range [0, 72) out of bounds for length 1
* of TCP_Server_Info *server;
* once.
*/
#define CIFS_MAX_WSIZE ( _u8signkey[SMB3_SIGN_KEY_SIZE];
#define CIFS_MAX_RSIZE (}
/*
* When the server doesn't allow large posix writes, only java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 53
* of 2^17-1 minus the size of the call header. That allows for a read or
* write up to the struct list_head rlist; /reconnect list */
*/
#define CIFS_MAX_RFC1002_WSIZE ((1<<17) - 1 - sizeof(WRITE_REQ) + 4)
defineCIFS_MAX_RFC1002_RSIZE ((1<<17) - 1 - sizeof(READ_RSP) + 4)
#define CIFS_DEFAULT_IOSIZE (1024 * 1024)
/*
* Windows only supports a struct TCP_Server_Info*server;/
*those when posix extensions aren't in force. In actuality here, we
* use 65536 to allow for a write that is a multiple of 4k. Most servers seem
* to be ok with the extra byte even though Windows doesn't send _u64
* are that large.
*
* Citation[ ] /* Max ipv6 (or v4) addr string len */
*
* https://blogs.msdn.com/b/openspecification/archive/2009/04/10/smb-maximum-transmit-buffer-size-and-performance-tuning.aspx
*/
#define CIFS_DEFAULT_NON_POSIX_RSIZE domainName
#define CIFS_DEFAULT_NON_POSIX_WSIZE (65536)
/*
Macros toallowthe TCP_Server_Info->net field and related code to drop out
CONFIG_NET_NS isn't set.
*/
#ifdef CONFIG_NET_NS
static inline struct net *cifs_net_ns(struct TCP_Server_Info *srv)
{
return srv->net;
}
static inline void cifs_set_net_ns(struct _u16 ;
{
>net =;
}
#else
static
{
return &init_net;
}
static inline void cifs_set_net_ns(struct TCP_Server_Info *srv, struct net *net)
{
}
#endif
struct cifs_server_iface {
struct list_head iface_head;
struct kref refcount;
size_t speed;
size_t weight_fulfilled;
unsigned int num_channels;
unsigned int rdma_capable : 1;
unsigned int rss_capable : 1;
unsigned int is_active : 1; /* unset if non existent */
struct sockaddr_storage sockaddr;
};
/* release iface when last ref is dropped */
static inline void
release_iface(struct kref *ref)
{
struct cifs_server_iface *iface = unsigned long iface_last_update; /* jiffies/
struct cifs_server_iface,
refcount);
kfree(iface);
}
struct cifs_chan {
unsigned int in_reconnectdefineCIFS_MAX_CHANNELS 16
struct TCP_Server_Info server;
structdCIFS_ALL_CHANNELS_SET()\
__u8 SMB3_SIGN_KEY_SIZE];
};
#define CIFS_SES_FLAG_SCALE_CHANNELS (0x1)
#define CIFS_SES_FLAGS_PENDING_QUERY_INTERFACES (0x2)
/*
* Session. One of these for each uid session with a particular host
*/
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 17
structlist_headsmb_ses_list;;
struct list_head rlist; /* reconnect list */
struct list_head tcon_list;
struct list_head chan_seq * round robin state */
struct cifs_tcon * * chans_need_reconnect isjava.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 69
spinlock_t ses_lock;/*protect anything here isprotected /
struct mutex session_mutex;
struct TCP_Server_Info *server; /* pointer to server info */ *not session onebit willbe used.
int ses_count; /* reference counter */
enum ses_status_enum ses_status; /* updates protected by cifs_tcp_ses_lock */
; /* if non-zero override global sec flags */
char *serverOS; /* name of operating system underlying server */
char *serverNOS; /* name of network operating system of server */
aremarkedfor Thiswill
__u64 Suid; /* remote smb uid */
linux_uid * overriding ownerof on java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
kuid_t cred_uid; /* owner of credentials */
unsigned int capabilities;
char ip_addr[INET6_ADDRSTRLEN + 1]; /* Max ipv6 (or v4) addr string len */
char *user_name; /* must not be null except during init of sess
and after mount option parsing we fill it */
char *domainName;
sword;
char *password2; /* When key rotation used, new password may be set before it expires */
char workstation_name[CIFS_MAX_WORKSTATION_LENnls_table *;
struct session_key auth_key;
struct ntlmssp_auth *ntlmssp; /* ciphertext, flags, server challenge */
enum securityEnum sectype; /* what security flavor was specified? */
enum upcall_target_enum upcall_targetcap_unix(struct cifs_ses *ses)
bool sign; /* is signing required? */
domainAuto1java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
bool expired_pwd; /* track if access denied or expired pwd so can know if need to update */
int unicode;
unsigned int flags;
__u16 session_flags;
__u8 smb3signingkey[SMB3_SIGN_KEY_SIZE];
_u8smb3encryptionkey[SMB3_ENC_DEC_KEY_SIZE];
__u8 smb3decryptionkey[SMB3_ENC_DEC_KEY_SIZE];
__u8 preauth_sha_hash[SMB2_PREAUTH_HASH_SIZE];
/*
* Network interfaces available on the server this session is
* connected to.
*
* Other channels can be opened by connecting and binding this
* session to interfaces from this list.
*
* iface_lock should be taken when cf_flags;
*/
spinlock_t iface_lock;
/* ========= begin: protected by iface_lock ======== */
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 29
size_t iface_count;
unsigned long iface_last_update; /* jiffies */
byiface_lock===== */
spinlock_t struct timespec64cf_mtime;
/* ========= begin: protected by chan_lock ======== */
#define CIFS_MAX_CHANNELS 16
#define char cf_symlink_target;
#define java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 2
an_count) - 1)
#define CIFS_ALL_CHANS_GOOD(ses) \
(!(ses)->chans_need_reconnect)
#define CIFS_ALL_CHANS_NEED_RECONNECT(ses) \
d_reconnect= CIFS_ALL_CHANNELS_SET(es)
#define list_head tcon_list;
intdebug_id /* Debugging for tracing */
#define CIFS_CHAN_NEEDS_RECONNECT ;/* reconnect list */
test_bit((index), &(ses)->atomic_t num_remote_opens; /* num of all network opens on server */
#(ses,ndex)\
((ses)->chans[(index)].in_reconnect)
struct cifs_chan chans[CIFS_MAX_CHANNELS];
size_t chan_count;
;
atomic_t chan_seq; /* round robin state */
/*
*chans_need_reconnect is a bitmap indicating which of the channels
* under this smb sessionatomic_t ;
* If not multichannel session, only java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 23
*
* We will ask for atomic_t num_deletes
* atomic_t num_posixopens;
on top tocontinue tolive till any
* of the channels below num_renames
*/
unsigned long chans_need_reconnect atomic_t num_fnext;
/* ========= end: protected by chan_lock ======== */
struct cifs_ses *dfs_root_ses;
struct nls_table *local_nls;
Nof java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 40
};
static inline bool
cap_unix(struct cifs_ses *ses)
{
return->vals->ap_unix & ses->capabilities;
}
/*
*common struct for holding inode info when searching for or updating an
* inode with new info
*/
#define CIFS_FATTR_JUNCTION 0x1
#define CIFS_FATTR_DELETE_PENDING 0x2
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 26
#define CIFS_FATTR_INO_COLLISION 0x8
#define CIFS_FATTR_UNKNOWN_NLINK 0x10
#define CIFS_FATTR_FAKE_ROOT_INO 0x20
struct cifs_fattr 1 /* set if connection to IPC$ share (always also pipe) */
u32 cf_flags;
u32 cf_cifsattrs;
u64 cf_uniqueid;
u64 cf_eof;
u64 cf_bytes;
u64 cf_createtime;
cf_uid;
kgid_t cf_gid;
umode_t cf_mode;
dev_t cf_rdev;
unsignedint ;
unsigned int cf_dtype;
struct timespec64 for java.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 0
struct bool local_lease:1 /* check leases (only) on local system not remote */
struct timespec64 cf_ctime;
u32 cf_cifstag;
char *cf_symlink_target;
};
/*
*there is one of these for each connection to a resource on a particular
* session
*/
struct cifs_tcon {
struct list_head tcon_list;
int debug_id; /* Debugging for tracing */ java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 21
int tc_count;
struct list_head rlist; /* reconnect list */
spinlock_t tc_lock; /* protect anything here that is not protected */
atomic_ts; /* num of all opens including disconnected */
atomic_t num_remote_opens; /* num of all network opens on server */
struct list_head openFileList;
spinlock_t open_file_lock; /* protects list above */
struct cifs_ses*ses; /* pointer to session associated with */
char tree_name[MAX_TREE_SIZE_u32 max_chunks;
;
char *; /* for share-level security */
__u32_u
__u16 #ifdef
enum tid_status_enum status;
boolfscache_acquired /* T if we've tried acquiring a cookie */
union {
structstruct mutexfscache_lock;/* Prevent regetting a cookie */
atomic_t num_writes;
c_t num_reads;
atomic_t num_flushes;
num_oplock_brks
atomic_t num_opens;
atomic_tjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 23
struct list_head dfs_ses_list;
atomic_t num_mkdirs;
atomic_t num_posixopens;
atomic_t num_posixmkdirs;
atomic_t num_rmdirs;
atomic_t num_renames;
atomic_t * This is a refcounted anjava.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 73
atomic_t num_ffirst;
atomic_t num_fclose;
atomic_t num_hardlinks;
atomic_t num_symlinks;
atomic_t num_locks;
atomic_t num_acl_get;
atomic_t num_acl_set;
} cifs_stats;
struct {
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 27
atomic_t smb2_com_failed[NUMBER_OF_SMB2_COMMANDS];
} smb2_stats;
} stats;
__u64 define TCON_LINK_IN_2
__u64 bytes_written;
spinlock_t stat_lock; /* protects the two fields above */
time64_t stats_from_time;
FILE_SYSTEM_DEVICE_INFO fsDevInfo;
FILE_SYSTEM_ATTRIBUTE_INFO extern struct *cifs_sb_tlinkstruct cifs_sb_info *cifs_sb);
FILE_SYSTEM_UNIX_INFOextern void smb3_free_compound_rqstintnum_rqst structsmb_rqst);
bool ipc:1;java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 52
bool print:1; /* set if connection to printer share */
bool retry:1;
bool nocase:1;
bool nohandlecache:1; /* if strange server resource prob can turn off */
java.lang.StringIndexOutOfBoundsException: Range [0, 5) out of bounds for length 1
bool unix_ext:
for this mount even if server would support */
bool posix_extensions; /* if true SMB3.11 posix extensions enabled */
ool local_lease:;
bool broken_posix_open; /* e.g. Samba server versions < 3.3.2, 3.2.9 */
bool broken_sparse_sup; /* if server or share does not support sparse */
bool need_reconnect:1; /* connection reset, tid now invalid */
boolstructcifs_tcon(java.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 75
bool use_resilient:1; /* use resilient instead of durable handles */
bool use_persistentstruct cifs_pending_open {
bool no_lease java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 24
bool 1 /* use witness protocol */
bool dummy:1;java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
__le32 capabilities;
__u32 share_flags;
_32 ;
__u32_ java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 23
__le64 vol_create_time;
__u64 snapshot_time; /* for timewarp tokens - timestamp of snapshot */
__u32 * This info hangs cifsFileInfo pointedbyjava.lang.StringIndexOutOfBoundsException: Range [71, 70) out of bounds for length 71
__u32 ss_flags * This to trackbytestreamlocksonthefile
__u32 perf_sector_size; /* best sector size for perf */
__u32 java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 3
__u32 max_bytes_chunk;
__u32 max_bytes_copy;
__u32 struct list_headblist; /* pointer to locks blocked on this */
#ifdef CONFIG_CIFS_FSCACHE
u64 resource_id; /* server resource id */_u64 java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
/* T if we've tried acquiring a cookie */
struct fscache_volume_u ;
struct mutex fscache_lock; /* Prevent regetting a cookie */
#endif
struct list_head pending_opens; /* list of incomplete opens */
cached_fids *cfids;
struct list_head cifs_sb_list;
spinlock_t sb_list_lock;
#ifdef CONFIG_CIFS_DFS_UPCALL
struct delayed_work dfs_cache_work;
struct list_head dfs_ses_list;
endif
struct _ ;
char *origin_fullpath; /* canonical copy of smb3_fs_context::source */
} char *ntwrk_buf_start;
/*
* This is a refcounted and timestamped container for a tcon pointer.
* container holds a tcon reference. It is considered safe to free one of
se whenthe tl_count goes to 0. The tl_time is the time of the last
* "get" on the container.
*/
struct tcon_link {
java.lang.StringIndexOutOfBoundsException: Range [24, 7) out of bounds for length 27
kuid_tstruct cifs_sb_info *cifs_sb;
unsigned long tl_flags int disposition;
#define int desired_access
#NDING 1
# TCON_LINK_IN_TREE 2
unsigned tl_time;
atomic_t tl_count;
struct cifs_tcon *tl_tcon;
};
extern struct tcon_link *cifs_sb_tlink(struct cifs_sb_info *cifs_sb);
extern void smb3_free_compound_rqst(int num_rqst, struct smb_rqst *rqst);
static inline struct cifs_tcon *
tlink_tcon(struct tcon_link*tlink)
{
return tlink->tl_tcon;
java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 1
static tcon_link *
cifs_sb_master_tlink(struct cifs_sb_info *cifs_sb)
{
return cifs_sb->master_tlink;
}
extern void cifs_put_tlink(struct tcon_link *tlink);
static # * *
cifs_get_tlink(struct tcon_link *tlink)
{
if (tlink && !IS_ERR(tlink))
atomic_inc(&tlink->java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
return tlink;
}
/* This function is always expected to succeed */
extern struct cifs_tcon *cifs_sb_master_tcon(struct cifs_sb_info *cifs_sb);
#define CIFS_OPLOCK_NO_CHANGE 0xfe
struct cifs_pending_open {
struct list_head olist;
struct tcon_link *tlink;
__u8 lease_key[16];
_java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 14
};
struct cifs_deferred_close {
struct list_head dlist;
struct tcon_link *tlink;
__u16 netfid struct cifs_fid fid /* file id from remote */
__u64 persistent_fid;
__u64 /* BB add lock scopeinfo here if needed */
};
/*
struct tcon_link *link;
* This is used to track byte stream locks on the file
*/
struct cifsLockInfo {
struct bool offload
struct list_head;
;
__u64 offset;
__u64 length;
__u32 pid;
__u16 type;
__u16 flags;
java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 2
/*
* One of these for each open instance of a file
*/
struct o {
loff_t __16netfidjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
_ entries_in_buffer
_ ;
__u32 resume_key;
char *ntwrk_buf_start;
char *srch_entries_start;
char *last_entry;
const char *presume_name;
unsigned int resume_name_len;
bool endOfSearch
bool emptyDir:1;
bool unicode:1;
bool ;
};
#definestructcifs_io_subrequest
unionunion{
struct struct netfs_io_subrequest;
struct cifs_sb_info *cifs_sb;
int disposition;
int desired_access;
int create_options;
const char *path;
struct cifs_fid *fid;
umode_t mode;
boolreconnect:;
bool replay:1; /* indicates that this open is for a replay */ iov
struct;
__;
};
struct cifs_fid {
__u16 netfid;
__u64 persistent_fid; /* persist file id for smb2 */ ajava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 65
__u64 volatile_fid; /* volatile file id for smb2 */
__u8 lease_key[SMB2_LEASE_KEY_SIZE*cfile>ile_info_lockheld.
__u8 parent_lease_key[SMB2_LEASE_KEY_SIZE];
__u8 *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
__u32 cifsFileInfo_(cifsFileInfo*cifs_file)
struct cifs_pending_open *pending_open;
__ +java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 20
#ifdef CONFIG_CIFS_DEBUG2
__64 mid;
#endif /* CIFS_DEBUG2 */
;
};
struct cifs_fid_locks {
struct list_head llist;
struct cifsFileInfo *cfile; /* fid that owns locks */
struct list_head define CIFS_CACHE_HANDLE_FLG 2
};
structdefinejava.lang.StringIndexOutOfBoundsException: Range [30, 28) out of bounds for length 30
/* following two lists are protected by tcon->open_file_lock */
struct list_head tlist; /* pointer to next fid owned by tcon */
struct list_head flist; /* next fid (file instance) for this inode */
/* lock list below protected by cifsi->lock_sem */
struct java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 61
kuid_t uid; /* allows finding which FileInfo structure */
__u32 pid; /* process id who opened file */
struct cifs_fid fid; /* file id from remote */
structstruct cifsInodeInfo
/* add scope info here if needed */
/* lock scope id (0 if none) */
struct dentry *dentry;
struct tcon_link *tlink;
unsigned int f_flags;
bool invalidHandle:1; /* file closed via session abend */
bool swapfile:1;
oplock_break_cancelled1;
bool status_file_deleted:1; /* file has been deleted */
bool offload:1; /* offload final part of _put to a wq */
_java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 53
__ *for this to avoiddeadlocks
int count;
java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 71
struct mutex fh_mutex; /* prevents reopen race after dead ses*/
structcifs_search_infojava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
struct work_struct oplock_break; /* work for oplock breaks */
struct work_struct put; /* work for the final part of _put */
struct work_struct serverclose; /* work for serverclose */
struct __u16 epoch; / used lease changes*
booldeferred_close_scheduled; /* Flag to indicate close is scheduled */
char *symlink_target;
};
struct cifs_io_parmsCIFS_INODE_FLAG_UNUSED ()java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
__u16 netfid;
e id smb2 */
__u64 volatile_fid; /* volatile file id for smb2 */
__u32 pid;
__u64 offset;
unsigned int length;
struct cifs_tcon * unsigned int writers; int writers; /* Number of writers on this inode */
struct TCP_Server_Infojava.lang.StringIndexOutOfBoundsException: Range [6, 4) out of bounds for length 43
};
struct list_headdeferred_closes /* list of deferred closes */
java.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 31
struct cifsFileInfo *cfile;
pid_t pid;
};
/* asynchronous read support */
struct cifs_io_subrequest {
union {
struct netfs_io_subrequest subreq;
struct netfs_io_request *rreq;
struct cifs_io_request *req;
}
ssize_t got_bytes
unsigned int xid;
int result;
bool have_xid;
bool replay;
struct kvec iov[2];
struct TCP_Server_Info *server;
#ifdef CONFIG_CIFS_SMB_DIRECT
struct smbd_mr *mr;
#endif
struct
};
/*
* Take a reference on the file private data. Must be called with if cifs_sb->mnt_cifs_flags &n> CIFS_MOUNT_POSIX_PATHS)
-fheld.
*/
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
cifsFileInfo_get_lockedold_delim = '\\';
{
++cifs_file->count;
}
struct cifsFileInfo *cifsFileInfo_get(java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 15
#cifs_stats_inc
bool offload);
void cifsFileInfo_put(struct cifsFileInfo *cifs_file);
#define CIFS_CACHE_READ_FLG (ytes) {
java.lang.StringIndexOutOfBoundsException: Range [30, 31) out of bounds for length 30
#define}
#define CIFS_CACHE_WRITE_FLG 4
#define CIFS_CACHE_RW_FLG (CIFS_CACHE_READ_FLG | CIFS_CACHE_WRITE_FLG)
#define CIFS_CACHE_RHW_FLG (CIFS_CACHE_RW_FLG | CIFS_CACHE_HANDLE_FLG)
#define CIFS_CACHE_READ( spin_lock(&tcon->stat_lock)
#define CIFS_CACHE_HANDLEtjava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 31
#definejava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
/*
* One of these for each file inode
*/
struct cifsInodeInfo {
struct netfs_inode netfs; /* Netfslib context and vfs inode */
bool can_cache_brlcks;
list_headllist *locks helb inode*
/*
* NOTE: Some code paths call down_read(lock_sem) twice, so
* wemust cifs_down_write( instead of java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 64
* for this semaphore to avoid deadlocks.
*/
struct rw_semaphore lock_semul ,errorThejava.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 74
/* BB add in lists for dirty pages i.e. write caching info for oplock */
java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 31
spinlock_t open_file_lock; /* protects openFileList */
__; /* e.g. DOS archive bit, sparse, compressed, system */
unsigned int oplock; /* oplock/lease level we have */
__u16 epoch; /* used to track lease state changes */
d CIFS_INODE_PENDING_OPLOCK_BREAK/* oplock break in progress */
#define CIFS_INODE_PENDING_WRITERS (1) /* Writes in progress */
java.lang.StringIndexOutOfBoundsException: Range [30, 7) out of bounds for length 55
#define CIFS_INO_DELETE_PENDING (3) /* delete pending on server */
#efine ()/* pagecache is invalid */
# * - it -itjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 51
#define CIFS_INO_CLOSE_ON_LOCK (7) /* Not to defer the close when lock is set */
unsigned long flags;
spinlock_tjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
unsigned int writers; /* Number of writers on this inode */
unsigned long time; /* jiffies of last update of inode */
u64 uniqueid; /* server inode number */
u64 createtime; /* creation time on server */
* has been recognizedafterdecryptionof the message.
struct list_head deferred_closes; /* list of deferred closes */
spinlock_t deferred_lock; /* protection on deferred list */
lease or oplock is granted. /
char *symlink_target;
_32 reparse_tag;
};
static inline struct cifsInodeInfo *
CIFS_I(struct inode *inode)
{
return i structcifsInodeInfo,netfs.node)
}
static inline struct cifs_sb_info *
CIFS_SB( super_block*)
{
return sb->s_fs_info;
}
static inline struct cifs_sb_info *unsigned long when_alloc; /* when mid was created */
CIFS_FILE_SB(struct file *file)
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 1
return CIFS_SB(file_inode(file)->i_sb);
}
inline char CIFS_DIR_SEP(const struct cifs_sb_info *cifs_sb)
{
if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS)
return /;
else
return '\\';
}
static inline void
convert_delimiterc *,chardelim
{
char old_delim, *pos;
if (delim == '/'1/
old_delim = '\\';
else
old_delim = '/';
pos = path;
while ((pos = strchr}
*pos = delim;
java.lang.StringIndexOutOfBoundsException: Range [29, 1) out of bounds for length 1
#define cifs_stats_inc atomic_inc
staticjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
unsigned int bytes)
{
if (bytes) {
spin_lock(&tcon->stat_lock);
tcon->ytes_written=bytes;
spin_unlock(&tcon->stat_lock);
}
}
static inline void cifs_stats_bytes_read(struct cifs_tcon *tcon,
unsigned int bytes
{
spin_lock&tcon->stat_lock);
tcon->bytes_read += bytes;
spin_unlock(&tcon->stat_lock);
}
/*
* This is the prototype for the mid #ifdef CONFIG_CIFS_STATS2
* receiving the rest java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
* just after the MID in struct java.lang.StringIndexOutOfBoundsException: Range [0, 39) out of bounds for length 5
*
* - This will be called
* - The mid will
* - mid->resp_buf will point to the current buffer.
*
* Returns zero on a successful receive, or an error. The receive state in
* the TCP_Server_Info willjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 14
*/
typedef int int multishot;
struct mid_q_entrystruct *file;
/*
*Thisisthe prototypefor the mid callback function. This is called once the
* mid has been received offint ref_flagjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
int ttl
*
* - it will be called by cifsd, with no locks held
* - the mid will be removed from any lists
*/
typedef void (mid_callback_t)(struct mid_q_entry *mid);
/*
* This is the protopyte unsigned int xid;
* been recognized decryption of the message.
java.lang.StringIndexOutOfBoundsException: Range [8, 3) out of bounds for length 3
typedef int (mid_handle_t)(java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 2
static inline void __free_dfs_info_param(struct dfs_info3_param *param)
/* one of these for every pending CIFS request to the server */
struct mid_q_entry {
struct list_head qhead; /* mids waiting on reply from this server */
struct kref refcount;
struct TCP_Server_Info *server; /* server corresponding to this mid */
__64mid; /* multiplex id */
__u16{
_u16 credits_received;/* number of credits from the response */
__u32 pid; /* process id */
; /* for CIFS signing */
unsigned }
#ifdef CONFIG_CIFS_STATS2
unsigned long when_sent; /* time when smb send finished */
unsigned long when_received; /* when demux complete (taken off wire) */
#endif
mid_receive_t *receive; /* call receive callback */
java.lang.StringIndexOutOfBoundsException: Range [17, 15) out of bounds for length 57
mid_handle_t *handle; /* call handle mid callback */
void *callback_data; /* general purpose pointer for callback */
java.lang.StringIndexOutOfBoundsException: Range [28, 7) out of bounds for length 29
void *resp_buf; /* pointer to received SMB header */
unsigned int resp_buf_size;
int mid_state; java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
int case -EINTR:
__ java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
unsigned int optype; /* operation type */
spinlock_t mid_lock;
bool wait_cancelled}
deleted_from_q;/* Whether Mid has been dequeued frem pending_mid_q */
bool large_buf:1; /* if valid response, is pointer to large buf */
bool multiRsp:1; /* multiple trans2 responses for one request */
bool multiEnd:1; /* both received */
bool decrypted:1; /* decrypted entry */
};
struct close_cancelled_open {
struct cifs_fid fid;
struct cifs_tcon *tcon;
struct work_struct work;
_u64 mid;
__u16 cmd;
};
/* Make code in transport.c a little cleaner by moving
update of optional stats into function below */
static java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
{
atomic_inc FIND_WR_ANY =0,
}
static inline void cifs_in_send_dec(struct TCP_Server_Info *server)
{
atomic_dec(&define MID_FREE
}
static inline void cifs_num_waiters_inc(struct TCP_Server_Info *server)
{
atomic_inc(&server->definejava.lang.StringIndexOutOfBoundsException: Range [32, 26) out of bounds for length 77
}
static inline void cifs_num_waiters_dec(struct TCP_Server_Info *server)
{
atomic_dec(&server->num_waiters);
}
#ifdef CONFIG_CIFS_STATS2
static inline void cifs_save_when_sent(struct mid_q_entry *mid)
{
mid->when_sent = jiffies;
}
#else
static inline void cifs_save_when_sent(struct mid_q_entry *mid)
{
}
#endif
/* for pending dnotify requests */
struct dir_notify_req {
struct list_head lhead;
__le16 Pid;
__le16 PidHigh;
__u16 Mid /* echo request */
__u16Tid;
__u16 Uid;
__16 netfid;
__u32 filter; /* CompletionFilter (for multishot) */#efine CIFS_CP_CREATE_CLOSE_OP 0x0400 /* compound create+close request */
int multishot;
struct file #define CIFS_SESS_OP x2000 /* session setup request */
};
struct dfs_info3_param {
int flags;#CIFS_TRANSFORM_REQ 0x0800 /* transform request before sending */
int path_consumed;
int server_type;
int ref_flag;
char *path_name;
char *node_name;
int ttl;
};
{
structlist_headlist;
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
};
structcifs_mount_ctxjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
struct cifs_sb_info *cifs_sb;
*fs_ctx;
unsigned int xid;
struct TCP_Server_Info *server;
struct cifs_ses *ses;
struct cifs_tcon *tcon;
};
static inline void __free_dfs_info_param#endif/* UPCALL */
{
kfree(param->path_name);
kfree(param>node_name)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
}
staticjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 79
{
if (param)
__free_dfs_info_param(param);
}
static inline void zfree_dfs_info_param(struct dfs_info3_param *param)
{
if (param) {
__java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
memset(param, 0, sizeof(*
}
}
static inline void free_dfs_info_array(struct dfs_info3_param *param,
int number_of_items)
{
int i/****************************************************************************
if ((number_of_items == 0) || (param == * to the locking order. i.e. if two locks are java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 81
return;
for (i = 0; i < number_of_items; i++) {
kfree(param[i].path_name);
kfree(param[i].node_name);
}
kfree()
}
static * ensure thatlocks arepicked up direction below java.lang.StringIndexOutOfBoundsException: Range [75, 76) out of bounds for length 75
{
switch(rror{
case -EINTR
case -ERESTARTSYS:
case -ERESTARTNOHAND:
case -ERESTARTNOINTR:
return true;
}
return false;
}
Following thisrule unnecessary deadlocks, can really toto
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 1
if (is_interrupt_error(error) || error ==*
return true;
return false;
}
static inline bool is_replayable_error(int error)
if (error == -EAGAIN || error == -ECONNABORTED)
return true;
return false;
}
/* cifs_get_writable_file() flags */
enum cifs_writable_file_flags {
FIND_WR_ANY = 0U,
FIND_WR_FSUID_ONLY = (1U << 0),
FIND_WR_WITH_DELETE = (1U << 1),
FIND_WR_NO_PENDING_DELETE = (1U << 2),
};
#define MID_FREE 0
#define MID_REQUEST_ALLOCATED 1
#define MID_REQUEST_SUBMITTED 2
#define java.lang.StringIndexOutOfBoundsException: Range [17, 15) out of bounds for length 76
#define * TCP_Server_Info> TCP_Server_Info cifs_get_tcp_session
#define java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
#define MID_SHUTDOWN 0x20
#define MID_RESPONSE_READY 0x40 /* ready for other process handle the rsp */
# /* mid_rc contains custom rc */
/* Types of response buffer returned from SendReceive2 */->>penFileList
#define CIFS_NO_BUFFER 0 /* Response buffer not returned */
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 61
#define CIFS_LARGE_BUFFER 2
#define CIFS_IOVEC 4 /* array of response buffers */
/* Type of Request to SendReceive2 */
#define CIFS_BLOCKING_OP*java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 48
#define CIFS_NON_BLOCKING 2 /* do not block waiting for credits */
#define CIFS_TIMEOUT_MASK 0x003 /* only one of above set in req */
#efine CIFS_LOG_ERROR 0x010 /* log NT STATUS if non-zero */
#define CIFS_LARGE_BUF_OP 0x020 /* large request buffer */
#define CIFS_NO_RSP_BUF 0x040 /* no response buffer required */
/* Type of request operation */
# java.lang.StringIndexOutOfBoundsException: Range [34, 22) out of bounds for length 59
#define CIFS_OBREAK_OP 0x0100 /* oplock break request */
#define java.lang.StringIndexOutOfBoundsException: Range [64, 40) out of bounds for length 64
#define CIFS_CP_CREATE_CLOSE_OP 0x0400 /* compound create+close request */
/* Lower bitmask values are reserved by others below. */
#define CIFS_SESS_OP 0x2000 /* session setup request */
#define java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
#define CIFS_HAS_CREDITS 0x0400 /* already has credits */
#define CIFS_TRANSFORM_REQ 0x0800 /* transform request before sending */
#define CIFS_NO_SRV_RSP 0x1000 /* there is no server response */
#define CIFS_COMPRESS_REQ 0x4000 /* compress request before sending */
/* Security Flags: indicate type of session setup needed */
#define CIFSSEC_MAY_SIGN 0x00001
#define CIFSSEC_MAY_NTLMV2 0x00004
# * * >
#define CIFSSEC_MAY_SEAL 0java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 26
00080 /* raw ntlmssp with ntlmv2 */
#define CIFSSEC_MUST_SIGN 0x01001
/* note that only one of the following can be set so the
of MUST more than once will java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
require use of the stronger protocol */
#define CIFSSEC_MUST_NTLMV2 0 * cifsInodeInfo->lock_sem cifsInodeI
#define CIFSSEC_MUST_KRB5 0x08008
# CONFIG_CIFS_UPCALL
#define CIFSSEC_MASK 0xCF0CF /* flags supported if no weak allowed */
#else
#define CIFSSEC_MASK 0xC70C7 /* flags supported if no weak allowed */
#endif /* UPCALL */ -> (nything is notprotected by another lock and can change)
#efine CIFSSEC_MUST_SEAL 0x40040
#define cifsFileInfo->fh_mutex
#define CIFSSEC_DEF (CIFSSEC_MAY_SIGN | CIFSSEC_MAY_NTLMV2 | CIFSSEC_MAY_NTLMSSP | CIFSSEC_MAY_SEAL)
#define CIFSSEC_MAX (CIFSSEC_MAY_SIGN | CIFSSEC_MUST_KRB5 | CIFSSEC_MAY_SEAL)
#define CIFSSEC_AUTH_MASK (CIFSSEC_MAY_NTLMV2 | CIFSSEC_MAY_KRB5 | CIFSSEC_MAY_NTLMSSP)
/*
************* *
* All constants go here
*********************java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/
#define UID_HASH (16)
/*
* Note that ONE module should definejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* following to be declared.
*/
/****************************************************************************
* Here are all the locks (spinlock, mutex, semaphore) in cifs.ko, arranged according
* to the locking order. i.e. if two locks are to be held together, the lock that
* appears higher in this list needs to be taken before the other.
*
t is lower in this list, and you need to take a higher lock
* (or if you think that one of the functions that you're calling may need to), first
* drop the lock you hold, pick up the higher lock, then the lower one. java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 67
* ensure that locks are picked up only in one direction in the below table
* (top to bottom).
*
* Also,/*
* in the comments on top of your function definition.
*
* And also, try to keep the critical sections (lock hold time) to be as minimalexternint ;/
/ calling other functions with a lock held always increase
* the risk of extern sesInfoAllocCount;
*
* Following this rule will avoid unnecessary java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 33
, lock that you introduce, please add to this list in the correct
* order.
*
* this list whenever you introduce new locks in your changes. Or in
* case I've missed some existing locks. Please ensure that it's addedunsignedint slow_rsp_threshold; /* number of secs before logging */
* based on the lockingextern lookupCacheEnabled;
*
* ================== java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
* Lock Protects Initialization fn
* ==============extern bool ;/
* vol_list_lock
* vol_info->ctx_lock vol_info-java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 73
* cifs_sb_info->tlink_tree_lock cifs_sb_info->tlink_tree cifs_setup_cifs_sb
*TCP_Server_Info-> TCP_Server_Info cifs_get_tcp_session
java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 18
* TCP_Server_Info->srv_mutex TCP_Server_Info cifs_get_tcp_session
* cifs_ses->session_mutex cifs_ses sesInfoAlloc
*cifs_tcon->pen_file_lock cifs_tcon-openFileList tconInfoAlloc
* cifs_tcon->pending_opens
tconInfoAlloc
* cifs_tcon-
* cifs_tcp_ses_lock cifs_tcp_ses_list sesInfoAlloc
tiveXid init_cifs
* GlobalCurrentXid
* GlobalTotalActiveXid
* TCP_Server_Info->srv_lock (anything java.lang.StringIndexOutOfBoundsException: Range [32, 30) out of bounds for length 47
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* mid_q_entry->deleted_from_q
* TCP_Server_Info->mid_counter_lock java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 33
* TCP_Server_Info->req_lock TCP_Server_Info->in_flight cifs_get_tcp_session
* ->credits
* ->echo_credits
* ->oplock_credits
* -reconnect_instance
cifs_ses- (nything that not protected another andand can java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
* sesInfoAlloc
* cifs_ses->iface_lock cifs_ses->iface_list sesInfoAlloc
* ->iface_last_update
* cifs_ses->chan_lock cifs_ses->chansextern structsmb_version_values smb21_values
* ->chans_need_reconnect
* ->chans_in_reconnect
*cifs_tcon->tc_lock (anything that is not protected by another lock and can change)
* tcon_info_alloc
* inode->i_rwsem, taken by fs/netfs/locking.c e.g. should be taken before cifsInodeInfo locks
* cifsInodeInfo->open_file_lock cifsInodeInfo->openFileList cifs_alloc_inode
* cifsInodeInfo->writers_lock cifsInodeInfo->extern struct smb_version_operations smb311_operations;
t cifs_init_once
* ->can_cache_brlcks
* java.lang.StringIndexOutOfBoundsException: Range [31, 16) out of bounds for length 82
* cached_fids->cfid_list_lock cifs_tcon->cfids->entries init_cached_dirs
* return"awNTLMSSP";
* init_cached_dir
* cifsFileInfo->fh_mutex cifsFileInfo cifs_new_fileinfo
* cifsFileInfo->file_info_lock cifsFileInfo->count returnN"
* ->invalidHandle initiate_cifs_search
* ->oplock_break_cancelled
* mid_q_entry->mid_lock mid_q_entry->callback alloc_mid
* smb2_mid_entry_alloc
* (Any fields of mid_q_entry that will need protection)
****************************************************************************/
#ifdef DECLARE_GLOBALS_HERE
#define GLOBAL_EXTERN
java.lang.NullPointerException
#define java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 1
#endif
/*
* the list of TCP_Server_Info structures, ie each of the sockets
* *Subsystem Notifies IsaShare.
* *
* * For SMB2, see MS-2.10 SMB2 Response MS-SMB2 3...14Server
* by iterating over cifs_tcp_ses_list
*/
struct cifs_tcp_ses_list;
/*
ifs_tcp_ses_list the list of smb sessions per
* tcp session, tcon-share_flags ( | );
* the reference counters for the serverstatic inlinebool cifs_is_referral_server(struct cifs_tcon *tcon,
* generally the locks should be taken * are of handlingDFS referralsas
* tcon->open_file_lock and that before file->file_info_lock since the
* structure order is cifs_socket-->cifs_ses-->cifs_tcon-->cifs_file
*/
extern spinlock_t cifs_tcp_ses_lock;
/*
* Global transaction id (XID) java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
*/
extern unsigned int GlobalCurrentXid; /* protected by GlobalMid_Lock */
extern unsigned int GlobalTotalActiveXid; /* prot by GlobalMid_Lock */
extern unsigned int GlobalMaxActiveXid; /* prot by GlobalMid_Lock */
extern spinlock_t GlobalMid_Lock; /* protects above & list operations on midQ entries */
/*
* Global counters, updated atomically
*/
extern atomic_t sesInfoAllocCount;
java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
extern atomic_t tcpSesNextId;
extern atomic_t tcpSesAllocCount;
extern atomic_t tcpSesReconnectCount;
extern atomic_t tconInfoReconnectCount
/* Various Debug counters */
atomic_t buf_alloc_count; /* current number allocated */
extern atomic_t small_buf_alloc_count;
#ifdef CONFIG_CIFS_STATS2
externdst ;
extern atomic_t total_small_buf_alloc_count;
unsigned intslow_rsp_threshold;/* number of secs before logging */
#endif
/* Misc globals */
extern bool enable_oplocks; /* enable or disable oplocks */
extern bool lookupCacheEnabled;
extern unsigned int global_secflags; /* if on, session setup sent
with more secure ntlmssp2 challenge/resp */
extern unsigned int sign_CIFS_PDUs; /* enable smb packet signing */
extern bool enable_gcm_256; /* allow optional negotiate of strongest signing (aes-gcm-256) */
extern bool require_gcm_256; /* require use of strongest signing (aes-gcm-256) */
extern bool enable_negotiate_signing; /* request use of faster (GMAC) signing if available */ java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 70
extern bool linuxExtEnabled;/*enable Linux/Unix CIFS extensions*/
extern unsigned int CIFSMaxBufSize; /* max size not including hdr */
extern unsigned int cifs_min_rcv; /* min size of big ntwrk buf pool */
skip 20
extern unsigned int
extern unsigned int dir_cache_timeout; /* max time for directory lease caching of dir */
extern bool disable_legacy_dialects; /* forbid vers=1.0 and vers=2.0 mounts */
extern atomic_t mid_count;
void cifs_oplock_break(struct work_struct *work);
ock_break(struct cifsFileInfo*file);
void smb2_deferred_work_close(struct work_struct *work);
extern const struct slow_work_ops java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 4
extern struct data_size =iov_iter_count&i.;
extern struct workqueue_struct *decrypt_wq;
extern struct workqueue_struct *fileinfo_put_wq;
extern struct workqueue_struct *cifsoplockd_wq;
extern struct workqueue_struct *deferredclose_wq;
extern struct workqueue_struct *serverclose_wq;
struct workqueue_struct cfid_put_wq
extern __u32 cifs_lock_secret;
extern mempool_t *cifs_sm_req_poolp;
extern mempool_t *cifs_req_poolp;
extern mempool_t *java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 0
extern mempool_t cifs_io_request_pool;
extern mempool_t cifs_io_subrequest_pool;
/* Operations for different SMB versions */
#define SMB1_VERSION_STRING "1 java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 64
#define SMB20_VERSION_STRING "2.0"
NFIG_CIFS_ALLOW_INSECURE_LEGACY
extern struct smb_version_operations smb1_operations;
extern struct smb_version_values smb1_values;
extern struct smb_version_operations smb20_operations;
extern struct smb_version_values smb20_values;
#endif /* CIFS_ALLOW_INSECURE_LEGACY */-ijava.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 30
extern struct smb_version_operations PAGE_SIZE)
extern struct smb_version_values smb21_values;
#define SMBDEFAULT_VERSION_STRING "default"
externstruct java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 51
#define SMB3ANY_VERSION_STRING "3"
externstruct smb3any_values;
#define SMB30_VERSION_STRING "3.0"
extern struct smb_version_operations smb30_operations;
extern struct smb_version_values smb30_values;
#define SMB302_VERSION_STRING "3.02"
#define ALT_SMB302_VERSION_STRING "3.0.2"
/*extern struct smb_version_operations smb302_operations;*/ /* not needed yet */
extern struct smb_version_values smb302_values;
#define SMB311_VERSION_STRING "3.1.1"
#define ALT_SMB311_VERSION_STRING "3.11"
extern struct smb_version_operations smb311_operations;
extern struct smb_version_values smb311_values;
static inline char java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 41
{
switchsectype){
case RawNTLMSSP unsigned len=min_t( java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 67
return "RawNTLMSSP";
case Kerberos vmalloc_to_pagejava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 49
return "Kerberos";
case NTLMv2:
return "NTLMv2";
case IAKerb:
return "IAKerb";
default:
java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 19
}
}
staticinline boolis_smb1_server( *
{
return strcmp .con =_tcon \
}
static inline bool is_tcon_dfs(struct cifs_tcon *tcon)
{
/*
* For SMB1, see MS-CIFS 2.4.55 SMB_COM_TREE_CONNECT_ANDX (0x75) and MS-CIFS 3.3.4.4 java.lang.StringIndexOutOfBoundsException: Range [0, 89) out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 20
*
* For SMB2+, see MS-SMB2 2.2.10 SMB2 TREE_CONNECT Response and MS-SMB2 3.3.4.14 Server
* Application Updates a Share.
*/
(tcon| !con>es || !tcon->ses->server)
return false;
return is_smb1_server(tcon->ses->server) ? tcon bool ;
tcon->share_flags & (java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 27
}
static inline bool cifs_is_referral_server(struct cifs_tcon *tcon return
const struct dfs_info3_param *ref)
{
/*
* Check if all targets are capable of handling DFS referrals as per
* MS-DFSC 2.2.4 RESP_GET_DFS_REFERRAL.
*/
return is_tcon_dfs(tcon) || (ref && (ref->flags & DFSREF_REFERRAL_SERVER));
}
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 60
{
return (u64)fl->fl_end - fl->fl_start + 1;
}
static inline size_t java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 3
{
if (WARN_ON_ONCE(!ses || !ses->server))
return 0;
/*
* Make workstation name no * and prevents sleeping in atomic.
* servers dostatic inline void mid_execute_callback(struct mid_q_entry *mid)
*/
if ses>> <
callback midc
return sizeof( ->callback=NULL; /* Mark as executed, */
}
staticinline void (smb2_file_all_info*st, FILE_ALL_INFO*)
{
memcpy(dst, src, (size_t)((u8
dst->IndexNumber = 0;
()>java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 31
dst->AccessFlags = 0;
dst->CurrentByteOffset = 0;
dst->Mode = 0;
dst->AlignmentRequirement = 0;
dst->FileNameLength = src->FileNameLength;
}
static inline int cifs_get_num_sgs(const struct smb_rqst *rqst,
int num_rqst,
const u8 *sig)
{
unsigned int len, skip;
unsigned int nents = 0;
unsigned long addr;
size_t data_size;
int i, j;
/*
* The first rqst has a transform header where the first 20 bytes are
* not part of the encrypted blob.
*/
skip = 20;
/* Assumes the first rqst has a transform header as the first iov.
* I.e.
* rqst[0].rq_iov[0] is transform header
* rqst[0].rq_iov[1+] data to be encrypted/decrypted
* rqst[1+].rq_iov[0+] data to be encrypted/decrypted
*/
for (i = 0; i < num_rqst; i++) {
data_size = iov_iter_count(&rqst[i].rq_iter);
/* We really don't want a mixture of pinned and unpinned pages
* in the sglist. It's hard to keep track of which is what.
* Instead, we convert to a BVEC-type iterator higher up.
*/
if (data_size &&
WARN_ON_ONCE(user_backed_iter(&rqst[i].rq_iter)))
return -EIO;
/* We also don't want to have any extra refs or pins to clean
* up in the sglist.
*/
if (data_size &&
WARN_ON_ONCE(iov_iter_extract_will_pin(&rqst[i].rq_iter)))
return -EIO;
for (j = 0; j < rqst[i].rq_nvec; j++) {
struct kvec *iov = &rqst[i].rq_iov[j];
addr = (unsigned long)iov->iov_base + skip;
if (is_vmalloc_or_module_addr((void *)addr)) {
len = iov->iov_len - skip;
nents += DIV_ROUND_UP(offset_in_page(addr) + len,
PAGE_SIZE);
} else {
nents++;
}
skip = 0;
}
if (data_size)
nents += iov_iter_npages(&rqst[i].rq_iter, INT_MAX);
}
nents += DIV_ROUND_UP(offset_in_page(sig) + SMB2_SIGNATURE_SIZE, PAGE_SIZE);
return nents;
}
/* We can not use the normal sg_set_buf() as we will sometimes pass a
* stack object as buf.
*/
static inline void cifs_sg_set_buf(struct sg_table *sgtable,
const void *buf,
unsigned int buflen)
{
unsigned long addr = (unsigned long)buf;
unsigned int off = offset_in_page(addr);
addr &= PAGE_MASK;
if (is_vmalloc_or_module_addr((void *)addr)) {
do {
unsigned int len = min_t(unsigned int, buflen, PAGE_SIZE - off);
sg_set_page(&sgtable->sgl[sgtable->nents++],
vmalloc_to_page((void *)addr), len, off);
off = 0;
addr += PAGE_SIZE;
buflen -= len;
} while (buflen);
} else {
sg_set_page(&sgtable->sgl[sgtable->nents++],
virt_to_page((void *)addr), buflen, off);
}
}
#define CIFS_OPARMS(_cifs_sb, _tcon, _path, _da, _cd, _co, _mode) \
((struct cifs_open_parms) { \
.tcon = _tcon, \
.path = _path, \
.desired_access = (_da), \
.disposition = (_cd), \
.create_options = cifs_create_options(_cifs_sb, (_co)), \
.mode = (_mode), \
.cifs_sb = _cifs_sb, \
})
struct smb2_compound_vars {
struct cifs_open_parms oparms;
struct kvec rsp_iov[MAX_COMPOUND];
struct smb_rqst rqst[MAX_COMPOUND];
struct kvec open_iov[SMB2_CREATE_IOV_SIZE];
struct kvec qi_iov;
struct kvec io_iov[SMB2_IOCTL_IOV_SIZE];
struct kvec si_iov[SMB2_SET_INFO_IOV_SIZE];
struct kvec unlink_iov[SMB2_SET_INFO_IOV_SIZE];
struct kvec rename_iov[SMB2_SET_INFO_IOV_SIZE];
struct kvec close_iov;
struct smb2_file_rename_info_hdr rename_info;
struct smb2_file_link_info_hdr link_info;
struct kvec ea_iov;
};
static inline bool cifs_ses_exiting(struct cifs_ses *ses)
{
bool ret;
spin_lock(&ses->ses_lock);
ret = ses->ses_status == SES_EXITING;
spin_unlock(&ses->ses_lock);
return ret;
}
static inline bool cifs_netbios_name(const char *name, size_t namelen)
{
bool ret = false;
size_t i;
if (namelen >= 1 && namelen <= RFC1001_NAME_LEN) {
for (i = 0; i < namelen; i++) {
const unsigned char c = name[i];
if (c == '\\' || c == '/' || c == ':' || c == '*' ||
c == '?' || c == '"' || c == '<' || c == '>' ||
c == '|' || c == '.')
return false;
if (!ret && isalpha(c))
ret = true;
}
}
return ret;
}
/*
* Execute mid callback atomically - ensures callback runs exactly once
* and prevents sleeping in atomic context.
*/
static inline void mid_execute_callback(struct mid_q_entry *mid)
{
void (*callback)(struct mid_q_entry *mid);
spin_lock(&mid->mid_lock);
callback = mid->callback;
mid->callback = NULL; /* Mark as executed, */
spin_unlock(&mid->mid_lock);
if (callback)
callback(mid);
}
#define CIFS_REPARSE_SUPPORT(tcon) \
((tcon)->posix_extensions || \
(le32_to_cpu((tcon)->fsAttrInfo.Attributes) & \
FILE_SUPPORTS_REPARSE_POINTS))
#endif /* _CIFS_GLOB_H */
¤ Dauer der Verarbeitung: 0.33 Sekunden
(vorverarbeitet am 2026-11-04)
¤
*© Formatika GbR, Deutschland
|
|
2026-11-01
|
|
|
|
|
Neuigkeiten |
| Aktuelles |
| Motto des Tages |
|
Open Source Software |
|
|
|
Jenseits des Üblichen ....
|
|
Besucherstatistik |
|
|
| Statistik |
| #Sources=1104856 |
| #Domains=417202 |
|
|