Re: [PATCH] pps: require CAP_SYS_TIME to attach N_PPS ldisc
From: Hungyu Lin
Date: Mon Nov 09 2026 - 19:06:45 EST
> Are you sure this is stable material?
I added the stable tag because an unprivileged user can exhaust the
global source pool. I'll reassess it with the narrower fix.
> Did you check whether this breaks existing setups?
The check would reject that setup. The default capture settings can
be used without PPS_SETPARAMS, so that comparison was insufficient.
> Also, is pps_tty_open() called only from TIOCSETD?
No. Reopening an existing tty after hangup can reach it through
tty_ldisc_reinit(). The check would use the reopener's credentials
and could make open() fail with -EPERM.
> If pps_tty_dcd_change() is never
> called there, wouldn't refusing N_PPS on a pty be enough, leaving the
> real serial ports as they are today?
PTYs don't call dcd_change. Rejecting N_PPS on PTYs would block this
path and leave serial ports as they are.
Thanks,
Hungyu