lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4959d0b8-96fe-7fe5-8b36-7e0a266d1d17@kernel.dk>
Date:   Tue, 11 Apr 2023 16:39:39 -0600
From:   Jens Axboe <axboe@...nel.dk>
To:     Josh Poimboeuf <jpoimboe@...nel.org>,
        Stephen Rothwell <sfr@...b.auug.org.au>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: Re: linux-next: build warnings after merge of the block tree

On 4/11/23 3:55?PM, Josh Poimboeuf wrote:
> On Wed, Apr 12, 2023 at 07:34:16AM +1000, Stephen Rothwell wrote:
>> Hi all,
>>
>> On Tue, 28 Mar 2023 10:47:19 +1100 Stephen Rothwell <sfr@...b.auug.org.au> wrote:
>>>
>>> On Mon, 27 Mar 2023 09:26:30 -0700 Josh Poimboeuf <jpoimboe@...nel.org> wrote:
>>>>
>>>> On Mon, Mar 27, 2023 at 12:00:17PM +1100, Stephen Rothwell wrote:  
>>>>>
>>>>> After merging the block tree, today's linux-next build (x86_64
>>>>> allnoconfig) produced these warnings:
>>>>>
>>>>> lib/iov_iter.o: warning: objtool: .altinstr_replacement+0x0: redundant UACCESS d
>>>>> isable
>>>>> lib/iov_iter.o: warning: objtool: iovec_from_user.part.0+0xc7: call to copy_comp
>>>>> at_iovec_from_user.part.0() with UACCESS enabled
>>>>> lib/iov_iter.o: warning: objtool: __import_iovec+0x21d: call to copy_compat_iovec_from_user.part.0() with UACCESS enabled
>>>>>
>>>>> Presumably introduced by commit
>>>>>
>>>>>   6376ce56feb6 ("iov_iter: import single vector iovecs as ITER_UBUF")    
>>>>
>>>> I'm not able to recreate.  What's your compiler version?  
>>>
>>> $ x86_64-linux-gnu-gcc --version
>>> x86_64-linux-gnu-gcc (Debian 12.2.0-14) 12.2.0
>>
>> Any progress?
> 
> I still wasn't able to recreate with gcc version 12.2.1 20221121 (Red
> Hat 12.2.1-4) (GCC) .
> 
> Is it a cross-compile?
> 
> Can you share the .o file?

Here's mine, native compile:

axboe@...00k ~/gi/linux-block (test)> gcc --version
gcc (Debian 12.2.0-14) 12.2.0


lib/iov_iter.o attached, gzip'ed. NOTE: if you disable either of the
copy_compat_iovec_from_user() as per diff below (commented out), then
it doesn't complain. Is there some bug where it thinks we'll hit both?
That should not be possible.


diff --git a/lib/iov_iter.c b/lib/iov_iter.c
index 783ae46b13b9..1bff8f9282b2 100644
--- a/lib/iov_iter.c
+++ b/lib/iov_iter.c
@@ -1327,6 +1327,7 @@ struct iovec *iovec_from_user(const struct iovec __user *uvec,
 			return ERR_PTR(-ENOMEM);
 	}
 
+	/* if (0 && compat) */
 	if (compat)
 		ret = copy_compat_iovec_from_user(iov, uvec, nr_segs);
 	else
@@ -1350,6 +1351,7 @@ static ssize_t __import_iovec_ubuf(int type, const struct iovec __user *uvec,
 	struct iovec *iov = *iovp;
 	ssize_t ret;
 
+	/* if (0 && compat) */
 	if (compat)
 		ret = copy_compat_iovec_from_user(iov, uvec, 1);
 	else

-- 
Jens Axboe

Download attachment "iov_iter.o.gz" of type "application/gzip" (163349 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