All of lore.kernel.org
 help / color / mirror / Atom feed
* + fs-crypto-hooksc-fix-build-with-gcc-444.patch added to -mm tree
@ 2018-01-18 23:51 akpm
  2018-01-19  0:09 ` Eric Biggers
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2018-01-18 23:51 UTC (permalink / raw)
  To: akpm, ebiggers, tytso, mm-commits


The patch titled
     Subject: fs/crypto/hooks.c: fix build with gcc-4.4.4
has been added to the -mm tree.  Its filename is
     fs-crypto-hooksc-fix-build-with-gcc-444.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/fs-crypto-hooksc-fix-build-with-gcc-444.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/fs-crypto-hooksc-fix-build-with-gcc-444.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Andrew Morton <akpm@linux-foundation.org>
Subject: fs/crypto/hooks.c: fix build with gcc-4.4.4

gcc-4.4.4 has issues with anon union initializers.  Work around this.

fs/crypto/hooks.c: In function '__fscrypt_encrypt_symlink':
fs/crypto/hooks.c:161: error: unknown field 'len' specified in initializer
fs/crypto/hooks.c:161: warning: excess elements in struct initializer
fs/crypto/hooks.c:161: warning: (near initialization for 'iname')

Fixes: 76e81d6d50 ("fscrypt: new helper functions for ->symlink()")
Cc: Eric Biggers <ebiggers@google.com>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/crypto/hooks.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN fs/crypto/hooks.c~fs-crypto-hooksc-fix-build-with-gcc-444 fs/crypto/hooks.c
--- a/fs/crypto/hooks.c~fs-crypto-hooksc-fix-build-with-gcc-444
+++ a/fs/crypto/hooks.c
@@ -158,7 +158,7 @@ int __fscrypt_encrypt_symlink(struct ino
 			      unsigned int len, struct fscrypt_str *disk_link)
 {
 	int err;
-	struct qstr iname = { .name = target, .len = len };
+	struct qstr iname = { { .hash_len = len, }, .name = target, };
 	struct fscrypt_symlink_data *sd;
 	unsigned int ciphertext_len;
 
_

Patches currently in -mm which might be from akpm@linux-foundation.org are

i-need-old-gcc.patch
arm-arch-arm-include-asm-pageh-needs-personalityh.patch
mm.patch
mm-terminate-shrink_slab-loop-if-signal-is-pending-fix.patch
include-linux-sched-mmh-uninline-mmdrop_async-etc.patch
mm-split-deferred_init_range-into-initializing-and-freeing-parts-fix.patch
mm-do-not-stall-register_shrinker-fix.patch
list_lru-prefetch-neighboring-list-entries-before-acquiring-lock-fix.patch
mm-oom-cgroup-aware-oom-killer-fix.patch
sparc64-update-pmdp_invalidate-to-return-old-pmd-value-fix.patch
x86-mm-provide-pmdp_establish-helper-fix.patch
fs-elf-drop-map_fixed-usage-from-elf_map-checkpatch-fixes.patch
mm-thp-use-down_read_trylock-in-khugepaged-to-avoid-long-block-fix.patch
mm-thp-use-down_read_trylock-in-khugepaged-to-avoid-long-block-fix-checkpatch-fixes.patch
mm-mmu_notifier-annotate-mmu-notifiers-with-blockable-invalidate-callbacks-fix.patch
mm-zsmalloc-simplify-shrinker-init-destroy-fix.patch
mm-fadvise-discard-partial-page-if-endbyte-is-also-eof-fix.patch
mm-page_owner-clean-up-init_pages_in_zone-v3-fix.patch
mm-migrate-remove-reason-argument-from-new_page_t-fix-fix.patch
kasan-clean-up-kasan_shadow_scale_shift-usage-checkpatch-fixes.patch
lib-ubsanc-s-missaligned-misaligned.patch
linux-next-rejects.patch
fs-crypto-hooksc-fix-build-with-gcc-444.patch
kernel-forkc-export-kernel_thread-to-modules.patch
slab-leaks3-default-y.patch


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

* Re: + fs-crypto-hooksc-fix-build-with-gcc-444.patch added to -mm tree
  2018-01-18 23:51 + fs-crypto-hooksc-fix-build-with-gcc-444.patch added to -mm tree akpm
@ 2018-01-19  0:09 ` Eric Biggers
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Biggers @ 2018-01-19  0:09 UTC (permalink / raw)
  To: akpm; +Cc: tytso, mm-commits, linux-fscrypt

+Cc linux-fscrypt

On Thu, Jan 18, 2018 at 03:51:15PM -0800, akpm@linux-foundation.org wrote:
> ------------------------------------------------------
> From: Andrew Morton <akpm@linux-foundation.org>
> Subject: fs/crypto/hooks.c: fix build with gcc-4.4.4
> 
> gcc-4.4.4 has issues with anon union initializers.  Work around this.
> 
> fs/crypto/hooks.c: In function '__fscrypt_encrypt_symlink':
> fs/crypto/hooks.c:161: error: unknown field 'len' specified in initializer
> fs/crypto/hooks.c:161: warning: excess elements in struct initializer
> fs/crypto/hooks.c:161: warning: (near initialization for 'iname')
> 
> Fixes: 76e81d6d50 ("fscrypt: new helper functions for ->symlink()")
> Cc: Eric Biggers <ebiggers@google.com>
> Cc: Theodore Ts'o <tytso@mit.edu>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  fs/crypto/hooks.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff -puN fs/crypto/hooks.c~fs-crypto-hooksc-fix-build-with-gcc-444 fs/crypto/hooks.c
> --- a/fs/crypto/hooks.c~fs-crypto-hooksc-fix-build-with-gcc-444
> +++ a/fs/crypto/hooks.c
> @@ -158,7 +158,7 @@ int __fscrypt_encrypt_symlink(struct ino
>  			      unsigned int len, struct fscrypt_str *disk_link)
>  {
>  	int err;
> -	struct qstr iname = { .name = target, .len = len };
> +	struct qstr iname = { { .hash_len = len, }, .name = target, };
>  	struct fscrypt_symlink_data *sd;
>  	unsigned int ciphertext_len;
>  

Thanks for finding this -- sorry for the trouble!  But I think it should really
use QSTR_INIT(), since that's what almost everywhere else uses to create a
'struct qstr':

	struct qstr iname = QSTR_INIT(target, len);

Ted, can you take the QSTR_INIT() fix into the fscrypt tree?  Maybe folded into
"fscrypt: new helper functions for ->symlink()"?  Or separate is okay too.

Eric

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

end of thread, other threads:[~2018-01-19  0:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-18 23:51 + fs-crypto-hooksc-fix-build-with-gcc-444.patch added to -mm tree akpm
2018-01-19  0:09 ` Eric Biggers

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.