Re: Why new kernel version cannot be installed on old Ubuntu?

2020-12-05 Thread Valdis Klētnieks
On Sat, 05 Dec 2020 22:35:37 +0900, Joontaek Oh said: > So, I am using my laptop with the multi-booting but it is too > space-consuming. > > Moreover, I get work that needs to modify the kernel 3.10.0 for Centos, but > the kernel 3.10.0 is not installed on the Ubuntu any version, and the > kernel

Re: toolchain name for building linux kernel?

2020-11-16 Thread Valdis Klētnieks
On Tue, 17 Nov 2020 14:37:00 +0900, c...@etri.re.kr said: > Some years ago, I used to use sparc-ab-elf- to build linux kernel. That will probably build a kernel for the Sun SPARC architecture... > Recently, I found a website that I should use aarch64-linux-gnu tool to > build the kernel. > > I

Re: arm64: Question about barriers with the mmu off

2020-11-16 Thread Valdis Klētnieks
On Tue, 17 Nov 2020 14:08:02 +0900, Wonhyuk Yang said: > > > > dc ivac,x1 // invalidate a cache line that's probably OK > > > > str w0,[x1 // and now we do a store that leaves a possibly stale > > > > cache line > Could you explain me why the store still leaves stale cache? > We invalidated

Re: arm64: Question about barriers with the mmu off

2020-11-16 Thread Valdis Klētnieks
On Tue, 17 Nov 2020 12:00:32 +0900, Wonhyuk Yang said: > > If you swap them, you get... > > > > dc ivac,x1 // invalidate a cache line that's probably OK > > str w0,[x1 // and now we do a store that leaves a possibly stale cache > > line > > > > In other words, if you swap them you may leave

Re: arm64: Question about barriers with the mmu off

2020-11-16 Thread Valdis Klētnieks
On Mon, 16 Nov 2020 20:58:52 +0900, Wonhyuk Yang said: > str w0, [x1] So we dirtied the cache line. > dmb sys > dc ivac, x1 // Invalidate potentially stale cache line So we invalidate it. > Is there any problem, if the dc operation precedes the store operation? If you swap them, you get...

Re: power management

2020-11-02 Thread Valdis Klētnieks
On Tue, 03 Nov 2020 06:45:29 +, "Pankaj Vinadrao Joshi" said: > with this my whole system is going into supend state but specifically i want > my > lcd backlight or wifi in Active state without considering the state of system What use will the lcd backlight be when your graphics subsystem is

Re: Recover previous kernel

2020-10-17 Thread Valdis Klētnieks
On Sun, 18 Oct 2020 02:01:18 +0530, Palash Nigam said: > While building a new kernel i forgot to change the name of > CONFIG_LOCALVERSION in the .config file as a result my current kernel got > replaced by the one I was building. Hold that thought for a moment... > My original kernel still

Re: Oops stack trace missing function addresses

2020-10-15 Thread Valdis Klētnieks
On Thu, 15 Oct 2020 18:34:08 +0100, Adrian Larumbe said: > claims, I get no VA next to each function in the Call Trace: > > Call Trace: > do_one_initcall+0xfc/0x290 > ? cache_alloc_debugcheck_after+0x38/0x270 > ? rcu_read_lock_sched_held+0x77/0xa0 > ? kmem_cache_alloc_trace+0x2b6/0x330 >

Re: How are the standard file descriptors implemented?

2020-10-08 Thread Valdis Klētnieks
On Wed, 07 Oct 2020 08:11:17 +0200, Sebastian Fricke said: > - The standard file descriptors are an abstraction layer in between an > output device like a monitor and an input device like a keyboard. In > the old days, these were configured directly to the terminals. There's "in the old

Re: make vmlinux .bss PROGBITS

2020-10-06 Thread Valdis Klētnieks
On Tue, 06 Oct 2020 13:56:11 -0500, William Tambe said: > We have a loader that loads vmlinux.bin (created from vmlinux using > objcopy -O binary), however if section .bss is not PROGBITS, > vmlinux.bin does not include that space, which the loader will not > reserve; by allocating that space in

Re: make vmlinux .bss PROGBITS

2020-10-06 Thread Valdis Klētnieks
On Tue, 06 Oct 2020 08:17:44 -0500, William Tambe said: > How can I modify Makefile such that when vmlinux is created, following > command is run on vmlinux to make section .bss PROGBITS: > objcopy --set-section-flags .bss=alloc,load,contents Remember - vmlinux isn't going to be loaded by the

Re: Fixing keyboard chatter in Linux

2020-10-03 Thread Valdis Klētnieks
On Sat, 03 Oct 2020 22:15:08 -, Ave Milia said: > Hello, > > I have a faulty key switch on the keyboard that apparently sends multiple > signals upon a single press. And apparently this is called keyboard chatter. > Since no such software exists (or if it does, please share it), I would like

Re: Read the "real_parent" field of task_struct

