From patchwork Tue Jun 22 20:31:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seth Forshee X-Patchwork-Id: 1495850 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4G8dNM53vMz9sVp; Wed, 23 Jun 2021 06:31:47 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lvn3f-0003s6-6A; Tue, 22 Jun 2021 20:31:43 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lvn3d-0003rS-AV for kernel-team@lists.ubuntu.com; Tue, 22 Jun 2021 20:31:41 +0000 Received: from mail-qt1-f198.google.com ([209.85.160.198]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lvn3d-0005iB-20 for kernel-team@lists.ubuntu.com; Tue, 22 Jun 2021 20:31:41 +0000 Received: by mail-qt1-f198.google.com with SMTP id d7-20020ac811870000b02901e65f85117bso428530qtj.18 for ; Tue, 22 Jun 2021 13:31:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=Xp0T2aOccuuKMjmbEop2l1LEGRcQPUpK86hp0b8q0QA=; b=DGmOYf8gE88ShITJF1I7mduDZVuMyWVnv4DpHaLNhTDaApEa1VsREtmRbid9g/7peW AakITLfuw4o+Hl7ZLuv2GtY13RKHO1zVnQ56TTsgqkOrx6/0nYEsqyrwn4HdFEA4+gJ7 9hqEzakaLWTYQiQyWN5bjrI+g+65OeVR2uNg3ScjjTFTU9Q2PFEdv5UVxX/DjVzIC4Ni M2YSaWQsJYtbixAt3VdF04nnn3kcQqmRlbICMh2Sw3hgLt0BIS6mA+hryhD8FXIJOOYr K7Aj49YcFXOCchVhpK1jb5BofZjuJryM3wHO5pUExFTUi1HBDluuIqsdAl9MF37yLFJ1 p+Yg== X-Gm-Message-State: AOAM532Sskrj+sZ/Mk8andeCWDV436Q4ZY+0eP8wRGyyyYLXAHOa+8Q7 Hq+tbXixIGLuFtzmkAsolcJ50GXpiZyYPyMJXOCYthjxzBe1qYRMlt4oBUclqBeGriGw34757H2 BVi0JqYJ1eTz3N/sLn+HH/6YcshyDyaxARYGjZpE6eQ== X-Received: by 2002:ac8:75c3:: with SMTP id z3mr582379qtq.308.1624393900238; Tue, 22 Jun 2021 13:31:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1048WT/2KNAL2K9K4bO5P+VLENIntesKZPeLGeCKkEf4ux4/KB1dM/y77AlRWnuOfoeJrYg== X-Received: by 2002:ac8:75c3:: with SMTP id z3mr582355qtq.308.1624393899901; Tue, 22 Jun 2021 13:31:39 -0700 (PDT) Received: from localhost ([2600:1000:be0c:1c1a:e340:9c62:c2d7:98ef]) by smtp.gmail.com with ESMTPSA id w2sm13230439qkf.88.2021.06.22.13.31.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Jun 2021 13:31:38 -0700 (PDT) From: Seth Forshee To: kernel-team@lists.ubuntu.com Subject: [SRU][H][PATCH 0/1] Fix net kselftest tls.bidir test case failure Date: Tue, 22 Jun 2021 15:31:36 -0500 Message-Id: <20210622203137.303677-1-seth.forshee@canonical.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1933268 [Impact] The tls bidir test from the network kselftests fails with the ChaCha cipher: # RUN tls.12_chacha.bidir ... # tls.c:845:bidir:Expected ret (-1) == 0 (0) # bidir: Test terminated by assertion # FAIL tls.12_chacha.bidir This is a problem with the test. The test fixture setup configures tls in one direction on the test socket pair according to the cipher being tested. The test case configures tls in the other direction, however it always configures for GCM regardless of the cipher being tested. When the test cipher is ChaCha the setsockopt() calls fail as the cipher is required to be the same in both directions. [Test Plan] Run the tls test from the net kselftests and confirm that the bidir test now passes when the test cipher is ChaCha. [Where problems could occur] This is a fix for a test case and should have no user impact. A serious problem in the test case might cause passing test cases to fail or prevent subsequent test cases from running. Any such issues should be caught during testing in -proposed before releasing kernels to users. Thanks, Seth Acked-by: Andrea Righi --- Jakub Kicinski (1): UBUNTU: SAUCE: selftests: tls: fix chacha+bidir tests tools/testing/selftests/net/tls.c | 67 ++++++++++++++++++------------- 1 file changed, 39 insertions(+), 28 deletions(-)