DistroKit Mailinglist
 help / color / mirror / Atom feed
From: Roland Hieber <rhi@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: distrokit@pengutronix.de
Subject: Re: [DistroKit] [PATCH 6/6] v7a_noneon: run: really constrain the forwarded SSH port to <= 64000
Date: Thu, 8 Aug 2024 15:01:18 +0200	[thread overview]
Message-ID: <20240808130118.nrb66wdjtsgfykdg@pengutronix.de> (raw)
In-Reply-To: <20240801113819.3981009-6-a.fatoum@pengutronix.de>

On Thu, Aug 01, 2024 at 01:38:19PM +0200, Ahmad Fatoum wrote:
> The variable expansion braces should have been arithmetic evaluation
> parentheses, which had the effect that the PPID was always used as a
> port number (which incidentally works fine for PPIDs < 65535).
> 
> This was fixed in configs/platform-v7a/run by commit
> fb3e1645e6b5 ("v7a: run: really constrain the forwarded SSH port to <= 64000"),
> so apply the same fix here.
> 
> Fixes: 5d2b3d23b2da ("platform-v7a_noneon: sama5: platform w/out NEON extension")
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  configs/platform-v7a_noneon/run | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/configs/platform-v7a_noneon/run b/configs/platform-v7a_noneon/run
> index ccdcdb91c767..0307e982a334 100755
> --- a/configs/platform-v7a_noneon/run
> +++ b/configs/platform-v7a_noneon/run
> @@ -31,10 +31,10 @@ if [ ! -e "${QEMU_EXEC}" ]; then
>  	exit 1
>  fi
>  
> -# the port to which an sshd would connect (in the emulated sysem)
> +# the port to which an sshd would connect (in the emulated system)
>  SSH_INTERNAL_PORT=22
>  # the port which QEMU opens at the host side to give access to the ${SSH_INTERNAL_PORT}
> -SSH_EXTERNAL_PORT=${QEMU_SSH_PORT:-${PPID%64000+1025}}
> +SSH_EXTERNAL_PORT=${QEMU_SSH_PORT:-$((PPID%64000+1025))}

I guess we should really divide this script up into re-usable parts so
that we don't have to fix all bugs three times… but the patches in this
series look good to me.

 - Roland

>  
>  # check if vde is available for networking
>  if [ -z "${VDE_SOCKET}" ]; then
> -- 
> 2.39.2
> 
> 
> 

-- 
Roland Hieber, Pengutronix e.K.          | r.hieber@pengutronix.de     |
Steuerwalder Str. 21                     | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686         | Fax:   +49-5121-206917-5555 |



  reply	other threads:[~2024-08-08 13:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-01 11:38 [DistroKit] [PATCH 1/6] v7a_noneon: barebox: update to v2024.07.0 Ahmad Fatoum
2024-08-01 11:38 ` [DistroKit] [PATCH 2/6] v7a_noneon: barebox: don't activate all consoles by default Ahmad Fatoum
2024-08-01 11:38 ` [DistroKit] [PATCH 3/6] v7a_noneon: barebox: use ARM-optimized routines where appropriate Ahmad Fatoum
2024-08-01 11:38 ` [DistroKit] [PATCH 4/6] v7a_noneon: barebox: enable of_diff command Ahmad Fatoum
2024-08-01 11:38 ` [DistroKit] [PATCH 5/6] v7a_noneon: generate vexpress.norimg by default Ahmad Fatoum
2024-08-01 11:38 ` [DistroKit] [PATCH 6/6] v7a_noneon: run: really constrain the forwarded SSH port to <= 64000 Ahmad Fatoum
2024-08-08 13:01   ` Roland Hieber [this message]
2024-08-13 13:20 ` [DistroKit] [PATCH v3 0/9] mips(el) cleanup Roland Hieber
2024-08-13 13:20   ` [DistroKit] [PATCH v3 1/9] mipsel: sync kernelconfig Roland Hieber
2024-08-13 13:20   ` [DistroKit] [PATCH v3 2/9] mips, mipsel: remove forked kernel rule Roland Hieber
2024-08-13 13:20   ` [DistroKit] [PATCH v3 3/9] mips, mipsel: kernel-*: sync with template Roland Hieber
2024-08-13 13:20   ` [DistroKit] [PATCH v3 4/9] mips, mipsel: kernel-*: use ptx/image-install and fix 'clean' stage Roland Hieber
2024-08-13 13:20   ` [DistroKit] [PATCH v3 5/9] mips, mipsel: kernel-*: select KERNEL Roland Hieber
2024-08-13 13:20   ` [DistroKit] [PATCH v3 6/9] mips, mipsel: migrate barebox-common recipe to barebox Roland Hieber
2024-08-13 13:20   ` [DistroKit] [PATCH v3 7/9] mips, mipsel: barebox-*: sync with template Roland Hieber
2024-08-13 13:20   ` [DistroKit] [PATCH v3 8/9] mips, mipsel: barebox-*: use ptx/image-install Roland Hieber
2024-08-13 13:20   ` [DistroKit] [PATCH v3 9/9] mips, mipsel: barebox-*: set LICENSE_FILES Roland Hieber
2024-08-14  7:55   ` [DistroKit] [PATCH v3 0/9] mips(el) cleanup Robert Schwebel
2024-08-14  7:59 ` [DistroKit] [PATCH 1/6] v7a_noneon: barebox: update to v2024.07.0 Robert Schwebel

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=20240808130118.nrb66wdjtsgfykdg@pengutronix.de \
    --to=rhi@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=distrokit@pengutronix.de \
    /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