Re: [PATCH] timekeeping: Require permission to set auxiliary clocks

From: Thomas Gleixner

Date: Fri Oct 23 2026 - 15:49:08 EST


On Wed, Oct 21 2026 at 11:29, John Stultz wrote:
> On Mon, Oct 19, 2026 at 1:03 AM Daehyeon Ko <4ncienth@xxxxxxxxx> wrote:
>> + ret = security_settime64(tnew, NULL);
>> + if (ret)
>> + return ret;
>>
>> aux_tks = &aux_tkd->shadow_timekeeper;
>
> This looked a little odd adding the security_settime64() check in the
> core timekeeping.c where as is usually called closer to the syscall in
> time.c, but given the clock_aux k_clock is defined in timekeeping.c, I
> guess this makes it the best place to add the check.

The reason why it's not in the syscall is that posix clocks have a
different permission scheme than system time, so the check ends up in
the clock_set() callback of the individial clocks.