Re: [PATCH] apparmor: Change to use DEFINE_SHOW_ATTRIBUTE macro

2018-11-06 Thread Frank Lee
Sorry,I will send the second version of the patch.
--Yangtao
On Wed, Nov 7, 2018 at 9:17 AM kbuild test robot  wrote:
>
> Hi Yangtao,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on security/next-testing]
> [also build test ERROR on v4.20-rc1 next-20181106]
> [if your patch is applied to the wrong git tree, please drop us a note to 
> help improve the system]
>
> url:
> https://github.com/0day-ci/linux/commits/Yangtao-Li/apparmor-Change-to-use-DEFINE_SHOW_ATTRIBUTE-macro/20181107-004056
> base:   
> https://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git 
> next-testing
> config: ia64-allmodconfig (attached as .config)
> compiler: ia64-linux-gcc (GCC) 8.1.0
> reproduce:
> wget 
> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
> ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # save the attached .config to linux build tree
> GCC_VERSION=8.1.0 make.cross ARCH=ia64
>
> All errors (new ones prefixed by >>):
>
> >> security/apparmor/apparmorfs.o:(.data.rel+0x110): undefined reference to 
> >> `aa_sfs_seq_file_ops'
>security/apparmor/apparmorfs.o:(.data.rel+0x228): undefined reference to 
> `aa_sfs_seq_file_ops'
>security/apparmor/apparmorfs.o:(.data.rel+0x250): undefined reference to 
> `aa_sfs_seq_file_ops'
>security/apparmor/apparmorfs.o:(.data.rel+0x278): undefined reference to 
> `aa_sfs_seq_file_ops'
>security/apparmor/apparmorfs.o:(.data.rel+0x2c8): undefined reference to 
> `aa_sfs_seq_file_ops'
>security/apparmor/apparmorfs.o:(.data.rel+0x2f0): more undefined 
> references to `aa_sfs_seq_file_ops' follow
>
> ---
> 0-DAY kernel test infrastructureOpen Source Technology Center
> https://lists.01.org/pipermail/kbuild-all   Intel Corporation


Re: [PATCH] apparmor: Change to use DEFINE_SHOW_ATTRIBUTE macro

2018-11-06 Thread Frank Lee
Sorry,I will send the second version of the patch.
--Yangtao
On Wed, Nov 7, 2018 at 9:17 AM kbuild test robot  wrote:
>
> Hi Yangtao,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on security/next-testing]
> [also build test ERROR on v4.20-rc1 next-20181106]
> [if your patch is applied to the wrong git tree, please drop us a note to 
> help improve the system]
>
> url:
> https://github.com/0day-ci/linux/commits/Yangtao-Li/apparmor-Change-to-use-DEFINE_SHOW_ATTRIBUTE-macro/20181107-004056
> base:   
> https://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git 
> next-testing
> config: ia64-allmodconfig (attached as .config)
> compiler: ia64-linux-gcc (GCC) 8.1.0
> reproduce:
> wget 
> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
> ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # save the attached .config to linux build tree
> GCC_VERSION=8.1.0 make.cross ARCH=ia64
>
> All errors (new ones prefixed by >>):
>
> >> security/apparmor/apparmorfs.o:(.data.rel+0x110): undefined reference to 
> >> `aa_sfs_seq_file_ops'
>security/apparmor/apparmorfs.o:(.data.rel+0x228): undefined reference to 
> `aa_sfs_seq_file_ops'
>security/apparmor/apparmorfs.o:(.data.rel+0x250): undefined reference to 
> `aa_sfs_seq_file_ops'
>security/apparmor/apparmorfs.o:(.data.rel+0x278): undefined reference to 
> `aa_sfs_seq_file_ops'
>security/apparmor/apparmorfs.o:(.data.rel+0x2c8): undefined reference to 
> `aa_sfs_seq_file_ops'
>security/apparmor/apparmorfs.o:(.data.rel+0x2f0): more undefined 
> references to `aa_sfs_seq_file_ops' follow
>
> ---
> 0-DAY kernel test infrastructureOpen Source Technology Center
> https://lists.01.org/pipermail/kbuild-all   Intel Corporation


