From: Heiko Carstens <hca@linux.ibm.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: oe-kbuild@lists.linux.dev, lkp@intel.com,
oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Vasily Gorbik <gor@linux.ibm.com>
Subject: Re: arch/s390/mm/fault.c:566 do_secure_storage_access() warn: inconsistent returns '&mm->mmap_lock'.
Date: Fri, 25 Oct 2024 12:05:16 +0200 [thread overview]
Message-ID: <20241025100516.7541-B-hca@linux.ibm.com> (raw)
In-Reply-To: <5e4a2c40-9fc4-439a-8166-3a694e705d8e@stanley.mountain>
On Fri, Oct 25, 2024 at 10:35:47AM +0300, Dan Carpenter wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: c2ee9f594da826bea183ed14f2cc029c719bf4da
> commit: 7c194d84a9ce662426b2ecb59da54bb80c6b1d91 s390/mm,fault: remove VM_FAULT_BADMAP and VM_FAULT_BADACCESS
> config: s390-randconfig-r072-20241024 (https://download.01.org/0day-ci/archive/20241025/202410250552.XsMLl1sx-lkp@intel.com/config)
> compiler: s390-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 <dan.carpenter@linaro.org>
> | Closes: https://lore.kernel.org/r/202410250552.XsMLl1sx-lkp@intel.com/
>
> smatch warnings:
> arch/s390/mm/fault.c:566 do_secure_storage_access() warn: inconsistent returns '&mm->mmap_lock'.
...
> 084ea4d611a3d0 Vasily Gorbik 2020-01-21 540 case USER_FAULT:
> 084ea4d611a3d0 Vasily Gorbik 2020-01-21 541 mm = current->mm;
> d8ed45c5dcd455 Michel Lespinasse 2020-06-08 542 mmap_read_lock(mm);
> 084ea4d611a3d0 Vasily Gorbik 2020-01-21 543 vma = find_vma(mm, addr);
> 7c194d84a9ce66 Heiko Carstens 2023-10-12 544 if (!vma)
> 7c194d84a9ce66 Heiko Carstens 2023-10-12 545 return handle_fault_error(regs, SEGV_MAPERR);
>
> mmap_read_unlock() before returning?
This is a false positive: handle_fault_error() contains an unconditional
mmap_read_unlock() call. I would wish the __acquires() and __releases()
annotations would work better (or maybe I just can't figure out to use them
properly.
In any case: do_secure_storage_access() will very likely go away with the next
merge window and its functionality will be implemented differently.
next prev parent reply other threads:[~2024-10-25 10:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-25 7:35 arch/s390/mm/fault.c:566 do_secure_storage_access() warn: inconsistent returns '&mm->mmap_lock' Dan Carpenter
2024-10-25 10:05 ` Heiko Carstens [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-10-26 15:30 kernel test robot
2024-10-24 21:57 kernel test robot
2024-09-24 6:41 kernel test robot
2024-09-23 12:22 kernel test robot
2024-09-22 22:01 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=20241025100516.7541-B-hca@linux.ibm.com \
--to=hca@linux.ibm.com \
--cc=dan.carpenter@linaro.org \
--cc=gor@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--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.