Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump idna from 3.4 to 3.7 in /drivers/gpu/drm/ci/xfails #669

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
cbe889e
Revert "fs/9p: fix uninitialized values during inode evict"
Apr 3, 2024
c1cca65
Revert "fs/9p: remove redundant pointer v9ses"
Apr 3, 2024
3e940e2
Revert "fs/9p: fix uaf in in v9fs_stat2inode_dotl"
Apr 3, 2024
db65e28
Revert "fs/9p: fix dups even in uncached mode"
Apr 3, 2024
ba52141
Revert "fs/9p: simplify iget to remove unnecessary paths"
Apr 3, 2024
7988c20
Revert "fs/9p: rework qid2ino logic"
Apr 3, 2024
7e9cef8
Revert "fs/9p: Eliminate now unused v9fs_get_inode"
Apr 3, 2024
fcdceea
Revert "fs/9p: Eliminate redundant non-cache path in mknod"
Apr 3, 2024
f88e140
Revert "fs/9p: remove walk and inode allocation from symlink"
Apr 3, 2024
891e5c3
Revert "fs/9p: convert mkdir to use get_new_inode"
Apr 3, 2024
cbb62e9
Revert "fs/9p: switch vfsmount to use v9fs_get_new_inode"
Apr 3, 2024
63c6a99
bcachefs: Don't use bch2_btree_node_lock_write_nofail() in btree spli…
Apr 11, 2024
a779401
bcachefs: printbuf improvements
Apr 10, 2024
0210486
bcachefs: printbufs: prt_printf() now handles \t\r\n
Apr 10, 2024
ffe4d93
bcachefs: prt_printf() now respects \r\n\t
Apr 10, 2024
2e6ce89
bcachefs: bch2_btree_node_header_to_text()
Apr 10, 2024
d4ea8d2
bcachefs: bch2_journal_keys_dump()
Apr 9, 2024
4635696
bcachefs: bch2_hash_lookup() now returns bkey_s_c
Apr 7, 2024
e1e3963
bcachefs: add btree_node_merging_disabled debug param
Apr 5, 2024
55ffab0
bcachefs: bch2_btree_path_to_text()
Apr 6, 2024
7bbb39e
bcachefs: New assertion for writing to the journal after shutdown
Feb 21, 2024
0c77f54
bcachefs: allow for custom action in fsck error messages
Mar 28, 2024
7f89d03
bcachefs: Don't read journal just for fsck
Mar 31, 2024
6ccecca
bcachefs: When traversing to interior nodes, propagate result to path…
Mar 22, 2024
6f40b7a
bcachefs: Optimize eytzinger0_sort() with bottom-up heapsort
visitorckw Apr 7, 2024
3c726bb
bcachefs: kill for_each_btree_key_old()
Apr 6, 2024
6720901
bcachefs: for_each_btree_key_continue()
Apr 7, 2024
fa64ed9
bcachefs: bch2_gc() is now private to btree_gc.c
Apr 6, 2024
2d71188
bcachefs: Finish converting reconstruct_alloc to errors_silent
Apr 7, 2024
c0fb314
bcachefs: kill metadata only gc
Apr 7, 2024
5c01601
bcachefs: move topology repair kick to gc_btrees()
Apr 7, 2024
96f63bf
bcachefs: move root node topo checks to node_check_topology()
Apr 7, 2024
11ee32b
bcachefs: gc_btree_init_recurse() uses gc_mark_node()
Apr 7, 2024
fa5e902
bcachefs: mark_superblock cleanup
Apr 7, 2024
e960ee8
bcachefs: __BTREE_ITER_ALL_SNAPSHOTS -> BTREE_ITER_SNAPSHOT_FIELD
Apr 7, 2024
6fb337c
bcachefs: iter/update/trigger/str_hash flag cleanup
Apr 7, 2024
c96d230
bcachefs: bch2_btree_insert_trans() no longer specifies BTREE_ITER_ca…
Apr 7, 2024
513594a
bcachefs: bch2_dir_emit() - drop_locks_do() conversion
Apr 10, 2024
1eca1d9
bcachefs: bch2_trans_relock_fail() - factor out slowpath
Apr 9, 2024
7096881
bcachefs: debug assert for merge locking bug
Apr 6, 2024
e9e1171
bcachefs: Fix UAF when doing btree node merges
Apr 11, 2024
20675c4
fixup! bcachefs: Fix UAF when doing btree node merges
Apr 11, 2024
5de038f
build(deps): bump idna from 3.4 to 3.7 in /drivers/gpu/drm/ci/xfails
dependabot[bot] Apr 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion drivers/gpu/drm/ci/xfails/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ termcolor==2.3.0
# ci-collate dependencies
certifi==2023.7.22
charset-normalizer==3.2.0
idna==3.4
idna==3.7
pip==23.3
python-gitlab==3.15.0
requests==2.31.0
Expand Down
31 changes: 26 additions & 5 deletions fs/9p/v9fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,16 @@ extern int v9fs_vfs_rename(struct mnt_idmap *idmap,
struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry,
unsigned int flags);
extern struct inode *v9fs_fid_iget(struct super_block *sb, struct p9_fid *fid);
extern struct inode *v9fs_inode_from_fid(struct v9fs_session_info *v9ses,
struct p9_fid *fid,
struct super_block *sb, int new);
extern const struct inode_operations v9fs_dir_inode_operations_dotl;
extern const struct inode_operations v9fs_file_inode_operations_dotl;
extern const struct inode_operations v9fs_symlink_inode_operations_dotl;
extern const struct netfs_request_ops v9fs_req_ops;
extern struct inode *v9fs_fid_iget_dotl(struct super_block *sb,
struct p9_fid *fid);
extern struct inode *v9fs_inode_from_fid_dotl(struct v9fs_session_info *v9ses,
struct p9_fid *fid,
struct super_block *sb, int new);

