From: Alexey Gladkov <legion@altlinux.ru>
To: "Dmitry V. Levin" <ldv@altlinux.org>
Cc: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: Re: [devel] /dev/shm
Date: Wed, 28 Aug 2019 23:46:50 +0200
Message-ID: <20190828214650.yw2avjxhlmem3rdx@Legion-PC.fortress> (raw)
In-Reply-To: <20190828205315.GA32468@altlinux.org>
[-- Attachment #1: Type: text/plain, Size: 3357 bytes --]
On Wed, Aug 28, 2019 at 11:53:15PM +0300, Dmitry V. Levin wrote:
> On Wed, Aug 28, 2019 at 09:50:18PM +0200, Alexey Gladkov wrote:
> > On Wed, Aug 28, 2019 at 09:15:52PM +0300, Dmitry V. Levin wrote:
> > > Изменение по сути одно и оно точечное.
> > >
> > > Содержимое hasher/chroot/dev будет недоступно процессам в чруте,
> > > поскольку у них будет свой /dev на tmpfs, создаваемый каждый раз
> > > при запуске этих процессов в их mount namespace и, соответственно,
> > > недоступный процессам снаружи.
> >
> > Ну setns всё-таки есть :)
>
> Это процессы разных пользователей, и setns не сработает с hidepid=1.
Да, но это нужно делать в хост-системе и он будет глобален для всего pid
namespace ... нужно всё-таки возродить тот патч.
> > А почему теперь /dev/shm обязателен и не отключаем ? Раньше же без него
> > обходились.
>
> Раньше его неотключаемо создавал hasher, теперь hasher-priv.
> В принципе, его можно отключить через /etc/hasher-priv/fstab,
> написав какой-нибудь mode=755, но зачем?
Ну просто это ещё одна tmpfs. Она конечно ограничена по размеру, но
всё-таки. Я бы и /sys без нужды не давал ибо нефиг читать информацию про
хост-систему и модули.
> На тот случай, если нерадивый админ добавит /dev в allowed_mountpoints?
Вдруг он перестал принимать свои таблетки.
> > http://git.altlinux.org/tasks/236645/gears/340/git?p=git;a=blob;f=hasher-priv/mount.c;h=5b99354f6c64ba440980fe27a9f3738130a9be6e;hb=1a2f923ab0ca822de9406198ed409c79eb000ce7#l304
> >
> > Дим, зачем ты отдельно проходишь по всему mount_vec, который заполняешь
> > чуть выше ? Разве не проще сделать:
> >
> > --- a/hasher-priv/mount.c
> > +++ b/hasher-priv/mount.c
> > @@ -301,6 +301,8 @@ setup_mountpoints(void)
> > mpoint_vec =
> > xgrowarray(mpoint_vec, &mpoint_allocated,
> > sizeof(*mpoint_vec));
> > + if (!strcmp("/dev/pts", item))
> > + dev_pts_mounted = 1;
> > mpoint_vec[mpoint_size++] = item;
> > } else {
> > error(EXIT_FAILURE, 0,
>
> Это же оптимизация! :)
Ты же знаешь, что в моей конторе любят всё "оптимизировать" ! :)
Мне как-то не понравились специальные кейсы про /dev, /dev/pts, /dev/shm,
но сходу не смог придумать как от них избавиться.
--
Rgrds, legion
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 163 bytes --]
next prev parent reply other threads:[~2019-08-28 21:46 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-28 8:27 ` [devel] Fwd: [cyber] I: Sisyphus-20190827 x86_64 beehive_status: +34 -5 (105) Levin Stanislav
2019-08-28 9:04 ` [devel] /dev/shm Dmitry V. Levin
2019-08-28 9:55 ` Dmitry V. Levin
2019-08-28 9:58 ` Anton Farygin
2019-08-28 10:03 ` Валерий Иноземцев
2019-08-28 10:13 ` Dmitry V. Levin
2019-08-28 10:57 ` Dmitry V. Levin
2019-08-29 0:56 ` Alexey Shabalin
2019-08-28 13:54 ` Dmitry V. Levin
2019-08-28 14:33 ` Alexey Gladkov
2019-08-28 15:02 ` Dmitry V. Levin
2019-08-28 15:11 ` Alexey Gladkov
2019-08-28 15:23 ` Dmitry V. Levin
2019-08-28 18:08 ` Alexey Gladkov
2019-08-28 18:11 ` Anton Farygin
2019-08-28 18:24 ` Dmitry V. Levin
2019-08-28 18:45 ` Anton Farygin
2019-08-28 18:50 ` Anton Farygin
2019-08-28 18:59 ` Dmitry V. Levin
2019-08-29 21:08 ` Dmitry V. Levin
2019-08-28 18:15 ` Dmitry V. Levin
2019-08-28 19:50 ` Alexey Gladkov
2019-08-28 20:53 ` Dmitry V. Levin
2019-08-28 21:46 ` Alexey Gladkov [this message]
2019-08-28 22:52 ` Dmitry V. Levin
2019-08-29 13:58 ` Andrey Savchenko
2019-08-29 19:24 ` Dmitry V. Levin
2019-08-29 19:36 ` Anton Farygin
2019-08-29 23:39 ` Leonid Krivoshein
2019-08-30 0:27 ` Dmitry V. Levin
2019-08-30 4:30 ` Leonid Krivoshein
2019-08-28 16:31 ` Stanislav Levin
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=20190828214650.yw2avjxhlmem3rdx@Legion-PC.fortress \
--to=legion@altlinux.ru \
--cc=devel@lists.altlinux.org \
--cc=ldv@altlinux.org \
/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
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git