getconf CLK_TCK and CONFIG_HZ

2011-03-12 Thread Jim Cromie
Im trying to do a little benchmarking of perl, and have patched its distro files to run perl's times() function on each of the ~1900 test files. perl's times() uses man 2 times internally, which I presume reduces to a system-call The standard distro can be run as: HARNESS_TIMER=1 make test but

Re: getconf CLK_TCK and CONFIG_HZ

2011-03-15 Thread Jim Cromie
On Sun, Mar 13, 2011 at 1:20 AM, Mulyadi Santosa mulyadi.sant...@gmail.com wrote: Dear Jim... Allow me to help you by sharing what I know so far thanks Mulyadi This agrees with sysconf granularity : $ getconf CLK_TCK 100 but not with linux kernel HZ: $ grep _HZ /boot/config-`uname

is git.kernel.org the best place for stable releases ?

2011-03-16 Thread Jim Cromie
OpenWrt is apparently using a stable release that isnt on kernel.org Bartman007 wrote: 23 November 2010 The OpenWrt Release Team would like to announce a fourth release candidate (RC4) for Backfire Interim Release 1 (10.03.1). Testing of this release candidate will allow further refinement of

Re: is git.kernel.org the best place for stable releases ?

2011-03-16 Thread Jim Cromie
| git On Wed, Mar 16, 2011 at 1:53 PM, Greg KH g...@kroah.com wrote: On Wed, Mar 16, 2011 at 01:47:28PM -0600, Jim Cromie wrote: OpenWrt is apparently using a stable release that isnt on kernel.org Bartman007 wrote: 23 November 2010 The OpenWrt Release Team would like to announce a fourth

maranello for staging ?

2011-03-24 Thread Jim Cromie
we have, at http://www.cs.umd.edu/projects/maranello/ Abstract In this project, we design, implement, and evaluate Maranello, a novel partial packet recovery mechanism for 802.11. In Maranello, the receiver computes checksums over blocks in corrupt packets and bundles these checksums into a

Re: linux gpio

2011-04-03 Thread Jim Cromie
2011/3/29 Jürgen Lambrecht j.lambre...@televic.com: Hello, I am new to linux (coming from eCos). My backlight driver does not start up because the reset gpio pin is not correct specified. How does gpio work in Linux? theres no single way. the new way is in drivers/gpio/* , implemented in

Re: confused by char dev registration in a gpio driver

2011-05-09 Thread Jim Cromie
hi Robert, On Tue, May 3, 2011 at 3:21 PM, Robert P. J. Day rpj...@crashcourse.ca wrote:  i'm sure i'm going to embarrass myself here but i was perusing the char drivers for nice examples, and i ran across this excerpt in pc8736x_gpio.c: Thanks for taking a look, and questioning what looks

Re: confused by char dev registration in a gpio driver

2011-05-10 Thread Jim Cromie
On Tue, May 3, 2011 at 4:06 PM, Greg KH g...@kroah.com wrote: On Tue, May 03, 2011 at 05:21:11PM -0400, Robert P. J. Day wrote:   i always thought both of those routines returned a simple zero to indicate success.  but look at those last few lines -- that return code is assigned to major, at

Re: confused by char dev registration in a gpio driver

2011-05-13 Thread Jim Cromie
On Tue, May 10, 2011 at 12:40 PM, Greg KH g...@kroah.com wrote: On Tue, May 10, 2011 at 11:26:59AM -0600, Jim Cromie wrote: lets start with a list of grumbles about current api ? ... Are the insanities you alluded to of a different sort, ie internal suboptimalities ? No, those you have

Re: rtc_ops structure

2011-05-13 Thread Jim Cromie
On Wed, May 11, 2011 at 11:08 AM, Vikram Narayanan vikram...@gmail.com wrote: Hi, Is the structure rtc_ops still used in rtc drivers in the new kernels? If not, what is the equivalent of it? [jimc@groucho linux-2.6.git]$ grep -r rtc_ops drivers/ |wc 159 842 11646 heres one of

knewbies project? - updating LDD3 source

2011-05-24 Thread Jim Cromie
over at http://code.google.com/p/ldd3/ it says: The famous Linux Device Drivers released the sample code. but the code does not reflect the latest kernel updates, some of code cannot even compile. This project is to make it compatible with the current kernel. http://lwn.net/Kernel/LDD3/

trouble with __aquires(lock) __releases(lock)

2011-08-05 Thread Jim Cromie
Im trying to use macros from include/linux/compiler.h and theyre giving me warnings that dont look right. after thrashing on my own hacks, I looked to well established uses for guidance. But make C=1 fs/file.o also gives errors, similar to mine. What am I missing ? or has some bitrot set in ?

2 mods with same PCI-ID table, one installs, other fails modprobe

2011-09-08 Thread Jim Cromie
(aside - whats the correct ML? Ive used both suggested by my mail interface) I have 2 modules with same modinfo alias, one installs, the other gets -ENODEV. Id expect them to both act the same. What am I missing ? root@voyage:~# modprobe geode-aes root@voyage:~# lsmod |grep geode_aes geode_aes

Re: Code Generator

2011-09-15 Thread Jim Cromie
On Mon, Sep 12, 2011 at 3:04 PM, mosta mosta...@googlemail.com wrote: Hey All, does somebody know of projects that use code generators to generate kernel modules? I'm thinking about using a strongly typed language like haskell with a code generator to  generate kernel C-Code. I want to

objdump -S for a different dir.

2011-12-09 Thread Jim Cromie
hi folks, out of habit, I build my kernels to a build tree ie use make O=../build-foo just once, then cd ../build-foo, and thereafter run make there this doesnt play nice with objdump -S --source Display source code intermixed with disassembly, if possible. Implies -d. it seems its

Fwd: kernel 3.2rc4 hangs if I use allyesconfig

2011-12-12 Thread Jim Cromie
should have gone to list.. -- Forwarded message -- From: rajaneesh acharya rajaneeshacha...@indiatimes.com Date: Sat, Dec 10, 2011 at 2:48 AM Subject: Re: kernel 3.2rc4 hangs if I use allyesconfig To: Jim Cromie jim.cro...@gmail.com Hi Jim, allmodconfig and config borrowed

Re: objdump -S for a different dir.

2011-12-12 Thread Jim Cromie
On Sat, Dec 10, 2011 at 12:46 AM, Dave Hylands dhyla...@gmail.com wrote: Hi Jim, On Fri, Dec 9, 2011 at 10:59 PM, Jim Cromie jim.cro...@gmail.com wrote: hi folks, out of habit, I build my kernels to a build tree ie use make O=../build-foo just once, then cd ../build-foo, and thereafter

Re: What is use of apply_alternative function from alternative.c

2012-03-25 Thread Jim Cromie
On Tue, Mar 20, 2012 at 7:54 AM, Pritam Bankar pritambankar1...@gmail.com wrote: Hi, Cal anyone help me in understanding alternative.c file from Linux source code. I want to learn function apply_alternative. AFAIK this code applies better replacement to instruction set used by processor.

Re: Kernel IP Forwarding path

2012-03-25 Thread Jim Cromie
On Sun, Mar 25, 2012 at 2:02 PM, Suresh Kumar Subramanian sureshkuma...@carc.co.in wrote: Hi, I am so interested to tune the kernel forwarding path. My questions are, Is it possible, to  expose some API to user space to manipulate the routing table (Ex: add equal cost /unequal cost

Re: Git info needed

2012-03-25 Thread Jim Cromie
On Sun, Mar 11, 2012 at 11:06 PM, trisha yad trisha1ma...@gmail.com wrote: Hi All, I want Info about how to get patches from private Git. I have downloaded Catalin Marinas git(ARM). I want to know check to support ARM 15 how many patches are added, so that we can analysis the difference.

Re: reboot.c and X86-64 architectures

2012-04-04 Thread Jim Cromie
On Tue, Apr 3, 2012 at 9:22 PM, Miles Fidelman mfidel...@meetinghouse.net wrote: Hello Folks, Perhaps someone here can help me understand the behavior of the kernel reboot code. I've recently migrated from running a 32bit kernel to a 64bit one (specifically Debian Lenny 32bit environment

__initdata access at runtime

2012-04-09 Thread Jim Cromie
hi folks, Ive written a pair of patches which have an issue with __initdata [PATCH 1/3] bug.h: add BUILD_BUG_DECL, usable at file scope [PATCH 2/3] bug.h: add test/demo module 1st one declares a BUILD_BUG_DECL(name, condition) which breaks compile if the condition is true, much like the other

[PATCH 1/3] bug.h: add BUILD_BUG_DECL, usable at file scope

2012-04-09 Thread Jim Cromie
, but is otherwise arbitrary. You can reuse the name of one of the checked vars, or pick something easy to find on the rare occaision when the assertion breaks the build. example 5 yields: error: size of array ‘BUILD_BUG_DECL_Darth’ is negative Signed-off-by: Jim Cromie jim.cro...@gmail.com --- include

[PATCH 2/3] bug.h: add test/demo module

2012-04-09 Thread Jim Cromie
] cbint_get+0xd8/0x113 [build_asserts] SS:ESP 0068:c7451ee0 CR2: c8bbb000 ---[ end trace bfbcc6aee803d03b ]--- Signed-off-by: Jim Cromie jim.cro...@gmail.com --- drivers/misc/Makefile|2 + drivers/misc/build-asserts.c | 239 ++ 2 files changed

please report distros with CONFIG_DYNAMIC_DEBUG, using ddebug_query= boot param

2012-05-01 Thread Jim Cromie
hi all, Ive been asked whether ddebug_query= boot param is used in any distros, I think the question seeks to determine a good deprecation schedule for it (its been obsoleted by dyndbg= in driver-core-next) Would you all be so kind as to check your favorite distros, and report the ones that have

Re: Incremental Linking

2012-05-28 Thread Jim Cromie
On Wed, May 23, 2012 at 10:51 AM, Sarbojit Ganguly unixman.linux...@gmail.com wrote: Hello Dave, I tried to explain this feature (no doubt you have explain it perfectly) but he is looking for _how_ kernel module gets loaded and somehow (I wonder how!) dubs the entire process as incremental

Re: Kernel booting problem.

2012-09-02 Thread Jim Cromie
On Wed, Aug 29, 2012 at 10:06 PM, Sri Ram Vemulpali sri.ram.gm...@gmail.com wrote: Thanks for the replies again. This time the problem is in tty specification. Kernel supports console=tty0 (virtual terminal), where as my inittab has entry ::sysinit:/sbin/getty -L ttyS0 vt100. I have to change

Re: How to understand the macro __init?

2012-09-03 Thread Jim Cromie
On Thu, Aug 16, 2012 at 12:39 PM, Amarnath Revanna amarnath.reva...@gmail.com wrote: Just want to add a little more for better understanding: When I spoke about .init section of the final kernel image, please note that this section is going to contain all the __init data (and functions)

missing /sys/class/drm/*

2018-11-24 Thread jim . cromie
I just upgraded an old box to fedora 29 model name: Intel(R) Core(TM)2 Duo CPU E7400 @ 2.80GHz when booted, none of these kernels has /sys/class/drm/* populated and all have trouble with graphical mode, I am causally linking these 2 facts, does that make sense? If so, it makes sense to

Re: is there a macro symbol for strlen($LINUX_SOURCE_PATH)

2019-09-05 Thread jim . cromie
e doubts.. maybe this should go to LKML now, but I guess Id prefer to make my obvious thinkos less publicly. Im happy to bikeshed the commit-msg or code. From c7b8041928565786fc58fd20e80b278cc877bef4 Mon Sep 17 00:00:00 2001 From: Jim Cromie Date: Thu, 5 Sep 2019 00:25:34 -0600 Subject: [PATCH 1/2]

is there a macro symbol for strlen($LINUX_SOURCE_PATH)

2019-09-04 Thread jim . cromie
in the kernel, there are a lot of usages of __FILE__ this means that there are a lot of copies of fully rooted paths, including all the varying ~/src/linux prefixes used by individual builders. Id hazard a guess that something like __RELPATH_FILE__ would work in many cases and perhaps even be

opaque "pointer" API, model, best practice ?

2020-10-14 Thread jim . cromie
hi all, is there an api / usage model / or best practice for opaque "handles" ? Im aware of 1 case: the handle returned by zs_malloc I have tried to use it, and have run into locking conflicts when trying to keep the memory zs_mapped longer than the duration of a function. OTOH, if I map and

Re: opaque "pointer" API, model, best practice ?

2020-10-14 Thread jim . cromie
On Wed, Oct 14, 2020 at 9:21 AM Greg KH wrote: > > On Wed, Oct 14, 2020 at 09:09:11AM -0600, jim.cro...@gmail.com wrote: > > hi all, > > > > is there an api / usage model / or best practice > > for opaque "handles" ? > > "it depends" :) > > What are you wanting to do exactly? > > > Im aware of 1

Re: Compiled Kernel stuck in booting

2020-09-22 Thread jim . cromie
On Wed, Jul 29, 2020 at 2:54 AM Yashodhan Joshi wrote: > > Hello, > > I use a dual boot laptop with windows and Ubuntu,with grub2. > > I Followed the instruction in > https://kernelnewbies.org/OutreachyfirstpatchSetup to clone the source code > and compile the kernel, which was done without any

Re: Cannot boot kernel 2.6.35 or 2.6.24 with qemu 5.1

2020-10-03 Thread jim . cromie
On Thu, Aug 27, 2020 at 6:45 AM Cao Nitro wrote: > > Hi all, > > > > As the title mentions, I cannot boot Linux kernel 2.6.35 or 2.6.24 with QEMU > 5.1 on Arch Linux. QEMU hasn’t any output when running. > > that is ancient. why dont you try a new one, see if that works. if it doesnt, youre

CONFIG_KDB_KEYBOARD

2020-08-03 Thread jim . cromie
.config - Linux/x86 5.8.0-rc7 Kernel Configuration > Kernel hacking > Generic Kernel Debugging Instruments > KGDB: kernel debugger KGDB_KDB: keyboard as input device \ │ CONFIG_KDB_KEYBOARD: │ KDB can use a PS/2 type keyboard for an input device │ I notice

Re: CONFIG_KDB_KEYBOARD

2020-08-03 Thread jim . cromie
On Mon, Aug 3, 2020 at 11:48 AM Valdis Klētnieks wrote: > > On Mon, 03 Aug 2020 11:30:05 -0600, jim.cro...@gmail.com said: > > > I notice this excludes USB keyboard. > > > > does this mean it doesnt work early enough to be useful for early panics > > etc? > > Very early panics and hangs are

Re: [PATCH 0/8] dyndbg: WIP diet plan

2020-08-06 Thread jim . cromie
On Thu, Aug 6, 2020 at 4:40 AM Greg KH wrote: > > On Wed, Aug 05, 2020 at 12:30:15PM -0600, Jim Cromie wrote: > > dynamic-debug metadata is bloated; the __dyndbg linker section is > > effectively an array of struct _ddebugs, its 1st 3 members are highly > > repetetive, wi

what are all the .cold symbols in system.map?

2020-08-08 Thread jim . cromie
Ive been seeing these in my backtraces they seem to come in both .cold and not cold flavors are they related to unlikely() code blocks ? 81001820 t calibrate_delay_direct 81001a90 t calibrate_delay_converge 81001bb0 W calibration_delay_done 81001bc0 T

[PATCH 7/8] dyndbg: enable 'cache' of active pr_debug callsites

2020-08-05 Thread Jim Cromie
return do_execve(getname_kernel(init_filename), (gdb) Cannot remove breakpoints because program is no longer writable. Further execution is probably impossible. kernel_init (unused=) at ../init/main.c:1435 1435if (!ret) (gdb) n Cannot remove breakpoints because program is no lo

[PATCH 4/8] dyndbg: split struct _ddebug in 2, creating _ddebug_callsite

2020-08-05 Thread Jim Cromie
may go as a part of causing the section reclaim. Signed-off-by: Jim Cromie --- include/asm-generic/vmlinux.lds.h | 4 +++ include/linux/dynamic_debug.h | 38 -- lib/dynamic_debug.c | 52 +-- 3 files changed, 60 insertions(+), 34

[PATCH 3/8] dyndbg: select ZPOOL in Kconfig.debug

2020-08-05 Thread Jim Cromie
dyndbg will next need zs_malloc and friends, so add config reqs now, to avoid touching make-deps late in a patch-set. I used select in order not to hide dyndbg inadvertently. I want to say recommends, since it could be an optional feature. Whats the best way ? Signed-off-by: Jim Cromie --- lib

[PATCH 0/8] dyndbg: WIP diet plan

2020-08-05 Thread Jim Cromie
I had good success with virtme, -q=-s -q=-S, and gdb target remote, all newbies should try it. These are on top of 5.8.0 +18 others, which GregKH added to his char-misc-testing trees. Jim Cromie (8): dyndbg: give %3u width in pr-format, cosmetic only dyndbg: motivate a diet plan dyndbg: se

[PATCH 5/8] dyndbg: WIP replace __dyndbg_callsite section with a zs-pool copy.

2020-08-05 Thread Jim Cromie
otential benefits: - convert in-kernel mem to zram/etc - zram compression - eventually swap it out entirely - map in the enabled callsites only Signed-off-by: Jim Cromie --- include/linux/dynamic_debug.h | 1 + lib/dynamic_debug.c | 140 +++--- 2 files ch

[PATCH 6/8] dyndbg: ddebug_zpool_remove

2020-08-05 Thread Jim Cromie
add ddebug_zpool_remove() to undo ddebug_zpool_add(), and call it from ddebug_remove_module(). Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 049299027fb3..102f47b2a439

[PATCH 1/8] dyndbg: give %3u width in pr-format, cosmetic only

2020-08-05 Thread Jim Cromie
Specify the print-width so log entries line up nicely. no functional changes. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 1d012e597cc3..01b7d0210412 100644 --- a/lib

[PATCH 2/8] dyndbg: motivate a diet plan

2020-08-05 Thread Jim Cromie
this table dramatically. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 01b7d0210412..691e79826fc2 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c

[PATCH 8/8] dyndbg: add locking around zpool-add loop in zpool-init

2020-08-05 Thread Jim Cromie
that protection. This commit adds locking to ddebug_zpool_init(), around the loop of ddebug_zpool_add(), to match the locking in ddebug_add_module(). Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/dynamic_debug.c b/lib

Re: Help to test the powerpc architecture

2020-08-11 Thread jim . cromie
On Mon, Aug 10, 2020 at 3:15 AM Santosh S wrote: > > On Sunday, 2 August, 2020 7:57:03 PM IST Oscar Carter wrote: > > Hi, > > > > I'm working in a new feature for the powerpc (64 bits little endian) > > architecture. Since I can't test it in a real environment, I need to > > emulate this arch. To

Re: [PATCH 0/8] dyndbg: WIP diet plan

2020-08-05 Thread jim . cromie
> Im sending to kernelnewbies 1st, to see if theres any low-speed > test-crashes I can get post-mortems of, before I take it to the races. > > So, I might as well narrate a bit here, see if I can get to a compelling story .. $ gdb -x ../cmds vmlinux $ more ../cmds target remote :1234 # hbreak

modprobe rbtree-test nnodes=1000 gets soft lockup

2020-07-03 Thread jim . cromie
hey fellow noobs/readers modprobe rbtree-test nnodes=1000 gets soft lockup timing seems semi-quadratic large sets seem to knock it over, I cut perf_loops in 1/10, expecting that to fix it, it didnt. does anyone else see this ? bash-5.0# modprobe rbtree_test [ 17.808044][ T233] rbtree

sticky bits in /proc etc

2020-06-10 Thread jim . cromie
Id like to ask about a possible new use for file and directory sticky bits, or setuid bits, to address the root-only use of /proc (etc) files this needs root echo module kvm +p > /proc/dynamic_debug/control how about this ? cat root-owned-readonly-file > /proc/dynamic_debug/control the

Re: sticky bits in /proc etc

2020-06-11 Thread jim . cromie
On Wed, Jun 10, 2020 at 9:37 PM Valdis Klētnieks wrote: > > On Wed, 10 Jun 2020 08:24:17 -0600, jim.cro...@gmail.com said: > > Id like to ask about a possible new use for file and directory sticky bits, > > or setuid bits, to address the root-only use of /proc (etc) files > > The sticky bit and

replacing if-then-else strcmp ladders with switch cases

2020-06-12 Thread jim . cromie
considering lib/dynamic_debug.c we have ... } else if (!strcmp(words[i], "module")) { rc = check_set(>module, words[i+1], "module"); } else if (!strcmp(words[i], "format")) { ... are there any built-in hash functions which would allow this ? switch (keyword) { case Hash("module"):

Re: replacing if-then-else strcmp ladders with switch cases

2020-06-13 Thread jim . cromie
On Fri, Jun 12, 2020 at 11:02 PM Valdis Klētnieks wrote: > > On Fri, 12 Jun 2020 12:05:55 -0600, jim.cro...@gmail.com said: > > considering lib/dynamic_debug.c > > we have > > > > ... > > } else if (!strcmp(words[i], "module")) { > > rc = check_set(>module, words[i+1], "module"); > > } else

[PATCH 1/3] dyndbg: WIP replace __dyndbg section with a zs-pool copy.

2020-07-25 Thread Jim Cromie
abled callsites only TLDR Note also that the format pointer is kept 2x in dynamic-debug; once inside the struct _ddebug, and again as the fmt parameter in the *_dbg() functions and macro stack. I dont see how 'fixing' this is worthwhile. Signed-off-by: Jim Cromie --- include/linux/dynamic_d

[PATCH 0/3] dyndbg: WIP semi-viable diet plan ?

2020-07-25 Thread Jim Cromie
f other dyndbg patches, which are now in gregkh's char-misc git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git in the char-misc-next branch. Jim Cromie (3): dyndbg: WIP replace __dyndbg section with a zs-pool copy. dyndbg: zhandle+1 plus info

[PATCH 3/3] dyndbg: fixup/correct assumptions re ptr-vals

2020-07-25 Thread Jim Cromie
ll needed (flags cant be in zram for non-JUMP_LABEL builds), so maybe it ends up there. Or perhaps the linker can be convinced to be slightly less parsimonious with the ram, making this is_odd() test viable. Signed-off-by: Jim Cromie --- include/linux/dynamic_debug.h | 5 + lib/dynamic_debug.c

[PATCH 2/3] dyndbg: zhandle+1 plus info tweaks, BUG_ONs

2020-07-25 Thread Jim Cromie
elys on the 'fact' uhm observation that zhandles were always even numbered. So far so good. Also add BUG-ONs to track/assert invariants into ddebug_zpool_init and the get/put inline helpers, and several debug prints. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c

hot take question for the day

2020-12-04 Thread jim . cromie
so I was looking at the following code, from dynamic_debug.c, I saw a minor code optimization, and wondered whether its already optimized away by compiler. Instead of actually testing it ( I intend to eventually ) I figure Id ask if you all want to take an educated guess ? or perhaps just do the

Failure debug messages

2021-01-03 Thread jim . cromie
So Im seeing these pr_debug messages from kernel/module.c [ 624.32] dyndbg: 336 debug prints in module i915 [ 624.891526] module:find_symbol: Failed to find symbol i915_gpu_busy [ 624.891528] module:find_symbol: Failed to find symbol i915_gpu_lower [ 624.891530] module:find_symbol: Failed

linker script hack - can it be made to work ?

2021-01-14 Thread jim . cromie
Im attempting to conditionally link an input section. if the just linked similarly named section wasnt empty. __start___dyndbg = .; \ _ = .; \ \ KEEP(*(__dyndbg (.-_)? gnu.linkonce.d.__dyndbg)) \ __stop___dyndbg = .; it gives me an unspecified linker syntax error

Re: '-D' 'KBUILD_MODSYM=main - like KBUILD_MODNAME, without the quotes ?

2021-01-28 Thread jim . cromie
On Thu, Jan 28, 2021 at 4:57 PM Valdis Klētnieks wrote: > On Thu, 28 Jan 2021 12:11:54 -0700, jim.cro...@gmail.com said: > > > In my hacking, Im finding this useful. > > it adds a version of KBUILD_MODNAME without the quotes > > OK, I'll bite. When and how is this useful? > > heres my use

'-D' 'KBUILD_MODSYM=main - like KBUILD_MODNAME, without the quotes ?

2021-01-28 Thread jim . cromie
hi folks, In my hacking, Im finding this useful. it adds a version of KBUILD_MODNAME without the quotes --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -119,7 +119,7 @@ target-stem = $(basename $(patsubst $(obj)/%,%,$@)) # end up in (or would, if it gets compiled in) name-fix = $(call

Re: '-D' 'KBUILD_MODSYM=main - like KBUILD_MODNAME, without the quotes ?

2021-01-29 Thread jim . cromie
On Thu, Jan 28, 2021 at 5:16 PM wrote: > > > On Thu, Jan 28, 2021 at 4:57 PM Valdis Klētnieks > wrote: > >> On Thu, 28 Jan 2021 12:11:54 -0700, jim.cro...@gmail.com said: >> >> > In my hacking, Im finding this useful. >> > it adds a version of KBUILD_MODNAME without the quotes >> >> OK, I'll

Re: '-D' 'KBUILD_MODSYM=main - like KBUILD_MODNAME, without the quotes ?

2021-01-29 Thread jim . cromie
... and somethings not right. debugger KBUILD_SYM shows it: these records are same as those shown in early boot output pasted previously these records look right (gdb) p *__start___dyndbg_sites@10 $2 = {{modname = 0x825a8ab9 "head64", filename = 0x825a8ac0

Re: why does an in-tree loadable module taint the kernel

2021-06-16 Thread jim . cromie
On Wed, Jun 16, 2021 at 2:05 AM Greg KH wrote: > > On Tue, Jun 15, 2021 at 12:26:19PM -0600, jim.cro...@gmail.com wrote: > > On Tue, Jun 15, 2021 at 10:24 AM Greg KH wrote: > > > > > > On Tue, Jun 15, 2021 at 10:06:08AM -0600, jim.cro...@gmail.com wrote: > > > > On Mon, Jun 14, 2021 at 1:20 AM

Re: why does an in-tree loadable module taint the kernel

2021-06-16 Thread jim . cromie
On Wed, Jun 16, 2021 at 11:50 AM wrote: > > On Wed, Jun 16, 2021 at 2:05 AM Greg KH wrote: > > > > On Tue, Jun 15, 2021 at 12:26:19PM -0600, jim.cro...@gmail.com wrote: > > > On Tue, Jun 15, 2021 at 10:24 AM Greg KH wrote: > > > > > > > > On Tue, Jun 15, 2021 at 10:06:08AM -0600,

Re: why does an in-tree loadable module taint the kernel

2021-06-15 Thread jim . cromie
On Mon, Jun 14, 2021 at 1:20 AM Greg KH wrote: > > On Mon, Jun 14, 2021 at 01:09:25AM -0600, jim.cro...@gmail.com wrote: > > serio_raw is apparently tainting the kernel when its modprobed. > > why ? other modules load properly, no code changes to this module > > > > bash-5.1# dmesg | grep -i

why does an in-tree loadable module taint the kernel

2021-06-14 Thread jim . cromie
serio_raw is apparently tainting the kernel when its modprobed. why ? other modules load properly, no code changes to this module bash-5.1# dmesg | grep -i taint [6.517150] serio_raw: module verification failed: signature and/or required key missing - tainting kernel [7.449072] CPU: 0

Re: why does an in-tree loadable module taint the kernel

2021-06-15 Thread jim . cromie
On Tue, Jun 15, 2021 at 10:24 AM Greg KH wrote: > > On Tue, Jun 15, 2021 at 10:06:08AM -0600, jim.cro...@gmail.com wrote: > > On Mon, Jun 14, 2021 at 1:20 AM Greg KH wrote: > > > > > > On Mon, Jun 14, 2021 at 01:09:25AM -0600, jim.cro...@gmail.com wrote: > > > > serio_raw is apparently tainting

Re: Does FreeRTOS works on Linux?

2021-05-10 Thread jim . cromie
On Sun, May 9, 2021 at 12:41 AM loïc tourlonias wrote: > > > if using a posix thread full fills the requirement of RTOS. The reason > > I want to use RTOS is , I am porting a Microcontroller code using RTOS > > (free RTOS) to Linux and > > afaik FreeRTOS doesnt work on Linux. > > > FreeRTOS is a

kernel module parameter API ala drm.debug

2021-05-10 Thread jim . cromie
so as a proof of concept, Ive converted drm to use dynamic-debug drm has ~dozen categories of debug messages, mapped to bits in drm.debug, aka /sys/module/drm/parameters/debug these bits are checked at runtime by drm_debug_enabled() to do drm debug printing. my patchset updates users of

Re: How to test device driver?

2021-05-17 Thread jim . cromie
On Mon, May 17, 2021 at 9:28 AM Hyeonggon Yoo <42.hye...@gmail.com> wrote: > > Hello, there are lots of drivers in linux. > > My questions are: > > - how can we test driver? is it just using that device for a long > time as a user? > testing is hard. Having the device is highly recommended.

Re: How to test device driver?

2021-05-17 Thread jim . cromie
On Mon, May 17, 2021 at 5:54 PM Hyeonggon Yoo <42.hye...@gmail.com> wrote: > > On Mon, May 17, 2021 at 12:48:38PM -0600, jim.cro...@gmail.com wrote: > > On Mon, May 17, 2021 at 9:28 AM Hyeonggon Yoo <42.hye...@gmail.com> wrote: > > > > > > Hello, there are lots of drivers in linux. > > > > > > My

how to return unneeded init-data to kernel ?

2021-06-03 Thread jim . cromie
hi all, When one builds with CONFIG_DYNAMIC_DEBUG=y one consumes extra memory for kernel data Ive managed to coax dyndbg into "not needing" about 30KiB in a __dyndbg* section, how can I return it to the kernel ? https://lore.kernel.org/lkml/20210529200029.205306-1-jim.cro...@gmail.com/ b4:

Re: laptop iwlwifi suddenly not working

2021-07-08 Thread jim . cromie
Solved ! On Fri, Jul 2, 2021 at 7:39 AM wrote: > > On Thu, Jul 1, 2021 at 9:53 PM Connor Kuehl wrote: > > > > Maybe there’s a hardware switch that toggles airplane mode? Might not be, > > since I’d think that would be kind of redundant if there’s a fn key > > dedicated to it, but I remember

Re: How to comment or reply to others?

2021-07-08 Thread jim . cromie
On Sun, Jul 4, 2021 at 9:36 AM Valdis Klētnieks wrote: > > On Sun, 04 Jul 2021 11:13:08 +0200, Abd-Alrhman Masalkhi said: > > > I have allready set up the .gitconfig file with following configuration: > > > > smtpEncryption = ssl > > smtpServer = smtp.gmail.com > > smtpUser =

Re: laptop iwlwifi suddenly not working

2021-07-02 Thread jim . cromie
On Thu, Jul 1, 2021 at 9:53 PM Connor Kuehl wrote: > > Maybe there’s a hardware switch that toggles airplane mode? Might not be, > since I’d think that would be kind of redundant if there’s a fn key dedicated > to it, but I remember my previous laptops had a physical slider switch for >

Re: How to comment or reply to others?

2021-07-03 Thread jim . cromie
On Fri, Jul 2, 2021 at 2:11 PM abdalrhman masalkhi wrote: > > Hello everyone, I am having some trouble replying to other comments, I have > submitted some patches and then I have received some comments from reviews, I > tried to reply to them by just prefixing the subject line Re: instead of >

Re: Seeking advice on "monkey patching" a driver

2021-07-01 Thread jim . cromie
On Thu, Jul 1, 2021 at 2:03 PM Ian Pilcher wrote: > > On 7/1/21 12:59 PM, Greg KH wrote: > > Oh that's horrible, please no, do not do that :) > > Indeed it is, but it works, and it meets my main objective, which is to > allow the use of distribution kernel packages and modules. > > > How about a

laptop iwlwifi suddenly not working

2021-07-01 Thread jim . cromie
while fumbling to pause grub during boot, I think I managed to disable the wifi. its affecting distro kernel, and my own booting with iwlwifi.debug=0xff on command line shows me iwl_pcie_apm_init Init card's basic functions reporting RF_KILL (radio disabled) It is reading that from somewhere,

advice on a bisect

2021-06-29 Thread jim . cromie
I have an old 686 machine, running fedora 30 (last fedora supporting 686) processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Core(TM)2 Duo CPU E7400 @ 2.80GHz stepping : 10 microcode : 0xa0b cpu MHz : 1614.044 cache size : 3072 KB I generally keep it with

Re: laptop iwlwifi suddenly not working

2021-07-01 Thread jim . cromie
On Thu, Jul 1, 2021 at 3:49 PM wrote: > > while fumbling to pause grub during boot, > I think I managed to disable the wifi. > and booting a live usb gets same result ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org

Re: Test if a socket accept is from external network

2021-05-04 Thread jim . cromie
On Sun, Apr 25, 2021 at 6:02 AM Jeffrey Walton wrote: > > On Sun, Apr 25, 2021 at 7:09 AM John Wood wrote: > > > > I'm working in a LSM to detect and mitigate fork brute force attacks > > against vulnerable userspace applications. Now, to fine tuning the > > detection I want to detect a network

Re: Device driver .shutdown() VS .remove()

2021-04-22 Thread jim . cromie
On Thu, Apr 22, 2021 at 1:37 AM Luca Ceresoli wrote: > Hello, > > despite having been searching for documentation I couldn't find out the > exact and detailed difference between the .shutdown() and .remove() > calls in struct device_driver. > > so, I'll start by saying I know next to nothing,

Re: How to switch between installed kernel and developed kernel

2021-03-25 Thread jim . cromie
> > > > I've found running a kernel under qemu with my normal rootfs to be quite > useful to quickly try out things. See the qemu-test script in the RAUC > project > for an example: https://github.com/rauc/rauc/blob/master/qemu-test > > I would agree. I find "virtme" tool to be super simple and

"module:find_symbol: Failed to find symbol ....." not so bad.

2021-03-25 Thread jim . cromie
so when I enable the pr_debug()s in kernel/module, and boot that kernel, I get a raft of messages (~800), like : [ 110.072535] module:find_symbol: Failed to find symbol drm_scdc_get_scrambling_status [ 110.072538] module:find_symbol: Failed to find symbol drm_scdc_read [ 110.072541]

Re: pid start time and new display field in proc pid stat

2021-03-25 Thread jim . cromie
On Thu, Mar 25, 2021 at 6:53 AM Navin P wrote: > Hi, > > As of 5.11 kernel (pid,pid_start_time) is not unique /monotonic even > though the underlying counters are . > I chose start_boottime because i wanted the counter to increase > during suspend as well. > > 1. Is there any case where

Re: make menuconfig

2021-03-25 Thread jim . cromie
On Sat, Mar 20, 2021 at 1:07 PM Martin Herdeis wrote: > Hello, > > I am trying to learn more about the kernel build system and due to that I > tried the following in the top level Kconfig file right at the beginning: > > config FOO > tristate > prompt "FOO" > config BAR >

patchset grooming question.

2021-03-25 Thread jim . cromie
I have a patchset which touches vmlinux.lds.h 2x 1st inserts a few lines, 2nd moves them and related to a separate macro. this is sub-optimal, if new macro is warranted, it should just do that in 1st change. or maybe 3rd option. move existing to macro- no functional change then do 2

Re: Unable to boot to kernel built from stable 5.11.y

2021-04-02 Thread jim . cromie
On Tue, Mar 30, 2021 at 7:16 AM Andrew Adamson wrote: > Hi Everyone, > > I tried to build the kernel myself for the first a few days ago. While the > build was successful, I am unable to boot to it. After grub I get a > blinking cursor for 15 to 30 minutes, and then a message that says "Please >

Re: is there an efficient module_is_builtin() test ?

2021-03-16 Thread jim . cromie
On Tue, Mar 9, 2021 at 3:25 PM Valdis Klētnieks wrote: > On Tue, 09 Mar 2021 12:55:14 -0700, jim.cro...@gmail.com said: > > > To use the index, I need _sites[], and that only works > > for builtin-module's callsites. For loaded modules, I can/have > > added a pointer to the section into

help with linker script mods

2021-03-16 Thread jim . cromie
so Im trying to constrain the linker to put ELF section pairs into contiguous chunks of memory. this is on top of: https://lore.kernel.org/lkml/20210316050801.2446401-1-jim.cro...@gmail.com/ The macro below works when used in vmlinux.lds.h, it does pack the sections as desired. but same macro,

Re: are 1-wire devices "discoverable"?

2021-03-18 Thread jim . cromie
On Sat, Feb 13, 2021 at 11:58 AM Trevor Woerner wrote: > Hi, > > It's true that you do need a device tree overlay to tell the kernel that > you > want to use the 1-wire bus, and you have to tell the kernel which GPIO pin > you > want to use as the 1 wire, but after that, attaching DS18B20

is there an efficient module_is_builtin() test ?

2021-03-09 Thread jim . cromie
Im trying to reduce memory used by internal tables built into DYNAMIC_DEBUG the main savings available is in the per pr_debug* callsite data: modname, filename, funcname. I have segregated those fields to a new __dyndbg_sites section, described by struct _ddebug_site, and now refd by new ptr in

Re: Does 'make oldconfig' work across different architectures?

2021-02-18 Thread jim . cromie
On Thu, Feb 18, 2021 at 8:07 PM wrote: > Hello folks, > > When we want to use an old .config file for a new kernel build, we can use > (place in build location) that .config and do ‘make oldconfig’ so that the > build system lets us to fill the new config variables. > > I'm curious if this 'make

Re: VFS: Cannot open root device "(null)" or unknown-block(0, 0): error -2

2021-08-15 Thread jim . cromie
On Sat, Aug 14, 2021 at 6:21 PM Valdis Klētnieks wrote: > > On Fri, 13 Aug 2021 18:08:38 -0600, jim.cro...@gmail.com said: > > > then I added BTRFS_FS, since thats the host fs. > > of course it didnt work. > > > VFS: Cannot open root device "(null)" or unknown-block(0,0): error -2 > > Please

how to properly use BUILD_BUG_ON_MSG ?

2021-08-30 Thread jim . cromie
so I got this macro which depends upon config choices to work, Id like to have alt-config versions which throw some obvious error. like this: #elif (defined(CONFIG_DYNAMIC_DEBUG_CORE) && !defined(DYNAMIC_DEBUG_MODULE)) #define DEFINE_DYNAMIC_DEBUG_CATEGORIES(fsname, var, bitmap_desc, ...) \

Re: how to properly use BUILD_BUG_ON_MSG ?

2021-08-30 Thread jim . cromie
trimming out the "noise", Im left with >39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) > | ^~ > /home/jimc/projects/lx/wk-next/include/linux/dynamic_debug.h:283:9: > note: in expansion of macro

  1   2   >