From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: arch/openrisc/kernel/signal.c:50 restore_fp_state() warn: maybe return -EFAULT instead of the bytes remaining?
Date: Tue, 5 Nov 2024 01:40:00 +0800 [thread overview]
Message-ID: <202411050108.7hvptsS6-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Stafford Horne <shorne@gmail.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 59b723cd2adbac2a34fc8e12c74ae26ae45bf230
commit: 4dc70e1aadfadf968676d983587c6f5d455aba85 openrisc: Move FPU state out of pt_regs
date: 7 months ago
:::::: branch date: 18 hours ago
:::::: commit date: 7 months ago
config: openrisc-randconfig-r072-20241104 (https://download.01.org/0day-ci/archive/20241105/202411050108.7hvptsS6-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 14.1.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202411050108.7hvptsS6-lkp@intel.com/
smatch warnings:
arch/openrisc/kernel/signal.c:50 restore_fp_state() warn: maybe return -EFAULT instead of the bytes remaining?
arch/openrisc/kernel/signal.c:67 save_fp_state() warn: maybe return -EFAULT instead of the bytes remaining?
vim +50 arch/openrisc/kernel/signal.c
1c4de499e6134e Stafford Horne 2023-08-20 39
1c4de499e6134e Stafford Horne 2023-08-20 40 asmlinkage int do_work_pending(struct pt_regs *regs, unsigned int thread_flags,
1c4de499e6134e Stafford Horne 2023-08-20 41 int syscall);
1c4de499e6134e Stafford Horne 2023-08-20 42
4dc70e1aadfadf Stafford Horne 2024-03-30 43 #ifdef CONFIG_FPU
4dc70e1aadfadf Stafford Horne 2024-03-30 44 static long restore_fp_state(struct sigcontext __user *sc)
4dc70e1aadfadf Stafford Horne 2024-03-30 45 {
4dc70e1aadfadf Stafford Horne 2024-03-30 46 long err;
4dc70e1aadfadf Stafford Horne 2024-03-30 47
4dc70e1aadfadf Stafford Horne 2024-03-30 48 err = __copy_from_user(¤t->thread.fpcsr, &sc->fpcsr, sizeof(unsigned long));
4dc70e1aadfadf Stafford Horne 2024-03-30 49 if (unlikely(err))
4dc70e1aadfadf Stafford Horne 2024-03-30 @50 return err;
4dc70e1aadfadf Stafford Horne 2024-03-30 51
4dc70e1aadfadf Stafford Horne 2024-03-30 52 /* Restore the FPU state */
4dc70e1aadfadf Stafford Horne 2024-03-30 53 restore_fpu(current);
4dc70e1aadfadf Stafford Horne 2024-03-30 54
4dc70e1aadfadf Stafford Horne 2024-03-30 55 return 0;
4dc70e1aadfadf Stafford Horne 2024-03-30 56 }
4dc70e1aadfadf Stafford Horne 2024-03-30 57
4dc70e1aadfadf Stafford Horne 2024-03-30 58 static long save_fp_state(struct sigcontext __user *sc)
4dc70e1aadfadf Stafford Horne 2024-03-30 59 {
4dc70e1aadfadf Stafford Horne 2024-03-30 60 long err;
4dc70e1aadfadf Stafford Horne 2024-03-30 61
4dc70e1aadfadf Stafford Horne 2024-03-30 62 /* Sync the user FPU state so we can copy to sigcontext */
4dc70e1aadfadf Stafford Horne 2024-03-30 63 save_fpu(current);
4dc70e1aadfadf Stafford Horne 2024-03-30 64
4dc70e1aadfadf Stafford Horne 2024-03-30 65 err = __copy_to_user(&sc->fpcsr, ¤t->thread.fpcsr, sizeof(unsigned long));
4dc70e1aadfadf Stafford Horne 2024-03-30 66
4dc70e1aadfadf Stafford Horne 2024-03-30 @67 return err;
4dc70e1aadfadf Stafford Horne 2024-03-30 68 }
4dc70e1aadfadf Stafford Horne 2024-03-30 69 #else
4dc70e1aadfadf Stafford Horne 2024-03-30 70 #define save_fp_state(sc) (0)
4dc70e1aadfadf Stafford Horne 2024-03-30 71 #define restore_fp_state(sc) (0)
4dc70e1aadfadf Stafford Horne 2024-03-30 72 #endif
4dc70e1aadfadf Stafford Horne 2024-03-30 73
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2024-11-04 17:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-04 17:40 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-12-23 11:06 arch/openrisc/kernel/signal.c:50 restore_fp_state() warn: maybe return -EFAULT instead of the bytes remaining? kernel test robot
2024-11-26 1:57 kernel test robot
2024-10-14 23:32 kernel test robot
2024-09-25 14:14 kernel test robot
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 \
--in-reply-to=202411050108.7hvptsS6-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.