GNU/Weeb Mailing List <[email protected]>
 help / color / mirror / Atom feed
From: kernel test robot <[email protected]>
To: Ammar Faizi <[email protected]>,
	GNU/Weeb Mailing List <[email protected]>
Cc: [email protected]
Subject: [ammarfaizi2-block:google/android/kernel/common/android-4.19-stable 1/2] kernel/sched/core.c:5212: Error: unrecognized opcode `csrs sstatus,a5'
Date: Wed, 1 Mar 2023 20:46:42 +0800	[thread overview]
Message-ID: <[email protected]> (raw)

tree:   https://github.com/ammarfaizi2/linux-block google/android/kernel/common/android-4.19-stable
head:   f47c1c07f90d2065c93bd942a2f3895cfd3ec0e5
commit: 22cfbf1a8e2848fde162c2b8ac9c4bb878e6be18 [1/2] BACKPORT: sched_setattr: switch to copy_struct_from_user()
config: riscv-allnoconfig (https://download.01.org/0day-ci/archive/20230301/[email protected]/config)
compiler: riscv64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/ammarfaizi2/linux-block/commit/22cfbf1a8e2848fde162c2b8ac9c4bb878e6be18
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block google/android/kernel/common/android-4.19-stable
        git checkout 22cfbf1a8e2848fde162c2b8ac9c4bb878e6be18
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=riscv olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash kernel/sched/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

   kernel/sched/core.c: In function 'ttwu_stat':
   kernel/sched/core.c:2283:20: warning: variable 'rq' set but not used [-Wunused-but-set-variable]
    2283 |         struct rq *rq;
         |                    ^~
   kernel/sched/core.c: At top level:
   kernel/sched/core.c:4424:35: warning: no previous prototype for 'preempt_schedule_irq' [-Wmissing-prototypes]
    4424 | asmlinkage __visible void __sched preempt_schedule_irq(void)
         |                                   ^~~~~~~~~~~~~~~~~~~~
   kernel/sched/core.c: In function 'sched_init':
   kernel/sched/core.c:6659:39: warning: variable 'ptr' set but not used [-Wunused-but-set-variable]
    6659 |         unsigned long alloc_size = 0, ptr;
         |                                       ^~~
   kernel/sched/core.c: Assembler messages:
>> kernel/sched/core.c:5212: Error: unrecognized opcode `csrs sstatus,a5'
>> kernel/sched/core.c:5212: Error: unrecognized opcode `csrc sstatus,a5'
   kernel/sched/core.c:5242: Error: unrecognized opcode `csrs sstatus,a3'
   kernel/sched/core.c:5242: Error: unrecognized opcode `csrc sstatus,a3'
   arch/riscv/include/asm/irqflags.h:24: Error: unrecognized opcode `csrr a5,sstatus'
   arch/riscv/include/asm/irqflags.h:30: Error: unrecognized opcode `csrs sstatus,2'
   arch/riscv/include/asm/irqflags.h:42: Error: unrecognized opcode `csrrc s8,sstatus,2'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,s8'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,s8'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,s8'
   arch/riscv/include/asm/irqflags.h:42: Error: unrecognized opcode `csrrc s8,sstatus,2'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,s8'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,s8'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,s8'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,s8'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,s8'
   arch/riscv/include/asm/irqflags.h:42: Error: unrecognized opcode `csrrc a5,sstatus,2'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,a5'
   arch/riscv/include/asm/irqflags.h:42: Error: unrecognized opcode `csrrc a5,sstatus,2'
   arch/riscv/include/asm/irqflags.h:42: Error: unrecognized opcode `csrrc a5,sstatus,2'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,a5'
   arch/riscv/include/asm/irqflags.h:36: Error: unrecognized opcode `csrc sstatus,2'
   arch/riscv/include/asm/mmu_context.h:91: Error: unrecognized opcode `csrw sptbr,a5'
   arch/riscv/include/asm/irqflags.h:30: Error: unrecognized opcode `csrs sstatus,2'
   arch/riscv/include/asm/irqflags.h:42: Error: unrecognized opcode `csrrc s2,sstatus,2'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,s2'
   arch/riscv/include/asm/irqflags.h:42: Error: unrecognized opcode `csrrc s2,sstatus,2'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,s2'
   arch/riscv/include/asm/irqflags.h:42: Error: unrecognized opcode `csrrc s2,sstatus,2'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,s2'
   kernel/sched/core.c:3471: Error: unrecognized opcode `csrs sstatus,a4'
   kernel/sched/core.c:3471: Error: unrecognized opcode `csrc sstatus,a4'
   arch/riscv/include/asm/irqflags.h:42: Error: unrecognized opcode `csrrc s1,sstatus,2'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,s1'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,s1'
   arch/riscv/include/asm/irqflags.h:42: Error: unrecognized opcode `csrrc s1,sstatus,2'
   arch/riscv/include/asm/irqflags.h:42: Error: unrecognized opcode `csrrc a5,sstatus,2'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,a5'
   arch/riscv/include/asm/irqflags.h:24: Error: unrecognized opcode `csrr a5,sstatus'
   arch/riscv/include/asm/irqflags.h:30: Error: unrecognized opcode `csrs sstatus,2'
   arch/riscv/include/asm/irqflags.h:36: Error: unrecognized opcode `csrc sstatus,2'
   arch/riscv/include/asm/irqflags.h:42: Error: unrecognized opcode `csrrc s3,sstatus,2'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,s3'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,s3'
   arch/riscv/include/asm/irqflags.h:42: Error: unrecognized opcode `csrrc s3,sstatus,2'
   arch/riscv/include/asm/irqflags.h:42: Error: unrecognized opcode `csrrc a3,sstatus,2'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,a4'
   arch/riscv/include/asm/irqflags.h:36: Error: unrecognized opcode `csrc sstatus,2'
   arch/riscv/include/asm/irqflags.h:30: Error: unrecognized opcode `csrs sstatus,2'
   arch/riscv/include/asm/irqflags.h:36: Error: unrecognized opcode `csrc sstatus,2'
   arch/riscv/include/asm/irqflags.h:30: Error: unrecognized opcode `csrs sstatus,2'
   arch/riscv/include/asm/irqflags.h:42: Error: unrecognized opcode `csrrc a5,sstatus,2'
   arch/riscv/include/asm/irqflags.h:24: Error: unrecognized opcode `csrr a4,sstatus'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,s1'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,s1'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,a5'
   arch/riscv/include/asm/irqflags.h:42: Error: unrecognized opcode `csrrc s1,sstatus,2'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,s1'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,s1'
   arch/riscv/include/asm/irqflags.h:42: Error: unrecognized opcode `csrrc s1,sstatus,2'
   arch/riscv/include/asm/irqflags.h:42: Error: unrecognized opcode `csrrc s2,sstatus,2'
   arch/riscv/include/asm/irqflags.h:60: Error: unrecognized opcode `csrs sstatus,s2'


vim +5212 kernel/sched/core.c

^1da177e4c3f41 kernel/sched.c      Linus Torvalds  2005-04-16  5200  
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5201  /*
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5202   * Mimics kernel/events/core.c perf_copy_attr().
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5203   */
d1ccc66df8bfe3 kernel/sched/core.c Ingo Molnar     2017-02-01  5204  static int sched_copy_attr(struct sched_attr __user *uattr, struct sched_attr *attr)
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5205  {
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5206  	u32 size;
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5207  	int ret;
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5208  
d1ccc66df8bfe3 kernel/sched/core.c Ingo Molnar     2017-02-01  5209  	/* Zero the full structure, so that a short copy will be nice: */
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5210  	memset(attr, 0, sizeof(*attr));
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5211  
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07 @5212  	ret = get_user(size, &uattr->size);
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5213  	if (ret)
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5214  		return ret;
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5215  
d1ccc66df8bfe3 kernel/sched/core.c Ingo Molnar     2017-02-01  5216  	/* ABI compatibility quirk: */
d1ccc66df8bfe3 kernel/sched/core.c Ingo Molnar     2017-02-01  5217  	if (!size)
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5218  		size = SCHED_ATTR_SIZE_VER0;
22cfbf1a8e2848 kernel/sched/core.c Aleksa Sarai    2019-10-01  5219  	if (size < SCHED_ATTR_SIZE_VER0 || size > PAGE_SIZE)
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5220  		goto err_size;
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5221  
22cfbf1a8e2848 kernel/sched/core.c Aleksa Sarai    2019-10-01  5222  	ret = copy_struct_from_user(attr, sizeof(*attr), uattr, size);
22cfbf1a8e2848 kernel/sched/core.c Aleksa Sarai    2019-10-01  5223  	if (ret) {
22cfbf1a8e2848 kernel/sched/core.c Aleksa Sarai    2019-10-01  5224  		if (ret == -E2BIG)
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5225  			goto err_size;
22cfbf1a8e2848 kernel/sched/core.c Aleksa Sarai    2019-10-01  5226  		return ret;
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5227  	}
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5228  
e6056b2a5b47a7 kernel/sched/core.c Patrick Bellasi 2019-06-21  5229  	if ((attr->sched_flags & SCHED_FLAG_UTIL_CLAMP) &&
e6056b2a5b47a7 kernel/sched/core.c Patrick Bellasi 2019-06-21  5230  	    size < SCHED_ATTR_SIZE_VER1)
e6056b2a5b47a7 kernel/sched/core.c Patrick Bellasi 2019-06-21  5231  		return -EINVAL;
e6056b2a5b47a7 kernel/sched/core.c Patrick Bellasi 2019-06-21  5232  
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5233  	/*
d1ccc66df8bfe3 kernel/sched/core.c Ingo Molnar     2017-02-01  5234  	 * XXX: Do we want to be lenient like existing syscalls; or do we want
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5235  	 * to be strict and return an error on out-of-bounds values?
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5236  	 */
75e45d512f257b kernel/sched/core.c Dongsheng Yang  2014-02-11  5237  	attr->sched_nice = clamp(attr->sched_nice, MIN_NICE, MAX_NICE);
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5238  
e78c7bca56dab5 kernel/sched/core.c Michael Kerrisk 2014-05-09  5239  	return 0;
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5240  
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5241  err_size:
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5242  	put_user(sizeof(*attr), &uattr->size);
e78c7bca56dab5 kernel/sched/core.c Michael Kerrisk 2014-05-09  5243  	return -E2BIG;
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5244  }
d50dde5a10f305 kernel/sched/core.c Dario Faggioli  2013-11-07  5245  

:::::: The code at line 5212 was first introduced by commit
:::::: d50dde5a10f305253cbc3855307f608f8a3c5f73 sched: Add new scheduler syscalls to support an extended scheduling parameters ABI

:::::: TO: Dario Faggioli <[email protected]>
:::::: CC: Ingo Molnar <[email protected]>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

                 reply	other threads:[~2023-03-01 12:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox