From 3e1677c91b3f6c2b2ad8554d923300fe61bcf7d0 Mon Sep 17 00:00:00 2001 From: piccardi Date: Sat, 17 Sep 2022 08:39:39 +0200 Subject: [PATCH 01/12] Piccole correzioni estetiche --- signal.tex | 57 +++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/signal.tex b/signal.tex index b43af0a..e6c75e6 100644 --- a/signal.tex +++ b/signal.tex @@ -3098,14 +3098,6 @@ che venga eseguita l'azione predefinita, devono essere mascherati per tutti i \textit{thread}, compreso quello dedicato alla gestione, che potrebbe riceverlo fra due chiamate successive. -Come esempio elementare dell'uso dei segnali \textit{real-time}, e della -possibilità di inviare informazioni al gestore degli stessi con -\func{sigqueue}, si è riportato in fig.~\ref{fig:sig_rtsival_main} il corpo -principale di un programma elementare che legge dal terminale un valore -numerico, ed utilizza un segnale \textit{real-time} per inviarlo al gestore -dello stesso. Si sono trascurati i controlli dei valori di ritorno delle varie -funzioni per brevità. - \begin{figure}[!htb] \footnotesize \centering \begin{minipage}[c]{\codesamplewidth} @@ -3117,11 +3109,19 @@ funzioni per brevità. \label{fig:sig_rtsival_main} \end{figure} +Come esempio elementare dell'uso dei segnali \textit{real-time}, e della +possibilità di inviare informazioni al gestore degli stessi con +\func{sigqueue}, si è riportato in fig.~\ref{fig:sig_rtsival_main} il corpo +principale di un programma elementare che legge dal terminale un valore +numerico, ed utilizza un segnale \textit{real-time} per inviarlo al gestore +dello stesso. Nel codice sono stati trascurati i controlli dei valori di +ritorno delle varie funzioni per mantenere la brevità dell'esempio. + Dopo aver definito (\texttt{\small 5}) una variabile \var{value} di tipo -\type{sigval\_t} per inviare i dati, ed aver opportunamente scelto +\type{sigval\_t} per poter inviare i dati, e dopo aver opportunamente scelto (\texttt{\small 6}) per \var{signo} un segnale \textit{real-time}, la parte iniziale del programma (\texttt{\small 8--11}) installa il relativo gestore -(la cui definizione è riportata in fig.~\ref{fig:sig_rtsival_handl}), dopo di +(la cui definizione è riportata in fig.~\ref{fig:sig_rtsival_handl}). Dopo di che il programma si pone in un ciclo infinito (\texttt{\small 14--27}) in cui prima (\texttt{\small 15--20}) legge in buffer dallo \textit{standard input} una stringa immessa dall'utente, terminandola opportunamente (\texttt{\small @@ -3131,6 +3131,10 @@ conversione ha successo e \texttt{value.sival\_int} è positivo) invia a se stesso (\texttt{\small 23}) il segnale \textit{real-time}, altrimenti stampa un avviso (\texttt{\small 24}). +Alla ricezione del segnale il gestore si limita a stampare alcune delle +informazioni ricevute nella struttura \struct{sigval\_t}, ed in particolare +(\texttt{\small 5}) stampa tramite il valore del campo \var{si\_value} il +numero che gli è stato inviato da \func{sigqueue}. \begin{figure}[!htb] \footnotesize \centering @@ -3138,14 +3142,12 @@ un avviso (\texttt{\small 24}). \includecodesample{listati/rtsigvalsend_handl.c} \end{minipage} \normalsize - \caption{Codice del gestore.} + \caption{Codice del gestore usato dal programma di + fig.~\ref{fig:sig_rtsival_main}.} \label{fig:sig_rtsival_handl} \end{figure} - - - \subsection{La gestione avanzata delle temporizzazioni} \label{sec:sig_timer_adv} @@ -3194,20 +3196,6 @@ alta definizione però erano già presenti, essendo stata introdotte insieme ad altre funzioni per il supporto delle estensioni \textit{real-time} con il rilascio del kernel 2.6, ma la risoluzione effettiva era nominale. -A tutte le implementazioni che si rifanno a queste estensioni è richiesto di -disporre di una versione \textit{real-time} almeno per l'orologio generale di -sistema, quello che mantiene il \textit{calendar time} (vedi -sez.~\ref{sec:sys_time_base}), che in questa forma deve indicare il numero di -secondi e nanosecondi passati a partire dal primo gennaio 1970 (\textit{The - Epoch}). Si ricordi infatti che l'orologio ordinario usato dal -\textit{calendar time} riporta solo un numero di secondi, e che la risoluzione -effettiva normalmente non raggiunge il nanosecondo (a meno di hardware -specializzato). Oltre all'orologio generale di sistema possono essere -presenti altri tipi di orologi \textit{real-time}, ciascuno dei quali viene -identificato da un opportuno valore di una variabile di tipo -\type{clockid\_t}; un elenco di quelli disponibili su Linux è riportato in -tab.~\ref{tab:sig_timer_clockid_types}. - \begin{table}[htb] \footnotesize \centering @@ -3265,6 +3253,19 @@ tab.~\ref{tab:sig_timer_clockid_types}. \label{tab:sig_timer_clockid_types} \end{table} +A tutte le implementazioni che si rifanno a queste estensioni è richiesto di +disporre di una versione \textit{real-time} almeno per l'orologio generale di +sistema, quello che mantiene il \textit{calendar time} (vedi +sez.~\ref{sec:sys_time_base}), che in questa forma deve indicare il numero di +secondi e nanosecondi passati a partire dal primo gennaio 1970 (\textit{The + Epoch}). Si ricordi infatti che l'orologio ordinario usato dal +\textit{calendar time} riporta solo un numero di secondi, e che la risoluzione +effettiva normalmente non raggiunge il nanosecondo (a meno di hardware +specializzato). Oltre all'orologio generale di sistema possono essere +presenti altri tipi di orologi \textit{real-time}, ciascuno dei quali viene +identificato da un opportuno valore di una variabile di tipo +\type{clockid\_t}; un elenco di quelli disponibili su Linux è riportato in +tab.~\ref{tab:sig_timer_clockid_types}. % TODO: dal 4.17 CLOCK_MONOTONIC e CLOCK_BOOTTIME sono identici vedi % https://lwn.net/Articles/751651/ e -- 2.39.5 From eeab41391da85f635be3c2f3058e24b9a5265b85 Mon Sep 17 00:00:00 2001 From: Simone Piccardi Date: Wed, 5 Apr 2023 14:44:22 +0200 Subject: [PATCH 02/12] Aggiunti vari TODO --- fileadv.tex | 3 +++ filedir.tex | 3 +++ fileio.tex | 1 + othersock.tex | 2 ++ procadv.tex | 4 ++++ sockctrl.tex | 6 ++++-- 6 files changed, 17 insertions(+), 2 deletions(-) diff --git a/fileadv.tex b/fileadv.tex index 948f721..ba34116 100644 --- a/fileadv.tex +++ b/fileadv.tex @@ -3498,6 +3498,9 @@ raggruppati in un solo evento. % http://lwn.net/Articles/343346/ (incluso nel 2.6.36) % fanotify_mark() ha FAN_MARK_FILESYSTEM dal 4.20 % fanotify() ha FAN_OPEN_EXEC dal 4.21/5.0 +% fanotify() ha FAN_FS_ERROR dal 5.16, vedi +% https://docs.kernel.org/admin-guide/filesystem-monitoring.html +% fanotify() ha FAN_RENAME dal 5.17, vedi https://kernelnewbies.org/Linux_5.17 \subsection{L'interfaccia POSIX per l'I/O asincrono} diff --git a/filedir.tex b/filedir.tex index 6577274..bc1f5ab 100644 --- a/filedir.tex +++ b/filedir.tex @@ -1182,6 +1182,9 @@ utilizzati solo in fase di montaggio: % * http://lwn.net/Articles/159077/ e % * Documentation/filesystems/sharedsubtree.txt +% TODO: (bassa priorità) trattare mount_setattr, vedi +% https://lwn.net/Articles/896255/ + % TODO: (bassa priorità) non documentati ma presenti in sys/mount.h: % * MS_POSIXACL % * MS_KERNMOUNT diff --git a/fileio.tex b/fileio.tex index f630562..28153b4 100644 --- a/fileio.tex +++ b/fileio.tex @@ -557,6 +557,7 @@ escludere la possibilità di far esistere il file anche in un secondo tempo. % NOTE: per O_TMPFILE vedi: http://kernelnewbies.org/Linux_3.11 % https://lwn.net/Articles/558598/ http://lwn.net/Articles/619146/ +% https://lwn.net/Articles/896153/ \begin{table}[!htb] diff --git a/othersock.tex b/othersock.tex index 325fb0d..aad32e4 100644 --- a/othersock.tex +++ b/othersock.tex @@ -801,6 +801,8 @@ stack dei protocolli. \subsection{I socket \textit{netlink}} \label{sec:socket_netlink} +Vedi \url{https://docs.kernel.org/next/userspace-api/netlink/index.html} + \subsection{I \textit{packet socket}} \label{sec:packet_socket} diff --git a/procadv.tex b/procadv.tex index a5ea67f..cefed26 100644 --- a/procadv.tex +++ b/procadv.tex @@ -1902,6 +1902,10 @@ Introdotta a partire dal kernel 2.4.21, solo su PowerPC. % TODO documentare PR_SET_SYSCALL_USER_DISPATCH in 5.11, vedi % https://lwn.net/Articles/826313/ +% TODO documentare PR_SET_MDWE in 6.3, vedi +% https://git.kernel.org/linus/b507808ebce2 + + \label{sec:prctl_operation} \end{basedescript} diff --git a/sockctrl.tex b/sockctrl.tex index 9d5279e..17514f5 100644 --- a/sockctrl.tex +++ b/sockctrl.tex @@ -2669,8 +2669,10 @@ tab.~\ref{tab:sock_opt_socklevel} sul significato delle varie opzioni: \item[\constd{SO\_TYPE}] questa opzione permette di leggere il tipo di socket su cui si opera; funziona solo con \func{getsockopt}, ed utilizza per \param{optval} un intero in cui verrà restituito il valore numerico che lo - identifica (ad esempio \const{SOCK\_STREAM}). - + identifica (ad esempio \const{SOCK\_STREAM}). + +% TODO verificare IP_LOCAL_PORT_RANGE, aggiunta con il 6.3 +% vedi https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=91d0b78c5177 \end{basedescript} -- 2.39.5 From 87fb95cc5ce9b6ef9106c6c237c69476d12834fa Mon Sep 17 00:00:00 2001 From: Simone Piccardi Date: Thu, 5 Oct 2023 16:25:40 +0200 Subject: [PATCH 03/12] Note kernel 6.6 --- fileio.tex | 3 +++ procadv.tex | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/fileio.tex b/fileio.tex index 28153b4..55c076e 100644 --- a/fileio.tex +++ b/fileio.tex @@ -1960,6 +1960,9 @@ aggiuntivo sono \textit{system call}, ad esempio \func{faccessat} e aderenza allo standard POSIX.1-2008, dato che la \textit{system call} sottostante non prevede l'argomento \param{flags}. +% TODO: nel kernel 6.6 è stata introdotta fchmodat2 che risolve il problema +% appena illustrato + % TODO: aggiornare per via di faccessat2 aggiunta con il kernel 5.8 In tab.~\ref{tab:at-functions_constant_values} si sono elencati i valori diff --git a/procadv.tex b/procadv.tex index cefed26..4b5912e 100644 --- a/procadv.tex +++ b/procadv.tex @@ -1360,6 +1360,10 @@ essere fornito in una forma di codice interpretabile fornito attraverso un socket o una \textit{pipe}, creati prima di lanciare il processo che eseguirà il codice non fidato. +% TODO: a partire dal kernel 6.6 è stato introdotto +% SECCOMP_USER_NOTIF_FD_SYNC_WAKE_UP that indicates that events from the +% watched process will be handled synchronously; that allows the kernel to +% schedule the two processes more efficiently (da LWN) % TODO a partire dal kernel 3.5 è stato introdotto la possibilità di usare un % terzo argomento se il secondo è SECCOMP_MODE_FILTER, vedi -- 2.39.5 From cea75853940205e861aa8467e3e091e8dffd5763 Mon Sep 17 00:00:00 2001 From: piccardi Date: Fri, 20 Oct 2023 11:12:36 +0200 Subject: [PATCH 04/12] Note di copyright e piccole correzioni --- build.tex | 2 +- errors.tex | 2 +- fileadv.tex | 2 +- filedir.tex | 2 +- fileio.tex | 4 ++-- gapil.tex | 2 +- intro.tex | 2 +- ipc.tex | 2 +- macro.tex | 2 +- netlayer.tex | 2 +- network.tex | 2 +- othersock.tex | 2 +- preambolo.tex | 2 +- pref.tex | 2 +- session.tex | 2 +- signal.tex | 49 ++++++++++++++++++++++++------------------------- thread.tex | 2 +- trasplayer.tex | 2 +- 18 files changed, 42 insertions(+), 43 deletions(-) diff --git a/build.tex b/build.tex index cec0b2d..d515d78 100644 --- a/build.tex +++ b/build.tex @@ -1,6 +1,6 @@ %% build.tex %% -%% Copyright (C) 1999-2019 Simone Piccardi. Permission is granted to copy, +%% Copyright (C) 1999-2023 Simone Piccardi. Permission is granted to copy, %% distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/errors.tex b/errors.tex index b8b6a8f..d3c8d8d 100644 --- a/errors.tex +++ b/errors.tex @@ -1,6 +1,6 @@ %% errors.tex %% -%% Copyright (C) 2000-2019 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/fileadv.tex b/fileadv.tex index ba34116..fd912c3 100644 --- a/fileadv.tex +++ b/fileadv.tex @@ -1,6 +1,6 @@ %% fileadv.tex %% -%% Copyright (C) 2000-2019 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/filedir.tex b/filedir.tex index bc1f5ab..a5ce4ce 100644 --- a/filedir.tex +++ b/filedir.tex @@ -1,6 +1,6 @@ %% filedir.tex %% -%% Copyright (C) 2000-2019 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/fileio.tex b/fileio.tex index 55c076e..301b98d 100644 --- a/fileio.tex +++ b/fileio.tex @@ -1,6 +1,6 @@ -s%% fileio.tex (merge fileunix.tex - filestd.tex) +%% fileio.tex (merge fileunix.tex - filestd.tex) %% -%% Copyright (C) 2000-2019 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/gapil.tex b/gapil.tex index 3b1d0c9..4ad87a0 100644 --- a/gapil.tex +++ b/gapil.tex @@ -1,6 +1,6 @@ %% gapil.tex %% -%% Copyright (C) 2000-2019 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.3 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/intro.tex b/intro.tex index 4059f5e..0929867 100644 --- a/intro.tex +++ b/intro.tex @@ -1,6 +1,6 @@ %% intro.tex %% -%% Copyright (C) 2000-2019 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/ipc.tex b/ipc.tex index 7306d8e..bd310d3 100644 --- a/ipc.tex +++ b/ipc.tex @@ -1,6 +1,6 @@ %% ipc.tex %% -%% Copyright (C) 2000-2019 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/macro.tex b/macro.tex index 3cd6b92..30d64fe 100644 --- a/macro.tex +++ b/macro.tex @@ -1,6 +1,6 @@ %% macro.tex %% -%% Copyright (C) 2000-2019 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/netlayer.tex b/netlayer.tex index 4ed5260..633ffbc 100644 --- a/netlayer.tex +++ b/netlayer.tex @@ -1,6 +1,6 @@ %% netlayer.tex %% -%% Copyright (C) 2000-2019 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/network.tex b/network.tex index dde8230..95f54f4 100644 --- a/network.tex +++ b/network.tex @@ -1,6 +1,6 @@ %% network.tex %% -%% Copyright (C) 2000-2019 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/othersock.tex b/othersock.tex index aad32e4..3772d68 100644 --- a/othersock.tex +++ b/othersock.tex @@ -1,6 +1,6 @@ %% othersock.tex %% -%% Copyright (C) 2004-2019 Simone Piccardi. Permission is granted to +%% Copyright (C) 2004-2023 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/preambolo.tex b/preambolo.tex index 522eb13..a3f1175 100644 --- a/preambolo.tex +++ b/preambolo.tex @@ -1,6 +1,6 @@ %% preambolo.tex %% -%% Copyright (C) 2000-2019 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/pref.tex b/pref.tex index 4659e92..512fced 100644 --- a/pref.tex +++ b/pref.tex @@ -1,6 +1,6 @@ %% pref.tex %% -%% Copyright (C) 2000-2019 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/session.tex b/session.tex index 639cf0d..77510fe 100644 --- a/session.tex +++ b/session.tex @@ -1,6 +1,6 @@ %% session.tex %% -%% Copyright (C) 2000-2019 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/signal.tex b/signal.tex index e6c75e6..e932644 100644 --- a/signal.tex +++ b/signal.tex @@ -3335,17 +3335,17 @@ stata inizializzata con il valore che si vuole impostare sull'orologio, mentre per \func{clock\_gettime} verrà restituito al suo interno il valore corrente dello stesso. -Si tenga presente inoltre che per eseguire un cambiamento sull'orologio -generale di sistema \const{CLOCK\_REALTIME} occorrono i privilegi -amministrativi;\footnote{ed in particolare la \textit{capability} - \const{CAP\_SYS\_TIME}.} inoltre ogni cambiamento ad esso apportato non avrà -nessun effetto sulle temporizzazioni effettuate in forma relativa, come quelle -impostate sulle quantità di \textit{process time} o per un intervallo di tempo -da trascorrere, ma solo su quelle che hanno richiesto una temporizzazione ad -un istante preciso (in termini di \textit{calendar time}). Si tenga inoltre -presente che nel caso di Linux \const{CLOCK\_REALTIME} è l'unico orologio per -cui si può effettuare una modifica, infatti nonostante lo standard preveda la -possibilità di modifiche anche per \const{CLOCK\_PROCESS\_CPUTIME\_ID} e +Per eseguire un cambiamento sull'orologio generale di sistema +\const{CLOCK\_REALTIME} occorrono i privilegi amministrativi;\footnote{ed in + particolare la \textit{capability} \const{CAP\_SYS\_TIME}.} e che ogni +cambiamento ad esso apportato non avrà nessun effetto sulle temporizzazioni +effettuate in forma relativa, come quelle impostate sulle quantità di +\textit{process time} o per un intervallo di tempo da trascorrere, ma solo su +quelle che hanno richiesto una temporizzazione ad un istante preciso (in +termini di \textit{calendar time}). Si tenga inoltre presente che nel caso di +Linux \const{CLOCK\_REALTIME} è l'unico orologio per cui si può effettuare una +modifica, infatti nonostante lo standard preveda la possibilità di modifiche +anche per \const{CLOCK\_PROCESS\_CPUTIME\_ID} e \const{CLOCK\_THREAD\_CPUTIME\_ID}, il kernel non le consente. Oltre alle due funzioni precedenti, lo standard POSIX prevede una terza @@ -3381,16 +3381,15 @@ voglia utilizzare nelle funzioni di impostazione che non corrisponda ad un multiplo intero di questa risoluzione, sarà troncato in maniera automatica. Gli orologi elencati nella seconda sezione di -tab.~\ref{tab:sig_timer_clockid_types} sono delle estensioni specifiche di -Linux, create per rispondere ad alcune esigenze specifiche, come quella di -tener conto di eventuali periodi di sospensione del sistema, e presenti solo -nelle versioni più recenti del kernel. In particolare gli ultimi due, -contraddistinti dal suffisso \texttt{\_ALARM}, hanno un impiego particolare, -derivato dalle esigenze emerse con Android per l'uso di Linux sui cellulari, -che consente di creare timer che possono scattare, riattivando il sistema, -anche quando questo è in sospensione. Per il loro utilizzo è prevista la -necessità di una capacità specifica, \const{CAP\_WAKE\_ALARM} (vedi -sez.~\ref{sec:proc_capabilities}). +tab.~\ref{tab:sig_timer_clockid_types} sono estensioni specifiche di Linux +presenti solo nelle versioni più recenti del kernel, create per rispondere ad +alcune esigenze specifiche come quella di tener conto di eventuali periodi di +sospensione del sistema. In particolare gli ultimi due, contraddistinti dal +suffisso \texttt{\_ALARM}, hanno un impiego particolare derivato dalle +esigenze emerse con Android per l'uso di Linux sui cellulari, che consente di +creare timer che possono scattare, riattivando il sistema, anche quando questo +è in sospensione. Per il loro utilizzo è prevista la necessità di una capacità +specifica, \const{CAP\_WAKE\_ALARM} (vedi sez.~\ref{sec:proc_capabilities}). Si tenga presente inoltre che con l'introduzione degli \textit{high resolution timer} i due orologi \const{CLOCK\_PROCESS\_CPUTIME\_ID} e @@ -3892,10 +3891,10 @@ anch'essa introdotta dallo standard POSIX.1, il suo prototipo è: La funzione permette di ricavare quali sono i segnali pendenti per il processo in corso, cioè i segnali che sono stati inviati dal kernel ma non sono stati ancora ricevuti dal processo in quanto bloccati. Non esiste una funzione -equivalente nella vecchia interfaccia, ma essa è tutto sommato poco utile, -dato che essa può solo assicurare che un segnale è stato inviato, dato che -escluderne l'avvenuto invio al momento della chiamata non significa nulla -rispetto a quanto potrebbe essere in un qualunque momento successivo. +equivalente nella vecchia interfaccia, ma essa, potendo solo assicurare che un +segnale è stato inviato, è tutto sommato poco utile dato che escluderne +l'avvenuto invio al momento della chiamata non significa nulla rispetto a +quanto potrebbe accadere in un qualunque momento successivo. Una delle caratteristiche di BSD, disponibile anche in Linux, è la possibilità di usare uno \textit{stack} alternativo per i segnali; è cioè possibile fare diff --git a/thread.tex b/thread.tex index 62f4dfd..afb1b62 100644 --- a/thread.tex +++ b/thread.tex @@ -1,6 +1,6 @@ %% thread.tex %% -%% Copyright (C) 2007-2019 Simone Piccardi. Permission is granted to +%% Copyright (C) 2007-2023 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/trasplayer.tex b/trasplayer.tex index 97b0efb..978e9bb 100644 --- a/trasplayer.tex +++ b/trasplayer.tex @@ -1,6 +1,6 @@ %% tcpprot.tex %% -%% Copyright (C) 2002-2019 Simone Piccardi. Permission is granted to copy, +%% Copyright (C) 2002-2023 Simone Piccardi. Permission is granted to copy, %% distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", -- 2.39.5 From 9591992789144176c6d5d90920d21bbda5e4b7d7 Mon Sep 17 00:00:00 2001 From: piccardi Date: Fri, 20 Oct 2023 12:43:52 +0200 Subject: [PATCH 05/12] Altre piccole correzioni --- session.tex | 22 ++++++++-------- sources/sigwait.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 11 deletions(-) create mode 100644 sources/sigwait.c diff --git a/session.tex b/session.tex index 77510fe..25c8146 100644 --- a/session.tex +++ b/session.tex @@ -44,9 +44,9 @@ Originariamente si trattava di dispositivi specifici (i terminali seriali, se non addirittura le telescriventi). Oggi questa interfaccia viene in genere emulata o tramite programmi o con le cosiddette console virtuali associate a monitor e tastiera, ma esiste sempre la possibilità di associarla direttamente -ad alcuni dispositivi, come eventuali linee seriali, ed in certi casi, come -buona parte dei dispositivi embedded su cui gira Linux (come router, access -point, ecc.) questa resta anche l'unica opzione per una \textit{console} di +a dispositivi specifici lelinee seriali, che in certi casi, come avviene per +buona parte dei dispositivi embedded su cui gira Linux come router, access +point, ecc. sono l'unica opzione per una avere una \textit{console} di sistema. @@ -64,7 +64,7 @@ molti terminali in contemporanea da una singola postazione di lavoro, ma il sistema è nato prima dell'esistenza di tutto ciò. Il \textit{job control} è una caratteristica opzionale, introdotta in BSD -negli anni '80, e successivamente standardizzata da POSIX.1. La sua +negli anni '80, e successivamente standardizzata da POSIX.1; la sua disponibilità nel sistema è verificabile attraverso il controllo della macro \macro{\_POSIX\_JOB\_CONTROL}. In generale il \textit{job control} richiede il supporto sia da parte della shell (quasi tutte ormai lo hanno), che da parte @@ -562,7 +562,7 @@ terminati. L'organizzazione del sistema del job control è strettamente connessa alle modalità con cui un utente accede al sistema per dare comandi, collegandosi ad esso con un terminale, che sia questo realmente tale, come un VT100 collegato -ad una seriale o virtuale, come quelli associati a schermo e tastiera o ad una +ad una seriale, o virtuale, come quelli associati a schermo e tastiera o ad una connessione di rete. Dato che i concetti base sono gli stessi, e dato che alla fine le differenze sono nel dispositivo cui il kernel associa i file standard (vedi tab.~\ref{tab:file_std_files}) per l'I/O, tratteremo solo il caso @@ -695,12 +695,12 @@ Questi programmi, che devono essere eseguiti in modalità non interattiva e senza nessun intervento dell'utente, sono normalmente chiamati \textsl{demoni}, (o \textit{daemons}), nome ispirato dagli omonimi spiritelli della mitologia greca che svolgevano compiti che gli dei trovavano noiosi, di -cui parla anche Socrate (che sosteneva di averne uno al suo servizio). +cui parla anche Socrate, che sosteneva di averne uno al suo servizio. %TODO ricontrollare, i miei ricordi di filosofia sono piuttosto datati. Se però si lancia un programma demone dalla riga di comando in un sistema che -supporta, come Linux, il \textit{job control} esso verrà comunque associato ad +supporta il \textit{job control} come Linux, esso verrà comunque associato ad un terminale di controllo e mantenuto all'interno di una sessione, e anche se può essere mandato in background e non eseguire più nessun I/O su terminale, si avranno comunque tutte le conseguenze che abbiamo trattato in @@ -823,7 +823,7 @@ differenti meccanismi come: le modalità con cui queste azioni vengono realizzate dipendono ovviamente dal demone che si usa, per la gestione del quale si rimanda ad un testo di amministrazione di sistema.\footnote{l'argomento è ad esempio coperto dal - capitolo 3.2.3 si \cite{AGL}.} + capitolo 3.2.3 di \cite{AGL}.} La \acr{glibc} definisce una serie di funzioni standard con cui un processo può accedere in maniera generica al servizio di \textit{syslog}, che però @@ -1270,9 +1270,9 @@ al di fuori di questo. \label{sec:sess_terminal_io} Benché come ogni altro dispositivo i terminali siano accessibili come file, -essi hanno assunto storicamente, essendo stati a lungo l'unico modo di -accedere al sistema, una loro rilevanza specifica, che abbiamo già avuto modo -di incontrare nella precedente sezione. +essendo stati a lungo l'unico modo di accedere al sistema essi hanno assunto +storicamente una loro rilevanza specifica, che abbiamo già avuto modo di +incontrare nella precedente sezione. Esamineremo qui le peculiarità dell'I/O eseguito sui terminali, che per la loro particolare natura presenta delle differenze rispetto ai normali file su diff --git a/sources/sigwait.c b/sources/sigwait.c new file mode 100644 index 0000000..7dcc983 --- /dev/null +++ b/sources/sigwait.c @@ -0,0 +1,66 @@ +/* sigwait.c + * + * Copyright (C) 2021 Simone Piccardi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/**************************************************************** + * + * Program sigwait.c: + * Test program for sigwait function + * + * Author: Simone Piccardi + * Nov. 2021 + * + ****************************************************************/ +/* + * Include needed headers + */ +#define _GNU_SOURCE +#include /* unix standard library */ +#include /* signal constants, types and functions */ +#include /* error definitions and routines */ +#include /* C standard library */ +#include /* unix standard library */ +#include /* standard I/O library */ +#include /* C strings library */ + +int main(int argc, char *argv[]) +{ +/* + * Variables definition + */ + int i; + pid_t pid = 0; + int sig,res; + sigset_t set; + + sigemptyset(&set); + sigaddset(&set, SIGALRM); +// while (1) { + res=sigwait(&set, &sig); + printf("Sig was %d", sig); + if ( res > 0) { + printf("Errno was %d", errno); + perror("errore"); + printf("Result was %d", res); + printf("Error by res was %s", strerror(res)); + exit(11); + } else { + printf("Result was %d", res); + printf("Normal exit"); + } +// } +} -- 2.39.5 From f7a6ae8c2e5b4e412f1805db07582b1bc5ae4f06 Mon Sep 17 00:00:00 2001 From: Simone Piccardi Date: Wed, 10 Jan 2024 12:11:16 +0100 Subject: [PATCH 06/12] Note varie --- fileadv.tex | 12 +++++++++++- filedir.tex | 2 ++ procadv.tex | 4 ++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/fileadv.tex b/fileadv.tex index 948f721..8e83df6 100644 --- a/fileadv.tex +++ b/fileadv.tex @@ -925,6 +925,7 @@ attuale delle cose è sconsigliabile fare affidamento sul \textit{mandatory % TODO il supporto è stato reso opzionale nel 4.5, verrà eliminato nel futuro % (vedi http://lwn.net/Articles/667210/) +% è stato eliminato nel 5.15 \itindend{file~locking} @@ -3498,6 +3499,7 @@ raggruppati in un solo evento. % http://lwn.net/Articles/343346/ (incluso nel 2.6.36) % fanotify_mark() ha FAN_MARK_FILESYSTEM dal 4.20 % fanotify() ha FAN_OPEN_EXEC dal 4.21/5.0 +% fanotify() ha FAN_REPORT_PIDFD dal 5.14 \subsection{L'interfaccia POSIX per l'I/O asincrono} @@ -4733,7 +4735,9 @@ caching dei dati. % https://lwn.net/Articles/733256/). % TODO aggiunte MADV_COLD e MADV_PAGEOUT dal kernel 5.4, vedi % https://git.kernel.org/linus/9c276cc65a58 e -% https://git.kernel.org/linus/1a4e58cce84e +% https://git.kernel.org/linus/1a4e58cce84e +% TODO: aggiunte MADV_POPULATE_READ e MADV_POPULATE_WRITE (vedi +% https://lwn.net/Articles/861695/) \footnotetext{a partire dal kernel 2.6.32 è stato introdotto un meccanismo che identifica pagine di memoria identiche e le accorpa in una unica pagina @@ -5862,6 +5866,12 @@ da fare % TODO: trattare i file seal, vedi fcntl / F_ADD_SEAL e memfd_create +% TODO: con il kernel 5.14 è stata introdotta la syscall memfd_secret, vedi +% https://lwn.net/Articles/835342/ https://lwn.net/Articles/812325/ +% https://lwn.net/Articles/865256/ +% https://lwn.net/ml/linux-mm/20210729082900.1581359-1-rppt@kernel.org/ e +% https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1507f51255c9 + % TODO trattare qui ioctl_ficlonerange ? % TODO trattare qui close_range, vedi https://lwn.net/Articles/789023/ diff --git a/filedir.tex b/filedir.tex index 6577274..e1e89e9 100644 --- a/filedir.tex +++ b/filedir.tex @@ -6262,6 +6262,8 @@ gestione delle quote è \funcd{quotactl}, ed il suo prototipo è: \end{funcproto} % TODO rivedere gli errori +% TODO aggiungere quotactl_fd introdotta con il kernel 5.14, vedi +% https://lwn.net/Articles/859679/ La funzione richiede che il filesystem sul quale si vuole operare, che deve essere specificato con il nome del relativo file di dispositivo nell'argomento diff --git a/procadv.tex b/procadv.tex index 53eb58a..69f81ea 100644 --- a/procadv.tex +++ b/procadv.tex @@ -1565,6 +1565,10 @@ all'ordinario valore nullo (dato per implicito). %TODO: trattare PR_MPX_*_MANAGEMENT, dal 3.19, vedi % https://lwn.net/Articles/582712/ %TODO: trattare PR_*NO_NEW_PRIVS, dal 3.5 +%TODO: trattare il core scheduling dal 5.14, vedi +%https://lwn.net/Articles/780703/ e https://lwn.net/Articles/861251/ +%TODO: trattare PR_SPEC_L1D_FLUSH vedi https://git.kernel.org/linus/b7fe54f6c2d4 + \begin{basedescript}{\desclabelwidth{1.5cm}\desclabelstyle{\nextlinelabel}} \item[\constd{PR\_CAPBSET\_READ}] Controlla la disponibilità di una delle -- 2.39.5 From 9ba1c62a79690cb2bdb753b2bc3728d046142d70 Mon Sep 17 00:00:00 2001 From: Simone Piccardi Date: Wed, 10 Jan 2024 12:18:24 +0100 Subject: [PATCH 07/12] Aggiornamento note copyright --- build.tex | 2 +- errors.tex | 2 +- fileadv.tex | 2 +- filedir.tex | 2 +- fileio.tex | 2 +- gapil.tex | 4 ++-- intro.tex | 2 +- ipc.tex | 2 +- macro.tex | 2 +- netlayer.tex | 2 +- network.tex | 2 +- othersock.tex | 2 +- preambolo.tex | 2 +- pref.tex | 2 +- process.tex | 2 +- prochand.tex | 2 +- ringraziamenti.tex | 2 +- session.tex | 2 +- signal.tex | 2 +- sockadv.tex | 2 +- sockctrl.tex | 2 +- socket.tex | 2 +- system.tex | 2 +- tcpsock.tex | 2 +- thread.tex | 2 +- trasplayer.tex | 2 +- 26 files changed, 27 insertions(+), 27 deletions(-) diff --git a/build.tex b/build.tex index d515d78..ad1ba8f 100644 --- a/build.tex +++ b/build.tex @@ -1,6 +1,6 @@ %% build.tex %% -%% Copyright (C) 1999-2023 Simone Piccardi. Permission is granted to copy, +%% Copyright (C) 1999-2024 Simone Piccardi. Permission is granted to copy, %% distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/errors.tex b/errors.tex index d3c8d8d..18d618c 100644 --- a/errors.tex +++ b/errors.tex @@ -1,6 +1,6 @@ %% errors.tex %% -%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/fileadv.tex b/fileadv.tex index 189972a..1bce388 100644 --- a/fileadv.tex +++ b/fileadv.tex @@ -1,6 +1,6 @@ %% fileadv.tex %% -%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/filedir.tex b/filedir.tex index 41f50a2..96c4b58 100644 --- a/filedir.tex +++ b/filedir.tex @@ -1,6 +1,6 @@ %% filedir.tex %% -%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/fileio.tex b/fileio.tex index 301b98d..59a3614 100644 --- a/fileio.tex +++ b/fileio.tex @@ -1,6 +1,6 @@ %% fileio.tex (merge fileunix.tex - filestd.tex) %% -%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/gapil.tex b/gapil.tex index 4ad87a0..81c00c5 100644 --- a/gapil.tex +++ b/gapil.tex @@ -1,6 +1,6 @@ %% gapil.tex %% -%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.3 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", @@ -136,7 +136,7 @@ hyperfootnotes=false]{hyperref} \begin{quote} - Copyright \copyright\ 2000-2021 Simone Piccardi. Permission is granted to + Copyright \copyright\ 2000-2024 Simone Piccardi. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being ``Un preambolo'' diff --git a/intro.tex b/intro.tex index 0929867..74091fc 100644 --- a/intro.tex +++ b/intro.tex @@ -1,6 +1,6 @@ %% intro.tex %% -%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/ipc.tex b/ipc.tex index bd310d3..415b2a2 100644 --- a/ipc.tex +++ b/ipc.tex @@ -1,6 +1,6 @@ %% ipc.tex %% -%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/macro.tex b/macro.tex index 30d64fe..9ede6c4 100644 --- a/macro.tex +++ b/macro.tex @@ -1,6 +1,6 @@ %% macro.tex %% -%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/netlayer.tex b/netlayer.tex index 633ffbc..275b00d 100644 --- a/netlayer.tex +++ b/netlayer.tex @@ -1,6 +1,6 @@ %% netlayer.tex %% -%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/network.tex b/network.tex index 95f54f4..7672423 100644 --- a/network.tex +++ b/network.tex @@ -1,6 +1,6 @@ %% network.tex %% -%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/othersock.tex b/othersock.tex index 3772d68..0f7b665 100644 --- a/othersock.tex +++ b/othersock.tex @@ -1,6 +1,6 @@ %% othersock.tex %% -%% Copyright (C) 2004-2023 Simone Piccardi. Permission is granted to +%% Copyright (C) 2004-2024 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/preambolo.tex b/preambolo.tex index a3f1175..0d51e0e 100644 --- a/preambolo.tex +++ b/preambolo.tex @@ -1,6 +1,6 @@ %% preambolo.tex %% -%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/pref.tex b/pref.tex index 512fced..03e134f 100644 --- a/pref.tex +++ b/pref.tex @@ -1,6 +1,6 @@ %% pref.tex %% -%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/process.tex b/process.tex index 57b8873..349806e 100644 --- a/process.tex +++ b/process.tex @@ -1,6 +1,6 @@ %% process.tex %% -%% Copyright (C) 2000-2019 by Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2024 by Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/prochand.tex b/prochand.tex index 3ee2344..e02f0fd 100644 --- a/prochand.tex +++ b/prochand.tex @@ -1,6 +1,6 @@ %% prochand.tex %% -%% Copyright (C) 2000-2019 by Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2024 by Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/ringraziamenti.tex b/ringraziamenti.tex index 6d4e77e..c5c75df 100644 --- a/ringraziamenti.tex +++ b/ringraziamenti.tex @@ -1,6 +1,6 @@ %% ringraziamenti.tex %% -%% Copyright (C) 2000-2019 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/session.tex b/session.tex index 25c8146..beb46bb 100644 --- a/session.tex +++ b/session.tex @@ -1,6 +1,6 @@ %% session.tex %% -%% Copyright (C) 2000-2023 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/signal.tex b/signal.tex index e932644..7b6cb8e 100644 --- a/signal.tex +++ b/signal.tex @@ -1,6 +1,6 @@ %% signal.tex %% -%% Copyright (C) 2000-2019 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/sockadv.tex b/sockadv.tex index a9e4cd5..8eede04 100644 --- a/sockadv.tex +++ b/sockadv.tex @@ -1,6 +1,6 @@ %% sockadv.tex %% -%% Copyright (C) 2004-2019 Simone Piccardi. Permission is granted to +%% Copyright (C) 2004-2024 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/sockctrl.tex b/sockctrl.tex index 17514f5..19f9ddc 100644 --- a/sockctrl.tex +++ b/sockctrl.tex @@ -1,6 +1,6 @@ %% sockctrl.tex %% -%% Copyright (C) 2004-2019 Simone Piccardi. Permission is granted to +%% Copyright (C) 2004-2024 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Prefazione", diff --git a/socket.tex b/socket.tex index b01ff3a..51bdad7 100644 --- a/socket.tex +++ b/socket.tex @@ -1,6 +1,6 @@ %% socket.tex %% -%% Copyright (C) 2000-2019 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/system.tex b/system.tex index a761b4d..671b102 100644 --- a/system.tex +++ b/system.tex @@ -1,6 +1,6 @@ %% system.tex %% -%% Copyright (C) 2000-2019 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/tcpsock.tex b/tcpsock.tex index 5951a91..525867e 100644 --- a/tcpsock.tex +++ b/tcpsock.tex @@ -1,6 +1,6 @@ %% tcpsock.tex %% -%% Copyright (C) 2000-2019 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/thread.tex b/thread.tex index afb1b62..b067920 100644 --- a/thread.tex +++ b/thread.tex @@ -1,6 +1,6 @@ %% thread.tex %% -%% Copyright (C) 2007-2023 Simone Piccardi. Permission is granted to +%% Copyright (C) 2007-2024 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/trasplayer.tex b/trasplayer.tex index 978e9bb..4493730 100644 --- a/trasplayer.tex +++ b/trasplayer.tex @@ -1,6 +1,6 @@ %% tcpprot.tex %% -%% Copyright (C) 2002-2023 Simone Piccardi. Permission is granted to copy, +%% Copyright (C) 2002-2024 Simone Piccardi. Permission is granted to copy, %% distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", -- 2.39.5 From edae5086a3e87e3b08505cb2acfb3d001ae38242 Mon Sep 17 00:00:00 2001 From: piccardi Date: Fri, 18 Oct 2024 11:54:21 +0200 Subject: [PATCH 08/12] Piccole correzioni e link per openpty e affini --- session.tex | 101 +++++++++++++++++++++++++++++----------------------- 1 file changed, 56 insertions(+), 45 deletions(-) diff --git a/session.tex b/session.tex index beb46bb..7a77919 100644 --- a/session.tex +++ b/session.tex @@ -1352,8 +1352,8 @@ ricevuti impiegandoli opportunamente come comandi o come dati. Per capire le caratteristiche dell'I/O sui terminali occorre esaminare le modalità con cui esso viene effettuato. L'accesso, come per tutti i dispositivi, viene gestito dal kernel, ma per tutti i terminali viene -utilizzata una architettura generica che si è schematizzata in -fig.~\ref{fig:term_struct}. +utilizzata una architettura generica che si è schematizzata in maniera +semplificata in fig.~\ref{fig:term_struct}. Ad ogni terminale sono sempre associate due code per gestire l'input e l'output, che ne implementano una bufferizzazione @@ -1406,8 +1406,9 @@ descriptor che corrispondono ad un terminale, in caso contrario lo standard richiede che venga restituito un errore di \errcode{ENOTTY}. Per evitare l'errore, ed anche semplicemente per verificare se un file -descriptor corrisponde ad un terminale, è disponibile la funzione -\funcd{isatty}, il cui prototipo è: +descriptor corrisponde ad un terminale (cosa che viene fatta da alcuni +programmi quando richiedono l'immissione di una password), è disponibile la +funzione \funcd{isatty}, il cui prototipo è: \begin{funcproto}{ \fhead{unistd.h} @@ -1419,13 +1420,14 @@ descriptor corrisponde ad un terminale, è disponibile la funzione altrimenti, nel qual caso \var{errno} assumerà uno dei valori: \begin{errlist} \item[\errcode{EBADF}] \param{fd} non è un file descriptor valido. - \item[\errcode{EINVAL}] \param{fd} non è associato a un terminale (non - ottempera a POSIX.1-2001 che richiederebbe \errcode{ENOTTY}). + \item[\errcode{ENOTTY}] \param{fd} non è associato a un terminale (alcune + vecchie versioni del kernel restituiscono \errcode{EINVAL} che non + ottempera a POSIX.1-2001). \end{errlist} } \end{funcproto} -Un'altra funzione per avere informazioni su un terminale è \funcd{ttyname}, +Una seconda funzione per avere informazioni su un terminale è \funcd{ttyname}, che permette di ottenere il nome del file di dispositivo del terminale associato ad un file descriptor; il suo prototipo è: @@ -1508,14 +1510,14 @@ essere in grado di aprire il terminale. I vari attributi associati ad un terminale vengono mantenuti per ciascuno di essi in una struttura \struct{termios} che viene usata dalle varie funzioni dell'interfaccia. In fig.~\ref{fig:term_termios} si sono riportati tutti i -campi della definizione di questa struttura usata in Linux; di questi solo i -primi cinque sono previsti dallo standard POSIX.1, ma le varie implementazioni -ne aggiungono degli altri per mantenere ulteriori informazioni.\footnote{la - definizione della struttura si trova in \file{bits/termios.h}, da non +campi della definizione di questa struttura usata in Linux;\footnote{la + definizione della struttura si trova in \file{bits/termios-struct.h}, da non includere mai direttamente; Linux, seguendo l'esempio di BSD, aggiunge i due campi \var{c\_ispeed} e \var{c\_ospeed} per mantenere le velocità delle linee seriali, ed un campo ulteriore, \var{c\_line} per indicare la - disciplina di linea.} + disciplina di linea.} di questi solo i primi quattro flag ed il successivo +\texttt{c\_cc} sono previsti dallo standard POSIX.1, ma le varie +implementazioni ne aggiungono degli altri per mantenere ulteriori informazioni. \begin{figure}[!htb] \footnotesize \centering @@ -1621,26 +1623,28 @@ modificare i bit su cui non si interviene. \end{table} Il primo flag, mantenuto nel campo \var{c\_iflag}, è detto \textsl{flag di - input} e controlla le modalità di funzionamento dell'input dei caratteri sul -terminale, come il controllo di parità, il controllo di flusso, la gestione -dei caratteri speciali; un elenco dei vari bit, del loro significato e delle -costanti utilizzate per identificarli è riportato in -tab.~\ref{tab:sess_termios_iflag}. - -Si noti come alcuni di questi flag (come quelli per la gestione del flusso) -fanno riferimento a delle caratteristiche che ormai sono completamente -obsolete; la maggior parte inoltre è tipica di terminali seriali, e non ha -alcun effetto su dispositivi diversi come le console virtuali o gli -pseudo-terminali usati nelle connessioni di rete. + input} e controlla le modalità con cui viene gestita l'immissione dei +caratteri sul terminale, per funzionalità come il controllo di parità, il +controllo di flusso, la gestione dei caratteri speciali; un elenco dei vari +bit che compongono il flag, del loro significato e delle costanti utilizzate +per identificarli è riportato in tab.~\ref{tab:sess_termios_iflag}. + +Si noti come alcuni di questi flag (come quelli relativi al controllo di +gestione del flusso) fanno riferimento a delle caratteristiche dei terminali +che ormai sono completamente obsolete; la maggior parte inoltre è tipica dei +terminali seriali, e non ha alcun effetto su dispositivi diversi come le +console virtuali sullo schermo o gli pseudo-terminali usati nelle connessioni +di rete. Il secondo flag, mantenuto nel campo \var{c\_oflag}, è detto \textsl{flag di - output} e controlla le modalità di funzionamento dell'output dei caratteri, -come l'impacchettamento dei caratteri sullo schermo, la traslazione degli a -capo, la conversione dei caratteri speciali; un elenco dei vari bit, del loro -significato e delle costanti utilizzate per identificarli è riportato in -tab.~\ref{tab:sess_termios_oflag}, di questi solo \const{OPOST} era previsto -da POSIX.1, buona parte degli altri sono stati aggiunti in POSIX.1-2001, -quelli ancora assenti sono stati indicati esplicitamente. + output} e controlla le modalità con cui viene gestito il funzionamento dei +caratteri scritti sul terminale, come l'impacchettamento dei caratteri sullo +schermo, la traslazione degli a capo, la conversione dei caratteri speciali. +Un elenco dei vari bit, del loro significato e delle costanti utilizzate per +identificarli è stato riportato in tab.~\ref{tab:sess_termios_oflag}, di +questi soltanto \const{OPOST} era previsto da POSIX.1, buona parte degli altri +flag sono stati aggiunti in POSIX.1-2001, quelli ancora assenti sono stati +indicati esplicitamente. \begin{table}[!htb] \footnotesize @@ -1698,17 +1702,19 @@ quelli ancora assenti sono stati indicati esplicitamente. \end{table} Si noti come alcuni dei valori riportati in tab.~\ref{tab:sess_termios_oflag} -fanno riferimento a delle maschere di bit; essi infatti vengono utilizzati per -impostare alcuni valori numerici relativi ai ritardi nell'output di alcuni -caratteri: una caratteristica originaria dei primi terminali su telescrivente, -che avevano bisogno di tempistiche diverse per spostare il carrello in -risposta ai caratteri speciali, e che oggi sono completamente in disuso. - -Si tenga presente inoltre che nel caso delle maschere il valore da inserire in -\var{c\_oflag} deve essere fornito avendo cura di cancellare prima tutti i bit -della maschera, i valori da immettere infatti (quelli riportati nella -spiegazione corrispondente) sono numerici e non per bit, per cui possono -sovrapporsi fra di loro. Occorrerà perciò utilizzare un codice del tipo: +fanno riferimento non a bit singoli, ma a delle maschere di bit; essi infatti +vengono utilizzati per impostare alcuni valori numerici relativi ai ritardi da +applicare alla scrittura sul terminale di alcuni caratteri: si tratta di una +caratteristica originaria dei primi terminali su telescrivente, che avevano +bisogno di tempistiche diverse per spostare il carrello in risposta ai +caratteri speciali, e che oggi sono completamente in disuso. + +Si tenga presente inoltre che nel caso si utilizzi una di queste maschere di +bit il valore da inserire in \var{c\_oflag} deve essere fornito avendo cura di +cancellare prima tutti i bit della maschera; i valori da immettere infatti +(quelli riportati nella spiegazione corrispondente) sono numerici e non per +bit, per cui possono sovrapporsi fra di loro. Occorrerà perciò utilizzare un +codice del tipo: \includecodesnip{listati/oflag.c} @@ -1911,8 +1917,8 @@ Oltre ai vari flag per gestire le varie caratteristiche dei terminali, impostare i caratteri speciali associati alle varie funzioni di controllo. Il numero di questi caratteri speciali è indicato dalla costante \constd{NCCS}, POSIX ne specifica almeno 11, ma molte implementazioni ne definiscono molti -altri.\footnote{in Linux il valore della costante è 32, anche se i caratteri - effettivamente definiti sono solo 17.} +altri; in Linux il valore della costante è 32, anche se i caratteri +effettivamente definiti sono solo 17. \begin{table}[!htb] \footnotesize @@ -2187,7 +2193,8 @@ velocità tipiche delle linee seriali: \begin{verbatim} B0 B50 B75 B110 B134 B150 B200 B300 B600 B1200 B1800 B2400 B4800 B9600 - B19200 B38400 B57600 B115200 B230400 B460800 + B19200 B38400 B57600 B115200 B230400 B460800 B460800 + B500000 B576000 B921600 B1000000 B1152000 B1500000 B2000000 \end{verbatim} Un terminale può utilizzare solo alcune delle velocità possibili, le funzioni @@ -2489,7 +2496,6 @@ Da fare. Qui vanno spiegati i terminali virtuali, \file{/dev/pty} e compagnia. % vedi man pts -% vedi \subsection{Allocazione dei terminali virtuali} @@ -2503,6 +2509,11 @@ Qui vanno le cose su \func{openpty} e compagnia. % vedi http://lwn.net/Articles/688809/, % http://man7.org/linux/man-pages/man3/ptsname.3.html +% vedi +% https://stackoverflow.com/questions/77231881/how-to-turn-a-pty-shell-into-a-remote-shell +% https://gist.github.com/zmwangx/2bac2af9195cad47069419ccd9ee98d8 +% https://www.uninformativ.de/blog/postings/2018-02-24/0/POSTING-en.html +% https://cpp.hotexamples.com/it/examples/-/-/openpty/cpp-openpty-function-examples.html % TODO materiale sulle seriali % vedi http://www.easysw.com/~mike/serial/serial.html -- 2.39.5 From b47944a510894e2fef065117d193b9771a7d2ed9 Mon Sep 17 00:00:00 2001 From: piccardi Date: Sun, 20 Oct 2024 19:56:55 +0200 Subject: [PATCH 09/12] Correzioni --- session.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/session.tex b/session.tex index 7a77919..ac90872 100644 --- a/session.tex +++ b/session.tex @@ -44,7 +44,7 @@ Originariamente si trattava di dispositivi specifici (i terminali seriali, se non addirittura le telescriventi). Oggi questa interfaccia viene in genere emulata o tramite programmi o con le cosiddette console virtuali associate a monitor e tastiera, ma esiste sempre la possibilità di associarla direttamente -a dispositivi specifici lelinee seriali, che in certi casi, come avviene per +a dispositivi specifici come le linee seriali, che in certi casi, come avviene per buona parte dei dispositivi embedded su cui gira Linux come router, access point, ecc. sono l'unica opzione per una avere una \textit{console} di sistema. @@ -2520,7 +2520,7 @@ Qui vanno le cose su \func{openpty} e compagnia. % TODO materiale generico sul layer TTY % vedi http://www.linusakesson.net/programming/tty/index.php -% LocalWords: kernel multitasking job control BSD POSIX shell sez group +% LocalWords: kernel multitasking job control BSD POSIX shell sez group SysV % LocalWords: foreground process bg fg waitpid WUNTRACED pgrp session sched % LocalWords: struct pgid sid pid ps getpgid getpgrp unistd void errno int % LocalWords: ESRCH getsid glibc system call XOPEN SOURCE EPERM setpgrp EACCES @@ -2558,7 +2558,7 @@ Qui vanno le cose su \func{openpty} e compagnia. % LocalWords: closelog dmesg sysctl klogctl sys ERESTARTSYS ConsoleKit to CoPy % LocalWords: loglevel message libc klog mydmesg CAP ADMIN LXC pipelining UID % LocalWords: TIOCSPGRP GID IUTF UTF LOBLK NONBLOCK CMSPAR MARK VDSUSP VSTATUS -% LocalWords: cfsetspeed raw cfmakeraw +% LocalWords: cfsetspeed raw cfmakeraw dell'I SVr l'I %%% Local Variables: %%% mode: latex -- 2.39.5 From 6bb88c30a34e49a8d9f87e8214e880eb6209c6fe Mon Sep 17 00:00:00 2001 From: Simone Piccardi Date: Wed, 23 Oct 2024 16:29:38 +0200 Subject: [PATCH 10/12] Aggiunti TODO per variazioni introdotte da nuovi kernel --- filedir.tex | 3 +++ fileio.tex | 3 +++ procadv.tex | 9 +++++++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/filedir.tex b/filedir.tex index bc1f5ab..410de41 100644 --- a/filedir.tex +++ b/filedir.tex @@ -1409,6 +1409,9 @@ trattazione, di queste funzioni, rimandando al manuale della \acr{glibc} % filesystem, vedi https://lwn.net/Articles/759499/ e % https://git.kernel.org/linus/f1b5618e013a +% TODO con il 6.8 sono state introdotte le syscall listmount() and statmount() +% system calls, vedi https://lwn.net/Articles/950569/ e +% https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8c9440fea774 \section{La gestione di file e directory} \label{sec:file_dir} diff --git a/fileio.tex b/fileio.tex index 55c076e..d1b833f 100644 --- a/fileio.tex +++ b/fileio.tex @@ -2918,6 +2918,9 @@ il nome indicato nel precedente prototipo), è riportata di seguito: o \errcode{EMFILE} se il processo ha già raggiunto il massimo numero di descrittori consentito. + % TODO: trattare F_DUPFD_QUERY aggiunta con il kernel 6.10 + % TODO: trattare F_CREATE_QUERY aggiunta con il kernel 6.12 + \item[\constd{F\_DUPFD\_CLOEXEC}] ha lo stesso effetto di \const{F\_DUPFD}, ma in più attiva il flag di \textit{close-on-exec} sul file descriptor duplicato, in modo da evitare una successiva chiamata con diff --git a/procadv.tex b/procadv.tex index 4b5912e..d7b8aef 100644 --- a/procadv.tex +++ b/procadv.tex @@ -1492,12 +1492,14 @@ alcune opzioni di controllo attivabili via \func{sysctl} o il filesystem % TODO: trattare pure protected_regular e protected_fifos introdotti con il % 4.19 (vedi https://lwn.net/Articles/763106/) - - % TODO: trattare keyctl (man 2 keyctl) % (fare sezione dedicata ????) % TODO documentare la Crypto API del kernel +% TODO: trattere le syscall di gestione dei Linux Security Modules +% lsm_list_modules(), lsm_get_self_attr() e lsm_set_self_attr(), aggiunte con +% il 6.8, vedi https://lwn.net/Articles/919059/ e +% https://docs.kernel.org/next/userspace-api/lsm.html % TODO trattare le funzioni di protezione della memoria pkey_alloc, pkey_free, % pkey_mprotect, introdotte con il kernel 4.8, vedi @@ -1909,6 +1911,9 @@ Introdotta a partire dal kernel 2.4.21, solo su PowerPC. % TODO documentare PR_SET_MDWE in 6.3, vedi % https://git.kernel.org/linus/b507808ebce2 +% TODO documentare PR_SET_MEMORY_MERGE in 6.4, vedi +% https://lwn.net/Articles/953141/ + \label{sec:prctl_operation} \end{basedescript} -- 2.39.5 From 044a7e80feafaf0bdfc9f9c70128a4d36a2e3ffa Mon Sep 17 00:00:00 2001 From: piccardi Date: Wed, 5 Feb 2025 11:48:50 +0100 Subject: [PATCH 11/12] Piccole correzioni --- session.tex | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/session.tex b/session.tex index ac90872..54bd915 100644 --- a/session.tex +++ b/session.tex @@ -1,6 +1,6 @@ %% session.tex %% -%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2025 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", @@ -44,9 +44,9 @@ Originariamente si trattava di dispositivi specifici (i terminali seriali, se non addirittura le telescriventi). Oggi questa interfaccia viene in genere emulata o tramite programmi o con le cosiddette console virtuali associate a monitor e tastiera, ma esiste sempre la possibilità di associarla direttamente -a dispositivi specifici come le linee seriali, che in certi casi, come avviene per -buona parte dei dispositivi embedded su cui gira Linux come router, access -point, ecc. sono l'unica opzione per una avere una \textit{console} di +a dispositivi specifici come le linee seriali, che in certi casi, come avviene +per buona parte dei dispositivi embedded su cui gira Linux, come router, +access point, ecc. sono l'unica opzione per una avere una \textit{console} di sistema. @@ -560,15 +560,15 @@ terminati. \label{sec:sess_login} L'organizzazione del sistema del job control è strettamente connessa alle -modalità con cui un utente accede al sistema per dare comandi, collegandosi ad +modalità con cui un utente accede al sistema per dare comandi collegandosi ad esso con un terminale, che sia questo realmente tale, come un VT100 collegato -ad una seriale, o virtuale, come quelli associati a schermo e tastiera o ad una -connessione di rete. Dato che i concetti base sono gli stessi, e dato che alla -fine le differenze sono nel dispositivo cui il kernel associa i file standard -(vedi tab.~\ref{tab:file_std_files}) per l'I/O, tratteremo solo il caso -classico del terminale, in generale nel caso di login via rete o di terminali -lanciati dall'interfaccia grafica cambia anche il processo da cui ha origine -l'esecuzione della shell. +ad una seriale, o virtuale, come quelli associati a schermo e tastiera o ad +una connessione di rete. Dato che i concetti base sono gli stessi, e dato che +alla fine le differenze sono nel dispositivo cui il kernel associa i file +standard (vedi tab.~\ref{tab:file_std_files}) per l'I/O, tratteremo solo il +caso classico del terminale, in generale nel caso di login via rete o di +terminali lanciati dall'interfaccia grafica cambia anche il processo da cui ha +origine l'esecuzione della shell. Abbiamo già brevemente illustrato in sez.~\ref{sec:intro_kern_and_sys} le modalità con cui il sistema si avvia, e di come, a partire da \cmd{init}, @@ -589,7 +589,7 @@ definito nello stesso file. Tralasciando la descrizione del sistema dei \textit{run level}, (per il quale si rimanda alla lettura delle pagine di manuale di \cmd{init} e di -\file{inittab} o alla trattazione in sez.~5.3 di \cite{AGL}) quello che +\file{inittab} o alla trattazione in sez.~5.4.5 di \cite{AGL}) quello che comunque viene sempre fatto è di eseguire almeno una istanza di un programma che permetta l'accesso ad un terminale. Uno schema di massima della procedura è riportato in fig.~\ref{fig:sess_term_login}. -- 2.39.5 From df6cd5c54af40065d39e1c6dcb49a642701a2892 Mon Sep 17 00:00:00 2001 From: Simone Piccardi Date: Wed, 5 Feb 2025 12:00:08 +0100 Subject: [PATCH 12/12] Note di copyright 2025 --- build.tex | 2 +- errors.tex | 2 +- fileadv.tex | 2 +- filedir.tex | 5 ++++- fileio.tex | 2 +- gapil.tex | 4 ++-- intro.tex | 2 +- ipc.tex | 2 +- macro.tex | 2 +- netlayer.tex | 2 +- network.tex | 2 +- othersock.tex | 2 +- preambolo.tex | 2 +- pref.tex | 2 +- process.tex | 2 +- prochand.tex | 2 +- ringraziamenti.tex | 2 +- signal.tex | 2 +- sockadv.tex | 2 +- sockctrl.tex | 2 +- socket.tex | 2 +- system.tex | 2 +- tcpsock.tex | 2 +- thread.tex | 2 +- trasplayer.tex | 2 +- 25 files changed, 29 insertions(+), 26 deletions(-) diff --git a/build.tex b/build.tex index ad1ba8f..f695fdf 100644 --- a/build.tex +++ b/build.tex @@ -1,6 +1,6 @@ %% build.tex %% -%% Copyright (C) 1999-2024 Simone Piccardi. Permission is granted to copy, +%% Copyright (C) 1999-2025 Simone Piccardi. Permission is granted to copy, %% distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/errors.tex b/errors.tex index 18d618c..7fcbaf8 100644 --- a/errors.tex +++ b/errors.tex @@ -1,6 +1,6 @@ %% errors.tex %% -%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2025 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/fileadv.tex b/fileadv.tex index 1bce388..4031615 100644 --- a/fileadv.tex +++ b/fileadv.tex @@ -1,6 +1,6 @@ %% fileadv.tex %% -%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2025 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/filedir.tex b/filedir.tex index 7bc0980..5b48a34 100644 --- a/filedir.tex +++ b/filedir.tex @@ -1,6 +1,6 @@ %% filedir.tex %% -%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2025 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", @@ -5343,6 +5343,9 @@ l'argomento \param{name} secondo le stesse modalità già illustrate in precedenza per le altre funzioni relative alla gestione degli attributi estesi. +% TODO: aggiungere le varianti setxattrat(), getxattrat(), listxattrat(), and +% removexattrat() aggiunte con il kernel 6.13 (qui o nella at functions) + \itindend{Extended~Attributes} diff --git a/fileio.tex b/fileio.tex index e5b427e..5ab716c 100644 --- a/fileio.tex +++ b/fileio.tex @@ -1,6 +1,6 @@ %% fileio.tex (merge fileunix.tex - filestd.tex) %% -%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2025 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/gapil.tex b/gapil.tex index 81c00c5..bb82003 100644 --- a/gapil.tex +++ b/gapil.tex @@ -1,6 +1,6 @@ %% gapil.tex %% -%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2025 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.3 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", @@ -136,7 +136,7 @@ hyperfootnotes=false]{hyperref} \begin{quote} - Copyright \copyright\ 2000-2024 Simone Piccardi. Permission is granted to + Copyright \copyright\ 2000-2025 Simone Piccardi. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being ``Un preambolo'' diff --git a/intro.tex b/intro.tex index 74091fc..1a45c66 100644 --- a/intro.tex +++ b/intro.tex @@ -1,6 +1,6 @@ %% intro.tex %% -%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2025 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/ipc.tex b/ipc.tex index 415b2a2..482b52c 100644 --- a/ipc.tex +++ b/ipc.tex @@ -1,6 +1,6 @@ %% ipc.tex %% -%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2025 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/macro.tex b/macro.tex index 9ede6c4..c46c768 100644 --- a/macro.tex +++ b/macro.tex @@ -1,6 +1,6 @@ %% macro.tex %% -%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2025 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/netlayer.tex b/netlayer.tex index 275b00d..c1b4f92 100644 --- a/netlayer.tex +++ b/netlayer.tex @@ -1,6 +1,6 @@ %% netlayer.tex %% -%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2025 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/network.tex b/network.tex index 7672423..2953b04 100644 --- a/network.tex +++ b/network.tex @@ -1,6 +1,6 @@ %% network.tex %% -%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2025 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/othersock.tex b/othersock.tex index 0f7b665..246837a 100644 --- a/othersock.tex +++ b/othersock.tex @@ -1,6 +1,6 @@ %% othersock.tex %% -%% Copyright (C) 2004-2024 Simone Piccardi. Permission is granted to +%% Copyright (C) 2004-2025 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/preambolo.tex b/preambolo.tex index 0d51e0e..2ff74c6 100644 --- a/preambolo.tex +++ b/preambolo.tex @@ -1,6 +1,6 @@ %% preambolo.tex %% -%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2025 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/pref.tex b/pref.tex index 03e134f..a93f971 100644 --- a/pref.tex +++ b/pref.tex @@ -1,6 +1,6 @@ %% pref.tex %% -%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2025 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/process.tex b/process.tex index 349806e..016fd3b 100644 --- a/process.tex +++ b/process.tex @@ -1,6 +1,6 @@ %% process.tex %% -%% Copyright (C) 2000-2024 by Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2025 by Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/prochand.tex b/prochand.tex index e02f0fd..58da355 100644 --- a/prochand.tex +++ b/prochand.tex @@ -1,6 +1,6 @@ %% prochand.tex %% -%% Copyright (C) 2000-2024 by Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2025 by Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/ringraziamenti.tex b/ringraziamenti.tex index c5c75df..26e93c2 100644 --- a/ringraziamenti.tex +++ b/ringraziamenti.tex @@ -1,6 +1,6 @@ %% ringraziamenti.tex %% -%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2025 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/signal.tex b/signal.tex index 7b6cb8e..ab365cc 100644 --- a/signal.tex +++ b/signal.tex @@ -1,6 +1,6 @@ %% signal.tex %% -%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2025 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/sockadv.tex b/sockadv.tex index 8eede04..a0a0b29 100644 --- a/sockadv.tex +++ b/sockadv.tex @@ -1,6 +1,6 @@ %% sockadv.tex %% -%% Copyright (C) 2004-2024 Simone Piccardi. Permission is granted to +%% Copyright (C) 2004-2025 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/sockctrl.tex b/sockctrl.tex index 19f9ddc..6a720f2 100644 --- a/sockctrl.tex +++ b/sockctrl.tex @@ -1,6 +1,6 @@ %% sockctrl.tex %% -%% Copyright (C) 2004-2024 Simone Piccardi. Permission is granted to +%% Copyright (C) 2004-2025 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Prefazione", diff --git a/socket.tex b/socket.tex index 51bdad7..ea80e85 100644 --- a/socket.tex +++ b/socket.tex @@ -1,6 +1,6 @@ %% socket.tex %% -%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2025 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/system.tex b/system.tex index 671b102..ed4e13a 100644 --- a/system.tex +++ b/system.tex @@ -1,6 +1,6 @@ %% system.tex %% -%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2025 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/tcpsock.tex b/tcpsock.tex index 525867e..7089f09 100644 --- a/tcpsock.tex +++ b/tcpsock.tex @@ -1,6 +1,6 @@ %% tcpsock.tex %% -%% Copyright (C) 2000-2024 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2025 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/thread.tex b/thread.tex index b067920..a407220 100644 --- a/thread.tex +++ b/thread.tex @@ -1,6 +1,6 @@ %% thread.tex %% -%% Copyright (C) 2007-2024 Simone Piccardi. Permission is granted to +%% Copyright (C) 2007-2025 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", diff --git a/trasplayer.tex b/trasplayer.tex index 4493730..239589a 100644 --- a/trasplayer.tex +++ b/trasplayer.tex @@ -1,6 +1,6 @@ %% tcpprot.tex %% -%% Copyright (C) 2002-2024 Simone Piccardi. Permission is granted to copy, +%% Copyright (C) 2002-2025 Simone Piccardi. Permission is granted to copy, %% distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", -- 2.39.5