Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9399634rwd; Wed, 21 Jun 2023 07:03:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7NguPFnZ1mHMEWdMewMrJ8/VpILRU1afT7pIdOFXS8wUAkZLM1yv1GYC2o3Rt+GIAq5KV6 X-Received: by 2002:a92:d4ca:0:b0:33b:f0a0:8dea with SMTP id o10-20020a92d4ca000000b0033bf0a08deamr6943976ilm.26.1687356223507; Wed, 21 Jun 2023 07:03:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687356223; cv=none; d=google.com; s=arc-20160816; b=OFeNXEwJ1q3XIA6SZIPGOv3XAkQVk5gknSZ7qj4lr7memtcd97XNYAqHNp96Eu3KsU rrcT6Pc07FIgh9vT0fVk8TwyOKzrzMGpZcqSFAJ2G7nRBKzchKKhgn/lsTVueJ/c0pVj 0oz9hO/rpPc5G31s4cS/A4q1mwN2BaZiWqMomfYWCncDITFHs7kvPTdyKg4YRy3CFxql n17dy2IPNT8fzo4yERjpY6WQGzlY0UGbNWhjiAVjCvsHAQr+LA0tawcrG06nr2tRmkdz fPkROGHsHG/oTCJBYjYVI0YABvAjMh1wqY6OpdS5edteB4v2mkPBDTStJv5SXMBi1dAD 3SNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=6sclYJf1MAP3WnxzFZYb6FFsPPNwboLlQ7OHjVpEDGM=; b=o1kJUjjXIlvDV9N3RtBlxR/O9z4ZIHPQicysicxmdf3hwjqrUuVkjc7D4/tfuLDriO gOk8hIrMCumkWBPzt/qxMKaoBE1Qh0C7YkvIj40EIR6Z6t8SOua1iTWjqmKoV75zjX/O WJObViXNIs1+bxMUgQ1ZRmzibXHCrzoMuZyN47+p9qQQwZUhWFubxVrlvlPdMaNKmcJ/ wMS/229x32SSLGP7esKKe1wnjTxxOpMph+KhtiW0Uqv2PSLjO+swJAF79BKej6QbKbMG 2dodsuN1qHDndTXXN3oigSE5IFbccqvQU6lQ4VnD5rb+LJ5mNqfCSh/RCbIHKMOKlVV/ NFKw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t16-20020a92c910000000b003427852828bsi1713613ilp.181.2023.06.21.07.03.28; Wed, 21 Jun 2023 07:03:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232592AbjFUNna (ORCPT + 99 others); Wed, 21 Jun 2023 09:43:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229920AbjFUNn2 (ORCPT ); Wed, 21 Jun 2023 09:43:28 -0400 Received: from mail.hallyn.com (mail.hallyn.com [178.63.66.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B496E19C; Wed, 21 Jun 2023 06:43:26 -0700 (PDT) Received: from jerom (99-112-204-245.lightspeed.hstntx.sbcglobal.net [99.112.204.245]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: serge) by mail.hallyn.com (Postfix) with ESMTPSA id 0AF18B66; Wed, 21 Jun 2023 08:43:23 -0500 (CDT) Date: Wed, 21 Jun 2023 08:43:21 -0500 From: Serge Hallyn To: Paul Moore Cc: Ben Dooks , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] capabilities: fix sparse warning about __user access Message-ID: References: <20230619123535.324632-1-ben.dooks@codethink.co.uk> <20230619175710.GA200481@mail.hallyn.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Mon, Jun 19, 2023 at 05:47:54PM -0400, Paul Moore wrote: > On Mon, Jun 19, 2023 at 1:57 PM Serge E. Hallyn wrote: > > > > On Mon, Jun 19, 2023 at 01:35:35PM +0100, Ben Dooks wrote: > > > The two syscalls for capget and capset are producing sparse warnings > > > as sparse is thinking that the "struct __user_cap_data_struct" is marked > > > user, which seems to be down to the declaration and typedef at the same > > > time. > > > > > > Fix the following warnings by splutting the struct declaration and then > > > the user typedef into two: > > > > I'm not a fan of making code changes to work around scanners' > > shortcomings, mainly because eventually I assume the scanners > > will learn to deal with it. > > > > However, I don't like the all-in-one typedef+struct definition > > either, so let's go with it :) > > > > Paul, do you mind picking this up? > > Sure, no problem. Since we are at -rc7, I'm assuming this can wait > until after the merge window? Yeah, it's just fixing a sparse warning, no urgency. thanks, -serge