Re: linux-next: manual merge of the rust tree with the char-misc tree

2021-04-16 Thread Miguel Ojeda
Hi Stephen,

On Fri, Apr 16, 2021 at 9:58 AM Stephen Rothwell  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


Re: linux-next: manual merge of the rust tree with the char-misc tree

2021-04-16 Thread Stephen Rothwell
Hi all,

On Fri, 16 Apr 2021 17:58:06 +1000 Stephen Rothwell  
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..
> --- 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 
>   __u32reserved3;
>   };
>   
>  +struct binder_freeze_info {
>  +__u32pid;
>  +__u32enable;
>  +__u32timeout_ms;
>  +};
>  +
>  +struct binder_frozen_status_info {
>  +__u32pid;
>  +__u32sync_recv;
>  +__u32async_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


pgpjWc7lWPj1R.pgp
Description: OpenPGP digital signature


Re: linux-next: manual merge of the rust tree with the char-misc tree

2021-04-16 Thread Greg KH
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


linux-next: manual merge of the rust tree with the char-misc tree

2021-04-16 Thread Stephen Rothwell
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..
--- 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 
__u32reserved3;
  };
  
 +struct binder_freeze_info {
 +  __u32pid;
 +  __u32enable;
 +  __u32timeout_ms;
 +};
 +
 +struct binder_frozen_status_info {
 +  __u32pid;
 +  __u32sync_recv;
 +  __u32async_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


pgpHe4_ap9qjq.pgp
Description: OpenPGP digital signature