480 Commits

Author SHA1 Message Date
Kaiwan N Billimoria
3e93235b8d Update README.md
Fig 12.12 typo
2025-07-12 13:51:01 +05:30
Kaiwan N Billimoria
d06daa7962 README.md: errata in Fig 12.7
Signed-off-by: Kaiwan N Billimoria <kaiwan.billimoria@gmail.com>
2025-07-08 08:15:24 +05:30
Kaiwan N Billimoria
c39925e2d2 slab2_buggy.c: check for kzalloc() failure case
(cred to @ncshy on github)

Signed-off-by: Kaiwan N Billimoria <kaiwan.billimoria@gmail.com>
2025-06-02 08:18:45 +05:30
Kaiwan N Billimoria
a2d2531ff9 fix typo (cred to @ncshy on github)
Signed-off-by: Kaiwan N Billimoria <kaiwan.billimoria@gmail.com>
2025-06-02 08:17:31 +05:30
Kaiwan N Billimoria
e1f7096a9a Merge pull request #16 from aigualada/fix-chapter8-hands-on-system-book-link
Fixed book 'Hands-On System Programming with Linux' link
2025-02-27 17:25:10 +05:30
aigualada
6232e7973f Fixed book 'Hands-On System Programming with Linux' in chapter 8 further reading link 2025-02-26 18:17:34 +01:00
Kaiwan N Billimoria
99c29c917a slab2_buggy: initial commit (thanks to @aigualada) 2025-02-25 18:15:09 +05:30
Kaiwan N Billimoria
fecd122139 slab1/Makefile: set DEBUG on so that the print_hex_dump_bytes() takes effect 2025-02-25 17:56:18 +05:30
Kaiwan N Billimoria
d9ab15d699 list_demo_rcu.c: better emphasis within the comment 2025-02-25 17:55:34 +05:30
Kaiwan N Billimoria
710bc00ac3 add Errata for pg 752 reg the wrongly wrapped 'DEADLOCK ... >' str 2025-01-26 13:05:32 +05:30
Kaiwan N Billimoria
89588e8c37 run: use the var names KFUNC* 2025-01-26 13:02:57 +05:30
Kaiwan N Billimoria
fbc896063b Merge pull request #14 from MhmRhm/add-errata
Add errata for page 752 reversed-colors notation
2025-01-26 12:59:57 +05:30
Mohammad Rahimi
584b55acea Add errata on page 752
The lock ordering in the sample timeline forms two
self deadlocks but it should be an AB-BA deadlock.
2025-01-25 18:52:13 +00:00
Kaiwan N Billimoria
dab08fd62e userspc_cpuaffinity.c: change the 'for this process..' msg
Change the 'for this process..' to '... cores system-wide' as this better reflects the system state; + a minor comment fix
2025-01-03 08:35:04 +05:30
Kaiwan N Billimoria
321bc86e65 Merge pull request #12 from MhmRhm/fix-detected-cores
Fix incorrect CPU core count when displaying affinity mask
2025-01-03 08:21:31 +05:30
Kaiwan N Billimoria
a4bfbf466a Merge pull request #11 from aigualada/fix-hands-on-system-programming-book-link
Fix link to 'Hands-On System Programming Book'
2025-01-03 08:03:22 +05:30
Mohammad Rahimi
784b8be891 Fix incorrect CPU core count when displaying affinity mask
The current implementation uses `nproc` to query the number
of available CPUs. However, when restricting the cores that
`userspc_cpuaffinity` can run on (e.g., via `taskset -c`),
the affinity mask table is incorrectly displayed. For example,
running `taskset -c 2 ./userspc_cpuaffinity` results in a
single-column table displaying a wrong core id.

This commit resolves the issue by replacing `nproc` with
`get_nprocs()` from `sys/sysinfo.h`, which provides the correct
number of processors after core restrictions are applied.
2025-01-01 04:52:52 +00:00
aigualada
a272662231 Fix link to 'Hands-On System Programming Book' 2024-12-30 13:39:51 +01:00
Kaiwan N Billimoria
441516bbec setup soft links with chapter names to ch'n' folders
Signed-off-by: Kaiwan N Billimoria <kaiwan.billimoria@gmail.com>
2024-12-30 10:42:05 +05:30
Kaiwan N Billimoria
5963e897ac countem2.sh: fix calc of # of kernel-mode stacks
in memory

