linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the vfs tree with the powerpc tree
@ 2013-04-29  1:35 Stephen Rothwell
  2013-04-29  3:40 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2013-04-29  1:35 UTC (permalink / raw)
  To: Al Viro
  Cc: linux-next, linux-kernel, David Howells, Vasant Hegde,
	Benjamin Herrenschmidt, linuxppc-dev

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

Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
arch/powerpc/kernel/rtas_flash.c between commit ad18a364f186
("powerpc/rtas_flash: Free kmem upon module exit"),  from the powerpc
tree and commit 5c0333c00ff6 ("ppc: Clean up rtas_flash driver somewhat")
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@canb.auug.org.au

diff --cc arch/powerpc/kernel/rtas_flash.c
index a3e4034,8196bfb..0000000
--- a/arch/powerpc/kernel/rtas_flash.c
+++ b/arch/powerpc/kernel/rtas_flash.c
@@@ -806,20 -740,17 +758,22 @@@ enomem_buf
  
  static void __exit rtas_flash_cleanup(void)
  {
+ 	int i;
+ 
  	rtas_flash_term_hook = NULL;
  
 +	if (rtas_firmware_flash_list) {
 +		free_flash_list(rtas_firmware_flash_list);
 +		rtas_firmware_flash_list = NULL;
 +	}
 +
- 	if (flash_block_cache)
- 		kmem_cache_destroy(flash_block_cache);
+ 	for (i = 0; i < ARRAY_SIZE(rtas_flash_files); i++) {
+ 		const struct rtas_flash_file *f = &rtas_flash_files[i];
+ 		remove_proc_entry(f->filename, NULL);
+ 	}
  
- 	remove_flash_pde(firmware_flash_pde);
- 	remove_flash_pde(firmware_update_pde);
- 	remove_flash_pde(validate_pde);
- 	remove_flash_pde(manage_pde);
+ 	kmem_cache_destroy(flash_block_cache);
+ 	kfree(rtas_validate_flash_data.buf);
  }
  
  module_init(rtas_flash_init);

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: manual merge of the vfs tree with the powerpc tree
  2013-04-29  1:35 linux-next: manual merge of the vfs tree with the powerpc tree Stephen Rothwell
@ 2013-04-29  3:40 ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2013-04-29  3:40 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Vasant Hegde, linux-kernel, David Howells, linux-next, Al Viro,
	linuxppc-dev

On Mon, 2013-04-29 at 11:35 +1000, Stephen Rothwell wrote:
> Today's linux-next merge of the vfs tree got a conflict in
> arch/powerpc/kernel/rtas_flash.c between commit ad18a364f186
> ("powerpc/rtas_flash: Free kmem upon module exit"),  from the powerpc
> tree and commit 5c0333c00ff6 ("ppc: Clean up rtas_flash driver
> somewhat")
> from the vfs tree.
> 
> I fixed it up (see below) and can carry the fix as necessary (no
> action
> is required).

Please don't merge Dave's rework until it's been acked & fully tested by
us. AFAIK, there are outstanding comments from my guys who
reviewed/tested the first pass.

Cheers,
Ben.

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

* linux-next: manual merge of the vfs tree with the powerpc tree
@ 2020-07-27  1:32 Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2020-07-27  1:32 UTC (permalink / raw)
  To: Al Viro, Michael Ellerman
  Cc: PowerPC, Linux Next Mailing List, Linux Kernel Mailing List,
	Aneesh Kumar K.V

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

Hi all,

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

  arch/powerpc/kernel/ptrace/ptrace-view.c

between commit:

  e0d8e991be64 ("powerpc/book3s64/kuap: Move UAMOR setup to key init function")

from the powerpc tree and commit:

  5e39a71bddb3 ("powerpc: switch to ->regset_get()")

from the vfs tree.

I fixed it up (I thnk - 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 arch/powerpc/kernel/ptrace/ptrace-view.c
index ac7d480cb9c1,13208a9a02ca..000000000000
--- a/arch/powerpc/kernel/ptrace/ptrace-view.c
+++ b/arch/powerpc/kernel/ptrace/ptrace-view.c
@@@ -486,23 -468,15 +468,15 @@@ static int pkey_active(struct task_stru
  }
  
  static int pkey_get(struct task_struct *target, const struct user_regset *regset,
- 		    unsigned int pos, unsigned int count, void *kbuf, void __user *ubuf)
+ 		    struct membuf to)
  {
- 	int ret;
- 
  	BUILD_BUG_ON(TSO(amr) + sizeof(unsigned long) != TSO(iamr));
 -	BUILD_BUG_ON(TSO(iamr) + sizeof(unsigned long) != TSO(uamor));
  
  	if (!arch_pkeys_enabled())
  		return -ENODEV;
  
- 	ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, &target->thread.amr,
- 				  0, 2 * sizeof(unsigned long));
- 	if (ret)
- 		return ret;
- 
- 	ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, &default_uamor,
- 				  2 * sizeof(unsigned long), 3 * sizeof(unsigned long));
- 	return ret;
 -	return membuf_write(&to, &target->thread.amr, ELF_NPKEY * sizeof(unsigned long));