/* other default globals */
#define V9FS_PORT 564
Expand Down Expand Up @@ -227,9 +230,27 @@ v9fs_get_inode_from_fid(struct v9fs_session_info *v9ses, struct p9_fid *fid,
struct super_block *sb)
{
if (v9fs_proto_dotl(v9ses))
return v9fs_fid_iget_dotl(sb, fid);
return v9fs_inode_from_fid_dotl(v9ses, fid, sb, 0);
else
return v9fs_fid_iget(sb, fid);
return v9fs_inode_from_fid(v9ses, fid, sb, 0);
}

/**
* v9fs_get_new_inode_from_fid - Helper routine to populate an inode by
* issuing a attribute request
* @v9ses: session information
* @fid: fid to issue attribute request for
* @sb: superblock on which to create inode
*
*/
static inline struct inode *
v9fs_get_new_inode_from_fid(struct v9fs_session_info *v9ses, struct p9_fid *fid,
struct super_block *sb)
{
if (v9fs_proto_dotl(v9ses))
return v9fs_inode_from_fid_dotl(v9ses, fid, sb, 1);
else
return v9fs_inode_from_fid(v9ses, fid, sb, 1);
}

#endif
11 changes: 4 additions & 7 deletions fs/9p/v9fs_vfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,13 @@ extern struct kmem_cache *v9fs_inode_cache;

struct inode *v9fs_alloc_inode(struct super_block *sb);
void v9fs_free_inode(struct inode *inode);
struct inode *v9fs_get_inode(struct super_block *sb, umode_t mode,
dev_t rdev);
void v9fs_set_netfs_context(struct inode *inode);
int v9fs_init_inode(struct v9fs_session_info *v9ses,
struct inode *inode, struct p9_qid *qid, umode_t mode, dev_t rdev);
struct inode *inode, umode_t mode, dev_t rdev);
void v9fs_evict_inode(struct inode *inode);
#if (BITS_PER_LONG == 32)
#define QID2INO(q) ((ino_t) (((q)->path+2) ^ (((q)->path) >> 32)))
#else
#define QID2INO(q) ((ino_t) ((q)->path+2))
#endif

ino_t v9fs_qid2ino(struct p9_qid *qid);
void v9fs_stat2inode(struct p9_wstat *stat, struct inode *inode,
struct super_block *sb, unsigned int flags);
void v9fs_stat2inode_dotl(struct p9_stat_dotl *stat, struct inode *inode,
Expand Down
4 changes: 2 additions & 2 deletions fs/9p/vfs_dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ static int v9fs_dir_readdir(struct file *file, struct dir_context *ctx)
}

