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>] [day] [month] [year] [list]
Date:	Mon, 7 Dec 2015 12:57:28 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Al Viro <viro@...IV.linux.org.uk>,
	Jeff Layton <jlayton@...chiereds.net>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Jeff Layton <jeff.layton@...marydata.com>,
	Christoph Hellwig <hch@....de>
Subject: linux-next: manual merge of the vfs tree with the file-locks tree

Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  include/linux/fs.h

between commit:

  9e8925b67a80 ("locks: Allow disabling mandatory locking at compile time")

from the file-locks tree and commit:

  9e48b0c90a29 ("locks: new locks_mandatory_area calling convention")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

diff --cc include/linux/fs.h
index cbf08d5c246e,59bf96d82d1d..000000000000
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@@ -2027,12 -2035,9 +2035,9 @@@ extern struct kobject *fs_kobj
  
  #define MAX_RW_COUNT (INT_MAX & PAGE_CACHE_MASK)
  
- #define FLOCK_VERIFY_READ  1
- #define FLOCK_VERIFY_WRITE 2
- 
 -#ifdef CONFIG_FILE_LOCKING
 +#ifdef CONFIG_MANDATORY_FILE_LOCKING
  extern int locks_mandatory_locked(struct file *);
- extern int locks_mandatory_area(int, struct inode *, struct file *, loff_t, size_t);
+ extern int locks_mandatory_area(struct file *, loff_t, loff_t, unsigned char);
  
  /*
   * Candidates for mandatory locking have the setgid bit set
@@@ -2065,55 -2070,18 +2070,56 @@@ static inline int locks_verify_truncate
  				    struct file *filp,
  				    loff_t size)
  {
- 	if (inode->i_flctx && mandatory_lock(inode))
- 		return locks_mandatory_area(
- 			FLOCK_VERIFY_WRITE, inode, filp,
- 			size < inode->i_size ? size : inode->i_size,
- 			(size < inode->i_size ? inode->i_size - size
- 			 : size - inode->i_size)
- 		);
- 	return 0;
+ 	if (!inode->i_flctx || !mandatory_lock(inode))
+ 		return 0;
+ 
+ 	if (size < inode->i_size) {
+ 		return locks_mandatory_area(filp, size, inode->i_size - 1,
+ 				F_WRLCK);
+ 	} else {
+ 		return locks_mandatory_area(filp, inode->i_size, size - 1,
+ 				F_WRLCK);
+ 	}
  }
  
 +#else /* !CONFIG_MANDATORY_FILE_LOCKING */
 +
 +static inline int locks_mandatory_locked(struct file *file)
 +{
 +	return 0;
 +}
 +
- static inline int locks_mandatory_area(int rw, struct inode *inode,
- 				       struct file *filp, loff_t offset,
- 				       size_t count)
++static inline int locks_mandatory_area(struct file *filp, loff_t start,
++		loff_t end, unsigned char type)
 +{
 +	return 0;
 +}
 +
 +static inline int __mandatory_lock(struct inode *inode)
 +{
 +	return 0;
 +}
 +
 +static inline int mandatory_lock(struct inode *inode)
 +{
 +	return 0;
 +}
 +
 +static inline int locks_verify_locked(struct file *file)
 +{
 +	return 0;
 +}
 +
 +static inline int locks_verify_truncate(struct inode *inode, struct file *filp,
 +					size_t size)
 +{
 +	return 0;
 +}
 +
 +#endif /* CONFIG_MANDATORY_FILE_LOCKING */
 +
 +
 +#ifdef CONFIG_FILE_LOCKING
  static inline int break_lease(struct inode *inode, unsigned int mode)
  {
  	/*
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