Symlink's external data block is one kind of metadata block, and now
that almost all ext4 metadata block's page cache (e.g. directory blocks,
quota blocks...) belongs to bdev backing inode except the symlink. It
is essentially worked in data=journal mode like other regular file's
data block because probably in order to make it simple for generic VFS
code handling symlinks or some other historical reasons, but the logic
of creating external data block in ext4_symlink() is complicated. and it
also make things confused if user do not want to let the filesystem
worked in data=journal mode. This patch convert the final exceptional
case and make things clean, move the mapping of the symlink's external
data block to bdev like any other metadata block does.
Signed-off-by: Zhang Yi <[email protected]>
---
v3-v2:
- Retry if it fail in close-to-ENOSPC conditions.
- Use ext4_add_nondir() to add dir entry for no-fast symlink.
- Fix RCU walking for symlinks.
- Ensure nul-terminate when in ext4_get_link().
v2->v1:
- Add comment to explain the credits of creating symlink.
[v2]: https://lore.kernel.org/linux-ext4/[email protected]/
[v1]: https://lore.kernel.org/linux-ext4/[email protected]/
fs/ext4/inode.c | 9 +---
fs/ext4/namei.c | 123 +++++++++++++++++++++-------------------------
fs/ext4/symlink.c | 54 +++++++++++++++++---
3 files changed, 103 insertions(+), 83 deletions(-)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 13740f2d0e61..a6339cefbb1e 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -199,8 +199,7 @@ void ext4_evict_inode(struct inode *inode)
*/
if (inode->i_ino != EXT4_JOURNAL_INO &&
ext4_should_journal_data(inode) &&
- (S_ISLNK(inode->i_mode) || S_ISREG(inode->i_mode)) &&
- inode->i_data.nrpages) {
+ S_ISREG(inode->i_mode) && inode->i_data.nrpages) {
journal_t *journal = EXT4_SB(inode->i_sb)->s_journal;
tid_t commit_tid = EXT4_I(inode)->i_datasync_tid;
@@ -2944,8 +2943,7 @@ static int ext4_da_write_begin(struct file *file, struct address_space *mapping,
index = pos >> PAGE_SHIFT;
- if (ext4_nonda_switch(inode->i_sb) || S_ISLNK(inode->i_mode) ||
- ext4_verity_in_progress(inode)) {
+ if (ext4_nonda_switch(inode->i_sb) || ext4_verity_in_progress(inode)) {
*fsdata = (void *)FALL_BACK_TO_NONDELALLOC;
return ext4_write_begin(file, mapping, pos,
len, flags, pagep, fsdata);
@@ -4977,7 +4975,6 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino,
}
if (IS_ENCRYPTED(inode)) {
inode->i_op = &ext4_encrypted_symlink_inode_operations;
- ext4_set_aops(inode);
} else if (ext4_inode_is_fast_symlink(inode)) {
inode->i_link = (char *)ei->i_data;
inode->i_op = &ext4_fast_symlink_inode_operations;
@@ -4985,9 +4982,7 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino,
sizeof(ei->i_data) - 1);
} else {
inode->i_op = &ext4_symlink_inode_operations;
- ext4_set_aops(inode);
}
- inode_nohighmem(inode);
} else if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode) ||
S_ISFIFO(inode->i_mode) || S_ISSOCK(inode->i_mode)) {
inode->i_op = &ext4_special_inode_operations;
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index e37da8d5cd0c..dbb6294914bc 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -3249,6 +3249,32 @@ static int ext4_unlink(struct inode *dir, struct dentry *dentry)
return retval;
}
+static int ext4_init_symlink_block(handle_t *handle, struct inode *inode,
+ struct fscrypt_str *disk_link)
+{
+ struct buffer_head *bh;
+ char *kaddr;
+ int err = 0;
+
+ bh = ext4_bread(handle, inode, 0, EXT4_GET_BLOCKS_CREATE);
+ if (IS_ERR(bh))
+ return PTR_ERR(bh);
+
+ BUFFER_TRACE(bh, "get_write_access");
+ err = ext4_journal_get_write_access(handle, inode->i_sb, bh, EXT4_JTR_NONE);
+ if (err)
+ goto out;
+
+ kaddr = (char *)bh->b_data;
+ memcpy(kaddr, disk_link->name, disk_link->len);
+ inode->i_size = disk_link->len - 1;
+ EXT4_I(inode)->i_disksize = inode->i_size;
+ err = ext4_handle_dirty_metadata(handle, inode, bh);
+out:
+ brelse(bh);
+ return err;
+}
+
static int ext4_symlink(struct user_namespace *mnt_userns, struct inode *dir,
struct dentry *dentry, const char *symname)
{
@@ -3257,6 +3283,7 @@ static int ext4_symlink(struct user_namespace *mnt_userns, struct inode *dir,
int err, len = strlen(symname);
int credits;
struct fscrypt_str disk_link;
+ int retries = 0;
if (unlikely(ext4_forced_shutdown(EXT4_SB(dir->i_sb))))
return -EIO;
@@ -3270,26 +3297,15 @@ static int ext4_symlink(struct user_namespace *mnt_userns, struct inode *dir,
if (err)
return err;
- if ((disk_link.len > EXT4_N_BLOCKS * 4)) {
- /*
- * For non-fast symlinks, we just allocate inode and put it on
- * orphan list in the first transaction => we need bitmap,
- * group descriptor, sb, inode block, quota blocks, and
- * possibly selinux xattr blocks.
- */
- credits = 4 + EXT4_MAXQUOTAS_INIT_BLOCKS(dir->i_sb) +
- EXT4_XATTR_TRANS_BLOCKS;
- } else {
- /*
- * Fast symlink. We have to add entry to directory
- * (EXT4_DATA_TRANS_BLOCKS + EXT4_INDEX_EXTRA_TRANS_BLOCKS),
- * allocate new inode (bitmap, group descriptor, inode block,
- * quota blocks, sb is already counted in previous macros).
- */
- credits = EXT4_DATA_TRANS_BLOCKS(dir->i_sb) +
- EXT4_INDEX_EXTRA_TRANS_BLOCKS + 3;
- }
-
+ /*
+ * EXT4_INDEX_EXTRA_TRANS_BLOCKS for addition of entry into the
+ * directory. +3 for inode, inode bitmap, group descriptor allocation.
+ * EXT4_DATA_TRANS_BLOCKS for the data block allocation and
+ * modification.
+ */
+ credits = EXT4_DATA_TRANS_BLOCKS(dir->i_sb) +
+ EXT4_INDEX_EXTRA_TRANS_BLOCKS + 3;
+retry:
inode = ext4_new_inode_start_handle(mnt_userns, dir, S_IFLNK|S_IRWXUGO,
&dentry->d_name, 0, NULL,
EXT4_HT_DIR, credits);
@@ -3297,7 +3313,8 @@ static int ext4_symlink(struct user_namespace *mnt_userns, struct inode *dir,
if (IS_ERR(inode)) {
if (handle)
ext4_journal_stop(handle);
- return PTR_ERR(inode);
+ err = PTR_ERR(inode);
+ goto out_retry;
}
if (IS_ENCRYPTED(inode)) {
@@ -3305,75 +3322,45 @@ static int ext4_symlink(struct user_namespace *mnt_userns, struct inode *dir,
if (err)
goto err_drop_inode;
inode->i_op = &ext4_encrypted_symlink_inode_operations;
+ } else {
+ if ((disk_link.len > EXT4_N_BLOCKS * 4)) {
+ inode->i_op = &ext4_symlink_inode_operations;
+ } else {
+ inode->i_op = &ext4_fast_symlink_inode_operations;
+ inode->i_link = (char *)&EXT4_I(inode)->i_data;
+ }
}
if ((disk_link.len > EXT4_N_BLOCKS * 4)) {
- if (!IS_ENCRYPTED(inode))
- inode->i_op = &ext4_symlink_inode_operations;
- inode_nohighmem(inode);
- ext4_set_aops(inode);
- /*
- * We cannot call page_symlink() with transaction started
- * because it calls into ext4_write_begin() which can wait
- * for transaction commit if we are running out of space
- * and thus we deadlock. So we have to stop transaction now
- * and restart it when symlink contents is written.
- *
- * To keep fs consistent in case of crash, we have to put inode
- * to orphan list in the mean time.
- */
- drop_nlink(inode);
- err = ext4_orphan_add(handle, inode);
- if (handle)
- ext4_journal_stop(handle);
- handle = NULL;
- if (err)
- goto err_drop_inode;
- err = __page_symlink(inode, disk_link.name, disk_link.len, 1);
- if (err)
- goto err_drop_inode;
- /*
- * Now inode is being linked into dir (EXT4_DATA_TRANS_BLOCKS
- * + EXT4_INDEX_EXTRA_TRANS_BLOCKS), inode is also modified
- */
- handle = ext4_journal_start(dir, EXT4_HT_DIR,
- EXT4_DATA_TRANS_BLOCKS(dir->i_sb) +
- EXT4_INDEX_EXTRA_TRANS_BLOCKS + 1);
- if (IS_ERR(handle)) {
- err = PTR_ERR(handle);
- handle = NULL;
- goto err_drop_inode;
- }
- set_nlink(inode, 1);
- err = ext4_orphan_del(handle, inode);
+ /* alloc symlink block and fill it */
+ err = ext4_init_symlink_block(handle, inode, &disk_link);
if (err)
goto err_drop_inode;
} else {
/* clear the extent format for fast symlink */
ext4_clear_inode_flag(inode, EXT4_INODE_EXTENTS);
- if (!IS_ENCRYPTED(inode)) {
- inode->i_op = &ext4_fast_symlink_inode_operations;
- inode->i_link = (char *)&EXT4_I(inode)->i_data;
- }
memcpy((char *)&EXT4_I(inode)->i_data, disk_link.name,
disk_link.len);
inode->i_size = disk_link.len - 1;
+ EXT4_I(inode)->i_disksize = inode->i_size;
}
- EXT4_I(inode)->i_disksize = inode->i_size;
err = ext4_add_nondir(handle, dentry, &inode);
if (handle)
ext4_journal_stop(handle);
if (inode)
iput(inode);
- goto out_free_encrypted_link;
+ goto out_retry;
err_drop_inode:
- if (handle)
- ext4_journal_stop(handle);
clear_nlink(inode);
+ ext4_orphan_add(handle, inode);
unlock_new_inode(inode);
+ if (handle)
+ ext4_journal_stop(handle);
iput(inode);
-out_free_encrypted_link:
+out_retry:
+ if (err == -ENOSPC && ext4_should_retry_alloc(dir->i_sb, &retries))
+ goto retry;
if (disk_link.name != (unsigned char *)symname)
kfree(disk_link.name);
return err;
diff --git a/fs/ext4/symlink.c b/fs/ext4/symlink.c
index 69109746e6e2..af9a613ed3b2 100644
--- a/fs/ext4/symlink.c
+++ b/fs/ext4/symlink.c
@@ -27,7 +27,7 @@ static const char *ext4_encrypted_get_link(struct dentry *dentry,
struct inode *inode,
struct delayed_call *done)
{
- struct page *cpage = NULL;
+ struct buffer_head *bh = NULL;
const void *caddr;
unsigned int max_size;
const char *paddr;
@@ -39,16 +39,19 @@ static const char *ext4_encrypted_get_link(struct dentry *dentry,
caddr = EXT4_I(inode)->i_data;
max_size = sizeof(EXT4_I(inode)->i_data);
} else {
- cpage = read_mapping_page(inode->i_mapping, 0, NULL);
- if (IS_ERR(cpage))
- return ERR_CAST(cpage);
- caddr = page_address(cpage);
+ bh = ext4_bread(NULL, inode, 0, 0);
+ if (IS_ERR(bh))
+ return ERR_CAST(bh);
+ if (!bh) {
+ EXT4_ERROR_INODE(inode, "bad symlink.");
+ return ERR_PTR(-EFSCORRUPTED);
+ }
+ caddr = bh->b_data;
max_size = inode->i_sb->s_blocksize;
}
paddr = fscrypt_get_symlink(inode, caddr, max_size, done);
- if (cpage)
- put_page(cpage);
+ brelse(bh);
return paddr;
}
@@ -62,6 +65,41 @@ static int ext4_encrypted_symlink_getattr(struct user_namespace *mnt_userns,
return fscrypt_symlink_getattr(path, stat);
}
+static void ext4_free_link(void *bh)
+{
+ brelse(bh);
+}
+
+static const char *ext4_get_link(struct dentry *dentry, struct inode *inode,
+ struct delayed_call *callback)
+{
+ struct buffer_head *bh;
+
+ if (!dentry) {
+ bh = ext4_getblk(NULL, inode, 0, 0);
+ if (!bh || IS_ERR(bh))
+ goto error_out;
+ if (!ext4_buffer_uptodate(bh))
+ return ERR_PTR(-ECHILD);
+ } else {
+ bh = ext4_bread(NULL, inode, 0, 0);
+ if (!bh || IS_ERR(bh))
+ goto error_out;
+ }
+
+ set_delayed_call(callback, ext4_free_link, bh);
+ nd_terminate_link(bh->b_data, inode->i_size,
+ inode->i_sb->s_blocksize - 1);
+ return bh->b_data;
+
+error_out:
+ if (!bh) {
+ EXT4_ERROR_INODE(inode, "bad symlink.");
+ return ERR_PTR(-EFSCORRUPTED);
+ }
+ return ERR_CAST(bh);
+}
+
const struct inode_operations ext4_encrypted_symlink_inode_operations = {
.get_link = ext4_encrypted_get_link,
.setattr = ext4_setattr,
@@ -70,7 +108,7 @@ const struct inode_operations ext4_encrypted_symlink_inode_operations = {
};
const struct inode_operations ext4_symlink_inode_operations = {
- .get_link = page_get_link,
+ .get_link = ext4_get_link,
.setattr = ext4_setattr,
.getattr = ext4_getattr,
.listxattr = ext4_listxattr,
--
2.31.1
On Mon 18-04-22 14:37:35, Zhang Yi wrote:
> Symlink's external data block is one kind of metadata block, and now
> that almost all ext4 metadata block's page cache (e.g. directory blocks,
> quota blocks...) belongs to bdev backing inode except the symlink. It
> is essentially worked in data=journal mode like other regular file's
> data block because probably in order to make it simple for generic VFS
> code handling symlinks or some other historical reasons, but the logic
> of creating external data block in ext4_symlink() is complicated. and it
> also make things confused if user do not want to let the filesystem
> worked in data=journal mode. This patch convert the final exceptional
> case and make things clean, move the mapping of the symlink's external
> data block to bdev like any other metadata block does.
>
> Signed-off-by: Zhang Yi <[email protected]>
The patch looks good now except for one problem:
> +static const char *ext4_get_link(struct dentry *dentry, struct inode *inode,
> + struct delayed_call *callback)
> +{
> + struct buffer_head *bh;
> +
> + if (!dentry) {
> + bh = ext4_getblk(NULL, inode, 0, 0);
This is problematic because in RCU walk mode we must not sleep and
ext4_getblk() may sleep in ext4_map_blocks(). So we'd need some trick to
avoid that.
Honza
--
Jan Kara <[email protected]>
SUSE Labs, CR
Greeting,
FYI, we noticed the following commit (built with gcc-11):
commit: bfe57bd7e18960dfb34534a326fa10155d10f92a ("[RFC PATCH v3] ext4: convert symlink external data block mapping to bdev")
url: https://github.com/intel-lab-lkp/linux/commits/Zhang-Yi/ext4-convert-symlink-external-data-block-mapping-to-bdev/20220418-143737
base: https://git.kernel.org/cgit/linux/kernel/git/tytso/ext4.git dev
patch link: https://lore.kernel.org/linux-ext4/[email protected]
in testcase: xfstests
version: xfstests-x86_64-46e1b83-1_20220414
with following parameters:
disk: 4HDD
fs: ext4
test: generic-group-32
ucode: 0xec
test-description: xfstests is a regression test suite for xfs and other files ystems.
test-url: git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git
on test machine: 4 threads Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz with 32G memory
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
If you fix the issue, kindly add following tag
Reported-by: kernel test robot <[email protected]>
[ 259.165108][ T4690] EXT4-fs (sda4): INFO: recovery required on readonly filesystem
[ 259.172699][ T4690] EXT4-fs (sda4): write access will be enabled during recovery
[ 259.262233][ T4690] EXT4-fs (sda4): recovery complete
[ 259.287473][ T4690] EXT4-fs (sda4): mounted filesystem with ordered data mode. Quota mode: none.
[ 259.374823][ T4702] EXT4-fs (sda4): mounted filesystem with ordered data mode. Quota mode: none.
[ 260.108492][ T4726] EXT4-fs (sda4): mounted filesystem with ordered data mode. Quota mode: none.
[ 260.177189][ T314] generic/646 24s
[ 260.177198][ T314]
[ 260.224149][ T1550] run fstests generic/647 at 2022-04-20 20:24:33
[ 260.585202][ T4905] EXT4-fs (sda1): mounted filesystem with ordered data mode. Quota mode: none.
[ 262.085184][ T5110] EXT4-fs (sda1): mounted filesystem with ordered data mode. Quota mode: none.
[ 262.140559][ T314] generic/647 1s
[ 262.140568][ T314]
[ 262.188396][ T1550] run fstests generic/648 at 2022-04-20 20:24:35
[ 273.534811][ T5381] EXT4-fs (sda4): mounted filesystem with ordered data mode. Quota mode: none.
[ 273.752566][ T314] generic/648 [not run] Reflink not supported by scratch filesystem type: ext4
[ 273.752575][ T314]
[ 273.806605][ T1550] run fstests generic/649 at 2022-04-20 20:24:46
[ 274.250167][ T314] generic/649 [not run] Reflink not supported by test filesystem type: ext4
[ 274.250176][ T314]
[ 274.304279][ T1550] run fstests generic/650 at 2022-04-20 20:24:47
[ 274.665973][ T5815] smpboot: CPU 1 is now offline
[ 275.282175][ T5815] smpboot: CPU 0 is now offline
[ 275.819609][ T5815] smpboot: CPU 3 is now offline
[ 278.338825][ T5815] x86: Booting SMP configuration:
[ 278.343724][ T5815] smpboot: Booting Node 0 Processor 1 APIC 0x2
[ 278.350221][ T0] masked ExtINT on CPU#1
[ 278.354345][ T0] CPU0: Thermal monitoring enabled (TM1)
[ 278.895948][ T5815] smpboot: Booting Node 0 Processor 3 APIC 0x6
[ 278.902236][ T0] masked ExtINT on CPU#3
[ 279.996061][ T5815] smpboot: CPU 2 is now offline
[ 281.088956][ T5815] smpboot: CPU 1 is now offline
[ 282.100211][ T5815] x86: Booting SMP configuration:
[ 282.105112][ T5815] smpboot: Booting Node 0 Processor 1 APIC 0x2
[ 282.111607][ T0] masked ExtINT on CPU#1
[ 282.214467][ T5820] BUG: sleeping function called from invalid context at fs/buffer.c:1332
[ 282.222775][ T5820] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5820, name: fsstress
[ 282.231492][ T5820] preempt_count: 1, expected: 0
[ 282.236206][ T5820] CPU: 1 PID: 5820 Comm: fsstress Tainted: G I 5.17.0-rc5-00038-gbfe57bd7e189 #1
[ 282.246472][ T5820] Hardware name: Dell Inc. OptiPlex 7040/0Y7WYT, BIOS 1.1.1 10/07/2015
[ 282.254563][ T5820] Call Trace:
[ 282.257703][ T5820] <TASK>
[ 282.260498][ T5820] dump_stack_lvl (lib/dump_stack.c:107 (discriminator 1))
[ 282.264859][ T5820] __might_resched.cold (kernel/sched/core.c:9586)
[ 282.269914][ T5820] __getblk_gfp (fs/buffer.c:1332)
[ 282.274188][ T5820] ext4_getblk (include/linux/buffer_head.h:327 fs/ext4/inode.c:855)
[ 282.278458][ T5820] ? current_time (fs/inode.c:2400)
[ 282.282903][ T5820] ? ext4_iomap_overwrite_begin (fs/ext4/inode.c:837)
[ 282.288478][ T5820] ext4_get_link (fs/ext4/symlink.c:79)
[ 282.292924][ T5820] pick_link (fs/namei.c:1815)
[ 282.297024][ T5820] ? __d_lookup_rcu (fs/dcache.c:226 fs/dcache.c:278 fs/dcache.c:2368)
[ 282.301730][ T5820] ? ext4_encrypted_get_link (fs/ext4/symlink.c:75)
[ 282.307231][ T5820] step_into (fs/namei.c:1876)
[ 282.311328][ T5820] ? pick_link (fs/namei.c:1848)
[ 282.315600][ T5820] ? generic_permission (fs/namei.c:296 fs/namei.c:350 fs/namei.c:403)
[ 282.320654][ T5820] ? try_to_unlazy_next (fs/namei.c:1619)
[ 282.325708][ T5820] ? inode_permission (fs/namei.c:525 fs/namei.c:499)
[ 282.330500][ T5820] open_last_lookups (fs/namei.c:3423)
[ 282.335381][ T5820] ? lookup_open+0x1740/0x1740
[ 282.340610][ T5820] path_openat (fs/namei.c:3606 (discriminator 1))
[ 282.344885][ T5820] ? open_last_lookups (fs/namei.c:3591)
[ 282.350024][ T5820] ? kasan_save_stack (mm/kasan/common.c:40)
[ 282.354731][ T5820] ? kasan_save_stack (mm/kasan/common.c:39)
[ 282.359449][ T5820] ? __kasan_record_aux_stack (mm/kasan/generic.c:348)
[ 282.364851][ T5820] ? __call_rcu (kernel/rcu/tree.c:3027 (discriminator 3))
[ 282.369122][ T5820] ? task_work_run (kernel/task_work.c:166 (discriminator 1))
[ 282.373655][ T5820] ? exit_to_user_mode_loop (include/linux/tracehook.h:188 kernel/entry/common.c:175)
[ 282.379054][ T5820] do_filp_open (fs/namei.c:3636)
[ 282.383415][ T5820] ? may_open_dev (fs/namei.c:3630)
[ 282.387946][ T5820] ? _raw_spin_lock (arch/x86/include/asm/atomic.h:202 include/linux/atomic/atomic-instrumented.h:543 include/asm-generic/qspinlock.h:82 include/linux/spinlock.h:185 include/linux/spinlock_api_smp.h:134 kernel/locking/spinlock.c:154)
[ 282.392565][ T5820] ? _raw_write_lock_irq (kernel/locking/spinlock.c:153)
[ 282.397705][ T5820] ? __check_object_size (mm/memremap.c:128)
[ 282.403455][ T5820] ? alloc_fd (arch/x86/include/asm/bitops.h:214 include/asm-generic/bitops/instrumented-non-atomic.h:135 fs/file.c:240 fs/file.c:513)
[ 282.407642][ T5820] do_sys_openat2 (fs/open.c:1214)
[ 282.412177][ T5820] ? build_open_flags (fs/open.c:1200)
[ 282.417057][ T5820] ? __fput (include/linux/percpu_counter.h:189 fs/file_table.c:58 fs/file_table.c:335)
[ 282.421067][ T5820] __x64_sys_openat (fs/open.c:1241)
[ 282.425775][ T5820] ? __ia32_compat_sys_open (fs/open.c:1241)
[ 282.431175][ T5820] ? exit_to_user_mode_loop (include/linux/sched.h:2223 include/linux/tracehook.h:200 kernel/entry/common.c:175)
[ 282.436497][ T5820] ? exit_to_user_mode_prepare (kernel/entry/common.c:207)
[ 282.442082][ T5820] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
[ 282.446359][ T5820] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113)
[ 282.452119][ T5820] RIP: 0033:0x7f418eef21ae
[ 282.456396][ T5820] Code: 25 00 00 41 00 3d 00 00 41 00 74 48 48 8d 05 59 65 0d 00 8b 00 85 c0 75 69 89 f2 b8 01 01 00 00 48 89 fe bf 9c ff ff ff 0f 05 <48> 3d 00 f0 ff ff 0f 87 a6 00 00 00 48 8b 4c 24 28 64 48 33 0c 25
All code
========
0: 25 00 00 41 00 and $0x410000,%eax
5: 3d 00 00 41 00 cmp $0x410000,%eax
a: 74 48 je 0x54
c: 48 8d 05 59 65 0d 00 lea 0xd6559(%rip),%rax # 0xd656c
13: 8b 00 mov (%rax),%eax
15: 85 c0 test %eax,%eax
17: 75 69 jne 0x82
19: 89 f2 mov %esi,%edx
1b: b8 01 01 00 00 mov $0x101,%eax
20: 48 89 fe mov %rdi,%rsi
23: bf 9c ff ff ff mov $0xffffff9c,%edi
28: 0f 05 syscall
2a:* 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax <-- trapping instruction
30: 0f 87 a6 00 00 00 ja 0xdc
36: 48 8b 4c 24 28 mov 0x28(%rsp),%rcx
3b: 64 fs
3c: 48 rex.W
3d: 33 .byte 0x33
3e: 0c 25 or $0x25,%al
Code starting with the faulting instruction
===========================================
0: 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax
6: 0f 87 a6 00 00 00 ja 0xb2
c: 48 8b 4c 24 28 mov 0x28(%rsp),%rcx
11: 64 fs
12: 48 rex.W
13: 33 .byte 0x33
14: 0c 25 or $0x25,%al
[ 282.475881][ T5820] RSP: 002b:00007ffe802301e0 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
[ 282.484151][ T5820] RAX: ffffffffffffffda RBX: 00007ffe802303b0 RCX: 00007f418eef21ae
[ 282.491982][ T5820] RDX: 0000000000000002 RSI: 000055b0f61e64f0 RDI: 00000000ffffff9c
[ 282.499814][ T5820] RBP: 00007ffe802303b0 R08: 00007f418efc3c40 R09: 00007ffe8022ffc6
[ 282.507646][ T5820] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002
[ 282.515479][ T5820] R13: 28f5c28f5c28f5c3 R14: 00007ffe80230430 R15: 000055b0f53e6d00
[ 282.523312][ T5820] </TASK>
[ 282.642902][ T5815] smpboot: Booting Node 0 Processor 2 APIC 0x4
[ 282.649228][ T0] masked ExtINT on CPU#2
[ 283.693053][ T5815] smpboot: CPU 2 is now offline
[ 285.223216][ T5815] smpboot: CPU 1 is now offline
[ 285.732314][ T5815] smpboot: Booting Node 0 Processor 2 APIC 0x4
[ 285.738606][ T0] masked ExtINT on CPU#2
[ 286.276104][ T5815] smpboot: CPU 2 is now offline
[ 287.287678][ T5815] smpboot: Booting Node 0 Processor 0 APIC 0x0
[ 287.293921][ T0] masked ExtINT on CPU#0
[ 287.844906][ T5815] smpboot: Booting Node 0 Processor 2 APIC 0x4
[ 287.851219][ T0] masked ExtINT on CPU#2
[ 288.890682][ T5815] smpboot: CPU 2 is now offline
[ 290.921923][ T5815] x86: Booting SMP configuration:
[ 290.926833][ T5815] smpboot: Booting Node 0 Processor 1 APIC 0x2
[ 290.933281][ T0] masked ExtINT on CPU#1
[ 292.469942][ T5815] smpboot: Booting Node 0 Processor 2 APIC 0x4
[ 292.476227][ T0] masked ExtINT on CPU#2
[ 293.069136][ T5815] smpboot: CPU 3 is now offline
[ 294.118103][ T5815] smpboot: CPU 1 is now offline
[ 295.140956][ T5815] x86: Booting SMP configuration:
[ 295.145864][ T5815] smpboot: Booting Node 0 Processor 1 APIC 0x2
[ 295.152276][ T0] masked ExtINT on CPU#1
[ 296.190768][ T5815] smpboot: CPU 1 is now offline
[ 299.225915][ T5815] smpboot: Booting Node 0 Processor 3 APIC 0x6
[ 299.232198][ T0] masked ExtINT on CPU#3
[ 300.274255][ T5815] smpboot: CPU 3 is now offline
[ 300.851916][ T5815] smpboot: CPU 0 is now offline
[ 301.863364][ T5815] smpboot: Booting Node 0 Processor 0 APIC 0x0
[ 301.869609][ T0] masked ExtINT on CPU#0
[ 302.407915][ T5815] x86: Booting SMP configuration:
[ 302.412816][ T5815] smpboot: Booting Node 0 Processor 1 APIC 0x2
[ 302.419128][ T0] masked ExtINT on CPU#1
[ 302.960837][ T5815] smpboot: CPU 1 is now offline
[ 303.499912][ T5815] smpboot: Booting Node 0 Processor 3 APIC 0x6
[ 303.506220][ T0] masked ExtINT on CPU#3
[ 304.047924][ T5815] smpboot: CPU 3 is now offline
[ 304.585186][ T5815] smpboot: CPU 0 is now offline
[ 305.094921][ T5815] smpboot: Booting Node 0 Processor 3 APIC 0x6
[ 305.101210][ T0] masked ExtINT on CPU#3
[ 306.140631][ T5815] x86: Booting SMP configuration:
[ 306.145563][ T5815] smpboot: Booting Node 0 Processor 1 APIC 0x2
[ 306.151870][ T0] masked ExtINT on CPU#1
[ 306.748147][ T5815] smpboot: CPU 2 is now offline
[ 307.342924][ T5815] smpboot: CPU 1 is now offline
[ 307.852098][ T5815] smpboot: Booting Node 0 Processor 0 APIC 0x0
[ 307.858343][ T0] masked ExtINT on CPU#0
[ 308.954917][ T5815] smpboot: CPU 3 is now offline
[ 309.464994][ T5815] x86: Booting SMP configuration:
[ 309.469894][ T5815] smpboot: Booting Node 0 Processor 1 APIC 0x2
[ 309.476590][ T0] masked ExtINT on CPU#1
[ 311.009963][ T5815] smpboot: Booting Node 0 Processor 3 APIC 0x6
[ 311.016284][ T0] masked ExtINT on CPU#3
[ 312.121176][ T5815] smpboot: CPU 0 is now offline
[ 312.655850][ T5815] smpboot: Booting Node 0 Processor 2 APIC 0x4
[ 312.662144][ T0] masked ExtINT on CPU#2
[ 313.712887][ T5815] smpboot: CPU 3 is now offline
[ 314.246039][ T5815] smpboot: CPU 2 is now offline
[ 314.755223][ T5815] smpboot: Booting Node 0 Processor 2 APIC 0x4
[ 314.761514][ T0] masked ExtINT on CPU#2
[ 316.802935][ T5815] smpboot: Booting Node 0 Processor 3 APIC 0x6
[ 316.809266][ T0] masked ExtINT on CPU#3
[ 317.847960][ T5815] smpboot: Booting Node 0 Processor 0 APIC 0x0
[ 317.854196][ T0] masked ExtINT on CPU#0
[ 319.404776][ T5815] smpboot: CPU 3 is now offline
To reproduce:
git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
sudo bin/lkp install job.yaml # job file is attached in this email
bin/lkp split-job --compatible job.yaml # generate the yaml file for lkp run
sudo bin/lkp run generated-yaml-file
# if come across any failure that blocks the test,
# please remove ~/.lkp and /lkp dir to run from a clean state.
--
0-DAY CI Kernel Test Service
https://01.org/lkp