linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the rust tree with the char-misc tree
@ 2022-05-16  7:13 Stephen Rothwell
  2022-05-16  7:49 ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Stephen Rothwell @ 2022-05-16  7:13 UTC (permalink / raw)
  To: Miguel Ojeda, Greg KH, Arnd Bergmann
  Cc: Alex Gaynor, Carlos Llamas, Finn Behrens, Gary Guo,
	Greg Kroah-Hartman, Linux Kernel Mailing List,
	Linux Next Mailing List, Miguel Ojeda, Sven Van Asbroeck,
	Wayne Campbell, Wedson Almeida Filho

[-- Attachment #1: Type: text/plain, Size: 3544 bytes --]

Hi all,

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

  include/uapi/linux/android/binder.h

between commit:

  bd32889e841c ("binder: add BINDER_GET_EXTENDED_ERROR ioctl")

from the char-misc tree and commit:

  d637f9ec1954 ("[RFC] drivers: android: Binder IPC in Rust")

from the rust tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc include/uapi/linux/android/binder.h
index e6ee8cae303b,a982c30dbbf5..000000000000
--- a/include/uapi/linux/android/binder.h
+++ b/include/uapi/linux/android/binder.h
@@@ -236,35 -236,21 +236,37 @@@ struct binder_frozen_status_info 
  	__u32            async_recv;
  };
  
 +/* struct binder_extened_error - extended error information
 + * @id:		identifier for the failed operation
 + * @command:	command as defined by binder_driver_return_protocol
 + * @param:	parameter holding a negative errno value
 + *
 + * Used with BINDER_GET_EXTENDED_ERROR. This extends the error information
 + * returned by the driver upon a failed operation. Userspace can pull this
 + * data to properly handle specific error scenarios.
 + */
 +struct binder_extended_error {
 +	__u32	id;
 +	__u32	command;
 +	__s32	param;
 +};
 +
