Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] openssh: fix sshd for MIPS64 n32
Date: Wed, 21 Jun 2017 21:44:00 +0200	[thread overview]
Message-ID: <20170621214400.7b3c2358@windsurf> (raw)
In-Reply-To: <20170620161519.44028-1-Vincent.Riera@imgtec.com>

Hello,

On Tue, 20 Jun 2017 17:15:19 +0100, Vicente Olivert Riera wrote:
> This patch backports two patches that have been sent upstream as a pull
> request in order to fix sshd for MIPS64 n32.
> 
> The first patch adds support for detecting the MIPS ABI during the
> configure phase.
> 
> The second patch sets the right value to seccomp_audit_arch taking into
> account the MIPS64 ABI.
> 
> Currently seccomp_audit_arch is set to AUDIT_ARCH_MIPS64 or
> AUDIT_ARCH_MIPSEL64 (depending on the endinness) when openssh is built
> for MIPS64. However, that's only valid for n64 ABI. The right macros for
> n32 ABI defined in seccomp.h are AUDIT_ARCH_MIPS64N32 and
> AUDIT_ARCH_MIPSEL64N32, for big and little endian respectively.
> 
> Because of that an sshd built for MIPS64 n32 rejects connection attempts
> and the output of strace reveals that the problem is related to seccomp
> audit:
> 
> [pid   194] prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, {len=57,
> filter=0x555d5da0}) = 0
> [pid   194] write(7, "\0\0\0]\0\0\0\5\0\0\0Ulist_hostkey_types: "..., 97) = ?
> [pid   193] <... poll resumed> )        = 2 ([{fd=5, revents=POLLIN|POLLHUP},
> {fd=6, revents=POLLHUP}])
> [pid   194] +++ killed by SIGSYS +++
> 
> Pull request: https://github.com/openssh/openssh-portable/pull/71
> 
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> ---
>  package/openssh/openssh.hash | 2 ++
>  package/openssh/openssh.mk   | 6 ++++++
>  2 files changed, 8 insertions(+)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2017-06-21 19:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-20 16:15 [Buildroot] [PATCH] openssh: fix sshd for MIPS64 n32 Vicente Olivert Riera
2017-06-21 19:44 ` Thomas Petazzoni [this message]
2017-06-26  8:10 ` Peter Korsgaard

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=20170621214400.7b3c2358@windsurf \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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