All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] openssh: Add a work around for ICE on mips/mips64
@ 2024-02-15 21:28 Richard Purdie
  2024-02-16  1:11 ` [OE-core] " Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2024-02-15 21:28 UTC (permalink / raw)
  To: openembedded-core; +Cc: Tim Orling

Unfortunately the new openssh version has an ICE on mips. This looks similar to:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104817
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104820

Given how long these have been open, workaround the issue by disabling the compiler
hardening options on mips.

It is likely better to do this than have the open CVEs for everyone
as we can't upgrade.

An example:

| during RTL pass: zero_call_used_regs
| clientloop.c: In function 'client_loop':
| clientloop.c:1699:1: internal compiler error: in int_mode_for_mode, at stor-layout.cc:407
|  1699 | }
|       | ^
| 0x14d0acc internal_error(char const*, ...)
| 	???:0
| 0x5cf765 fancy_abort(char const*, int, char const*)
| 	???:0
| 0x826f1f emit_move_insn_1(rtx_def*, rtx_def*)
| 	???:0
| 0x8270c5 emit_move_insn(rtx_def*, rtx_def*)
| 	???:0
| 0xb7b994 default_zero_call_used_regs(HARD_REG_SET)
| 	???:0
| Please submit a full bug report, with preprocessed source (by using -freport-bug).
| Please include the complete backtrace with any bug report.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-connectivity/openssh/openssh_9.6p1.bb | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-connectivity/openssh/openssh_9.6p1.bb b/meta/recipes-connectivity/openssh/openssh_9.6p1.bb
index 6366cefdf96..1fd36a266fd 100644
--- a/meta/recipes-connectivity/openssh/openssh_9.6p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_9.6p1.bb
@@ -81,6 +81,10 @@ EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \
 # musl doesn't implement wtmp/utmp and logwtmp
 EXTRA_OECONF:append:libc-musl = " --disable-wtmp --disable-lastlog"
 
+# Work around ICE on mips/mips64 starting in 9.6p1
+EXTRA_OECONF:append:mips = " --without-hardening"
+EXTRA_OECONF:append:mips64 = " --without-hardening"
+
 # Since we do not depend on libbsd, we do not want configure to use it
 # just because it finds libutil.h.  But, specifying --disable-libutil
 # causes compile errors, so...
-- 
2.40.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [OE-core] [PATCH v3] openssh: Add a work around for ICE on mips/mips64
  2024-02-15 21:28 [PATCH v3] openssh: Add a work around for ICE on mips/mips64 Richard Purdie
@ 2024-02-16  1:11 ` Khem Raj
  2024-02-16  2:58   ` Tim Orling
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2024-02-16  1:11 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core, Tim Orling

On Thu, Feb 15, 2024 at 1:29 PM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> Unfortunately the new openssh version has an ICE on mips. This looks similar to:
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104817
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104820
>
> Given how long these have been open, workaround the issue by disabling the compiler
> hardening options on mips.
>
> It is likely better to do this than have the open CVEs for everyone
> as we can't upgrade.
>
> An example:
>
> | during RTL pass: zero_call_used_regs
> | clientloop.c: In function 'client_loop':
> | clientloop.c:1699:1: internal compiler error: in int_mode_for_mode, at stor-layout.cc:407
> |  1699 | }
> |       | ^
> | 0x14d0acc internal_error(char const*, ...)
> |       ???:0
> | 0x5cf765 fancy_abort(char const*, int, char const*)
> |       ???:0
> | 0x826f1f emit_move_insn_1(rtx_def*, rtx_def*)
> |       ???:0
> | 0x8270c5 emit_move_insn(rtx_def*, rtx_def*)
> |       ???:0
> | 0xb7b994 default_zero_call_used_regs(HARD_REG_SET)
> |       ???:0
> | Please submit a full bug report, with preprocessed source (by using -freport-bug).
> | Please include the complete backtrace with any bug report.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>  meta/recipes-connectivity/openssh/openssh_9.6p1.bb | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/meta/recipes-connectivity/openssh/openssh_9.6p1.bb b/meta/recipes-connectivity/openssh/openssh_9.6p1.bb
> index 6366cefdf96..1fd36a266fd 100644
> --- a/meta/recipes-connectivity/openssh/openssh_9.6p1.bb
> +++ b/meta/recipes-connectivity/openssh/openssh_9.6p1.bb
> @@ -81,6 +81,10 @@ EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \
>  # musl doesn't implement wtmp/utmp and logwtmp
>  EXTRA_OECONF:append:libc-musl = " --disable-wtmp --disable-lastlog"
>
> +# Work around ICE on mips/mips64 starting in 9.6p1
> +EXTRA_OECONF:append:mips = " --without-hardening"
> +EXTRA_OECONF:append:mips64 = " --without-hardening"

Perhaps just use mipsarch override since I imagine it will impact all
kinds of mips.

> +
>  # Since we do not depend on libbsd, we do not want configure to use it
>  # just because it finds libutil.h.  But, specifying --disable-libutil
>  # causes compile errors, so...
> --
> 2.40.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#195704): https://lists.openembedded.org/g/openembedded-core/message/195704
> Mute This Topic: https://lists.openembedded.org/mt/104381904/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [OE-core] [PATCH v3] openssh: Add a work around for ICE on mips/mips64
  2024-02-16  1:11 ` [OE-core] " Khem Raj