2020-10-01 Thread Valdis Klētnieks
On Thu, 01 Oct 2020 19:49:02 +0200, John Wood said: > Idea: The purpose of my LSM is to detect and mitigate a fork brute force > attack. To do so, I need a hierarchy of fork processes. In other words, there > is a pointer in the task_struct structure that points to an statistics data > structure.

Re: timer API change from kernel 4.9 to 5.0

2020-09-30 Thread Valdis Klētnieks
On Wed, 30 Sep 2020 18:34:07 +0200, Fabien R said: > Hello, > In timer.h of 4.9, struct timer_list contains a field data which is unsigned > long. > In timer.c, call_timer_fn calls the triggered function with data as parameter. > As of 5.0, the field data disappears from struct timer_list and

Re: Read the "real_parent" field of task_struct

2020-09-30 Thread Valdis Klētnieks
On Fri, 25 Sep 2020 18:11:42 +0200, John Wood said: > There are more examples but are similars to the ones showed. So my question > is how to read the "real_parent" field correctly. If I can understand all > the above examples I think I will have the knowledge to implement my LSM in > a correct

Re: [Cocci] coccinelle: Convert comma to semicolons (was Re: [PATCH] checkpatch: Add test for comma use that should be semicolon)

2020-09-26 Thread Valdis Klētnieks
On Fri, 25 Sep 2020 10:26:27 -0700, Joe Perches said: > And the generic individual maintainer apply rate for > each specific patch is always less than 50%. > > For instance the patches that converted the comma uses > in if/do/while statements to use braces and semicolons > from a month ago: > 29

Re: Disable EISA and probes

2020-09-05 Thread Valdis Klētnieks
On Sat, 05 Sep 2020 11:11:27 -0400, Jeffrey Walton said: > On Sat, Sep 5, 2020 at 10:52 AM Greg KH wrote: > > > Modern distros and their minimum requirements preclude EISA. One > > > cannot meet a distros minimum requirements and have EISA. > > > > Then file a bug with your distro to have it

Re: Please assess this patch: [PATCH] Docs: FIxed spelling errors in Documentation/devicetree/bindings/

2020-09-04 Thread Valdis Klētnieks
On Fri, 04 Sep 2020 17:00:47 +1000, Marlon Rac Cambasis said: > - should be atleast one pin specfied for this property and there is no upper > + should be atleast one pin specified for this property and there is no upper 'at least' should be two words. Given that, you should probably do a

Re: [Cocci] coccinelle: Convert comma to semicolons (was Re: [PATCH] checkpatch: Add test for comma use that should be semicolon)

2020-08-21 Thread Valdis Klētnieks
On Fri, 21 Aug 2020 18:08:08 -0700, Joe Perches said: > (forwarding on to kernel-janitors/mentees and kernelnewbies) > > Just fyi for anyone that cares: > > A janitorial task for someone might be to use Julia's coccinelle > script below to convert the existing instances of commas that > separate

Re: Scheduler benchmarks

2020-08-19 Thread Valdis Klētnieks
On Wed, 19 Aug 2020 12:42:54 +0200, Greg KH said: > Look up Spectre and Meltdown for many many examples of what happened and > what went wrong with chip designs and how we had to fix these things in > the kernel a few years ago. And I'm sure that nobody sane thinks we're done with security holes

Re: functions with empty body in file /kernel/events/core

2020-08-08 Thread Valdis Klētnieks
On Sat, 08 Aug 2020 12:48:08 -0500, cristian andres vargas gonzalez said: > Who have an empty body, Which is a reasonable thing to have, if the function doesn't do anything on a given architecture or configuration. > I understand that they are inside a conditional created by the preprocessor >

Re: Relationship between Rx/Tx ring and Skbuff.

2020-08-05 Thread Valdis Klētnieks
On Wed, 05 Aug 2020 11:34:52 -0700, Vasu M said: > it on a high level, when a packet is received in a NIC, DMA moves the > packets from the NIC frame buffer into the RX ring buffer in the driver. A > hardware interrupt is then raised and the top half moves the packet to the > RX ring buffer.

Re: CONFIG_KDB_KEYBOARD

2020-08-03 Thread Valdis Klētnieks
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 always a royal pain to deal with. There's no really good way to deal with it,

Re: Dubios pointer casting with put_user()

2020-07-19 Thread Valdis Klētnieks
On Sun, 19 Jul 2020 14:15:36 +0200, Richard Sailer said: > > If that were true, you wouldn't need to pass the 'amount' variable > > > Hmm, that would make no sense to me. arg is a pointer to user space > memory, put_user would still need the value to copy to that memory. -ENOCAFFEINE. :) I

Re: Old Driver Code Using Streams

2020-07-18 Thread Valdis Klētnieks
On Wed, 15 Jul 2020 15:44:33 -0500, Steve Boley said: > I have old source for a proprietary card that used to dev for both unix and > linux and uses the old sysV streams code for talking to the native > operating system. The streams is long out of development and trying to port > it to working

