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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2023101614-scarce-discount-d7ff@gregkh>
Date: Mon, 16 Oct 2023 17:05:07 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: jeffxu@...omium.org
Cc: akpm@...ux-foundation.org, keescook@...omium.org, sroettger@...gle.com,
	jeffxu@...gle.com, jorgelo@...omium.org, groeck@...omium.org,
	linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
	linux-mm@...ck.org, jannh@...gle.com, surenb@...gle.com,
	alex.sierra@....com, apopple@...dia.com, aneesh.kumar@...ux.ibm.com,
	axelrasmussen@...gle.com, ben@...adent.org.uk,
	catalin.marinas@....com, david@...hat.com, dwmw@...zon.co.uk,
	ying.huang@...el.com, hughd@...gle.com, joey.gouly@....com,
	corbet@....net, wangkefeng.wang@...wei.com, Liam.Howlett@...cle.com,
	torvalds@...ux-foundation.org, lstoakes@...il.com,
	willy@...radead.org, mawupeng1@...wei.com, linmiaohe@...wei.com,
	namit@...are.com, peterx@...hat.com, peterz@...radead.org,
	ryan.roberts@....com, shr@...kernel.io, vbabka@...e.cz,
	xiujianfeng@...wei.com, yu.ma@...el.com, zhangpeng362@...wei.com,
	dave.hansen@...el.com, luto@...nel.org,
	linux-hardening@...r.kernel.org
Subject: Re: [RFC PATCH v1 1/8] Add mseal syscall

On Mon, Oct 16, 2023 at 02:38:20PM +0000, jeffxu@...omium.org wrote:
> +#ifdef CONFIG_MSEAL
> +	/*
> +	 * bit masks for seal.
> +	 * need this since vm_flags is full.
> +	 */
> +	unsigned long vm_seals;		/* seal flags, see mm.h. */

"unsigned long" and yet:

> diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
> index c0cb22cd607d..f574c7dbee76 100644
> --- a/include/linux/syscalls.h
> +++ b/include/linux/syscalls.h
> @@ -802,6 +802,8 @@ asmlinkage long sys_process_mrelease(int pidfd, unsigned int flags);
>  asmlinkage long sys_remap_file_pages(unsigned long start, unsigned long size,
>  			unsigned long prot, unsigned long pgoff,
>  			unsigned long flags);
> +asmlinkage long sys_mseal(unsigned long start, size_t len, unsigned int types,
> +			  unsigned int flags);

"unsigned int"?

Why the mis-match?

> --- a/include/uapi/linux/mman.h
> +++ b/include/uapi/linux/mman.h
> @@ -55,4 +55,10 @@ struct cachestat {
>  	__u64 nr_recently_evicted;
>  };
>  
> +#define MM_SEAL_MSEAL		0x1
> +#define MM_SEAL_MPROTECT	0x2
> +#define MM_SEAL_MUNMAP		0x4
> +#define MM_SEAL_MMAP		0x8
> +#define MM_SEAL_MREMAP		0x10

I think we can use the BIT() macro in uapi .h files now, it is _BITUL().
Might want to use it here too to make it obvious what is happening.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