++	membuf_write(&to, &target->thread.amr, 2 * sizeof(unsigned long));
++	return membuf_write(&to, &default_uamor, sizeof(unsigned long));
  }
  
  static int pkey_set(struct task_struct *target, const struct user_regset *regset,

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

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

* Re: linux-next: manual merge of the vfs tree with the powerpc tree
  2013-05-01  5:01 ` Vasant Hegde
@ 2013-05-01  5:10   ` Al Viro
  0 siblings, 0 replies; 6+ messages in thread
From: Al Viro @ 2013-05-01  5:10 UTC (permalink / raw)
  To: Vasant Hegde
  Cc: Stephen Rothwell, linux-next, linux-kernel, David Howells,
	Benjamin Herrenschmidt, linuxppc-dev

On Wed, May 01, 2013 at 10:31:33AM +0530, Vasant Hegde wrote:
> On 05/01/2013 07:36 AM, Stephen Rothwell wrote:
> >Hi Al,
> >
> >Today's linux-next merge of the vfs tree got a conflict in
> >arch/powerpc/kernel/rtas_flash.c between commit fb4696c39573
> >("powerpc/rtas_flash: Fix bad memory access") from the powerpc tree and
> >commits ad18a364f186 ("powerpc/rtas_flash: Free kmem upon module exit")
> >and 2352ad01409d ("ppc: Clean up rtas_flash driver somewhat") from the
> >vfs tree.
> >
> 
> Stephen,
> 
> As Ben mentioned earlier, there are outstanding comments from me which
> needs to be addressed by Dave, before its merged.

What the hell?  Your fixes *are* folded into that commit and according to
Ben it passes testing; is there anything still missing?

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

* Re: linux-next: manual merge of the vfs tree with the powerpc tree
  2013-05-01  2:06 Stephen Rothwell
@ 2013-05-01  5:01 ` Vasant Hegde
  2013-05-01  5:10   ` Al Viro
  0 siblings, 1 reply; 6+ messages in thread
From: Vasant Hegde @ 2013-05-01  5:01 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Al Viro, linux-next, linux-kernel, David Howells,
	Benjamin Herrenschmidt, linuxppc-dev

On 05/01/2013 07:36 AM, Stephen Rothwell wrote:
> Hi Al,
>
> Today's linux-next merge of the vfs tree got a conflict in
> arch/powerpc/kernel/rtas_flash.c between commit fb4696c39573
> ("powerpc/rtas_flash: Fix bad memory access") from the powerpc tree and
> commits ad18a364f186 ("powerpc/rtas_flash: Free kmem upon module exit")
> and 2352ad01409d ("ppc: Clean up rtas_flash driver somewhat") from the
> vfs tree.
>

Stephen,

As Ben mentioned earlier, there are outstanding comments from me which
needs to be addressed by Dave, before its merged.


-Vasant

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

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

* linux-next: manual merge of the vfs tree with the powerpc tree
@ 2013-05-01  2:06 Stephen Rothwell
  2013-05-01  5:01 ` Vasant Hegde
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2013-05-01  2:06 UTC (permalink / raw)
  To: Al Viro
  Cc: linux-next, linux-kernel, David Howells, Vasant Hegde,
	Benjamin Herrenschmidt, linuxppc-dev

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

Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
arch/powerpc/kernel/rtas_flash.c between commit fb4696c39573
("powerpc/rtas_flash: Fix bad memory access") from the powerpc tree and
commits ad18a364f186 ("powerpc/rtas_flash: Free kmem upon module exit")
and 2352ad01409d ("ppc: Clean up rtas_flash driver somewhat") 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@canb.auug.org.au

diff --cc arch/powerpc/kernel/rtas_flash.c
index 243e184,5b77026..0000000
--- a/arch/powerpc/kernel/rtas_flash.c
+++ b/arch/powerpc/kernel/rtas_flash.c
@@@ -310,9 -316,9 +328,9 @@@ static ssize_t rtas_flash_write(struct 
  	 * proc file
  	 */
  	if (uf->flist == NULL) {
 -		uf->flist = kmem_cache_alloc(flash_block_cache, GFP_KERNEL);
 +		uf->flist = kmem_cache_zalloc(flash_block_cache, GFP_KERNEL);
  		if (!uf->flist)
- 			return -ENOMEM;
+ 			goto nomem;
  	}
  
  	fl = uf->flist;
@@@ -321,18 -327,18 +339,18 @@@
  	next_free = fl->num_blocks;
  	if (next_free == FLASH_BLOCKS_PER_NODE) {
  		/* Need to allocate another block_list */
 -		fl->next = kmem_cache_alloc(flash_block_cache, GFP_KERNEL);
 +		fl->next = kmem_cache_zalloc(flash_block_cache, GFP_KERNEL);
  		if (!fl->next)
- 			return -ENOMEM;
+ 			goto nomem;
  		fl = fl->next;
  		next_free = 0;
  	}
  
  	if (count > RTAS_BLK_SIZE)
  		count = RTAS_BLK_SIZE;
 -	p = kmem_cache_alloc(flash_block_cache, GFP_KERNEL);
 +	p = kmem_cache_zalloc(flash_block_cache, GFP_KERNEL);
  	if (!p)
- 		return -ENOMEM;
+ 		goto nomem;
  	
  	if(copy_from_user(p, buffer, count)) {
  		kmem_cache_free(flash_block_cache, p);
@@@ -722,65 -694,13 +706,13 @@@ static int __init rtas_flash_init(void
  		return 1;
  	}
  
- 	firmware_flash_pde = create_flash_pde("powerpc/rtas/"
- 					      FIRMWARE_FLASH_NAME,
- 					      &rtas_flash_operations);
- 	if (firmware_flash_pde == NULL) {
- 		rc = -ENOMEM;
- 		goto cleanup;
- 	}
- 
- 	rc = initialize_flash_pde_data("ibm,update-flash-64-and-reboot",
- 			 	       sizeof(struct rtas_update_flash_t), 
- 				       firmware_flash_pde);
- 	if (rc != 0)
- 		goto cleanup;
- 
- 	firmware_update_pde = create_flash_pde("powerpc/rtas/"
- 					       FIRMWARE_UPDATE_NAME,
- 					       &rtas_flash_operations);
- 	if (firmware_update_pde == NULL) {
- 		rc = -ENOMEM;
- 		goto cleanup;
- 	}
- 
- 	rc = initialize_flash_pde_data("ibm,update-flash-64-and-reboot",
- 			 	       sizeof(struct rtas_update_flash_t), 
- 				       firmware_update_pde);
- 	if (rc != 0)
- 		goto cleanup;
- 
- 	validate_pde = create_flash_pde("powerpc/rtas/" VALIDATE_FLASH_NAME,
- 			      		&validate_flash_operations);
- 	if (validate_pde == NULL) {
- 		rc = -ENOMEM;
- 		goto cleanup;
- 	}
- 
- 	rc = initialize_flash_pde_data("ibm,validate-flash-image",
- 		                       sizeof(struct rtas_validate_flash_t), 
- 				       validate_pde);
- 	if (rc != 0)
- 		goto cleanup;
- 
- 	manage_pde = create_flash_pde("powerpc/rtas/" MANAGE_FLASH_NAME,
- 				      &manage_flash_operations);
- 	if (manage_pde == NULL) {
- 		rc = -ENOMEM;
- 		goto cleanup;
- 	}
- 
- 	rc = initialize_flash_pde_data("ibm,manage-flash-image",
- 			               sizeof(struct rtas_manage_flash_t),
- 				       manage_pde);
- 	if (rc != 0)
- 		goto cleanup;
- 
- 	rtas_flash_term_hook = rtas_flash_firmware;
+ 	rtas_validate_flash_data.buf = kzalloc(VALIDATE_BUF_SIZE, GFP_KERNEL);
+ 	if (!rtas_validate_flash_data.buf)
+ 		return -ENOMEM;
  
  	flash_block_cache = kmem_cache_create("rtas_flash_cache",
 -					      RTAS_BLK_SIZE, RTAS_BLK_SIZE, 0,
 -					      rtas_block_ctor);
 +				RTAS_BLK_SIZE, RTAS_BLK_SIZE, 0,
 +				NULL);
  	if (!flash_block_cache) {
  		printk(KERN_ERR "%s: failed to create block cache\n",
  				__func__);
@@@ -800,20 -742,17 +754,22 @@@ enomem_buf
  
  static void __exit rtas_flash_cleanup(void)
  {
+ 	int i;
+ 
  	rtas_flash_term_hook = NULL;
  
 +	if (rtas_firmware_flash_list) {
 +		free_flash_list(rtas_firmware_flash_list);
 +		rtas_firmware_flash_list = NULL;
 +	}
 +
- 	if (flash_block_cache)
- 		kmem_cache_destroy(flash_block_cache);
+ 	for (i = 0; i < ARRAY_SIZE(rtas_flash_files); i++) {
+ 		const struct rtas_flash_file *f = &rtas_flash_files[i];
+ 		remove_proc_entry(f->filename, NULL);
+ 	}
  
- 	remove_flash_pde(firmware_flash_pde);
- 	remove_flash_pde(firmware_update_pde);
- 	remove_flash_pde(validate_pde);
- 	remove_flash_pde(manage_pde);
+ 	kmem_cache_destroy(flash_block_cache);
+ 	kfree(rtas_validate_flash_data.buf);
  }
  
  module_init(rtas_flash_init);

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2020-07-27  1:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-29  1:35 linux-next: manual merge of the vfs tree with the powerpc tree Stephen Rothwell
2013-04-29  3:40 ` Benjamin Herrenschmidt
2013-05-01  2:06 Stephen Rothwell
2013-05-01  5:01 ` Vasant Hegde
2013-05-01  5:10   ` Al Viro
2020-07-27  1:32 Stephen Rothwell

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).