Re: Dubios pointer casting with put_user()

2020-07-17 Thread Valdis Klētnieks
On Fri, 17 Jul 2020 02:13:34 +0200, Richard Sailer said: > unsigned long. Is this (correctness and security wise) sane? Because as > I understand it put_user() determines the amount it copies from the > pointer type. > rc = put_user(amount, (int __user *)arg); If that were true,

Re: When returning from schedule_tail() ...

2020-07-15 Thread Valdis Klētnieks
On Wed, 15 Jul 2020 10:05:25 -0400, William Tambe said: > When returning from schedule_tail(), is it still necessary to check > for (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME) before resuming task ? Well.. since the semantics of signals are defined as being delivered when a process returns from the

Re: How to understand the comment of macro *compute_indices*?

2020-07-13 Thread Valdis Klētnieks
On Tue, 14 Jul 2020 07:54:04 +0800, carver said: > Hello, > > Macro *compute_indices* in arch/arm64/kernel/head.S have a comment > as shown below: > mov \istart, \ptrs > mul \istart, \istart, \count > add \iend, \iend, \istart // iend += (count - 1) * ptrs > > I am

Re: What's tha KOBJ_MAX action used for?

2020-07-13 Thread Valdis Klētnieks
On Mon, 13 Jul 2020 14:35:23 +0200, Greg KH said: > On Mon, Jul 13, 2020 at 01:17:25PM +0200, Garrit Franke wrote: > > Hi all, > > > > I was wondering, what the KOBJ_MAX action in the kobject.h file does. > > It is self explainatory what KOBJ_ADD, KOBJ_REMOVE etc. are used for, but > > KOBJ_MAX

Re: Regarding Linux kernel SMP and task switching CPU

2020-07-12 Thread Valdis Klētnieks
On Sun, 12 Jul 2020 12:24:46 -0400, William Tambe said: > On Sun, Jul 12, 2020 at 7:00 AM CVS wrote: > > > > > are there platform specific functions that are called to detect change ? > > What is it that you wish to do with this? > > I am doing porting work; I would like to be able to update >

Re: Why are there "" and "" in the call trace section? What does them imply?

2020-07-10 Thread Valdis Klētnieks
On Fri, 10 Jul 2020 13:29:29 +0800, "e- d8 i> sunshilong" said: > [72873.713473] > [72873.713474] switch_mm_irqs_off+0x31b/0x4e0 > [72873.713475] xnarch_switch_to+0x2f/0x80 > [72873.713476] ___xnsched_run.part.74+0x154/0x480 > [72873.713476] ___xnsched_run+0x35/0x50 > [72873.713477]

Re: how to debug problem with "failing unmounting"

2020-07-09 Thread Valdis Klētnieks
On Thu, 09 Jul 2020 14:22:00 +0200, Tomek The Messenger said: > On the soc on which I work there is issue with unmouting some > partitions/directories during /sbin/reboot, here is some example: > > [ OK ] Stopped target Local File System. > Unmouting Temporary Directory (/tmp)... > Unmouting

Re: Kbuild support for rebuilding a single driver gone?

2020-07-07 Thread Valdis Klētnieks
On Tue, 07 Jul 2020 14:22:42 +0200, Bj�rn Mork said: > I have "always" tested simple patches by rebuilding just the affected > driver on whatever kernel I happen to run. Like this: > make -C /lib/modules/4.19.0-9-amd64/build M=$(pwd)/drivers/net/usb > qmi_wwan.ko I suspect the problem is that

Re: There is "softlockup_tick()" function in the source code of linux-2.6.32, but what's the corresponding function name in the linux-4.9 or later?