Re: [PATCH] apparmor: Change to use DEFINE_SHOW_ATTRIBUTE macro

2018-11-06 Thread kbuild test robot
Hi Yangtao,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on security/next-testing]
[also build test ERROR on v4.20-rc1 next-20181106]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Yangtao-Li/apparmor-Change-to-use-DEFINE_SHOW_ATTRIBUTE-macro/20181107-004056
base:   
https://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git 
next-testing
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 8.1.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.1.0 make.cross ARCH=ia64 

All errors (new ones prefixed by >>):

>> security/apparmor/apparmorfs.o:(.data.rel+0x110): undefined reference to 
>> `aa_sfs_seq_file_ops'
   security/apparmor/apparmorfs.o:(.data.rel+0x228): undefined reference to 
`aa_sfs_seq_file_ops'
   security/apparmor/apparmorfs.o:(.data.rel+0x250): undefined reference to 
`aa_sfs_seq_file_ops'
   security/apparmor/apparmorfs.o:(.data.rel+0x278): undefined reference to 
`aa_sfs_seq_file_ops'
   security/apparmor/apparmorfs.o:(.data.rel+0x2c8): undefined reference to 
`aa_sfs_seq_file_ops'
   security/apparmor/apparmorfs.o:(.data.rel+0x2f0): more undefined references 
to `aa_sfs_seq_file_ops' follow

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH] apparmor: Change to use DEFINE_SHOW_ATTRIBUTE macro

2018-11-06 Thread kbuild test robot
Hi Yangtao,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on security/next-testing]
[also build test ERROR on v4.20-rc1 next-20181106]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Yangtao-Li/apparmor-Change-to-use-DEFINE_SHOW_ATTRIBUTE-macro/20181107-004056
base:   
https://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git 
next-testing
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 8.1.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.1.0 make.cross ARCH=ia64 

All errors (new ones prefixed by >>):

>> security/apparmor/apparmorfs.o:(.data.rel+0x110): undefined reference to 
>> `aa_sfs_seq_file_ops'
   security/apparmor/apparmorfs.o:(.data.rel+0x228): undefined reference to 
`aa_sfs_seq_file_ops'
   security/apparmor/apparmorfs.o:(.data.rel+0x250): undefined reference to 
`aa_sfs_seq_file_ops'
   security/apparmor/apparmorfs.o:(.data.rel+0x278): undefined reference to 
`aa_sfs_seq_file_ops'
   security/apparmor/apparmorfs.o:(.data.rel+0x2c8): undefined reference to 
`aa_sfs_seq_file_ops'
   security/apparmor/apparmorfs.o:(.data.rel+0x2f0): more undefined references 
to `aa_sfs_seq_file_ops' follow

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH] apparmor: Change to use DEFINE_SHOW_ATTRIBUTE macro

2018-11-06 Thread kbuild test robot
Hi Yangtao,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on security/next-testing]
[also build test ERROR on v4.20-rc1 next-20181106]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Yangtao-Li/apparmor-Change-to-use-DEFINE_SHOW_ATTRIBUTE-macro/20181107-004056
base:   
https://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git 
next-testing
config: i386-randconfig-s0-201844 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

>> security/apparmor/apparmorfs.o:(.data+0x1c4): undefined reference to 
>> `aa_sfs_seq_file_ops'
   security/apparmor/apparmorfs.o:(.data+0x2b4): undefined reference to 
`aa_sfs_seq_file_ops'
   security/apparmor/apparmorfs.o:(.data+0x2cc): undefined reference to 
`aa_sfs_seq_file_ops'
   security/apparmor/apparmorfs.o:(.data+0x2e4): undefined reference to 
`aa_sfs_seq_file_ops'
   security/apparmor/apparmorfs.o:(.data+0x314): undefined reference to 
`aa_sfs_seq_file_ops'
   security/apparmor/apparmorfs.o:(.data+0x32c): more undefined references to 
`aa_sfs_seq_file_ops' follow

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH] apparmor: Change to use DEFINE_SHOW_ATTRIBUTE macro