- #define BINDER_WRITE_READ		_IOWR('b', 1, struct binder_write_read)
- #define BINDER_SET_IDLE_TIMEOUT		_IOW('b', 3, __s64)
- #define BINDER_SET_MAX_THREADS		_IOW('b', 5, __u32)
- #define BINDER_SET_IDLE_PRIORITY	_IOW('b', 6, __s32)
- #define BINDER_SET_CONTEXT_MGR		_IOW('b', 7, __s32)
- #define BINDER_THREAD_EXIT		_IOW('b', 8, __s32)
- #define BINDER_VERSION			_IOWR('b', 9, struct binder_version)
- #define BINDER_GET_NODE_DEBUG_INFO	_IOWR('b', 11, struct binder_node_debug_info)
- #define BINDER_GET_NODE_INFO_FOR_REF	_IOWR('b', 12, struct binder_node_info_for_ref)
- #define BINDER_SET_CONTEXT_MGR_EXT	_IOW('b', 13, struct flat_binder_object)
- #define BINDER_FREEZE			_IOW('b', 14, struct binder_freeze_info)
- #define BINDER_GET_FROZEN_INFO		_IOWR('b', 15, struct binder_frozen_status_info)
- #define BINDER_ENABLE_ONEWAY_SPAM_DETECTION	_IOW('b', 16, __u32)
- #define BINDER_GET_EXTENDED_ERROR	_IOWR('b', 17, struct binder_extended_error)
+ enum {
+ 	BINDER_WRITE_READ		= _IOWR('b', 1, struct binder_write_read),
+ 	BINDER_SET_IDLE_TIMEOUT		= _IOW('b', 3, __s64),
+ 	BINDER_SET_MAX_THREADS		= _IOW('b', 5, __u32),
+ 	BINDER_SET_IDLE_PRIORITY	= _IOW('b', 6, __s32),
+ 	BINDER_SET_CONTEXT_MGR		= _IOW('b', 7, __s32),
+ 	BINDER_THREAD_EXIT		= _IOW('b', 8, __s32),
+ 	BINDER_VERSION			= _IOWR('b', 9, struct binder_version),
+ 	BINDER_GET_NODE_DEBUG_INFO	= _IOWR('b', 11, struct binder_node_debug_info),
+ 	BINDER_GET_NODE_INFO_FOR_REF	= _IOWR('b', 12, struct binder_node_info_for_ref),
+ 	BINDER_SET_CONTEXT_MGR_EXT	= _IOW('b', 13, struct flat_binder_object),
+ 	BINDER_FREEZE			= _IOW('b', 14, struct binder_freeze_info),
+ 	BINDER_GET_FROZEN_INFO		= _IOWR('b', 15, struct binder_frozen_status_info),
+ 	BINDER_ENABLE_ONEWAY_SPAM_DETECTION	= _IOW('b', 16, __u32),
++	BINDER_GET_EXTENDED_ERROR	= _IOWR('b', 17, struct binder_extended_error),
+ };
  
  /*
   * NOTE: Two special error codes you should check for when calling

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: linux-next: manual merge of the rust tree with the char-misc tree
  2022-05-16  7:13 linux-next: manual merge of the rust tree with the char-misc tree Stephen Rothwell
@ 2022-05-16  7:49 ` Greg KH
  2022-05-16  8:18   ` Miguel Ojeda
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2022-05-16  7:49 UTC (permalink / raw)
  To: Miguel Ojeda, Arnd Bergmann, Alex Gaynor, Carlos Llamas,
	Finn Behrens, Gary Guo, Linux Kernel Mailing List,
	Linux Next Mailing List, Miguel Ojeda, Sven Van Asbroeck,
	Wayne Campbell, Wedson Almeida Filho
  Cc: Stephen Rothwell

On Mon, May 16, 2022 at 05:13:29PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the rust tree got a conflict in:
> 
>   include/uapi/linux/android/binder.h
> 
> between commit:
> 
>   bd32889e841c ("binder: add BINDER_GET_EXTENDED_ERROR ioctl")
> 
> from the char-misc tree and commit:
> 
>   d637f9ec1954 ("[RFC] drivers: android: Binder IPC in Rust")
> 
> from the rust tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> -- 
> Cheers,
> Stephen Rothwell
> 
> diff --cc include/uapi/linux/android/binder.h
> index e6ee8cae303b,a982c30dbbf5..000000000000
> --- a/include/uapi/linux/android/binder.h
> +++ b/include/uapi/linux/android/binder.h
> @@@ -236,35 -236,21 +236,37 @@@ struct binder_frozen_status_info 
>   	__u32            async_recv;
>   };
>   
>  +/* struct binder_extened_error - extended error information
>  + * @id:		identifier for the failed operation
>  + * @command:	command as defined by binder_driver_return_protocol
>  + * @param:	parameter holding a negative errno value
>  + *
>  + * Used with BINDER_GET_EXTENDED_ERROR. This extends the error information
>  + * returned by the driver upon a failed operation. Userspace can pull this
>  + * data to properly handle specific error scenarios.
>  + */
>  +struct binder_extended_error {
>  +	__u32	id;
>  +	__u32	command;
>  +	__s32	param;
>  +};
>  +
> - #define BINDER_WRITE_READ		_IOWR('b', 1, struct binder_write_read)
> - #define BINDER_SET_IDLE_TIMEOUT		_IOW('b', 3, __s64)
> - #define BINDER_SET_MAX_THREADS		_IOW('b', 5, __u32)
> - #define BINDER_SET_IDLE_PRIORITY	_IOW('b', 6, __s32)
> - #define BINDER_SET_CONTEXT_MGR		_IOW('b', 7, __s32)
> - #define BINDER_THREAD_EXIT		_IOW('b', 8, __s32)
> - #define BINDER_VERSION			_IOWR('b', 9, struct binder_version)
> - #define BINDER_GET_NODE_DEBUG_INFO	_IOWR('b', 11, struct binder_node_debug_info)
> - #define BINDER_GET_NODE_INFO_FOR_REF	_IOWR('b', 12, struct binder_node_info_for_ref)
> - #define BINDER_SET_CONTEXT_MGR_EXT	_IOW('b', 13, struct flat_binder_object)
> - #define BINDER_FREEZE			_IOW('b', 14, struct binder_freeze_info)
> - #define BINDER_GET_FROZEN_INFO		_IOWR('b', 15, struct binder_frozen_status_info)
> - #define BINDER_ENABLE_ONEWAY_SPAM_DETECTION	_IOW('b', 16, __u32)
> - #define BINDER_GET_EXTENDED_ERROR	_IOWR('b', 17, struct binder_extended_error)
> + enum {
> + 	BINDER_WRITE_READ		= _IOWR('b', 1, struct binder_write_read),
> + 	BINDER_SET_IDLE_TIMEOUT		= _IOW('b', 3, __s64),
> + 	BINDER_SET_MAX_THREADS		= _IOW('b', 5, __u32),
> + 	BINDER_SET_IDLE_PRIORITY	= _IOW('b', 6, __s32),
> + 	BINDER_SET_CONTEXT_MGR		= _IOW('b', 7, __s32),
> + 	BINDER_THREAD_EXIT		= _IOW('b', 8, __s32),
> + 	BINDER_VERSION			= _IOWR('b', 9, struct binder_version),
> + 	BINDER_GET_NODE_DEBUG_INFO	= _IOWR('b', 11, struct binder_node_debug_info),
> + 	BINDER_GET_NODE_INFO_FOR_REF	= _IOWR('b', 12, struct binder_node_info_for_ref),
> + 	BINDER_SET_CONTEXT_MGR_EXT	= _IOW('b', 13, struct flat_binder_object),
> + 	BINDER_FREEZE			= _IOW('b', 14, struct binder_freeze_info),
> + 	BINDER_GET_FROZEN_INFO		= _IOWR('b', 15, struct binder_frozen_status_info),
> + 	BINDER_ENABLE_ONEWAY_SPAM_DETECTION	= _IOW('b', 16, __u32),
> ++	BINDER_GET_EXTENDED_ERROR	= _IOWR('b', 17, struct binder_extended_error),
> + };
>   