2020-07-05 Thread Valdis Klētnieks
On Sun, 05 Jul 2020 15:34:32 +0800, "e- d8 i> sunshilong" said: > There is "softlockup_tick()" function in the source code of > linux-2.6.32(refer to > https://elixir.bootlin.com/linux/v2.6.32.39/source/kernel/softlockup.c#L104), > but what's the corresponding function in the linux-4.9 or later?

Re: How can I investigate the cause of "watchdog: BUG: soft lockup"?

2020-07-04 Thread Valdis Klētnieks
> Can I draw the conclusion that continually acquiring the spinlock causes the > soft > lockup and the CPU has been stuck for 22s? > Can I think in this way? No. It's been stuck for 22s *TRYING* and *FAILING* to get the spinlock. For comparison - spinlocks are usually used when you need a

Re: How can I investigate the cause of "watchdog: BUG: soft lockup"?

2020-07-03 Thread Valdis Klētnieks
> Could you please give me some hint on how to investigate the cause deeply? Shortening the call trace to the relevant lines: > Jul 3 10:23:31 yx kernel: [ 1176.166252] Call Trace: > Jul 3 10:23:31 yx kernel: [ 1176.166261] _raw_spin_lock+0x20/0x30 > Jul 3 10:23:31 yx kernel: [ 1176.166270]

Re: Is there some method or software that could purposely generate a lot of physical memory fragmentations on linux?

2020-07-02 Thread Valdis Klētnieks
On Thu, 02 Jul 2020 15:29:18 +0700, Mulyadi Santosa said: > Just pseudo idea, if this is in user space, try to: allocate many blocks > of memory using malloc, each having different size, keep the returned > pointer, then randomly free() some of them, then malloc() again with > different size

Re: Git pull and untracked files

2020-06-28 Thread Valdis Klētnieks
On Mon, 29 Jun 2020 00:00:23 +0530, Gautam Bhat said: > Hi, > > When I do a git pull to get the latest changes (from v5.2) , git > status shows the following files as untracked: > > scripts/conmakehash > scripts/pnmtologo > scripts/sortextable > > I don't see the files in .gitignore too but in the

Re: Git pull and untracked files

2020-06-28 Thread Valdis Klētnieks
On Mon, 29 Jun 2020 00:00:23 +0530, Gautam Bhat said: > scripts/conmakehash > scripts/pnmtologo > scripts/sortextable > > I don't see the files in .gitignore too but in the earlier version > i.e. v5.2 it is present. These files are binaries, should I go ahead > and delete them? Looks like two

Re: Are there some potential problems that I should be aware of if I allocate the memory which doesn't have any relation to peripheral hardwares(i.e. DMA, PCI, serial port and etc) by vmalloc() instea

2020-06-26 Thread Valdis Klētnieks
On Fri, 26 Jun 2020 23:36:05 +0800, 孙世龙 sunshilong said: > Thank you for your attention to this matter. > > >Why are you having so many issues in allocating memory? > I often saw the page allocation failure recently. I must resolve this problem. As I mentioned a few days ago, the fact that

Re: Why does “page allocation failure” occur whereas there are still “58*4096kB (C)” could be used?

2020-06-20 Thread Valdis Klētnieks
> How can I know whether scatter/gather is available or not? > In another word, when it's available and when it's not? > I do not intend to ask the behavior of gadget driver. > I just wonder how I can confirm it in general. The following applies for device features in general, not just

Re: How do you comprehend the saying that the kernel's memory is not pageable whereas get_free_page use a page-oriented technique?

2020-06-20 Thread Valdis Klētnieks
On Sat, 20 Jun 2020 14:18:21 +0800, 孙世龙 sunshilong said: > Unfortunately for kernel developers, allocating memory in the kernel > is not as simple as allocating memory in userspace. A number of > factors contribute to the complication, among them: > The kernel is limited to about 1GB of

Re: There is a question mark in front of the function name in the call trace log.What does the question mark imply?

2020-06-19 Thread Valdis Klētnieks
On Fri, 19 Jun 2020 13:29:09 +0800, 孙世龙 said: > I have never seen such a call trace log before: there is a question > mark(i.e. symbol of "?") in front of the function name. What does the > question mark imply? > > Here is the related log: > > [22041.387697] Call Trace > [22041.387711]

Re: Why does “page allocation failure” occur whereas there are still “58*4096kB (C)” could be used?

2020-06-19 Thread Valdis Klētnieks
On Fri, 19 Jun 2020 14:56:20 +0800, 孙世龙 sunshilong said: > Why doesn't the kernel use two memory blocks whose size is 2048KB(i.e.*oder 9 > *) > instead of one block *order 10 *(you see, there are still three free blocks > and > 2048KB*2=4096KB equivalent to the memory size of order 10)?

Re: Why does “page allocation failure” occur whereas there are still “58*4096kB (C)” could be used?

2020-06-18 Thread Valdis Klētnieks
On Thu, 18 Jun 2020 14:21:05 +0800, 孙世龙 said: > Why does "page allocation failure" occur whereas there are still "58*4096kB > (C)"(*I think it indicates there are 58 order 10 memory could be used*) > could be used? > > Here is the related log: > > [ 2161.623563] : page allocation

Re: DKMS module and recipe for target '.../virtualbox/5.2.34/build/vboxdrv' failed

2020-06-18 Thread Valdis Klētnieks
On Thu, 18 Jun 2020 08:13:00 +0200, Greg KH said: > On Thu, Jun 18, 2020 at 01:41:23AM -0400, Jeffrey Walton wrote: > > Hi Everyone, > > > > I recently upgraded Ubuntu 18.04 x86_64 to the 5.4.0-37 kernel. > > VirtualBox died, and I am trying to reinstall virtualbox-dkms. The > > reinstall fails

Re: the cost of EXPORT_SYMBOL_GPL

2020-06-17 Thread Valdis Klētnieks
On Wed, 17 Jun 2020 16:26:49 +0200, Tomek The Messenger said: > Yes separate drivers but the actions do by them is to create the same files > in sysfs. So if somebody use intel, texas instrument or xilinx soc then in > order to read reset reason or other stuff he will use sysfs. So this will >

Re: the cost of EXPORT_SYMBOL_GPL

2020-06-17 Thread Valdis Klētnieks
On Wed, 17 Jun 2020 14:48:36 +0200, Tomek The Messenger said: > This is the case about which Martin write shortly. Then let's assume on > another soc reset reason is not stored in chip's address space memory > mapped to address 0xfff but it is accessed via some spi operation. On > another soc

Re: the cost of EXPORT_SYMBOL_GPL

2020-06-17 Thread Valdis Klētnieks
On Wed, 17 Jun 2020 12:39:08 +0200, Tomek The Messenger said: > OK, I will ask if it is possible to share the code. Well... if you planned to ship that code and that hardware outside your organization, it's going to have to be GPLv2-compatible. pgpYuxiJgxB3c.pgp Description: PGP signature

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

2020-06-12 Thread Valdis Klētnieks
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 if (!strcmp(words[i], "format")) { > ... > > are there any built-in hash

Re: sticky bits in /proc etc

2020-06-10 Thread Valdis Klētnieks
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 setuid/gid bits already have meanings for directories, and changing

Re: IPX support

2020-06-03 Thread Valdis Klētnieks
On Tue, 02 Jun 2020 01:30:49 +0300, Dmitry Podgorny said: > Recently I've created repositories with IPX for kernel 4.18+. If anyone > needs it, feel free to use and improve the code. The two biggest things that need to happen for this to avoid being Yet Another Dead Github Project are: 1) Deal

Re: Computing resources required for kernel development

2020-05-31 Thread Valdis Klētnieks
On Sat, 30 May 2020 20:56:21 +0530, Harsh chopra said: > I have been following the Kernel Hacking steps to submit my first patch but > I am facing problem in the kernel compilation as its taking more than a day > may be due to low computing resources.. On a Raspberry Pi 4 with 4G of RAM,

Re: Estimating total memory usage in any Linux system

2020-05-19 Thread Valdis Klētnieks
On Wed, 20 May 2020 10:26:50 +0530, Pintu Agarwal said: > I know it is weird to manually arrive a MemTotal from the values of meminfo. > But I am actually looking for general formula. You missed the point - the "general formula" has probably changed over the years. > With this I could arrive to

Re: Estimating total memory usage in any Linux system

2020-05-19 Thread Valdis Klētnieks
On Tue, 19 May 2020 22:33:15 +0530, Pintu Agarwal said: > > Below are some data taken from a small embedded arm32 device with 512MB RAM: > > > > Sorry, I forgot to mention the kernel version. Here it is 3.18 Kernel That's a kernel from 2014. You don't seriously expect us to remember how all

Re: general protection fault vs Oops

2020-05-16 Thread Valdis Klētnieks
On Sat, 16 May 2020 18:05:07 +0530, Subhashini Rao Beerisetty said: > In the first attempt when I run that test case I landed into “general > protection fault: [#1] SMP" .. Next I rebooted and ran the same > test , but now it resulted the “Oops: 0002 [#1] SMP". And the 0002 is telling

Re: First patch questions (target mailing list, target tree)

2020-05-10 Thread Valdis Klētnieks
On Sun, 10 May 2020 18:26:27 +0100, Wojciech Kudla said: > I'd like to send a patch to arch/x86/kernel/smp.c but I'm not sure about > 1) which branch of whose tree do I crate the patch against? > According to MAINTAINERS: T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git

Re: Getting started on writing a driver for the rpi4

2020-05-03 Thread Valdis Klētnieks
On Sun, 03 May 2020 22:19:35 +0200, Jacko Dirks said: > have never submitted a kernel patch before. So, should I email a mailing > list warning everyone of what I want to do? Is there anything else I > should know about? Yes, you should do a bit of Googling and/or check the current source tree to

Re: SElinux and its own error code?

2020-05-03 Thread Valdis Klētnieks
On Sat, 02 May 2020 23:55:02 -0400, Jeffrey Walton said: > I lost about four hours chasing inaccurate messages from Apache. It > turns out SElinux was denying access, so the EPERM was not really > accurate. But Apache saw EPERM or EACCESS and logged a message related > to Posix permissions. No,

Re: Reg : Writing modules in new Linux versions

2020-05-02 Thread Valdis Klētnieks
On Sat, 02 May 2020 23:46:08 +0530, Majji SankaraRao said: > I want to practice writing modules in Linux version 5.3.0-51-generic. > So please guide me by providing related documentation/Steps. Create two functions, one for initializing your module, and one for cleaning up at exit. static int

Re: Kernel janitors discussion list

2020-05-01 Thread Valdis Klētnieks
On Sat, 02 May 2020 00:40:01 +0530, hemanth nandish said: > I came across the Kernel Janitors page for beginners looking to contribute. > The TODO list under kernel janitors guides you on what could be done rather > than specifically discussing any issues. > > So I wanted to know if there is any

Re: Kernel Project : Implement network interface default labeling for Smack

2020-04-28 Thread Valdis Klētnieks
On Tue, 28 Apr 2020 19:45:56 +0530, Suraj Upadhyay said: > I saw a kernel project on kernelnewbies.org [1]. > Which goes like this :- > > > Implement network interfce default labeling for Smack. > > > Today all unlabeled networking traffic is treated with one > > "ambient" Smack label. This

Re: iptables and combining additional rule sources

2020-04-25 Thread Valdis Klētnieks
On Sat, 25 Apr 2020 02:55:08 -0400, Jeffrey Walton said: > One last question... Should I create my own target - say mediawiki - > and append my rules to it? That may simplify things: > > * Header, newstuff and trailer is fixed > * newstuff just jumps to mediawiki target > * if mediawiki does not

Re: iptables and combining additional rule sources

2020-04-24 Thread Valdis Klētnieks
On Fri, 24 Apr 2020 18:28:21 -0400, Jeffrey Walton said: > The problem I am having is, adding the new information to the existing > iptables rules in /etc/sysconfig/iptables. I want to write my rules to > a separate file and then tell /etc/sysconfig/iptables to include it at > the correct

Re: Invoke binary from kernel space

2020-04-23 Thread Valdis Klētnieks
On Fri, 24 Apr 2020 01:23:45 +0530, hemanth nandish said: > This function works as expected and a new thread is spawned. > Now when I try to directly call do_execve within my module by passing the > required arguments, I am getting -EFAULT error. > This is happening in this function: > >

Re: Email being rejected by vger.kernel.org

2020-04-18 Thread Valdis Klētnieks
On Sat, 18 Apr 2020 17:56:30 -, Bijan Tabatabai said: > Is the problem due to the mail server banning yahoo email addresses in > general? Quite possibly. There's reason to believe there are zero Yahoo mail accounts over a few years old that aren't compromised, because Yahoo has gotten

Re: Trouble with allocating memory on platform driver

2020-04-17 Thread Valdis Klētnieks
On Fri, 17 Apr 2020 10:47:33 +0200, "s.achte...@rug.nl" said: > I found a working solution. I actually don't know what I am doing but it > works. > Before the call to dma_zalloc_coherent I added: > >pdev->dev.coherent_dma_mask = 0x; DMA_BIT_MASK(32) rather than a hex constant

Re: What is the difference between make oldconfig and make menuconfig?

2020-04-11 Thread Valdis Klētnieks
On Sat, 11 Apr 2020 23:09:54 +0800, Hao Lee said: > I know make oldconfig is used to update my old .config to a newer one > and it will prompt me questions about the new configuration options. > However, make menuconfig can also handle old .config file properly and > it doesn't prompt any

Re: block size vs bvec length

2020-04-05 Thread Valdis Klētnieks
On Sun, 05 Apr 2020 19:17:39 +0100, Michele Sorcinelli said: > I used rq_for_each_segment() to print bvec.bv_len of the segments and it > appears to be 4096. > > Why is it 4096 rather than 512? What is the actual device backing this block device? > Also writing a block of 4096 bytes with dd to

Re: [Scheduler] CFS - What happens to each task's slice if nr_running * min_granularity > sched_latency?

2020-04-02 Thread Valdis Klētnieks
On Thu, 02 Apr 2020 22:10:11 -0400, Evan T Mesterhazy said: > I ran a test by starting five busy processes with a nice level of -10. > Next, I launched ~40 busy processes with a nice level of 0 (all procs were > set to use the same CPU). I expected CFS to expand the period and assign > each

Re: linux kernel coding style and checkpatch.pl script

2020-03-25 Thread Valdis Klētnieks
On Wed, 25 Mar 2020 10:36:08 +0100, Tomek The Messenger said: > There is checkpatch.pl script To borrow from Pirates of the Carribean, "They're not exactly rules, they're more like... suggestions..." Checkpatch flags *possible* code style problems, but it's not perfect. There's often good

Re: Finding bugs/issues to work on

2020-03-25 Thread Valdis Klētnieks
On Tue, 24 Mar 2020 16:49:29 +0530, Suraj Upadhyay said: > Hii newbies, > I just started studying for linux-kernel development although I am > not completely new to open source technologies. I wanted to clarify my > doubts in the following things > 1. Where can I find issues/tickets

Re: difference between /usr/lib/modules and /lib/modules

2020-03-21 Thread Valdis Klētnieks
On Fri, 20 Mar 2020 12:11:52 +0100, Valentin VidiD said: > On Fri, Mar 20, 2020 at 10:56:15AM +, Bernd Petrovitsch wrote: > > Are you sure they are actually different (and don't have e.g. > > the same inode number)? > > Looks like that to me (on Debian): > > $ ls -lid /usr/lib/modules

Re: Best way to debug an invalid opcode

2020-03-19 Thread Valdis Klētnieks
On Thu, 19 Mar 2020 10:22:25 +0100, Karaoui mohamed lamine said: > I am currently encountering a kernel oops that indicate an "invalid opcode: > [#1] SMP" > > I am working on this project https://github.com/GiantVM/Linux-DSM Oh geez. Don't checkin a copy of the entire kernel. Make your

Re: process descriptor address in kernel stack

2020-03-19 Thread Valdis Klētnieks
On Thu, 19 Mar 2020 16:53:32 +0800, ", Samuel" said: > movl $0xe000,%ecx or 0xf000 for 4KB stacks > andl %esp,%ecx > movl %ecx,p > > Why is *"stack pointer(esp) & 0xe000"* equal to the process descriptor > base address? > > That means the base address of process descriptor is

Re:

2020-03-17 Thread Valdis Klētnieks
On Tue, 17 Mar 2020 04:37:58 +0530, Sankalp Bhardwaj said: > Where to get started?? I am interested in understanding how the > kernel works but have no prior knowledge... Please help!! A good place to start is to realize that the answers often depend on what the question is - and there's usually

Re: Question about the "Dynamic reserved memory" patch

2020-03-12 Thread Valdis Klētnieks
On Fri, 13 Mar 2020 12:06:37 +0900, said: > In the __reserved_mem_reserve_reg() function, I found something that > I couldn't easily understand. > > To get help, I sent an e-mail to this mailing list. > if (first) { > fdt_reserved_mem_save_node(node,

Re: Need help to get started

2020-02-24 Thread Valdis Klētnieks
On Tue, 25 Feb 2020 12:08:53 +0530, m vivek said: > I just joined the mailing list. Excited to contribute to linux kernel but > finding it difficult to figure out where to start. > > Any help would be appreciated. Pretty much anything under drivers/staging is fair game - it's *all* code that

Re: .config

2020-02-22 Thread Valdis Klētnieks
On Sat, 22 Feb 2020 17:39:03 +, Enzo Desiage said: > I had a look back at the book and couldn't find the command > 'make localmodconfig' in "The Linux Kernel in a Nutshell" book, > why is that? Was it introduced in recent years? Depends what you call "recent". Looks like v2.6.30-ish.

Re: .config

2020-02-21 Thread Valdis Klētnieks
On Fri, 21 Feb 2020 23:41:10 +, Enzo Desiage said: > modules I actually need (thanks find_all_modules.sh). I'm trying to devise > a strategy to take the output of that script and make a brand new minimal > .config file. However, the only solution I've found is doing it manually > via make

Re: Kernel debugging

2020-02-21 Thread Valdis Klētnieks
On Wed, 19 Feb 2020 06:19:10 +, "Pankaj Vinadrao Joshi" said: > I am using linux 5.4.3 with our custom Yocto distro on RISC v machine i want > to get kernel crash log(hard panic) since RISC v does mot have support for the > kxec how i can collect the crash logs? Is netconsole an option, if

Re: New text

2020-02-20 Thread Valdis Klētnieks
On Wed, 19 Feb 2020 18:17:36 -0500, Ruben Safir said: > > 1) Start wading through the git log until you find the commit that > > changed the API. In either that commit, or a commit in the same series, > > whoever changed the API > > I don't think that will be a useful way to learn to code the

Re: uxfs review

2020-02-20 Thread Valdis Klētnieks
On Thu, 20 Feb 2020 18:39:21 +0100, Valentin Vidic said: > Now that you mention 2.6 :), I've been trying to update this uxfs > filesystem from an old book[1] for modern kernels: > > https://github.com/vvidic/uxfs/ > > It currently builds and seems to work but it could probably use a > review if

Re: New text

2020-02-19 Thread Valdis Klētnieks
On Wed, 19 Feb 2020 10:54:10 -0500, Ruben Safir said: > is there currently a rfecommended text to learn kernel development from? The first thing to remember is that the kernel has no obligation to be easy for new programmers. It's more like a Formula 1 race car than a Ford Escort - there's an

Re: Understanding the working of Optimistic DAD Feature.

2020-02-06 Thread Valdis Klētnieks
On Thu, 06 Feb 2020 12:19:26 +, Chinmay Agarwal said: > To check the same there is a condition in kernel code wherein we check if > ipv6.devconf_all is set. > Now, my query is that we are checking if forwarding is enabled on all > interfaces, then we consider the system to be a router. >

Re: Kernel drivers and IOCTLs

2020-02-04 Thread Valdis Klētnieks
On Tue, 04 Feb 2020 20:57:24 -0600, WyoFlippa said: > I'm actually happy with the existing boot schemes. In this case, the > driver is going to validate a signed image (U-Boot or Linux) before it > is programmed into the flash memory. Although the image is validated > when booting, it is one

Re: Ordering guarantee inside a single bio?

2020-01-30 Thread Valdis Klētnieks
On Thu, 30 Jan 2020 15:16:17 +0100, Lukas Straub said: > No, csum_next (and csum_prev) is a whole sector (i.e. physical block) > containing all the checksums for the following chunk of data (which > spans multiple sectors) Oh, OK. That works too.. :) > Regarding the ordering guarantee, I have

