stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] bitmap: fix memset optimization on big-endian systems
       [not found] <817147544aa3ecc2b78d6cadeab713869d8805e6.1522709616.git.osandov@fb.com>
@ 2018-04-02 23:00 ` Omar Sandoval
  2018-04-03 18:14 ` Please add 21035965f60b ("bitmap: fix memset optimization on big-endian systems") to the stable tree Omar Sandoval
  2018-04-06 20:05 ` [PATCH] bitmap: fix memset optimization on big-endian systems Sasha Levin
  2 siblings, 0 replies; 5+ messages in thread
From: Omar Sandoval @ 2018-04-02 23:00 UTC (permalink / raw)
  To: linux-btrfs, linux-kernel
  Cc: kernel-team, Matthew Wilcox, Andrew Morton, Rasmus Villemoes,
	Linus Torvalds, stable

On Mon, Apr 02, 2018 at 03:58:31PM -0700, Omar Sandoval wrote:
> From: Omar Sandoval <osandov@fb.com>
> 
> Commit 2a98dc028f91 introduced an optimization to bitmap_{set,clear}()
> which uses memset() when the start and length are constants aligned to a
> byte. This is wrong on big-endian systems; our bitmaps are arrays of
> unsigned long, so bit n is not at byte n / 8 in memory. This was caught
> by the Btrfs selftests, but the bitmap selftests also fail when run on a
> big-endian machine.
> 
> We can still use memset if the start and length are aligned to an
> unsigned long, so do that on big-endian. The same problem applies to the
> memcmp in bitmap_equal(), so fix it there, too.
> 
> Fixes: 2a98dc028f91 ("include/linux/bitmap.h: turn bitmap_set and bitmap_clear into memset when possible")
> Fixes: 2c6deb01525a ("bitmap: use memcmp optimisation in more situations")
> Cc: stable@kernel.org

This should be stable@vger.kernel.org, of course

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

* Please add 21035965f60b ("bitmap: fix memset optimization on big-endian systems") to the stable tree
       [not found] <817147544aa3ecc2b78d6cadeab713869d8805e6.1522709616.git.osandov@fb.com>
  2018-04-02 23:00 ` [PATCH] bitmap: fix memset optimization on big-endian systems Omar Sandoval
@ 2018-04-03 18:14 ` Omar Sandoval
  2018-04-03 18:57   ` Linus Torvalds
  2018-04-06 20:05 ` [PATCH] bitmap: fix memset optimization on big-endian systems Sasha Levin
  2 siblings, 1 reply; 5+ messages in thread
From: Omar Sandoval @ 2018-04-03 18:14 UTC (permalink / raw)
  To: linux-btrfs, linux-kernel, stable
  Cc: kernel-team, Matthew Wilcox, Andrew Morton, Rasmus Villemoes,
	Linus Torvalds

Just wanted to make sure this doesn't get missed because I misspelled
the stable email address in the patch. It applies to v4.13+.

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

* Re: Please add 21035965f60b ("bitmap: fix memset optimization on big-endian systems") to the stable tree
  2018-04-03 18:14 ` Please add 21035965f60b ("bitmap: fix memset optimization on big-endian systems") to the stable tree Omar Sandoval
@ 2018-04-03 18:57   ` Linus Torvalds
  2018-04-04  6:12     ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Linus Torvalds @ 2018-04-03 18:57 UTC (permalink / raw)
  To: Omar Sandoval
  Cc: linux-btrfs, Linux Kernel Mailing List, stable, kernel-team,
	Matthew Wilcox, Andrew Morton, Rasmus Villemoes

On Tue, Apr 3, 2018 at 11:14 AM, Omar Sandoval <osandov@osandov.com> wrote:
> Just wanted to make sure this doesn't get missed because I misspelled
> the stable email address in the patch. It applies to v4.13+.

The "stable@kernel.org" address for a stable cc is actually better
than stable@vger" imho, because afaik it still matches Greg's
automation (that also picks up on "Fixes:" tags), and it does *not*
cause extra email flurries when people use git-send-email scripts.

iirc, we had some vendor leak a security bug early because they
actually just cc'd everybody - including the stable list - on the
not-yet-publicly-committed change.

Greg - if your automation has changed, and you actually really want
the "vger", let me know. Because I tend to just use
"stable@kernel.org"

               Linus

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

* Re: Please add 21035965f60b ("bitmap: fix memset optimization on big-endian systems") to the stable tree
  2018-04-03 18:57   ` Linus Torvalds
@ 2018-04-04  6:12     ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2018-04-04  6:12 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Omar Sandoval, linux-btrfs, Linux Kernel Mailing List, stable,
	kernel-team, Matthew Wilcox, Andrew Morton, Rasmus Villemoes

On Tue, Apr 03, 2018 at 11:57:26AM -0700, Linus Torvalds wrote:
> 
> Greg - if your automation has changed, and you actually really want
> the "vger", let me know. Because I tend to just use
> "stable@kernel.org"

Either is fine, my scripts pick up both variants.

thanks,

greg k-h

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

* Re: [PATCH] bitmap: fix memset optimization on big-endian systems
       [not found] <817147544aa3ecc2b78d6cadeab713869d8805e6.1522709616.git.osandov@fb.com>
  2018-04-02 23:00 ` [PATCH] bitmap: fix memset optimization on big-endian systems Omar Sandoval
  2018-04-03 18:14 ` Please add 21035965f60b ("bitmap: fix memset optimization on big-endian systems") to the stable tree Omar Sandoval
@ 2018-04-06 20:05 ` Sasha Levin
  2 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2018-04-06 20:05 UTC (permalink / raw)
  To: Sasha Levin, Omar Sandoval, Omar Sandoval,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
  Cc: kernel-team@fb.com, Matthew Wilcox, stable@kernel.org,
	stable@vger.kernel.org

Hi,

[This is an automated email]

This commit has been processed because it contains a "Fixes:" tag,
fixing commit: 2a98dc028f91 include/linux/bitmap.h: turn bitmap_set and bitmap_clear into memset when possible.

The bot has also determined it's probably a bug fixing patch. (score: 65.4067)

The bot has tested the following trees: v4.16, v4.15.15, v4.14.32.

v4.16: Build OK!
v4.15.15: Build OK!
v4.14.32: Build OK!

--
Thanks,
Sasha

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

end of thread, other threads:[~2018-04-06 20:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <817147544aa3ecc2b78d6cadeab713869d8805e6.1522709616.git.osandov@fb.com>
2018-04-02 23:00 ` [PATCH] bitmap: fix memset optimization on big-endian systems Omar Sandoval
2018-04-03 18:14 ` Please add 21035965f60b ("bitmap: fix memset optimization on big-endian systems") to the stable tree Omar Sandoval
2018-04-03 18:57   ` Linus Torvalds
2018-04-04  6:12     ` Greg KH
2018-04-06 20:05 ` [PATCH] bitmap: fix memset optimization on big-endian systems Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).