From nobody Fri Jun 17 19:38:40 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 68F9B85B568; Fri, 17 Jun 2022 19:38:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LPq8w6tfLz3Qjq; Fri, 17 Jun 2022 19:38:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=evG/RP0oOo+4sRcms9/opZK2321bADHlktgHMGbTWKw=; b=Fv0Gyey50v3ExWz+WHwPw9GlWhgEllc+kguCQgJSAkttZWPT6c0gV/A+yG3x7w754KfpMo qHT17ptcL3Uns/AJ8edtG/Arb5+vfNdKl1obICVcJVNePwWWUMdVbg8GbucaCxNTFOGQek cGe2viMz1wjUmHZt+7pgVl3ZfuDVjION80p5zwB0Rj2bsocFcy3une5xxQ8W1bUvHkZw3K FTa0fkLW+wHMVeYGyKM0sMyI50UIuZcTGrZEhvk+g8GaVy7cBnnkhwYumO17eVqoijUSVk sDieeCF37lEn/Ufl2Nk1n39fB98gccV3rpt9CudA2x134xjORS0hMdCm3wcAYw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC19525D85; Fri, 17 Jun 2022 19:38:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 25HJcesV015001; Fri, 17 Jun 2022 19:38:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25HJceif015000; Fri, 17 Jun 2022 19:38:40 GMT (envelope-from git) Date: Fri, 17 Jun 2022 19:38:40 GMT Message-Id: <202206171938.25HJceif015000@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: 221d908864dd - stable/13 - linux(4): Add AT_NO_AUTOMOUNT to statx. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 221d908864ddd39402707570dd70e66b07fadd43 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=evG/RP0oOo+4sRcms9/opZK2321bADHlktgHMGbTWKw=; b=qJDI3yzVq4LApK/H9X8sfnyB+1XSN0Pd7M0c9x0Vh7rIuRuMucER7xShUHo1512kfT2Ccf XuBuNObu5S0E758rlw3uhCRAhfRQhuwzkkHqbBUBHUSDKchbb7Fr3np62H62rl0AWaIHD8 WhwXsBI0Wy/Iz8AaJKXMi4wbGv1XyR28buz/kL7hMsS2pq+UWBEozhDMsA9KLpJXK/h3bJ +pkIaT012psmrUTCGz+L9CzJV/MDlFdBTetubnGCUeNoGGWRsCC55XtBuoaVa43hHZn5GI Qp+/lUjqAYQq+IF4gZjnS0syOcCo8IuORt8SGTXY88afZfWmwEAOOgY0muafxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655494721; a=rsa-sha256; cv=none; b=e3srzN3zN1k3g3OB0i5i12h2drOBfAJSwJPmDiuutLdwRPulQCxT447vpVAIOl43WlE2mA w0fhs8POSI+N+Y2NLgBUko5in6QRUmsotyd+X9Bw2wvgG8C0S6F+06NB46fcigFaDOfC9f rgMhamZH27+Tp4EtZhXOiBJ5plRfN6Xlwqfhhx1ZI+c9xyMKqg1JtCvcHuHa5EhlwJpeMi 7TQ+ZhQ0GIaTanH08Ir+PyggtHLmwp31OAjFzi9shFkfXTO1Rg26O2VjsDsoZqwmKEKgmy 8KjZqsdBN2rvq0tziQlg/VZAuATljY+Uoj9ujjvsDQC5VPaaHoJ5Rw9OoN1WIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=221d908864ddd39402707570dd70e66b07fadd43 commit 221d908864ddd39402707570dd70e66b07fadd43 Author: Dmitry Chagin AuthorDate: 2022-03-25 14:54:23 +0000 Commit: Dmitry Chagin CommitDate: 2022-06-17 19:33:43 +0000 linux(4): Add AT_NO_AUTOMOUNT to statx. Specific to Linux AT_NO_AUTOMOUNT flag tells the kernel to not automount the terminal component of pathname if it is a directory that is an automount point. As it is the default for FreeBSD silencly ignore this flag. glibc-2.34 uses this flag in the stat64 system calls which is used by i386. Reviewed by: trasz Differential revision: https://reviews.freebsd.org/D31524 MFC after: 2 weeks (cherry picked from commit ff39d74aa99a49749d1de26dc1f6b1e1bfebceb0) --- sys/compat/linux/linux_file.h | 7 +++++++ sys/compat/linux/linux_stats.c | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_file.h b/sys/compat/linux/linux_file.h index e6a5bf0ce8a6..3f885f915411 100644 --- a/sys/compat/linux/linux_file.h +++ b/sys/compat/linux/linux_file.h @@ -36,6 +36,13 @@ #define LINUX_AT_EACCESS 0x200 #define LINUX_AT_REMOVEDIR 0x200 #define LINUX_AT_SYMLINK_FOLLOW 0x400 +#define LINUX_AT_NO_AUTOMOUNT 0x800 + /* + * Specific to Linux AT_NO_AUTOMOUNT flag tells the kernel to + * not automount the terminal component of pathname if it is a + * directory that is an automount point. As FreeBSD does not + * have such facility (automount), we can simply ignore this flag. + */ #define LINUX_AT_EMPTY_PATH 0x1000 /* diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 9dc7686cb963..e01cb0c8d87a 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -774,7 +774,8 @@ linux_statx(struct thread *td, struct linux_statx_args *args) int error, dirfd, flags, unsupported; struct stat buf; - unsupported = args->flags & ~(LINUX_AT_SYMLINK_NOFOLLOW | LINUX_AT_EMPTY_PATH); + unsupported = args->flags & ~(LINUX_AT_SYMLINK_NOFOLLOW | + LINUX_AT_EMPTY_PATH | LINUX_AT_NO_AUTOMOUNT); if (unsupported != 0) { linux_msg(td, "statx unsupported flags 0x%x", unsupported); return (EINVAL);