All of lore.kernel.org
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: ralf@linux-mips.org, bomb.zhang@gmail.com,
	gregkh@linuxfoundation.org, james.hogan@imgtec.com
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "MIPS: Fix special case in 64 bit IP checksumming." has been added to the 4.10-stable tree
Date: Wed, 08 Mar 2017 07:59:09 +0100	[thread overview]
Message-ID: <14889563496692@kroah.com> (raw)


This is a note to let you know that I've just added the patch titled

    MIPS: Fix special case in 64 bit IP checksumming.

to the 4.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mips-fix-special-case-in-64-bit-ip-checksumming.patch
and it can be found in the queue-4.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 66fd848cadaa6be974a8c780fbeb328f0af4d3bd Mon Sep 17 00:00:00 2001
From: Ralf Baechle <ralf@linux-mips.org>
Date: Thu, 26 Jan 2017 02:16:47 +0100
Subject: MIPS: Fix special case in 64 bit IP checksumming.

From: Ralf Baechle <ralf@linux-mips.org>

commit 66fd848cadaa6be974a8c780fbeb328f0af4d3bd upstream.

For certain arguments such as saddr = 0xc0a8fd60, daddr = 0xc0a8fda1,
len = 80, proto = 17, sum = 0x7eae049d there will be a carry when
folding the intermediate 64 bit checksum to 32 bit but the code doesn't
add the carry back to the one's complement sum, thus an incorrect result
will be generated.

Reported-by: Mark Zhang <bomb.zhang@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/mips/include/asm/checksum.h |    2 ++
 1 file changed, 2 insertions(+)

--- a/arch/mips/include/asm/checksum.h
+++ b/arch/mips/include/asm/checksum.h
@@ -186,7 +186,9 @@ static inline __wsum csum_tcpudp_nofold(
 	"	daddu	%0, %4		\n"
 	"	dsll32	$1, %0, 0	\n"
 	"	daddu	%0, $1		\n"
+	"	sltu	$1, %0, $1	\n"
 	"	dsra32	%0, %0, 0	\n"
+	"	addu	%0, $1		\n"
 #endif
 	"	.set	pop"
 	: "=r" (sum)


Patches currently in stable-queue which might be from ralf@linux-mips.org are

queue-4.10/mips-calculate-micromips-ra-properly-when-unwinding-the-stack.patch
queue-4.10/mips-fix-get_frame_info-handling-of-micromips-function-size.patch
queue-4.10/mips-handle-micromips-jumps-in-the-same-way-as-mips32-mips64-jumps.patch
queue-4.10/mips-fix-is_jump_ins-handling-of-16b-micromips-instructions.patch
queue-4.10/mips-clear-isa-bit-correctly-in-get_frame_info.patch
queue-4.10/mips-fix-special-case-in-64-bit-ip-checksumming.patch
queue-4.10/mips-pic32mzda-fix-linker-error-for-pic32_get_pbclk.patch
queue-4.10/mips-octeon-fix-copy_from_user-fault-handling-for-large-buffers.patch
queue-4.10/mips-prevent-unaligned-accesses-during-stack-unwinding.patch

                 reply	other threads:[~2017-03-08  7:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=14889563496692@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=bomb.zhang@gmail.com \
    --cc=james.hogan@imgtec.com \
    --cc=ralf@linux-mips.org \
    --cc=stable-commits@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /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.