Odd, why does the Rust binder implementation require the IOCTL
definitions to be in an enum instead of a #define?

If that's required, I can take that type of change now to prevent merge
issues in the future.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: linux-next: manual merge of the rust tree with the char-misc tree
  2022-05-16  7:49 ` Greg KH
@ 2022-05-16  8:18   ` Miguel Ojeda
  2022-05-16  8:27     ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Miguel Ojeda @ 2022-05-16  8:18 UTC (permalink / raw)
  To: Greg KH
  Cc: Arnd Bergmann, Alex Gaynor, Carlos Llamas, Finn Behrens,
	Gary Guo, Linux Kernel Mailing List, Linux Next Mailing List,
	Miguel Ojeda, Sven Van Asbroeck, Wayne Campbell,
	Wedson Almeida Filho, Stephen Rothwell

Hi Greg,

On Mon, May 16, 2022 at 9:49 AM Greg KH <greg@kroah.com> wrote:
>
> Odd, why does the Rust binder implementation require the IOCTL
> definitions to be in an enum instead of a #define?

It is because bindgen (the tool which generates the "raw" C bindings)
only works with simple C `#define`s. Thus there are two options when
one hits something like this: either copy-paste them manually into the
Rust side (which adds maintenance), or change them into real
objects/identifiers in the C side.

There may be support in the future for expanding macros that end up in
a numeric one: https://github.com/rust-lang/rust-bindgen/issues/753.

Stephen: the resolution looks fine, thanks!

> If that's required, I can take that type of change now to prevent merge
> issues in the future.

We have two so far: this one (for the RFC Android patch) and another
small one in include/linux/spinlock.h (for the `sync` module).

