lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0e0c38e2-67ad-1f51-c44b-d3c3d505e40a@intel.com>
Date:   Tue, 4 Jan 2022 12:36:06 -0800
From:   Dave Hansen <dave.hansen@...el.com>
To:     "Kirill A. Shutemov" <kirill@...temov.name>
Cc:     Borislav Petkov <bp@...en8.de>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Tom Lendacky <thomas.lendacky@....com>, tglx@...utronix.de,
        mingo@...hat.com, luto@...nel.org, peterz@...radead.org,
        sathyanarayanan.kuppuswamy@...ux.intel.com, aarcange@...hat.com,
        ak@...ux.intel.com, dan.j.williams@...el.com, david@...hat.com,
        hpa@...or.com, jgross@...e.com, jmattson@...gle.com,
        joro@...tes.org, jpoimboe@...hat.com, knsathya@...nel.org,
        pbonzini@...hat.com, sdeep@...are.com, seanjc@...gle.com,
        tony.luck@...el.com, vkuznets@...hat.com, wanpengli@...cent.com,
        x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 19/26] x86/tdx: Make pages shared in ioremap()

On 1/4/22 11:14 AM, Kirill A. Shutemov wrote:
> I see two possible options (I hate both): leave it defined in per-arch
> <asm/pgtable.h> or move it to <linux/mm.h> next to user in
> io_remap_pfn_range().

Could we do an asm-generic/pgprot.h that was basically just:

	typedef struct { unsigned long pgprot; } pgprot_t;

That would cover probably 80% of the of the architectures.  The rest of
them could define an actual asm/pgprot.h.

It doesn't seem to be *that* much work, although it is a bit of a shame
that pgtable-types.h doesn't fix this already.  I've attached something
that compiles on s390 (representing a random non-x86 architecture) and x86.


View attachment "pgprot-generic.patch" of type "text/x-patch" (18707 bytes)

View attachment "pgprot-x86.patch" of type "text/x-patch" (1896 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