mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Kevin Cernekee <cernekee@chromium.org>
Cc: kbuild-all@01.org, steffen.klassert@secunet.com,
	herbert@gondor.apana.org.au, davem@davemloft.net,
	paul@paul-moore.com, sds@tycho.nsa.gov, eparis@parisplace.org,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	selinux@tycho.nsa.gov, fw@strlen.de, fan.du@windriver.com,
	dianders@chromium.org, dtor@chromium.org
Subject: Re: [PATCH 4/4] xfrm_user: Add new 32/64-agnostic netlink messages
Date: Sat, 21 Jan 2017 16:21:18 +0800	[thread overview]
Message-ID: <201701211616.Ai2r5uFi%fengguang.wu@intel.com> (raw)
In-Reply-To: <20170121000507.34381-5-cernekee@chromium.org>

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

Hi Kevin,

[auto build test ERROR on ipsec-next/master]
[also build test ERROR on v4.10-rc4 next-20170120]
[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/Kevin-Cernekee/Make-xfrm-usable-by-32-bit-programs/20170121-150712
base:   https://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next.git master
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 6.2.0
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=ia64 

All errors (new ones prefixed by >>):

>> net/xfrm/xfrm_user_legacy.c:845:5: error: redefinition of 'xfrm_exp_state_notify_legacy'
    int xfrm_exp_state_notify_legacy(const struct xfrm_state *x,
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from net/xfrm/xfrm_user_legacy.c:30:0:
   net/xfrm/xfrm_user.h:131:19: note: previous definition of 'xfrm_exp_state_notify_legacy' was here
    static inline int xfrm_exp_state_notify_legacy(const struct xfrm_state *x,
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> net/xfrm/xfrm_user_legacy.c:863:5: error: redefinition of 'xfrm_notify_sa_legacy'
    int xfrm_notify_sa_legacy(const struct xfrm_state *x, const struct km_event *c)
        ^~~~~~~~~~~~~~~~~~~~~
   In file included from net/xfrm/xfrm_user_legacy.c:30:0:
   net/xfrm/xfrm_user.h:137:19: note: previous definition of 'xfrm_notify_sa_legacy' was here
    static inline int xfrm_notify_sa_legacy(const struct xfrm_state *x,
                      ^~~~~~~~~~~~~~~~~~~~~
>> net/xfrm/xfrm_user_legacy.c:983:5: error: redefinition of 'xfrm_send_acquire_legacy'
    int xfrm_send_acquire_legacy(struct xfrm_state *x,
        ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from net/xfrm/xfrm_user_legacy.c:30:0:
   net/xfrm/xfrm_user.h:143:19: note: previous definition of 'xfrm_send_acquire_legacy' was here
    static inline int xfrm_send_acquire_legacy(struct xfrm_state *x,
                      ^~~~~~~~~~~~~~~~~~~~~~~~
>> net/xfrm/xfrm_user_legacy.c:1043:5: error: redefinition of 'xfrm_exp_policy_notify_legacy'
    int xfrm_exp_policy_notify_legacy(const struct xfrm_policy *xp,
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from net/xfrm/xfrm_user_legacy.c:30:0:
   net/xfrm/xfrm_user.h:150:19: note: previous definition of 'xfrm_exp_policy_notify_legacy' was here
    static inline int xfrm_exp_policy_notify_legacy(const struct xfrm_policy *xp,
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> net/xfrm/xfrm_user_legacy.c:1060:5: error: redefinition of 'xfrm_notify_policy_legacy'
    int xfrm_notify_policy_legacy(const struct xfrm_policy *xp,
        ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from net/xfrm/xfrm_user_legacy.c:30:0:
   net/xfrm/xfrm_user.h:157:19: note: previous definition of 'xfrm_notify_policy_legacy' was here
    static inline int xfrm_notify_policy_legacy(const struct xfrm_policy *xp,
                      ^~~~~~~~~~~~~~~~~~~~~~~~~

vim +/xfrm_exp_state_notify_legacy +845 net/xfrm/xfrm_user_legacy.c

   839			return err;
   840	
   841		nlmsg_end(skb, nlh);
   842		return 0;
   843	}
   844	
 > 845	int xfrm_exp_state_notify_legacy(const struct xfrm_state *x,
   846					 const struct km_event *c)
   847	{
   848		struct net *net = xs_net(x);
   849		struct sk_buff *skb;
   850	
   851		skb = nlmsg_new(xfrm_expire_msgsize(), GFP_ATOMIC);
   852		if (skb == NULL)
   853			return -ENOMEM;
   854	
   855		if (build_expire(skb, x, c) < 0) {
   856			kfree_skb(skb);
   857			return -EMSGSIZE;
   858		}
   859	
   860		return xfrm_nlmsg_multicast(net, skb, 0, XFRMNLGRP_EXPIRE);
   861	}
   862	
 > 863	int xfrm_notify_sa_legacy(const struct xfrm_state *x, const struct km_event *c)
   864	{
   865		struct net *net = xs_net(x);
   866		struct xfrm_usersa_info_legacy *p;
   867		struct xfrm_usersa_id *id;
   868		struct nlmsghdr *nlh;
   869		struct sk_buff *skb;
   870		int len = xfrm_sa_len(x);
   871		int headlen, err;
   872		u32 event = 0;
   873	
   874		headlen = sizeof(*p);
   875		if (c->event == XFRM_MSG_DELSA) {
   876			len += nla_total_size(headlen);
   877			headlen = sizeof(*id);
   878			len += nla_total_size(sizeof(struct xfrm_mark));
   879		}
   880		len += NLMSG_ALIGN(headlen);
   881	
   882		skb = nlmsg_new(len, GFP_ATOMIC);
   883		if (skb == NULL)
   884			return -ENOMEM;
   885	
   886		switch (c->event) {
   887		case XFRM_MSG_NEWSA:
   888			event = XFRM_MSG_NEWSA_LEGACY;
   889			break;
   890		case XFRM_MSG_UPDSA:
   891			event = XFRM_MSG_UPDSA_LEGACY;
   892			break;
   893		case XFRM_MSG_DELSA:
   894			event = XFRM_MSG_DELSA_LEGACY;
   895			break;
   896		}
   897	
   898		nlh = nlmsg_put(skb, c->portid, c->seq, event, headlen, 0);
   899		err = -EMSGSIZE;
   900		if (nlh == NULL)
   901			goto out_free_skb;
   902	
   903		p = nlmsg_data(nlh);
   904		if (c->event == XFRM_MSG_DELSA) {
   905			struct nlattr *attr;
   906	
   907			id = nlmsg_data(nlh);
   908			memcpy(&id->daddr, &x->id.daddr, sizeof(id->daddr));
   909			id->spi = x->id.spi;
   910			id->family = x->props.family;
   911			id->proto = x->id.proto;
   912	
   913			attr = nla_reserve(skb, XFRMA_SA, sizeof(*p));
   914			err = -EMSGSIZE;
   915			if (attr == NULL)
   916				goto out_free_skb;
   917	
   918			p = nla_data(attr);
   919		}
   920		err = copy_to_user_state_extra(x, p, skb);
   921		if (err)
   922			goto out_free_skb;
   923	
   924		nlmsg_end(skb, nlh);
   925	
   926		return xfrm_nlmsg_multicast(net, skb, 0, XFRMNLGRP_SA);
   927	
   928	out_free_skb:
   929		kfree_skb(skb);
   930		return err;
   931	}
   932	
   933	static inline size_t xfrm_acquire_msgsize(const struct xfrm_state *x,
   934						  const struct xfrm_policy *xp)
   935	{
   936		return NLMSG_ALIGN(sizeof(struct xfrm_user_acquire_legacy))
   937		       + nla_total_size(sizeof(struct xfrm_user_tmpl) * xp->xfrm_nr)
   938		       + nla_total_size(sizeof(struct xfrm_mark))
   939		       + nla_total_size(xfrm_user_sec_ctx_size(x->security))
   940		       + userpolicy_type_attrsize();
   941	}
   942	
   943	static int build_acquire(struct sk_buff *skb,
   944				 struct xfrm_state *x,
   945				 const struct xfrm_tmpl *xt,
   946				 const struct xfrm_policy *xp)
   947	{
   948		__u32 seq = xfrm_get_acqseq();
   949		struct xfrm_user_acquire_legacy *ua;
   950		struct nlmsghdr *nlh;
   951		int err;
   952	
   953		nlh = nlmsg_put(skb, 0, 0, XFRM_MSG_ACQUIRE_LEGACY, sizeof(*ua), 0);
   954		if (nlh == NULL)
   955			return -EMSGSIZE;
   956	
   957		ua = nlmsg_data(nlh);
   958		memcpy(&ua->id, &x->id, sizeof(ua->id));
   959		memcpy(&ua->saddr, &x->props.saddr, sizeof(ua->saddr));
   960		memcpy(&ua->sel, &x->sel, sizeof(ua->sel));
   961		copy_to_user_policy(xp, &ua->policy, XFRM_POLICY_OUT);
   962		ua->aalgos = xt->aalgos;
   963		ua->ealgos = xt->ealgos;
   964		ua->calgos = xt->calgos;
   965		ua->seq = x->km.seq = seq;
   966	
   967		err = xfrm_copy_to_user_tmpl(xp, skb);
   968		if (!err)
   969			err = copy_to_user_state_sec_ctx(x, skb);
   970		if (!err)
   971			err = copy_to_user_policy_type(xp->type, skb);
   972		if (!err)
   973			err = xfrm_mark_put(skb, &xp->mark);
   974		if (err) {
   975			nlmsg_cancel(skb, nlh);
   976			return err;
   977		}
   978	
   979		nlmsg_end(skb, nlh);
   980		return 0;
   981	}
   982	
 > 983	int xfrm_send_acquire_legacy(struct xfrm_state *x,
   984				     const struct xfrm_tmpl *xt,
   985				     const struct xfrm_policy *xp)
   986	{
   987		struct net *net = xs_net(x);
   988		struct sk_buff *skb;
   989	
   990		skb = nlmsg_new(xfrm_acquire_msgsize(x, xp), GFP_ATOMIC);
   991		if (skb == NULL)
   992			return -ENOMEM;
   993	
   994		if (build_acquire(skb, x, xt, xp) < 0)
   995			BUG();
   996	
   997		return xfrm_nlmsg_multicast(net, skb, 0, XFRMNLGRP_ACQUIRE);
   998	}
   999	
  1000	static inline size_t xfrm_polexpire_msgsize(const struct xfrm_policy *xp)
  1001	{
  1002		return NLMSG_ALIGN(sizeof(struct xfrm_user_polexpire_legacy))
  1003		       + nla_total_size(sizeof(struct xfrm_user_tmpl) * xp->xfrm_nr)
  1004		       + nla_total_size(xfrm_user_sec_ctx_size(xp->security))
  1005		       + nla_total_size(sizeof(struct xfrm_mark))
  1006		       + userpolicy_type_attrsize();
  1007	}
  1008	
  1009	static int build_polexpire(struct sk_buff *skb,
  1010				   const struct xfrm_policy *xp,
  1011				   int dir,
  1012				   const struct km_event *c)
  1013	{
  1014		struct xfrm_user_polexpire_legacy *upe;
  1015		int hard = c->data.hard;
  1016		struct nlmsghdr *nlh;
  1017		int err;
  1018	
  1019		nlh = nlmsg_put(skb, c->portid, 0, XFRM_MSG_POLEXPIRE_LEGACY,
  1020				sizeof(*upe), 0);
  1021		if (nlh == NULL)
  1022			return -EMSGSIZE;
  1023	
  1024		upe = nlmsg_data(nlh);
  1025		copy_to_user_policy(xp, &upe->pol, dir);
  1026		err = xfrm_copy_to_user_tmpl(xp, skb);
  1027		if (!err)
  1028			err = copy_to_user_sec_ctx(xp, skb);
  1029		if (!err)
  1030			err = copy_to_user_policy_type(xp->type, skb);
  1031		if (!err)
  1032			err = xfrm_mark_put(skb, &xp->mark);
  1033		if (err) {
  1034			nlmsg_cancel(skb, nlh);
  1035			return err;
  1036		}
  1037		upe->hard = !!hard;
  1038	
  1039		nlmsg_end(skb, nlh);
  1040		return 0;
  1041	}
  1042	
> 1043	int xfrm_exp_policy_notify_legacy(const struct xfrm_policy *xp,
  1044					  int dir,
  1045					  const struct km_event *c)
  1046	{

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 45848 bytes --]

  reply	other threads:[~2017-01-21  8:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-21  0:05 [PATCH 0/4] Make xfrm usable by 32-bit programs Kevin Cernekee
2017-01-21  0:05 ` [PATCH 1/4] xfrm: Constify xfrm_user arguments and xfrm_mgr callback APIs Kevin Cernekee
2017-01-21  0:05 ` [PATCH 2/4] xfrm_user: Allow common functions to be called from another file Kevin Cernekee
2017-01-21  0:05 ` [PATCH 3/4] xfrm_user: Initial commit of xfrm_user_legacy.c Kevin Cernekee
2017-01-21  0:05 ` [PATCH 4/4] xfrm_user: Add new 32/64-agnostic netlink messages Kevin Cernekee
2017-01-21  8:21   ` kbuild test robot [this message]
2017-01-23  9:35 ` [PATCH 0/4] Make xfrm usable by 32-bit programs Steffen Klassert
2017-01-23 15:47   ` David Miller
2017-01-23 16:45 ` David Laight
2017-01-23 16:57   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201701211616.Ai2r5uFi%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=cernekee@chromium.org \
    --cc=davem@davemloft.net \
    --cc=dianders@chromium.org \
    --cc=dtor@chromium.org \
    --cc=eparis@parisplace.org \
    --cc=fan.du@windriver.com \
    --cc=fw@strlen.de \
    --cc=herbert@gondor.apana.org.au \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    --cc=steffen.klassert@secunet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®