mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Luis Chamberlain" <mcgrof@kernel.org>,
	"Arnd Bergmann" <arnd@kernel.org>,
	"Linus Torvalds" <torvalds@linux-foundation.org>
Cc: "Aaron Tomlin" <atomlin@redhat.com>,
	"Christophe Leroy" <christophe.leroy@csgroup.eu>,
	"Viktor Malik" <vmalik@redhat.com>,
	"Jason Baron" <jbaron@akamai.com>, "Song Liu" <song@kernel.org>,
	"Jim Cromie" <jim.cromie@gmail.com>,
	"Kees Cook" <keescook@chromium.org>,
	"Masahiro Yamada" <masahiroy@kernel.org>,
	"Sami Tolvanen" <samitolvanen@google.com>,
	linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] module: fix building stats for 32-bit targets
Date: Tue, 18 Apr 2023 00:49:29 +0200	[thread overview]
Message-ID: <cd9d08ea-ffa5-4932-b296-7a58203ef701@app.fastmail.com> (raw)
In-Reply-To: <ZD3E+AYPzq/EO2Gs@bombadil.infradead.org>

On Tue, Apr 18, 2023, at 00:15, Luis Chamberlain wrote:
> On Tue, Apr 18, 2023 at 12:02:47AM +0200, Arnd Bergmann wrote:
>> I have no idea if there is a risk of these variables actually
>> overflowing 'long' on 32-bit machines. If they provably can't, it
>> would be better to do the opposite patch.
>
> I had originally used atomic64_t and added a debugfs knob for it but
> Linus had advised against it because its not a stat we care too much
> on 32-bit and atomic64 is nasty on 32-bit [0].
>
> So I went with atomic_long and the cast becuase we're just reading.
> 
> Is there a way to fix this without doing the fully jump? If not oh well.

I've sent a v2 now that does it the other way round, which is
clearly much more efficient. Have only done minimal build testing
so far, but it passes the randconfigs that failed before.

     Arnd

  reply	other threads:[~2023-04-17 22:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-17 22:02 [PATCH 1/2] module: stats: include uapi/linux/module.h Arnd Bergmann
2023-04-17 22:02 ` [PATCH 2/2] module: fix building stats for 32-bit targets Arnd Bergmann
2023-04-17 22:15   ` Luis Chamberlain
2023-04-17 22:49     ` Arnd Bergmann [this message]
2023-04-17 23:28       ` Luis Chamberlain
2023-04-17 23:31 ` [PATCH 1/2] module: stats: include uapi/linux/module.h Luis Chamberlain

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=cd9d08ea-ffa5-4932-b296-7a58203ef701@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=atomlin@redhat.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=jbaron@akamai.com \
    --cc=jim.cromie@gmail.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=samitolvanen@google.com \
    --cc=song@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=vmalik@redhat.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

all inboxes | Powered by JetHome®