@ 2024-02-16  2:58   ` Tim Orling
  0 siblings, 0 replies; 3+ messages in thread
From: Tim Orling @ 2024-02-16  2:58 UTC (permalink / raw)
  To: Khem Raj; +Cc: Richard Purdie, Tim Orling, openembedded-core

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

I’m

On Thu, Feb 15, 2024 at 5:12 PM Khem Raj <raj.khem@gmail.com> wrote:

> On Thu, Feb 15, 2024 at 1:29 PM Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> >
> > Unfortunately the new openssh version has an ICE on mips. This looks
> similar to:
> >
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104817
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104820
> >
> > Given how long these have been open, workaround the issue by disabling
> the compiler
> > hardening options on mips.
> >
> > It is likely better to do this than have the open CVEs for everyone
> > as we can't upgrade.
> >
> > An example:
> >
> > | during RTL pass: zero_call_used_regs
> > | clientloop.c: In function 'client_loop':
> > | clientloop.c:1699:1: internal compiler error: in int_mode_for_mode, at
> stor-layout.cc:407
> > |  1699 | }
> > |       | ^
> > | 0x14d0acc internal_error(char const*, ...)
> > |       ???:0
> > | 0x5cf765 fancy_abort(char const*, int, char const*)
> > |       ???:0
> > | 0x826f1f emit_move_insn_1(rtx_def*, rtx_def*)
> > |       ???:0
> > | 0x8270c5 emit_move_insn(rtx_def*, rtx_def*)
> > |       ???:0
> > | 0xb7b994 default_zero_call_used_regs(HARD_REG_SET)
> > |       ???:0
> > | Please submit a full bug report, with preprocessed source (by using
> -freport-bug).
> > | Please include the complete backtrace with any bug report.
> >
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > ---
> >  meta/recipes-connectivity/openssh/openssh_9.6p1.bb | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/meta/recipes-connectivity/openssh/openssh_9.6p1.bb
> b/meta/recipes-connectivity/openssh/openssh_9.6p1.bb
> > index 6366cefdf96..1fd36a266fd 100644
> > --- a/meta/recipes-connectivity/openssh/openssh_9.6p1.bb
> > +++ b/meta/recipes-connectivity/openssh/openssh_9.6p1.bb
> > @@ -81,6 +81,10 @@ EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \
> >  # musl doesn't implement wtmp/utmp and logwtmp
> >  EXTRA_OECONF:append:libc-musl = " --disable-wtmp --disable-lastlog"
> >
> > +# Work around ICE on mips/mips64 starting in 9.6p1
> > +EXTRA_OECONF:append:mips = " --without-hardening"
> > +EXTRA_OECONF:append:mips64 = " --without-hardening"
>
> Perhaps just use mipsarch override since I imagine it will impact all
> kinds of mips.
>

Just a data point, both qemumips and qemumips64 are based on the ~2006-ish
“Malta” machine. I don’t know yet if that set of tuning is a factor (vs
“Boston” which is more like 2015). I’ll still follow through with a bug
report on gcc bugzilla.


> > +
> >  # Since we do not depend on libbsd, we do not want configure to use it
> >  # just because it finds libutil.h.  But, specifying --disable-libutil
> >  # causes compile errors, so...
> > --
> > 2.40.1
> >
> >
> >
> >
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#195733):
> https://lists.openembedded.org/g/openembedded-core/message/195733
> Mute This Topic: https://lists.openembedded.org/mt/104381904/924729
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> ticotimo@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

[-- Attachment #2: Type: text/html, Size: 5439 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-16  2:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-15 21:28 [PATCH v3] openssh: Add a work around for ICE on mips/mips64 Richard Purdie
2024-02-16  1:11 ` [OE-core] " Khem Raj
2024-02-16  2:58   ` Tim Orling

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.