over = !dir_emit(ctx, st.name, strlen(st.name),
QID2INO(&st.qid), dt_type(&st));
v9fs_qid2ino(&st.qid), dt_type(&st));
p9stat_free(&st);
if (over)
return 0;
Expand Down Expand Up @@ -184,7 +184,7 @@ static int v9fs_dir_readdir_dotl(struct file *file, struct dir_context *ctx)

if (!dir_emit(ctx, curdirent.d_name,
strlen(curdirent.d_name),
QID2INO(&curdirent.qid),
v9fs_qid2ino(&curdirent.qid),
curdirent.d_type))
return 0;

Expand Down
166 changes: 135 additions & 31 deletions fs/9p/vfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,9 @@ void v9fs_set_netfs_context(struct inode *inode)
}

int v9fs_init_inode(struct v9fs_session_info *v9ses,
struct inode *inode, struct p9_qid *qid, umode_t mode, dev_t rdev)
struct inode *inode, umode_t mode, dev_t rdev)
{
int err = 0;
struct v9fs_inode *v9inode = V9FS_I(inode);

memcpy(&v9inode->qid, qid, sizeof(struct p9_qid));

inode_init_owner(&nop_mnt_idmap, inode, NULL, mode);
inode->i_blocks = 0;
Expand Down Expand Up @@ -334,6 +331,36 @@ int v9fs_init_inode(struct v9fs_session_info *v9ses,

}

/**
* v9fs_get_inode - helper function to setup an inode
* @sb: superblock
* @mode: mode to setup inode with
* @rdev: The device numbers to set
*/

struct inode *v9fs_get_inode(struct super_block *sb, umode_t mode, dev_t rdev)
{
int err;
struct inode *inode;
struct v9fs_session_info *v9ses = sb->s_fs_info;

p9_debug(P9_DEBUG_VFS, "super block: %p mode: %ho\n", sb, mode);

inode = new_inode(sb);
if (!inode) {
pr_warn("%s (%d): Problem allocating inode\n",
__func__, task_pid_nr(current));
return ERR_PTR(-ENOMEM);
}
err = v9fs_init_inode(v9ses, inode, mode, rdev);
if (err) {
iput(inode);
return ERR_PTR(err);
}
v9fs_set_netfs_context(inode);
return inode;
}

/**
* v9fs_evict_inode - Remove an inode from the inode cache
* @inode: inode to release
Expand All @@ -344,57 +371,95 @@ void v9fs_evict_inode(struct inode *inode)
struct v9fs_inode __maybe_unused *v9inode = V9FS_I(inode);
__le32 __maybe_unused version;

if (!is_bad_inode(inode)) {
truncate_inode_pages_final(&inode->i_data);
truncate_inode_pages_final(&inode->i_data);

version = cpu_to_le32(v9inode->qid.version);
netfs_clear_inode_writeback(inode, &version);
version = cpu_to_le32(v9inode->qid.version);
netfs_clear_inode_writeback(inode, &version);

clear_inode(inode);
filemap_fdatawrite(&inode->i_data);
clear_inode(inode);
filemap_fdatawrite(&inode->i_data);

#ifdef CONFIG_9P_FSCACHE
if (v9fs_inode_cookie(v9inode))
fscache_relinquish_cookie(v9fs_inode_cookie(v9inode), false);
fscache_relinquish_cookie(v9fs_inode_cookie(v9inode), false);
#endif
} else
clear_inode(inode);
}

struct inode *v9fs_fid_iget(struct super_block *sb, struct p9_fid *fid)
static int v9fs_test_inode(struct inode *inode, void *data)
{
int umode;
dev_t rdev;
struct v9fs_inode *v9inode = V9FS_I(inode);
struct p9_wstat *st = (struct p9_wstat *)data;
struct v9fs_session_info *v9ses = v9fs_inode2v9ses(inode);

umode = p9mode2unixmode(v9ses, st, &rdev);
/* don't match inode of different type */
if (inode_wrong_type(inode, umode))
return 0;

/* compare qid details */
if (memcmp(&v9inode->qid.version,
&st->qid.version, sizeof(v9inode->qid.version)))
return 0;

if (v9inode->qid.type != st->qid.type)
return 0;

if (v9inode->qid.path != st->qid.path)
return 0;
return 1;
}

static int v9fs_test_new_inode(struct inode *inode, void *data)
{
return 0;
}

static int v9fs_set_inode(struct inode *inode, void *data)
{
struct v9fs_inode *v9inode = V9FS_I(inode);
struct p9_wstat *st = (struct p9_wstat *)data;

memcpy(&v9inode->qid, &st->qid, sizeof(st->qid));
return 0;
}

