All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Fernando Fernandez Mancera" <fmancera@suse.de>
Cc: linux-s390@vger.kernel.org, linux-rdma@vger.kernel.org,
	"Heiko Carstens" <hca@linux.ibm.com>,
	"Vasily Gorbik" <gor@linux.ibm.com>,
	"Alexander Gordeev" <agordeev@linux.ibm.com>,
	"Christian Borntraeger" <borntraeger@linux.ibm.com>
Subject: Re: [PATCH net] net/smc: fix limit_smc_hs sysctl on big-endian architecture
Date: Wed, 28 Oct 2026 22:57:39 +0000	[thread overview]
Message-ID: <sashiko-outbox-188536@kernel.org> (raw)
In-Reply-To: <20261028225350.3753-1-fmancera@suse.de>

> net->smc.limit_smc_hs is a bool, but its sysctl entry uses
> proc_dointvec_minmax() with .maxlen = sizeof(int), so the handler
> accesses four bytes at the address of a one-byte field.
> 
> On little-endian this works with the extra bytes being written in struct
> padding. On big-endian (tested on s390x) the bool sits at the most
> significant byte of the int therefore the bool stays false and the "1"
> goes into padding. The sysctl reads back 1 but SMC sockets created
> afterwards see limit_smc_hs as disabled.
> 
> Fix this by using proc_dobool() handler and adjust the maxlen to the
> right value.
> 
> Fixes: f8406a2fd279 ("net/smc: add sysctl for smc_limit_hs")
> Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261028225350.3753-1-fmancera@suse.de?part=1


      reply	other threads:[~2026-10-28 22:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28 22:53 [PATCH net] net/smc: fix limit_smc_hs sysctl on big-endian architecture Fernando Fernandez Mancera
2026-10-28 22:57 ` sashiko-bot [this message]

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=sashiko-outbox-188536@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=fmancera@suse.de \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 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.