linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Finn Thain <fthain@linux-m68k.org>
Cc: "Christopher M. Riedl" <cmr@linux.ibm.com>,
	Stan Johnson <stanley.johnson.001@protonmail.com>,
	linuxppc-dev@lists.ozlabs.org,
	Riccardo Mottola <riccardo.mottola@libero.it>
Subject: Re: Fwd: Fwd: X stopped working with 5.14 on iBook
Date: Fri, 5 Nov 2021 18:27:27 +0100	[thread overview]
Message-ID: <79ae1f49-f6b1-e9ad-977d-0cc7e553c7b9@csgroup.eu> (raw)
In-Reply-To: <de4b689-236e-505e-2632-6ce89110a1e9@linux-m68k.org>



Le 05/11/2021 à 00:36, Finn Thain a écrit :
> On Thu, 4 Nov 2021, Christophe Leroy wrote:
> 
>> Le 02/11/2021 à 03:20, Finn Thain a écrit :
>>> Hi Christopher,
>>>
>>> After many builds and tests, Stan and I were able to determine that this
>>> regression only affects builds with CONFIG_USER_NS=y. That is,
>>>
>>> d3ccc9781560  + CONFIG_USER_NS=y  -->  fail
>>> d3ccc9781560  + CONFIG_USER_NS=n  -->  okay
>>> d3ccc9781560~ + CONFIG_USER_NS=y  -->  okay
>>> d3ccc9781560~ + CONFIG_USER_NS=n  -->  okay
>>>
>>> Stan also tested a PowerMac G3 system and found that the regression is not
>>> present there. Thus far, only PowerMac G4 systems are known to be affected
>>> (Stan's Cube and Riccardo's PowerBook).
>>>
>>> I asked Stan to try v5.15-rc after reverting commit d3ccc9781560.
>>> Unexpectedly, this build had the same issue. So, it appears there are
>>> multiple bad commits that produce this Xorg failure, of which d3ccc9781560
>>> is just the first.
>>>
>>> But there's no easy way to identify the other bad commits using bisection.
>>> So I've addressed this message to you. Can you help fix this regression?
>>>
>>
>> I'm wondering if this commit is really the cause of the problem.
>>
>> Are you using GCC 11 ?
>>
>> If yes, I think it could be a false positive, fixed by
>> https://github.com/linuxppc/linux/commit/7315e457d6bc
>>
>> Can you try with GCC 10 or older ?
>>
> 
> AFAIK, all of Stan's builds were made with gcc 10.
> 
>> Can you cherry pick 7315e457d6bc ("powerpc/uaccess: Fix __get_user() with
>> CONFIG_CC_HAS_ASM_GOTO_OUTPUT") on top of d3ccc9781560 and see what happens ?
>>
> 
> $ git checkout d3ccc9781560
> $ git cherry-pick 7315e457d6bc
> Auto-merging arch/powerpc/include/asm/uaccess.h
> CONFLICT (content): Merge conflict in arch/powerpc/include/asm/uaccess.h
> error: could not apply 7315e457d6bc... powerpc/uaccess: Fix __get_user() with CONFIG_CC_HAS_ASM_GOTO_OUTPUT
> 
> There is no __get_user_asm2_goto in this tree, and __get_user_asm2 already
> has the "=&r" constraint:
> 
> #define __get_user_asm2(x, addr, err)                   \
>          __asm__ __volatile__(                           \
>                  "1:     lwz%X2 %1, %2\n"                        \
>                  "2:     lwz%X2 %L1, %L2\n"              \
>                  "3:\n"                                  \
>                  ".section .fixup,\"ax\"\n"              \
>                  "4:     li %0,%3\n"                     \
>                  "       li %1,0\n"                      \
>                  "       li %1+1,0\n"                    \
>                  "       b 3b\n"                         \
>                  ".previous\n"                           \
>                  EX_TABLE(1b, 4b)                        \
>                  EX_TABLE(2b, 4b)                        \
>                  : "=r" (err), "=&r" (x)                 \
>                  : "m" (*addr), "i" (-EFAULT), "0" (err))
> 

You are right, __get_user_asm2_goto() was added later.

I think I found the issue.

__get_user_sigset() is wrong for 32 bits.

Could you change its content  to return __get_user(*(u64*)&dst->sig[0], 
(u64 __user *)&src->sig[0]);

If it works, for the mainline also change unsafe_get_user_sigset()

Christophe

  reply	other threads:[~2021-11-05 17:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <6919111c-02fa-c6b9-bb05-04161e52f340@yahoo.com>
     [not found] ` <27ad38f3-c1a8-ac5c-8467-f311b5882a00@yahoo.com>
2021-10-22 18:40   ` Fwd: Fwd: X stopped working with 5.14 on iBook Christophe Leroy
2021-11-02  2:20     ` Finn Thain
2021-11-02 22:27       ` Christopher M. Riedl
2021-11-02 22:45         ` Riccardo Mottola
2021-11-04 18:30         ` Stanley Johnson
2021-11-04 16:40       ` Christophe Leroy
2021-11-04 18:49         ` Stanley Johnson
2021-11-04 23:36         ` Finn Thain
2021-11-05 17:27           ` Christophe Leroy [this message]
2021-11-06  1:22             ` Stanley Johnson
2021-11-05 17:58           ` Segher Boessenkool
     [not found]     ` <48c3ed15-2ecf-cc12-c287-2b61457f5fb__21333.0969143257$1635819996$gmane$org@nippy.intranet>
2021-11-03  8:51       ` Andreas Schwab
2021-11-03 22:26         ` Finn Thain
2021-11-03 22:55           ` Andreas Schwab
2021-11-04  2:00           ` Stanley Johnson
2021-11-04  9:01             ` Andreas Schwab

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=79ae1f49-f6b1-e9ad-977d-0cc7e553c7b9@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=cmr@linux.ibm.com \
    --cc=fthain@linux-m68k.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=riccardo.mottola@libero.it \
    --cc=stanley.johnson.001@protonmail.com \
    /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).