Signed-off-by: Kaiwan N Billimoria <kaiwan.billimoria@gmail.com>
2024-12-27 16:10:57 +05:30
Kaiwan N Billimoria
40e778d808 Add to Known Errata (reg RCU fig 13.16) 2024-11-28 11:37:19 +05:30
Kaiwan N Billimoria
327369e883 Add to Known Errata (reg RCU) 2024-11-28 11:34:37 +05:30
Kaiwan N Billimoria
70dd63412b fix:writer makes copy for RCU & should free the old object only 2024-11-28 11:27:18 +05:30
Kaiwan N Billimoria
eb41c1aebb Update README.md; errata fix 2024-11-26 11:26:45 +05:30
Kaiwan N Billimoria
ea4b587f71 Makefile: strip: use the correct filename for the .ko (when other files are linked in) 2024-11-26 11:20:45 +05:30
Kaiwan N Billimoria
ca960e5bf9 Avoid gcc warnings by stripping off outer parentheses from the SHOW_DELTA*() macros; Reported-by: eibisidi 2024-11-26 10:50:46 +05:30
Kaiwan N Billimoria
068f0c3ed8 ARM64 requires some tweaks; different header & kernel_neon_begin|end()
Reported-by: eibisidi
2024-11-26 10:27:51 +05:30
Kaiwan N Billimoria
6d800a83b2 the same quick fix; '--' to '-' in the Makefile 2024-11-26 10:19:08 +05:30
Kaiwan N Billimoria
05ea5fec73 quick fix 2024-11-26 10:15:45 +05:30
Kaiwan N Billimoria
1eea58479e Makefile: prefix the include config directive with '-' to fail gracefully if reqd 2024-11-26 10:13:15 +05:30
Kaiwan N Billimoria
b7bb3eabba Merge branch 'main' of https://github.com/PacktPublishing/Linux-Kernel-Programming_2E 2024-11-01 08:34:58 +05:30
Kaiwan N Billimoria
2662dd18f8 use cmd || true style to ensure execution continues on failure
(due to set -e); reported by eibisidi (github)
2024-11-01 08:30:48 +05:30
Kaiwan N Billimoria
deaedf0efb Declare prototypes for functions that aren't marked static,to prevent compiler warnings; credit @wiktorjl 2024-10-01 10:55:37 +05:30
Kaiwan N Billimoria
2778d9d2a4 add func protos to get rid of warnings 2024-09-28 11:33:10 +05:30
Kaiwan N Billimoria
233ff6e223 colour highlight the failure/warn/success msgs 2024-09-27 17:44:50 +05:30
Kaiwan N Billimoria
861575c062 colour highlight the failure msg 2024-09-27 17:11:45 +05:30
Kaiwan N Billimoria
14ba073888 better Makefile updt- ignore no .config;add 'dt'
target;add help tip
2024-09-27 15:56:12 +05:30
Kaiwan N Billimoria
11af573d52 TODO comment 2024-09-27 15:55:50 +05:30
Kaiwan N Billimoria
c750a2a97b update Known Errata (RCU) stuff 2024-09-15 08:52:38 +05:30
Kaiwan N Billimoria
a6d3f4d07f fix a leak, better comments 2024-09-15 08:52:18 +05:30
Kaiwan N Billimoria
c7036a9caf export var & continue on include fail 2024-09-15 08:50:33 +05:30
Kaiwan N Billimoria
86c1b29763 Merge pull request #3 from MhmRhm/fix-comment-and-line-width
Improve Makefile template for Linux LKMs
2024-07-29 07:13:12 +05:30
Mohammad Rahimi
31bb78b2c9 Improve Makefile template for Linux LKMs
- Enabled defining FNAME_C via command line.
- Removed a redundant word in the comment for DYNAMIC_DEBUG_MODULE.
2024-07-28 06:11:59 +00:00
Kaiwan N Billimoria
06dd8cdf99 Add Errata for pg 197
Signed-off-by: Kaiwan N Billimoria <kaiwan.billimoria@gmail.com>
2024-07-27 09:41:53 +05:30
Kaiwan N Billimoria
b40aaef5b1 convenient.h: cleanup as per checkpatch report
Signed-off-by: Kaiwan N Billimoria <kaiwan.billimoria@gmail.com>
2024-07-24 13:30:57 +05:30
Kaiwan N Billimoria
e21df88793 SHOW_DELTA() macro works ok only on 64-bit Linux
Signed-off-by: Kaiwan N Billimoria <kaiwan.billimoria@gmail.com>
2024-07-24 11:35:50 +05:30
Kaiwan N Billimoria
afccc07a00 README.md: add a couple of 'errata'
Signed-off-by: Kaiwan N Billimoria <kaiwan.billimoria@gmail.com>
2024-07-17 09:38:33 +05:30
Kaiwan N Billimoria
8f98867884 Add errata; pg 9
Signed-off-by: Kaiwan N Billimoria <kaiwan.billimoria@gmail.com>
2024-05-08 09:52:05 +05:30
Kaiwan N Billimoria
0a96f894b2 Update README.md to reflect the new ch6/countem2.sh script
Signed-off-by: Kaiwan N Billimoria <kaiwan.billimoria@gmail.com>
2024-05-02 08:48:00 +05:30
Kaiwan N Billimoria
b36201bdbc initial commit; an addendum to the countem.sh script
Signed-off-by: Kaiwan N Billimoria <kaiwan.billimoria@gmail.com>
2024-05-02 08:43:53 +05:30