Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp767898pxb; Tue, 12 Apr 2022 12:57:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5Gq+D/XWuCFuzDq2/PSqQo7JWMfmQTGMoHuXFlqtBCXPNdGrLxI7c2Cd59CpU4PLbp5xR X-Received: by 2002:a17:90a:488c:b0:1c7:b62e:8e8c with SMTP id b12-20020a17090a488c00b001c7b62e8e8cmr6770253pjh.157.1649793457719; Tue, 12 Apr 2022 12:57:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649793457; cv=none; d=google.com; s=arc-20160816; b=kMt2Z2imUtB7VF+YozbczyaPPE/nmt8yQPv2F9LyBnAmPolGGHz0uoWWAFtfopfqAG ZND0tnoBRfXsHe4qOy+8nLrpDce0g02EY94tn5EnDbQfvgOFTolKYpbCXJApGqsHGnR+ vlJ+xpPVTTr2kJmcYrO2BZ1W+ccUKcfUXCvBfhjLFJ/95UGic1RtIhdiEbxqVdg6MnXO Uoja6+9PZA6TOk8zZhe10Uy6eHqcCP0VjBBy6I0UwBOEBoios+dpOA5GqkHncSf0+nJy yZ7YahdsjseKCwI0C7wvsz3nQ3A5t7DLNIL4aTWvv4Lh2ZXqpo5NvF+urQeT8D+niFWx KY9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=aieyOoQjElV+1yHY4ofNprLGHOfx4cTB9R/S9Mt9YWM=; b=FcjxRCLLH8S/eAUAu2IxdPCTWAqUTHF5npHXwK8ZSjq+pCpwuRnSOC5Y/P2n3X1OaE FnyrwyJ4vX8LUZTPZVvWY5lPgZuYg8CzOWLZGEuPmnzGbfi7hPdFns+4iyjhRTcilSzL SDyjpKUSvY2g0534drYL3q+ZB9/15fEoqsZfBYU6YHjGxxT5oeXNEB4vz14d9u2LKn5U Pf3djQ5oHBvP4d66dumU1ZRFZrUfS4nSfKGB+LXFR8yzNc5TgkO4sil0RZd834RR6neC Xa9qh5NAkAn3czqC0WoFk9gasfS38NYurfN5AasfKgJcpD/k9xfIOtUBfYJcEmA1juWD C5KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=kTPBHuGj; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fb.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id l10-20020a170903120a00b00154a3b5d927si13430230plh.512.2022.04.12.12.57.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 12:57:37 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=kTPBHuGj; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fb.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CBB7071A3A; Tue, 12 Apr 2022 12:50:57 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357603AbiDLQdq (ORCPT + 99 others); Tue, 12 Apr 2022 12:33:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357683AbiDLQd2 (ORCPT ); Tue, 12 Apr 2022 12:33:28 -0400 Received: from mx0b-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DFFC5DE71 for ; Tue, 12 Apr 2022 09:30:59 -0700 (PDT) Received: from pps.filterd (m0109332.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 23C9IF5w029511 for ; Tue, 12 Apr 2022 09:30:58 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=facebook; bh=aieyOoQjElV+1yHY4ofNprLGHOfx4cTB9R/S9Mt9YWM=; b=kTPBHuGjkQ4l/Mu81WgtVpG7SpzFExkrcLl3/kEHKJ3zoowyFxr5Z0Kk4RAuF633tzQX EwzalpGbfkqbjBm8Vr6sLrslNLpntewyDuDE90dJoc/atgDT45snWZIUU/OpzbxHVSHS y4v9IvWA/GDlicg45DdLMpJ1GnT2x83Esrk= Received: from maileast.thefacebook.com ([163.114.130.16]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3fd6p3t9x3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 12 Apr 2022 09:30:58 -0700 Received: from twshared41237.03.ash8.facebook.com (2620:10d:c0a8:1b::d) by mail.thefacebook.com (2620:10d:c0a8:82::c) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Tue, 12 Apr 2022 09:30:57 -0700 Received: by devbig039.lla1.facebook.com (Postfix, from userid 572232) id 16E457456060; Tue, 12 Apr 2022 09:30:47 -0700 (PDT) From: Dylan Yudaken To: CC: , , , , Dylan Yudaken Subject: [PATCH 0/4] io_uring: verify that reserved fields are 0 Date: Tue, 12 Apr 2022 09:30:38 -0700 Message-ID: <20220412163042.2788062-1-dylany@fb.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-FB-Internal: Safe Content-Type: text/plain X-Proofpoint-ORIG-GUID: GH5SC7BSaBPZ5qrzy3r0fBuT0hagiLFK X-Proofpoint-GUID: GH5SC7BSaBPZ5qrzy3r0fBuT0hagiLFK X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-12_06,2022-04-12_02,2022-02-23_01 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A few reserved fields are not verified to be 0. In preparation for possib= ly using these fields later we should verify that they are passed as 0. One extra field I do not have confidence in verifying is up.nr in io_regi= ster_files_update(). Should this also be checked to be zero? Patch 1 in this series just moves a validation out of __io_register_rsrc_= update as it was duplicated Patch 2-4 add verifications for reserved fields Dylan Yudaken (4): io_uring: move io_uring_rsrc_update2 validation io_uring: verify that resv2 is 0 in io_uring_rsrc_update2 io_uring: verify resv is 0 in ringfd register/unregister io_uring: verify pad field is 0 in io_get_ext_arg fs/io_uring.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) base-commit: 0f8da75b51ac863b9435368bd50691718cc454b0 --=20 2.30.2