public inbox for linux-kernel-mentees@lists.linux-foundation.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Pranav Tyagi <pranav.tyagi03@gmail.com>,
	tglx@linutronix.de, mingo@redhat.com, peterz@infradead.org,
	dvhart@infradead.org, dave@stgolabs.net, andrealmeid@igalia.com,
	linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, jann@thejh.net,
	keescook@chromium.org, skhan@linuxfoundation.org,
	linux-kernel-mentees@lists.linux.dev,
	Pranav Tyagi <pranav.tyagi03@gmail.com>
Subject: Re: [PATCH v3] futex: don't leak robust_list pointer on exec race
Date: Sat, 9 Aug 2025 02:14:11 +0800	[thread overview]
Message-ID: <202508090125.VIm8fAXD-lkp@intel.com> (raw)
In-Reply-To: <20250805154725.22031-1-pranav.tyagi03@gmail.com>

Hi Pranav,

kernel test robot noticed the following build errors:

[auto build test ERROR on tip/locking/core]
[also build test ERROR on linus/master v6.16 next-20250808]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Pranav-Tyagi/futex-don-t-leak-robust_list-pointer-on-exec-race/20250806-121303
base:   tip/locking/core
patch link:    https://lore.kernel.org/r/20250805154725.22031-1-pranav.tyagi03%40gmail.com
patch subject: [PATCH v3] futex: don't leak robust_list pointer on exec race
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20250809/202508090125.VIm8fAXD-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 7b8dea265e72c3037b6b1e54d5ab51b7e14f328b)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250809/202508090125.VIm8fAXD-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202508090125.VIm8fAXD-lkp@intel.com/

All errors (new ones prefixed by >>):

>> kernel/futex/syscalls.c:72:13: error: no member named 'compat_robust_list' in 'struct task_struct'
      72 |                 head = p->compat_robust_list;
         |                        ~  ^
   1 error generated.


vim +72 kernel/futex/syscalls.c

    41	
    42	static void __user *get_robust_list_common(int pid, bool compat)
    43	{
    44		struct task_struct *p;
    45		void __user *head;
    46		unsigned long ret;
    47	
    48		p = current;
    49	
    50		scoped_guard(rcu) {
    51			if (pid) {
    52				p = find_task_by_vpid(pid);
    53				if (!p)
    54					return (void __user *)ERR_PTR(-ESRCH);
    55			}
    56			get_task_struct(p);
    57		}
    58	
    59		/*
    60		 * Hold exec_update_lock to serialize with concurrent exec()
    61		 * so ptrace_may_access() is checked against stable credentials
    62		 */
    63		ret = down_read_killable(&p->signal->exec_update_lock);
    64		if (ret)
    65			goto err_put;
    66	
    67		ret = -EPERM;
    68		if (!ptrace_may_access(p, PTRACE_MODE_READ_REALCREDS))
    69			goto err_unlock;
    70	
    71		if (IS_ENABLED(CONFIG_COMPAT) && compat)
  > 72			head = p->compat_robust_list;
    73		else
    74			head = p->robust_list;
    75	
    76		up_read(&p->signal->exec_update_lock);
    77		put_task_struct(p);
    78	
    79		return head;
    80	
    81	err_unlock:
    82		up_read(&p->signal->exec_update_lock);
    83	err_put:
    84		put_task_struct(p);
    85		return (void __user *)ERR_PTR(ret);
    86	}
    87	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

      parent reply	other threads:[~2025-08-08 18:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-05 15:47 [PATCH v3] futex: don't leak robust_list pointer on exec race Pranav Tyagi
2025-08-05 21:47 ` Thomas Gleixner
2025-08-13  7:52   ` Pranav Tyagi
2025-08-08 18:14 ` kernel test robot [this message]

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=202508090125.VIm8fAXD-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrealmeid@igalia.com \
    --cc=dave@stgolabs.net \
    --cc=dvhart@infradead.org \
    --cc=jann@thejh.net \
    --cc=keescook@chromium.org \
    --cc=linux-kernel-mentees@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=peterz@infradead.org \
    --cc=pranav.tyagi03@gmail.com \
    --cc=skhan@linuxfoundation.org \
    --cc=tglx@linutronix.de \
    /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