2018-11-06 Thread kbuild test robot
Hi Yangtao,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on security/next-testing]
[also build test ERROR on v4.20-rc1 next-20181106]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Yangtao-Li/apparmor-Change-to-use-DEFINE_SHOW_ATTRIBUTE-macro/20181107-004056
base:   
https://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git 
next-testing
config: i386-randconfig-s0-201844 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

>> security/apparmor/apparmorfs.o:(.data+0x1c4): undefined reference to 
>> `aa_sfs_seq_file_ops'
   security/apparmor/apparmorfs.o:(.data+0x2b4): undefined reference to 
`aa_sfs_seq_file_ops'
   security/apparmor/apparmorfs.o:(.data+0x2cc): undefined reference to 
`aa_sfs_seq_file_ops'
   security/apparmor/apparmorfs.o:(.data+0x2e4): undefined reference to 
`aa_sfs_seq_file_ops'
   security/apparmor/apparmorfs.o:(.data+0x314): undefined reference to 
`aa_sfs_seq_file_ops'
   security/apparmor/apparmorfs.o:(.data+0x32c): more undefined references to 
`aa_sfs_seq_file_ops' follow

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


[PATCH] apparmor: Change to use DEFINE_SHOW_ATTRIBUTE macro

2018-11-06 Thread Yangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Yangtao Li 
---
 security/apparmor/apparmorfs.c | 15 ++-
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
index e09fe4d7307c..0e80ea4a3f6b 100644
--- a/security/apparmor/apparmorfs.c
+++ b/security/apparmor/apparmorfs.c
@@ -977,7 +977,7 @@ static const struct file_operations aa_sfs_access = {
.llseek = generic_file_llseek,
 };
 
-static int aa_sfs_seq_show(struct seq_file *seq, void *v)
+static int aa_sfs_seq_file_show(struct seq_file *seq, void *v)
 {
struct aa_sfs_entry *fs_file = seq->private;
 
@@ -1002,18 +1002,7 @@ static int aa_sfs_seq_show(struct seq_file *seq, void *v)
return 0;
 }
 
-static int aa_sfs_seq_open(struct inode *inode, struct file *file)
-{
-   return single_open(file, aa_sfs_seq_show, inode->i_private);
-}
-
-const struct file_operations aa_sfs_seq_file_ops = {
-   .owner  = THIS_MODULE,
-   .open   = aa_sfs_seq_open,
-   .read   = seq_read,
-   .llseek = seq_lseek,
-   .release= single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(aa_sfs_seq_file);
 
 /*
  * profile based file operations
-- 
2.17.0



[PATCH] apparmor: Change to use DEFINE_SHOW_ATTRIBUTE macro

2018-11-06 Thread Yangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Yangtao Li 
---
 security/apparmor/apparmorfs.c | 15 ++-
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
index e09fe4d7307c..0e80ea4a3f6b 100644
--- a/security/apparmor/apparmorfs.c
+++ b/security/apparmor/apparmorfs.c
@@ -977,7 +977,7 @@ static const struct file_operations aa_sfs_access = {
.llseek = generic_file_llseek,
 };
 
-static int aa_sfs_seq_show(struct seq_file *seq, void *v)
+static int aa_sfs_seq_file_show(struct seq_file *seq, void *v)
 {
struct aa_sfs_entry *fs_file = seq->private;
 
@@ -1002,18 +1002,7 @@ static int aa_sfs_seq_show(struct seq_file *seq, void *v)
return 0;
 }
 
-static int aa_sfs_seq_open(struct inode *inode, struct file *file)
-{
-   return single_open(file, aa_sfs_seq_show, inode->i_private);
-}
-
-const struct file_operations aa_sfs_seq_file_ops = {
-   .owner  = THIS_MODULE,
-   .open   = aa_sfs_seq_open,
-   .read   = seq_read,
-   .llseek = seq_lseek,
-   .release= single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(aa_sfs_seq_file);
 
 /*
  * profile based file operations
-- 
2.17.0