Re: Ordering guarantee inside a single bio?

2020-01-29 Thread Valdis Klētnieks
On Tue, 28 Jan 2020 13:50:56 +0900, 오준택 said: (Lukas - there's stuff for you further down...) > If you write checksum for some data, ordering between checksum and data is > not needed. Actually, it is. > When the crash occurs, we just recalculate checksum with data and compare > the

Re: Ordering guarantee inside a single bio?

2020-01-27 Thread Valdis Klētnieks
On Sun, 26 Jan 2020 13:07:38 +0100, Lukas Straub said: > I am planing to write a new device-mapper target and I'm wondering if there > is a ordering guarantee for the operation inside a single bio? For example if > I > issue a write bio to sector 0 of length 4, is it guaranteed that sector 0 is

Re: Kernel drivers and IOCTLs

2020-01-23 Thread Valdis Klētnieks
On Tue, 21 Jan 2020 22:27:01 -0600, WyoFlippa said: > I'm working on a driver that would verify a Linux or U-Boot image is > secure and I need to pass parameters such as the public key, starting > address, etc. This is actually a lot harder to do properly than it looks, especially if you're

Re: Why is my block device busy?

2020-01-21 Thread Valdis Klētnieks
On Mon, 20 Jan 2020 12:51:15 +, Adam Trhon said: > mount | grep mmc You might want to dump the *entire* output of the mount command, and see if something is mounted via an alias or devmapper entry, or if you're using busybox and getting a stripped-down mount output. You should also check

Re: transfer physical memory page to swap disk

2020-01-19 Thread Valdis Klētnieks
On Sun, 19 Jan 2020 12:45:57 +, Anupam Kapoor said: > > Note that in this case, "naively" includes "not remembering to consider > > that the page being unmapped may have contained data we'd rather > > have kept by flushing the page to disk" :) > > but is it that bad ? > > before marking a

