linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Josh Poimboeuf <jpoimboe@kernel.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: build warnings after merge of the block tree
Date: Tue, 11 Apr 2023 16:39:39 -0600	[thread overview]
Message-ID: <4959d0b8-96fe-7fe5-8b36-7e0a266d1d17@kernel.dk> (raw)
In-Reply-To: <20230411215518.u2fgi7napfcwyuce@treble>

[-- Attachment #1: Type: text/plain, Size: 2306 bytes --]

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@canb.auug.org.au> wrote:
>>>
>>> On Mon, 27 Mar 2023 09:26:30 -0700 Josh Poimboeuf <jpoimboe@kernel.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@12900k ~/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

[-- Attachment #2: iov_iter.o.gz --]
[-- Type: application/gzip, Size: 163349 bytes --]

  reply	other threads:[~2023-04-11 22:39 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-27  1:00 linux-next: build warnings after merge of the block tree Stephen Rothwell
2023-03-27 16:26 ` Josh Poimboeuf
2023-03-27 23:47   ` Stephen Rothwell
2023-04-11 21:34     ` Stephen Rothwell
2023-04-11 21:55       ` Josh Poimboeuf
2023-04-11 22:39         ` Jens Axboe [this message]
2023-04-12  0:14           ` Josh Poimboeuf
2023-04-12  1:48             ` Jens Axboe
2023-04-12 11:44             ` Peter Zijlstra
2023-04-12 16:25               ` Josh Poimboeuf
2023-04-12 16:35                 ` Jens Axboe
2023-04-12 16:44                   ` Jens Axboe
2023-04-12 16:56                     ` Josh Poimboeuf
2023-04-12 17:57                       ` Jens Axboe
2023-06-16 12:43                 ` Peter Zijlstra
2023-06-16 12:49                   ` Borislav Petkov
2023-07-03 11:04                   ` Peter Zijlstra
2023-07-03 14:18                     ` Jens Axboe
2023-07-03 15:14                       ` Peter Zijlstra
2023-04-11 22:30       ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2024-02-06  2:10 Stephen Rothwell
2024-02-06  4:13 ` Stephen Rothwell
2024-02-06 11:12 ` Geert Uytterhoeven
2024-02-06 13:42   ` Geert Uytterhoeven
2024-02-06 14:53     ` Jens Axboe
2024-02-06 14:49 ` Jens Axboe
2023-07-27  6:10 Stephen Rothwell
2023-07-27 12:41 ` Jens Axboe
2022-07-15 11:51 Stephen Rothwell
2020-03-03  1:41 Stephen Rothwell
2020-03-03  2:59 ` Jens Axboe
2018-03-01  0:26 Stephen Rothwell
2018-03-01  4:02 ` Anshuman Khandual
2018-03-01 15:37   ` Jens Axboe
2013-11-26  2:29 Stephen Rothwell
2013-11-26  3:35 ` Stephen Rothwell
2013-11-26 19:01   ` Olof Johansson
2013-11-26 19:02     ` Jens Axboe
2011-01-07  0:02 Stephen Rothwell
2011-01-07  1:49 ` Mathieu Desnoyers

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=4959d0b8-96fe-7fe5-8b36-7e0a266d1d17@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=sfr@canb.auug.org.au \
    /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;
as well as URLs for NNTP newsgroup(s).