From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDAA8C43387 for ; Wed, 9 Jan 2019 16:28:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BE7AC2054F for ; Wed, 9 Jan 2019 16:28:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725775AbfAIQ2u (ORCPT ); Wed, 9 Jan 2019 11:28:50 -0500 Received: from imap1.codethink.co.uk ([176.9.8.82]:36599 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725468AbfAIQ2u (ORCPT ); Wed, 9 Jan 2019 11:28:50 -0500 Received: from office.codethink.co.uk ([148.252.241.226] helo=xylophone) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1ghGil-0006Ur-JD; Wed, 09 Jan 2019 16:28:47 +0000 Message-ID: <1547051327.3229.3.camel@codethink.co.uk> Subject: Re: [PATCH 4.9] libceph: fix CEPH_FEATURE_CEPHX_V2 check in calc_signature() From: Ben Hutchings To: Ilya Dryomov , Greg Kroah-Hartman Cc: stable@vger.kernel.org Date: Wed, 09 Jan 2019 16:28:47 +0000 In-Reply-To: <20190109141709.4921-1-idryomov@gmail.com> References: <20190109141709.4921-1-idryomov@gmail.com> Organization: Codethink Ltd. Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Wed, 2019-01-09 at 15:17 +0100, Ilya Dryomov wrote: > Upstream commit cc255c76c70f ("libceph: implement CEPHX_V2 calculation > mode") was adjusted incorrectly: CEPH_FEATURE_CEPHX_V2 if condition got > inverted, thus breaking 4.9.144 and later kernels for all setups that > use cephx. Whoa, sorry about that. Ben. > Cc: Ben Hutchings > Signed-off-by: Ilya Dryomov > --- >  net/ceph/auth_x.c | 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/ceph/auth_x.c b/net/ceph/auth_x.c > index 29e23b5cb2ed..a4896e4a1c9a 100644 > --- a/net/ceph/auth_x.c > +++ b/net/ceph/auth_x.c > @@ -804,7 +804,7 @@ static int calc_signature(struct ceph_x_authorizer *au, struct ceph_msg *msg, >   void *enc_buf = au->enc_buf; >   int ret; >   > - if (msg->con->peer_features & CEPH_FEATURE_CEPHX_V2) { > + if (!(msg->con->peer_features & CEPH_FEATURE_CEPHX_V2)) { >   struct { >   __le32 len; >   __le32 header_crc; -- Ben Hutchings, Software Developer   Codethink Ltd https://www.codethink.co.uk/ Dale House, 35 Dale Street Manchester, M1 2HF, United Kingdom