Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp654645iob; Wed, 4 May 2022 05:25:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLp7jp2ZgqrpZoM+GX1Y6lMLFkYimrS5jlZLlfLmaouuevUN6R+Uf55iSH0Fw6Sxy01KfT X-Received: by 2002:a17:902:e88c:b0:15e:bfbc:1a3d with SMTP id w12-20020a170902e88c00b0015ebfbc1a3dmr5241906plg.17.1651667158321; Wed, 04 May 2022 05:25:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651667158; cv=none; d=google.com; s=arc-20160816; b=EAAGekWrMiodCS9yQrAYaEaUBam/fRQXvRfE9xoZEZe/hLNBhk9SfpWvsXjxw1siNF OL3VbjZ5+YlTrxuuyX8V7oG/tBHtR4SujJPkDRly+lDY4TkaUqVLEZzprLJeyloNjuDg q+BwcdRRo4htQtVgZtRYZFjaptb48IVBboLLzak47YOrEQ4ujqFFURVKTq2WZoHNtOWC llSN6N/szkMDF1vYOHvQcvUrxO1bdhARnSlp1yIYkvyBr1axgAofoUuEl8UIRm43YBAV oea3v5M89J6r8N5c1Q4FoDkBKNYnVeZN02VnDFlgM40lcuFVI2+offNgXyFdp8u3lVhC HsSQ== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=rOtTfklybxzZCSEMsPzUimB8kRcfo61buiS4NtgbKGM=; b=YVl+mUYywe7xmAUGmsDniuKEP1rlQaUA0R9zKVDFia8zpUyxsfvaV8F8U/4H9JNsXC NookVu/H4Yl5ndadUIc2fGWn3Hk6XH4Qw9wZy1g7yrNrBEtK2GURrPaIkmvWA5FoTLw+ CCzYav5xC3WwBvS3GrIiYJt46pxbCxn9qcNzD2hmUcw8/3EYkLpc81Emo5vU+JLVVN2F 0FgWZ9EwI1ywhnMiV+rBjvovAn+GlaNDt3+2+Fi0UIzA0Gf277Om8ADzPnvp7EHYhyi4 MBLTcJFcPuOgTKpLSeMZalo1ABRYMmxhb7hZC77e7BY8Zf6t4z9hnChpss5ycq5G5IDM e/zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="SYG/P+vC"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kk9-20020a17090b4a0900b001da48da4de3si5544931pjb.102.2022.05.04.05.25.42; Wed, 04 May 2022 05:25:58 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="SYG/P+vC"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242643AbiECVOH (ORCPT + 99 others); Tue, 3 May 2022 17:14:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235960AbiECVOD (ORCPT ); Tue, 3 May 2022 17:14:03 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 174B111165 for ; Tue, 3 May 2022 14:10:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651612229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rOtTfklybxzZCSEMsPzUimB8kRcfo61buiS4NtgbKGM=; b=SYG/P+vCtjrZ/P1ww1wKfNISZBAtW1TNJdPHvJpN9RARjCZg3EIiaBYuArDY5L5ifttRuM rzGqKMLmxM1Kx3B/eHUmPY7FrSrtKLuBpRY8f3Lj8mP/vDppmYOpaw+NR6kw3FSk6/VrQd 2E7qvL4rXBCZDFjutD8D5EC5bC/Sqeg= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-175-ZIA2uvX2Nb-hQEsTeqkgaA-1; Tue, 03 May 2022 17:10:18 -0400 X-MC-Unique: ZIA2uvX2Nb-hQEsTeqkgaA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 613271C05EAB; Tue, 3 May 2022 21:07:42 +0000 (UTC) Received: from madcap2.tricolour.ca (unknown [10.22.48.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 462655523FB; Tue, 3 May 2022 21:07:41 +0000 (UTC) Date: Tue, 3 May 2022 17:07:39 -0400 From: Richard Guy Briggs To: Paul Moore Cc: Linux-Audit Mailing List , LKML , linux-fsdevel@vger.kernel.org, Eric Paris , Steve Grubb , Jan Kara Subject: Re: [PATCH v2 1/3] fanotify: Ensure consistent variable type for response Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,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 2022-05-02 20:16, Paul Moore wrote: > On Thu, Apr 28, 2022 at 8:45 PM Richard Guy Briggs wrote: > > > > The user space API for the response variable is __u32. This patch makes > > sure that the whole path through the kernel uses __u32 so that there is > > no sign extension or truncation of the user space response. > > > > Suggested-by: Steve Grubb > > Link: https://lore.kernel.org/r/12617626.uLZWGnKmhe@x2 > > Signed-off-by: Richard Guy Briggs > > Link: https://lore.kernel.org/r/aa98a3ad00666a6fc0ce411755de4a1a60f5c0cd.1651174324.git.rgb@redhat.com > > --- > > fs/notify/fanotify/fanotify.h | 2 +- > > fs/notify/fanotify/fanotify_user.c | 6 +++--- > > 2 files changed, 4 insertions(+), 4 deletions(-) > > It seems like audit_fanotify()/__audit_fanotify() should also be > changed, yes? Granted, in this case it's an unsigned int to u32 > conversion so not really all that critical, but if you are going to > update the fanotify code you might as well update the audit code as > well for the sake of completeness. Yes, that was somewhere in the back of my mind but forgot to come back to it. Thanks for catching that. > paul-moore.com - RGB -- Richard Guy Briggs Sr. S/W Engineer, Kernel Security, Base Operating Systems Remote, Ottawa, Red Hat Canada IRC: rgb, SunRaycer Voice: +1.647.777.2635, Internal: (81) 32635