So far I have put those changes in their respective patches, but if
you prefer I can send them independently too (like the prerequisite
patches).

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: linux-next: manual merge of the rust tree with the char-misc tree
  2022-05-16  8:18   ` Miguel Ojeda
@ 2022-05-16  8:27     ` Greg KH
  0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2022-05-16  8:27 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: Arnd Bergmann, Alex Gaynor, Carlos Llamas, Finn Behrens,
	Gary Guo, Linux Kernel Mailing List, Linux Next Mailing List,
	Miguel Ojeda, Sven Van Asbroeck, Wayne Campbell,
	Wedson Almeida Filho, Stephen Rothwell

On Mon, May 16, 2022 at 10:18:45AM +0200, Miguel Ojeda wrote:
> Hi Greg,
> 
> On Mon, May 16, 2022 at 9:49 AM Greg KH <greg@kroah.com> wrote:
> >
> > Odd, why does the Rust binder implementation require the IOCTL
> > definitions to be in an enum instead of a #define?
> 
> It is because bindgen (the tool which generates the "raw" C bindings)
> only works with simple C `#define`s. Thus there are two options when
> one hits something like this: either copy-paste them manually into the
> Rust side (which adds maintenance), or change them into real
> objects/identifiers in the C side.
> 
> There may be support in the future for expanding macros that end up in
> a numeric one: https://github.com/rust-lang/rust-bindgen/issues/753.
> 
> Stephen: the resolution looks fine, thanks!
> 
> > If that's required, I can take that type of change now to prevent merge
> > issues in the future.
> 
> We have two so far: this one (for the RFC Android patch) and another
> small one in include/linux/spinlock.h (for the `sync` module).
> 
> So far I have put those changes in their respective patches, but if
> you prefer I can send them independently too (like the prerequisite
> patches).

The binder one I can take now if you want to send that to me, as that
would make your development life easier.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: linux-next: manual merge of the rust tree with the char-misc tree
  2021-04-16  7:58 Stephen Rothwell
  2021-04-16  8:10 ` Greg KH
  2021-04-16  8:26 ` Stephen Rothwell
@ 2021-04-16 12:31 ` Miguel Ojeda
  2 siblings, 0 replies; 8+ messages in thread
From: Miguel Ojeda @ 2021-04-16 12:31 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Greg KH, Arnd Bergmann, Greg Kroah-Hartman, Hang Lu, Li Li,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Marco Ballesio, Miguel Ojeda, Todd Kjos, Wedson Almeida Filho

Hi Stephen,

On Fri, Apr 16, 2021 at 9:58 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> from the char-misc tree and commit:
>
>   1fed5dee5fbb ("Android: Binder IPC in Rust (WIP)")
>
> from the rust tree.

If you prefer, I can take out the binder bits from rust-next since
they will be submitted separately anyhow (i.e. they would eventually
go through the char-misc/Android tree after/if Rust support lands).

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: linux-next: manual merge of the rust tree with the char-misc tree
  2021-04-16  7:58 Stephen Rothwell
  2021-04-16  8:10 ` Greg KH
@ 2021-04-16  8:26 ` Stephen Rothwell
  2021-04-16 12:31 ` Miguel Ojeda
  2 siblings, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2021-04-16  8:26 UTC (permalink / raw)
  To: Miguel Ojeda, Greg KH, Arnd Bergmann
  Cc: Greg Kroah-Hartman, Hang Lu, Li Li, Linux Kernel Mailing List,
	Linux Next Mailing List, Marco Ballesio, Miguel Ojeda, Todd Kjos,
	Wedson Almeida Filho

