Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1610284 > unrolled thread

linux-next: manual merge of the livepatching tree with the security tree

Started byStephen Rothwell <sfr@canb.auug.org.au>
First post2017-03-28 06:20 +0200
Last post2017-03-28 13:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  linux-next: manual merge of the livepatching tree with the security  tree Stephen Rothwell <sfr@canb.auug.org.au> - 2017-03-28 06:20 +0200
    Re: linux-next: manual merge of the livepatching tree with the security tree Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2017-03-28 13:30 +0200

#1610284 — linux-next: manual merge of the livepatching tree with the security tree

FromStephen Rothwell <sfr@canb.auug.org.au>
Date2017-03-28 06:20 +0200
Subjectlinux-next: manual merge of the livepatching tree with the security tree
Message-ID<tpQLT-27u-5@gated-at.bofh.it>
Hi Jiri,

Today's linux-next merge of the livepatching tree got conflicts in:

  include/linux/init_task.h
  include/linux/sched.h

between commit:

  e4e55b47ed9a ("LSM: Revive security_task_alloc() hook and per "struct task_struct" security blob.")

from the security tree and commit:

  d83a7cb375ee ("livepatch: change to a per-task consistency model")

from the livepatching 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/linux/init_task.h
index 926f2f553cc5,5a791055b176..000000000000
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@@ -294,7 -296,7 +302,8 @@@ extern struct cred init_cred
  	INIT_VTIME(tsk)							\
  	INIT_NUMA_BALANCING(tsk)					\
  	INIT_KASAN(tsk)							\
 +	INIT_TASK_SECURITY						\
+ 	INIT_LIVEPATCH(tsk)						\
  }
  
  
diff --cc include/linux/sched.h
index 9ac23308c82c,e11032010318..000000000000
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@@ -1042,10 -1038,9 +1042,13 @@@ struct task_struct 
  	/* A live task holds one reference: */
  	atomic_t			stack_refcount;
  #endif
 +#ifdef CONFIG_SECURITY
 +	/* Used by LSM modules for access restriction: */
 +	void				*security;
 +#endif
+ #ifdef CONFIG_LIVEPATCH
+ 	int patch_state;
+ #endif
  	/* CPU-specific state of this task: */
  	struct thread_struct		thread;
  

[toc] | [next] | [standalone]


#1610585 — Re: linux-next: manual merge of the livepatching tree with the security tree

FromTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Date2017-03-28 13:30 +0200
SubjectRe: linux-next: manual merge of the livepatching tree with the security tree
Message-ID<tpXu2-6Nb-15@gated-at.bofh.it>
In reply to#1610284
Stephen Rothwell wrote:
> Hi Jiri,
> 
> Today's linux-next merge of the livepatching tree got conflicts in:
> 
>   include/linux/init_task.h
>   include/linux/sched.h
> 
> between commit:
> 
>   e4e55b47ed9a ("LSM: Revive security_task_alloc() hook and per "struct task_struct" security blob.")
> 
> from the security tree and commit:
> 
>   d83a7cb375ee ("livepatch: change to a per-task consistency model")
> 
> from the livepatching 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.

Thank you for fixing.
This is an append to "struct task_struct" race which is inevitable.

> 
> -- 
> Cheers,
> Stephen Rothwell
> 
> diff --cc include/linux/init_task.h
> index 926f2f553cc5,5a791055b176..000000000000
> --- a/include/linux/init_task.h
> +++ b/include/linux/init_task.h
> @@@ -294,7 -296,7 +302,8 @@@ extern struct cred init_cred
>   	INIT_VTIME(tsk)							\
>   	INIT_NUMA_BALANCING(tsk)					\
>   	INIT_KASAN(tsk)							\
>  +	INIT_TASK_SECURITY						\
> + 	INIT_LIVEPATCH(tsk)						\
>   }
>   
>   
> diff --cc include/linux/sched.h
> index 9ac23308c82c,e11032010318..000000000000
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@@ -1042,10 -1038,9 +1042,13 @@@ struct task_struct 
>   	/* A live task holds one reference: */
>   	atomic_t			stack_refcount;
>   #endif
>  +#ifdef CONFIG_SECURITY
>  +	/* Used by LSM modules for access restriction: */
>  +	void				*security;
>  +#endif
> + #ifdef CONFIG_LIVEPATCH

Just a comment to livepatch change. It seems that addition of

	/* A comment line for this variable: */

line and indentation alignment is expected due to
"Unscheduled maintenance for sched.h" work.

> + 	int patch_state;
> + #endif
>   	/* CPU-specific state of this task: */
>   	struct thread_struct		thread;
>   
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web