static struct inode *v9fs_qid_iget(struct super_block *sb,
struct p9_qid *qid,
struct p9_wstat *st,
int new)
{
dev_t rdev;
int retval;
umode_t umode;
unsigned long i_ino;
struct inode *inode;
struct p9_wstat *st;
struct v9fs_session_info *v9ses = sb->s_fs_info;
int (*test)(struct inode *inode, void *data);

inode = iget_locked(sb, QID2INO(&fid->qid));
if (unlikely(!inode))
if (new)
test = v9fs_test_new_inode;
else
test = v9fs_test_inode;

i_ino = v9fs_qid2ino(qid);
inode = iget5_locked(sb, i_ino, test, v9fs_set_inode, st);
if (!inode)
return ERR_PTR(-ENOMEM);
if (!(inode->i_state & I_NEW))
return inode;

/*
* initialize the inode with the stat info
* FIXME!! we may need support for stale inodes
* later.
*/
st = p9_client_stat(fid);
if (IS_ERR(st)) {
retval = PTR_ERR(st);
goto error;
}

inode->i_ino = i_ino;
umode = p9mode2unixmode(v9ses, st, &rdev);
retval = v9fs_init_inode(v9ses, inode, &fid->qid, umode, rdev);
v9fs_stat2inode(st, inode, sb, 0);
p9stat_free(st);
kfree(st);
retval = v9fs_init_inode(v9ses, inode, umode, rdev);
if (retval)
goto error;

v9fs_stat2inode(st, inode, sb, 0);
v9fs_set_netfs_context(inode);
v9fs_cache_inode_get_cookie(inode);
unlock_new_inode(inode);
Expand All @@ -405,6 +470,23 @@ struct inode *v9fs_fid_iget(struct super_block *sb, struct p9_fid *fid)

}

struct inode *
v9fs_inode_from_fid(struct v9fs_session_info *v9ses, struct p9_fid *fid,
struct super_block *sb, int new)
{
struct p9_wstat *st;
struct inode *inode = NULL;

st = p9_client_stat(fid);
if (IS_ERR(st))
return ERR_CAST(st);

inode = v9fs_qid_iget(sb, &st->qid, st, new);
p9stat_free(st);
kfree(st);
return inode;
}

/**
* v9fs_at_to_dotl_flags- convert Linux specific AT flags to
* plan 9 AT flag.
Expand Down Expand Up @@ -551,7 +633,7 @@ v9fs_create(struct v9fs_session_info *v9ses, struct inode *dir,
/*
* instantiate inode and assign the unopened fid to the dentry
*/
inode = v9fs_get_inode_from_fid(v9ses, fid, dir->i_sb);
inode = v9fs_get_new_inode_from_fid(v9ses, fid, dir->i_sb);
if (IS_ERR(inode)) {
err = PTR_ERR(inode);
p9_debug(P9_DEBUG_VFS,
Expand Down Expand Up @@ -679,8 +761,10 @@ struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
inode = NULL;
else if (IS_ERR(fid))
inode = ERR_CAST(fid);
else
else if (v9ses->cache & (CACHE_META|CACHE_LOOSE))
inode = v9fs_get_inode_from_fid(v9ses, fid, dir->i_sb);
else
inode = v9fs_get_new_inode_from_fid(v9ses, fid, dir->i_sb);
/*
* If we had a rename on the server and a parallel lookup
* for the new name, then make sure we instantiate with
Expand Down Expand Up @@ -1102,6 +1186,26 @@ v9fs_stat2inode(struct p9_wstat *stat, struct inode *inode,
v9inode->cache_validity &= ~V9FS_INO_INVALID_ATTR;
}

/**
* v9fs_qid2ino - convert qid into inode number
* @qid: qid to hash
*
* BUG: potential for inode number collisions?
*/

ino_t v9fs_qid2ino(struct p9_qid *qid)
{
u64 path = qid->path + 2;
ino_t i = 0;

if (sizeof(ino_t) == sizeof(path))
memcpy(&i, &path, sizeof(ino_t));
else
i = (ino_t) (path ^ (path >> 32));

return i;
}

/**
* v9fs_vfs_get_link - follow a symlink path
* @dentry: dentry for symlink
Expand Down
Loading