Re: transfer physical memory page to swap disk

2020-01-19 Thread Valdis Klētnieks
On Sun, 19 Jan 2020 10:55:44 +, Anupam Kapoor said: > but if _all_ that is required is randomly unmapping some marked > application pages, _that_ can be naively 'done' by the application > itself :) Note that in this case, "naively" includes "not remembering to consider that the page being

Re: transfer physical memory page to swap disk

2020-01-18 Thread Valdis Klētnieks
On Wed, 15 Jan 2020 18:23:05 +0530, Anupam Kapoor said: > On Wed, 15 Jan 2020 at 6:02 PM Sumit Kumar wrote: > > Does C/C++ provide any API / system call that enables user to force the > > application to transfer some its physical pages to swap disk ? If so, is it > > also possible to obtain the

Re: Free RAM in Linux .

2019-12-16 Thread Valdis Klētnieks
On Tue, 17 Dec 2019 10:39:08 +0530, Neel chakraborty said: > Does Linux use all of the physical memory (RAM) I have ? In both the > outputs of /proc/meminfo and free -h , shows that 1.4 gigs is used and 1.6 > gigs is cached , and the rest is "free" out of 32 Gigs . The available ram > is the

Re: How to get the preprocessor output as part of the compilation process?

2019-12-09 Thread Valdis Klētnieks
On Mon, 09 Dec 2019 13:10:11 +0300, Konstantin Andreev said: > The universal approach that always works in this and many similar cases is > just > to replace the instrumented binary by your interception shell script. > E.g. rename gcc to gcc.hide (generally, moving into another location may not

Re: How to get the preprocessor output as part of the compilation process?

2019-12-08 Thread Valdis Klētnieks
On Sun, 08 Dec 2019 14:05:06 -0500, "Frank A. Cancio Bello" said: > I know that with gcc -E you can get the output of the preprocessor, but what > I have to do to get that output for every source code file in the Linux Lernel > as part of the compilation process? What problem are you trying to

Re: Missing FDT description in DTB

2019-12-06 Thread Valdis Klētnieks
On Fri, 06 Dec 2019 10:03:34 +0100, Tomek Domek said: > And this uboot and spl is somekind of experimental software which is in > the middle of creation. Could anyone try to guide what might be possible > the reason of the issue as I am a bit new in u-boot development? Is there a reason why

Re: Kernel TLS

2019-11-30 Thread Valdis Klētnieks
On Sat, 30 Nov 2019 11:10:50 +0100, Bj�rn Mork said: > My version of setsockopt(2) says (...) > ERRORS >EBADF The argument sockfd is not a valid file descrip‐ > tor. > Note that there is no general *guarantee* that a syscall cannot return any values other than the

Re: Kernel TLS

2019-11-30 Thread Valdis Klētnieks
On Sat, 30 Nov 2019 09:13:35 +0100, Bj�rn Mork said: > include/linux/errno.h is kernel internal only. The UAPI header is > uapi/linux/errno.h, which is an alias for uapi/asm/errno.h. There is no > 524 in include/uapi/asm-generic/errno.h or > include/uapi/asm-generic/errno-base.h > > The codes

<    1   2   3   >