[-- Attachment #1: Type: text/plain, Size: 4432 bytes --]

Hi all,

On Fri, 16 Apr 2021 17:58:06 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the rust tree got a conflict in:
> 
>   include/uapi/linux/android/binder.h
> 
> between commits:
> 
>   432ff1e91694 ("binder: BINDER_FREEZE ioctl")
>   ae28c1be1e54 ("binder: BINDER_GET_FROZEN_INFO ioctl")
>   a7dc1e6f99df ("binder: tell userspace to dump current backtrace when detected oneway spamming")
> 
> from the char-misc tree and commit:
> 
>   1fed5dee5fbb ("Android: Binder IPC in Rust (WIP)")
> 
> from the rust tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> diff --cc include/uapi/linux/android/binder.h
> index 20e435fe657a,7b13c9e9aa2f..000000000000
> --- a/include/uapi/linux/android/binder.h
> +++ b/include/uapi/linux/android/binder.h
> @@@ -217,31 -217,18 +217,33 @@@ struct binder_node_info_for_ref 
>   	__u32            reserved3;
>   };
>   
>  +struct binder_freeze_info {
>  +	__u32            pid;
>  +	__u32            enable;
>  +	__u32            timeout_ms;
>  +};
>  +
>  +struct binder_frozen_status_info {
>  +	__u32            pid;
>  +	__u32            sync_recv;
>  +	__u32            async_recv;
>  +};
>  +
> - #define BINDER_WRITE_READ		_IOWR('b', 1, struct binder_write_read)
> - #define BINDER_SET_IDLE_TIMEOUT		_IOW('b', 3, __s64)
> - #define BINDER_SET_MAX_THREADS		_IOW('b', 5, __u32)
> - #define BINDER_SET_IDLE_PRIORITY	_IOW('b', 6, __s32)
> - #define BINDER_SET_CONTEXT_MGR		_IOW('b', 7, __s32)
> - #define BINDER_THREAD_EXIT		_IOW('b', 8, __s32)
> - #define BINDER_VERSION			_IOWR('b', 9, struct binder_version)
> - #define BINDER_GET_NODE_DEBUG_INFO	_IOWR('b', 11, struct binder_node_debug_info)
> - #define BINDER_GET_NODE_INFO_FOR_REF	_IOWR('b', 12, struct binder_node_info_for_ref)
> - #define BINDER_SET_CONTEXT_MGR_EXT	_IOW('b', 13, struct flat_binder_object)
> - #define BINDER_FREEZE			_IOW('b', 14, struct binder_freeze_info)
> - #define BINDER_GET_FROZEN_INFO		_IOWR('b', 15, struct binder_frozen_status_info)
> - #define BINDER_ENABLE_ONEWAY_SPAM_DETECTION	_IOW('b', 16, __u32)
> + enum {
> + 	BINDER_WRITE_READ		= _IOWR('b', 1, struct binder_write_read),
> + 	BINDER_SET_IDLE_TIMEOUT		= _IOW('b', 3, __s64),
> + 	BINDER_SET_MAX_THREADS		= _IOW('b', 5, __u32),
> + 	BINDER_SET_IDLE_PRIORITY	= _IOW('b', 6, __s32),
> + 	BINDER_SET_CONTEXT_MGR		= _IOW('b', 7, __s32),
> + 	BINDER_THREAD_EXIT		= _IOW('b', 8, __s32),
> + 	BINDER_VERSION			= _IOWR('b', 9, struct binder_version),
> + 	BINDER_GET_NODE_DEBUG_INFO	= _IOWR('b', 11, struct binder_node_debug_info),
> + 	BINDER_GET_NODE_INFO_FOR_REF	= _IOWR('b', 12, struct binder_node_info_for_ref),
> + 	BINDER_SET_CONTEXT_MGR_EXT	= _IOW('b', 13, struct flat_binder_object),
> ++	BINDER_FREEZE			= _IOW('b', 14, struct binder_freeze_info)
> ++	BINDER_GET_FROZEN_INFO		= _IOWR('b', 15, struct binder_frozen_status_info)
> ++	BINDER_ENABLE_ONEWAY_SPAM_DETECTION	= _IOW('b', 16, __u32)
> + };
>   
>   /*
>    * NOTE: Two special error codes you should check for when calling

I also needed this patch (which I will add to my merge resolution):

diff --git a/include/uapi/linux/android/binder.h b/include/uapi/linux/android/binder.h
index 49611d7309e0..9fca291e0132 100644
--- a/include/uapi/linux/android/binder.h
+++ b/include/uapi/linux/android/binder.h
@@ -240,9 +240,9 @@ enum {
 	BINDER_GET_NODE_DEBUG_INFO	= _IOWR('b', 11, struct binder_node_debug_info),
 	BINDER_GET_NODE_INFO_FOR_REF	= _IOWR('b', 12, struct binder_node_info_for_ref),
 	BINDER_SET_CONTEXT_MGR_EXT	= _IOW('b', 13, struct flat_binder_object),
-	BINDER_FREEZE			= _IOW('b', 14, struct binder_freeze_info)
-	BINDER_GET_FROZEN_INFO		= _IOWR('b', 15, struct binder_frozen_status_info)
-	BINDER_ENABLE_ONEWAY_SPAM_DETECTION	= _IOW('b', 16, __u32)
+	BINDER_FREEZE			= _IOW('b', 14, struct binder_freeze_info),
+	BINDER_GET_FROZEN_INFO		= _IOWR('b', 15, struct binder_frozen_status_info),
+	BINDER_ENABLE_ONEWAY_SPAM_DETECTION	= _IOW('b', 16, __u32),
 };
 
 /*

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: linux-next: manual merge of the rust tree with the char-misc tree
  2021-04-16  7:58 Stephen Rothwell
@ 2021-04-16  8:10 ` Greg KH
  2021-04-16  8:26 ` Stephen Rothwell
  2021-04-16 12:31 ` Miguel Ojeda
  2 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2021-04-16  8:10 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Miguel Ojeda, Arnd Bergmann, Hang Lu, Li Li,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Marco Ballesio, Miguel Ojeda, Todd Kjos, Wedson Almeida Filho

On Fri, Apr 16, 2021 at 05:58:06PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the rust tree got a conflict in:
> 
>   include/uapi/linux/android/binder.h
> 
> between commits:
> 
>   432ff1e91694 ("binder: BINDER_FREEZE ioctl")
>   ae28c1be1e54 ("binder: BINDER_GET_FROZEN_INFO ioctl")
>   a7dc1e6f99df ("binder: tell userspace to dump current backtrace when detected oneway spamming")
> 
> from the char-misc tree and commit:
> 
>   1fed5dee5fbb ("Android: Binder IPC in Rust (WIP)")
> 
> from the rust tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.

Hah, yeah, it is going to hit this and needs to be fixed up in the rust
code.  If they really want this as an enum, we can talk about it :)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

* linux-next: manual merge of the rust tree with the char-misc tree
@ 2021-04-16  7:58 Stephen Rothwell
  2021-04-16  8:10 ` Greg KH
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Stephen Rothwell @ 2021-04-16  7:58 UTC (permalink / raw)
  To: Miguel Ojeda, Greg KH, Arnd Bergmann
  Cc: Greg Kroah-Hartman, Hang Lu, Li Li, Linux Kernel Mailing List,
	Linux Next Mailing List, Marco Ballesio, Miguel Ojeda, Todd Kjos,
	Wedson Almeida Filho

[-- Attachment #1: Type: text/plain, Size: 3226 bytes --]

Hi all,

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

  include/uapi/linux/android/binder.h

between commits:

  432ff1e91694 ("binder: BINDER_FREEZE ioctl")
  ae28c1be1e54 ("binder: BINDER_GET_FROZEN_INFO ioctl")
  a7dc1e6f99df ("binder: tell userspace to dump current backtrace when detected oneway spamming")

from the char-misc tree and commit:

  1fed5dee5fbb ("Android: Binder IPC in Rust (WIP)")

from the rust tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc include/uapi/linux/android/binder.h
index 20e435fe657a,7b13c9e9aa2f..000000000000
--- a/include/uapi/linux/android/binder.h
+++ b/include/uapi/linux/android/binder.h
@@@ -217,31 -217,18 +217,33 @@@ struct binder_node_info_for_ref 
  	__u32            reserved3;
  };
  
 +struct binder_freeze_info {
 +	__u32            pid;
 +	__u32            enable;
 +	__u32            timeout_ms;
 +};
 +
 +struct binder_frozen_status_info {
 +	__u32            pid;
 +	__u32            sync_recv;
 +	__u32            async_recv;
 +};
 +
- #define BINDER_WRITE_READ		_IOWR('b', 1, struct binder_write_read)
- #define BINDER_SET_IDLE_TIMEOUT		_IOW('b', 3, __s64)
- #define BINDER_SET_MAX_THREADS		_IOW('b', 5, __u32)
- #define BINDER_SET_IDLE_PRIORITY	_IOW('b', 6, __s32)
- #define BINDER_SET_CONTEXT_MGR		_IOW('b', 7, __s32)
- #define BINDER_THREAD_EXIT		_IOW('b', 8, __s32)
- #define BINDER_VERSION			_IOWR('b', 9, struct binder_version)
- #define BINDER_GET_NODE_DEBUG_INFO	_IOWR('b', 11, struct binder_node_debug_info)
- #define BINDER_GET_NODE_INFO_FOR_REF	_IOWR('b', 12, struct binder_node_info_for_ref)
- #define BINDER_SET_CONTEXT_MGR_EXT	_IOW('b', 13, struct flat_binder_object)
- #define BINDER_FREEZE			_IOW('b', 14, struct binder_freeze_info)
- #define BINDER_GET_FROZEN_INFO		_IOWR('b', 15, struct binder_frozen_status_info)
- #define BINDER_ENABLE_ONEWAY_SPAM_DETECTION	_IOW('b', 16, __u32)
+ enum {
+ 	BINDER_WRITE_READ		= _IOWR('b', 1, struct binder_write_read),
+ 	BINDER_SET_IDLE_TIMEOUT		= _IOW('b', 3, __s64),
+ 	BINDER_SET_MAX_THREADS		= _IOW('b', 5, __u32),
+ 	BINDER_SET_IDLE_PRIORITY	= _IOW('b', 6, __s32),
+ 	BINDER_SET_CONTEXT_MGR		= _IOW('b', 7, __s32),
+ 	BINDER_THREAD_EXIT		= _IOW('b', 8, __s32),
+ 	BINDER_VERSION			= _IOWR('b', 9, struct binder_version),
+ 	BINDER_GET_NODE_DEBUG_INFO	= _IOWR('b', 11, struct binder_node_debug_info),
+ 	BINDER_GET_NODE_INFO_FOR_REF	= _IOWR('b', 12, struct binder_node_info_for_ref),
+ 	BINDER_SET_CONTEXT_MGR_EXT	= _IOW('b', 13, struct flat_binder_object),
++	BINDER_FREEZE			= _IOW('b', 14, struct binder_freeze_info)
++	BINDER_GET_FROZEN_INFO		= _IOWR('b', 15, struct binder_frozen_status_info)
++	BINDER_ENABLE_ONEWAY_SPAM_DETECTION	= _IOW('b', 16, __u32)
+ };
  
  /*
   * NOTE: Two special error codes you should check for when calling

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-05-16  8:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-16  7:13 linux-next: manual merge of the rust tree with the char-misc tree Stephen Rothwell
2022-05-16  7:49 ` Greg KH
2022-05-16  8:18   ` Miguel Ojeda
2022-05-16  8:27     ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2021-04-16  7:58 Stephen Rothwell
2021-04-16  8:10 ` Greg KH
2021-04-16  8:26 ` Stephen Rothwell
2021-04-16 12:31 ` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).