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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8FBD2C433F5 for ; Thu, 21 Apr 2022 19:51:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0F48B6B0072; Thu, 21 Apr 2022 15:51:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0A2CB6B0073; Thu, 21 Apr 2022 15:51:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E85546B0074; Thu, 21 Apr 2022 15:51:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id D834D6B0072 for ; Thu, 21 Apr 2022 15:51:09 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 9FE0927896 for ; Thu, 21 Apr 2022 19:51:09 +0000 (UTC) X-FDA: 79381929858.16.5B96D10 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf25.hostedemail.com (Postfix) with ESMTP id C5A32A0029 for ; Thu, 21 Apr 2022 19:51:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650570668; 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=4tqotywGt/DqKd/TvFplKXKyyPIojRpgxJrO1DGfKx8=; b=ek+wmMHOH7cxY1psUsLvSVNOw/vvqy7tNM8sfSbP5xnFtJh4MqV2ibg6niINzflkp0z6qg tSz8f9gh3MVk2UitzCI5bX/N+LxDlMDdepTjXLobdxj5o4I32b8+dEX/y+AgcqVZ6YaugB 03vtXNH9DlSQP5C+xbpx5Yb5mc+6Yz0= Received: from mail-il1-f197.google.com (mail-il1-f197.google.com [209.85.166.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-46-qwk2pSzRNzeUh8YPbB7b1w-1; Thu, 21 Apr 2022 15:51:05 -0400 X-MC-Unique: qwk2pSzRNzeUh8YPbB7b1w-1 Received: by mail-il1-f197.google.com with SMTP id v11-20020a056e0213cb00b002cbcd972206so3206155ilj.11 for ; Thu, 21 Apr 2022 12:51:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=4tqotywGt/DqKd/TvFplKXKyyPIojRpgxJrO1DGfKx8=; b=3IsnpeWA9mKWZRj6Y4EpGoMNRdCTJ8JTUGOpb2dYAPzo41BP/CNWb/4uVhIvIXA09s wiabzwJtcFqE1VNPHPS5fpodwV78H2EMsNhx0CJ4neQqacm6UCgeTQP8IY81tfiVAKx/ xZidKNiYwyaJzP58yk12WfeDMmA1kjw5wd37KPuEdJBSVU8cSxTDYB6JjjH/T57+bEHK A2uDh1rtC8jM8amB8rDtxYkkZwwtCdE5iw649XseOg+zV2z/+a4HYQxUAa7UTMtyMWsy Ap/H+I1nMb5GiNoEuSB+hn2HciZWR7KXg0EjHhnQlAbbDPFV4iJKNsx4gorDaio7CPWK 84DA== X-Gm-Message-State: AOAM533vQHopPVAZDYbNtK+txOV35wiS7bBsy3UqfZSsl1gK6CJkAZ/X aEzoWcmGCviGlmK9paIgZlPlVz3ry787NZ6HdT0eNGn4z1NrQeVbXatQBvGbmhNYSVX58sevLVe VPS6NhET4FW4= X-Received: by 2002:a05:6602:2c0d:b0:60f:6ac8:ad05 with SMTP id w13-20020a0566022c0d00b0060f6ac8ad05mr551580iov.175.1650570664839; Thu, 21 Apr 2022 12:51:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+5OwKDvwGe4GZpJ57rxKRUXK84FQGkqZb+Y8Ie85Syj1kCDWCEzuUM05lH+uqT38Kafd9bQ== X-Received: by 2002:a05:6602:2c0d:b0:60f:6ac8:ad05 with SMTP id w13-20020a0566022c0d00b0060f6ac8ad05mr551576iov.175.1650570664608; Thu, 21 Apr 2022 12:51:04 -0700 (PDT) Received: from xz-m1.local (cpec09435e3e0ee-cmc09435e3e0ec.cpe.net.cable.rogers.com. [99.241.198.116]) by smtp.gmail.com with ESMTPSA id d132-20020a6bb48a000000b00654937a72ccsm8602977iof.10.2022.04.21.12.51.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 12:51:04 -0700 (PDT) Date: Thu, 21 Apr 2022 15:51:03 -0400 From: Peter Xu To: Andrew Morton Cc: kernel test robot , kbuild-all@lists.01.org, Linux Memory Management List Subject: Re: [linux-next:master 5135/5346] include/linux/hugetlb.h:411:25: error: unknown type name 'zap_flags_t'; did you mean 'vm_flags_t'? Message-ID: References: <202204211854.p1LJEBHt-lkp@intel.com> <20220421123849.ee76504ffb86254c99b2c0f8@linux-foundation.org> MIME-Version: 1.0 In-Reply-To: <20220421123849.ee76504ffb86254c99b2c0f8@linux-foundation.org> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: C5A32A0029 X-Stat-Signature: orwfun76pyia57cjtq884to78nrub1ah Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=ek+wmMHO; spf=none (imf25.hostedemail.com: domain of peterx@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-HE-Tag: 1650570665-208940 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Apr 21, 2022 at 12:38:49PM -0700, Andrew Morton wrote: > On Thu, 21 Apr 2022 18:34:32 +0800 kernel test robot wrote: > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > > head: 65eb92e4c9f0a962656f131521f4fbc0d24c9d4c > > commit: 92393159862dde44e440892eb43ca48dc8c924c3 [5135/5346] fixup! mm/hugetlb: Only drop uffd-wp special pte if required > > config: i386-randconfig-m021 (https://download.01.org/0day-ci/archive/20220421/202204211854.p1LJEBHt-lkp@intel.com/config) > > compiler: gcc-11 (Debian 11.2.0-20) 11.2.0 > > reproduce (this is a W=1 build): > > # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=92393159862dde44e440892eb43ca48dc8c924c3 > > git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git > > git fetch --no-tags linux-next master > > git checkout 92393159862dde44e440892eb43ca48dc8c924c3 > > # save the config file > > mkdir build_dir && cp config build_dir/.config > > make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/virt/nitro_enclaves/ > > > > If you fix the issue, kindly add following tag as appropriate > > Reported-by: kernel test robot > > > > All errors (new ones prefixed by >>): > > > > In file included from drivers/virt/nitro_enclaves/ne_misc_dev.c:16: > > >> include/linux/hugetlb.h:411:25: error: unknown type name 'zap_flags_t'; did you mean 'vm_flags_t'? > > Thanks. > > I could include mm.h in drivers/virt/nitro_enclaves/ne_misc_dev.c, but > hugetlb.h should be standalone and I don't know what including mm.h > from hugetlb.h will do. > > I'll test this instead: > > --- a/include/linux/hugetlb.h~mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix-fix > +++ a/include/linux/hugetlb.h > @@ -1124,4 +1124,14 @@ bool want_pmd_share(struct vm_area_struc > #define flush_hugetlb_tlb_range(vma, addr, end) flush_tlb_range(vma, addr, end) > #endif > > +typedef unsigned int __bitwise zap_flags_t; > + > +/* > + * Whether to drop the pte markers, for example, the uffd-wp information for > + * file-backed memory. This should only be specified when we will completely > + * drop the page in the mm, either by truncation or unmapping of the vma. By > + * default, the flag is not set. > + */ > +#define ZAP_FLAG_DROP_MARKER ((__force zap_flags_t) BIT(0)) > + > #endif /* _LINUX_HUGETLB_H */ > --- a/include/linux/mm.h~mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix-fix > +++ a/include/linux/mm.h > @@ -3431,14 +3431,4 @@ madvise_set_anon_name(struct mm_struct * > } > #endif > > -typedef unsigned int __bitwise zap_flags_t; > - > -/* > - * Whether to drop the pte markers, for example, the uffd-wp information for > - * file-backed memory. This should only be specified when we will completely > - * drop the page in the mm, either by truncation or unmapping of the vma. By > - * default, the flag is not set. > - */ > -#define ZAP_FLAG_DROP_MARKER ((__force zap_flags_t) BIT(0)) > - > #endif /* _LINUX_MM_H */ > _ > Andrew, It may work, but I have worry that zap_flags_t should still be a common struct for mm not hugetlb specific, let's say it's still legal some .c file wants to reference it without hugetlb knowledge? >From that POV, could we perhaps move these chunk into mm_types.h (which hugetlb.h includes anyway)? Thanks, -- Peter Xu