From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10F2AC3524E for ; Wed, 19 Feb 2020 21:36:52 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C211724654 for ; Wed, 19 Feb 2020 21:36:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C211724654 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=vt.edu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.92.3) (envelope-from ) id 1j4X15-0000dU-EQ; Wed, 19 Feb 2020 16:36:23 -0500 Received: from omr2.cc.ipv6.vt.edu ([2607:b400:92:8400:0:33:fb76:806e] helo=omr2.cc.vt.edu) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1j4X13-0000dO-1b for kernelnewbies@kernelnewbies.org; Wed, 19 Feb 2020 16:36:21 -0500 Received: from mr2.cc.vt.edu (junk.cc.ipv6.vt.edu [IPv6:2607:b400:92:9:0:9d:8fcb:4116]) by omr2.cc.vt.edu (8.14.4/8.14.4) with ESMTP id 01JLaIPP006026 for ; Wed, 19 Feb 2020 16:36:19 -0500 Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by mr2.cc.vt.edu (8.14.7/8.14.7) with ESMTP id 01JLaDIp009642 for ; Wed, 19 Feb 2020 16:36:18 -0500 Received: by mail-qt1-f198.google.com with SMTP id m8so1124033qta.20 for ; Wed, 19 Feb 2020 13:36:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :mime-version:content-transfer-encoding:date:message-id; bh=KmfDFpuccnzL2+nNNXy1CPmQUTupqXRHOBb3jHLYMQo=; b=hP7DhpzaoXWLVYoCAPeJTD7bqXCx1IBcFAioyGl489qk0gxhN3R1tCfZ0BqN5BATGz Kd5yTcYWVfv1xNaZpPf3ksb24PkIplOfCUcGMHytgVD4HtCnAVGN3oV+eus60v8W9l4T CHBqFsNk6/GY9BH8Wtyfzf8ro6fb3jKCJW5mJkPxVlhx9F1pPawLZmfcffKW0SEnuSAb 8S0GxryqMUhiaA3JXk7jHk19iEqygZLgu8JGvI9+D96bzsaqIyhdcekZtI+vR/Ytr8js 7CJWYWyL9/rIpXEfQxbNucy53Ywy/hm8qD8R5Oam1H+3PnuysEcoj6wrS+0W1CeXtfTN tuUg== X-Gm-Message-State: APjAAAUaK/XvWTtUJ4a6dK5RMwHevEPslbjA3HhxIXomCb00/0yfO4Oq P/dDVe5uKDqXxDNIjmj5QPRrkPlOacxmywu8Qm2GqunBqf31XSdqEb5C7Equ8nwvPEL6kZFPt+G +/2SiIK91/9wHG+04y7jCiTsFGvPl62lvZws/3nM= X-Received: by 2002:a37:4856:: with SMTP id v83mr25664827qka.350.1582148172838; Wed, 19 Feb 2020 13:36:12 -0800 (PST) X-Google-Smtp-Source: APXvYqyWASIx2xmRBPBciVgwTVCQ7iDxQhK3RaSJNI1SZ6AWbaG9F8ZLeicV13b7SpQhAN3qv2/Zqg== X-Received: by 2002:a37:4856:: with SMTP id v83mr25664798qka.350.1582148172425; Wed, 19 Feb 2020 13:36:12 -0800 (PST) Received: from turing-police ([2601:5c0:c001:c9e1::359]) by smtp.gmail.com with ESMTPSA id t23sm670953qto.88.2020.02.19.13.36.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Feb 2020 13:36:11 -0800 (PST) From: "Valdis Kl=?utf-8?Q?=c4=93?=tnieks" X-Google-Original-From: "Valdis Kl=?utf-8?Q?=c4=93?=tnieks" X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7+dev To: Ruben Safir Subject: Re: New text In-Reply-To: <20200219155410.GA25523@www2.mrbrklyn.com> References: <20200219155410.GA25523@www2.mrbrklyn.com> Mime-Version: 1.0 Date: Wed, 19 Feb 2020 16:36:10 -0500 Message-ID: <228783.1582148170@turing-police> Cc: kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============5147169337269644924==" Errors-To: kernelnewbies-bounces@kernelnewbies.org --===============5147169337269644924== Content-Type: multipart/signed; boundary="==_Exmh_1582148169_9713P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit --==_Exmh_1582148169_9713P Content-Type: text/plain; charset=us-ascii 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 expectation that you *really* know what you're doing when you put your hands on the steering wheel. As a result, the authoritative source on that is, of course: $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Seriously - the kernel is a work in progress, and it's in motion all the time. There's no way to write a text that's up to date - by the time you finish, the source tree has moved by 3 or 4 million lines. Currently, the best is probably Linux Device Drivers, Third Edition (just google for LDD3 and you'll get a pointer to the PDF). However - keep in mind that it discusses *concepts* like locking and variable lifetimes and so on. It's now somewhere over 15 million lines out of date, and it's expected that if you can't figure out for yourself what concepts mean, or what the *current* API is, then you probably shouldn't be writing large chunks of kernel code that requires undertanding the current APIs. Note that many bugs are fixable without knowing all that - it's often a "somebody added A and B, when it should have been A - B" or a stupid null pointer mistake, or similar. And drivers/staging is just *full* of stuff that is in drastic need of help. Protip: if you've been handed a device dqriver for a 4.7 kernel, and been told to make it work under a 5.5 kernel, and you have *no* idea how to fix all the compile errors, the way to proceed is usually: 0) Kernel API changes are *supposed* to break a compile - if you used to pass an integer as the third parameter, and now it's a pointer to a structure, the build will break. Anybody who makes a kernel API change where the third parameter used to be an integer that meant one thing, and changes it to an integer that means something else, so it will compile but not work correctly, will probably get smacked around with a large trout or something. (A common work around for this is changing a function from (struct *A, struct *B, oldint) to (struct A*, newint, struct *B) so the compiler will whine). 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 also changed all the in-tree users of the API. 2) Look at that commit, and see what got changed in all the in-tree users. 3) Do the same thing to your out-of-tree code. And here you thought it was difficult, :) (Of course, if you're trying to get a 2.6.12 driver working on 5.6... you may decide that it's time to start drinking heavily :) --==_Exmh_1582148169_9713P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Comment: Exmh version 2.9.0 11/07/2018 iQIVAwUBXk2qSQdmEQWDXROgAQJ+BBAAhWVHaw4KqJCm/PoPfSYPp2Yjk5YD9XEn 2uk6qeahcS+9xsXxOHPuVT24J+rWKigWxL29fOWVglKue5ARIQuOlJkLP9evHaSW UHBH6cD9b2MmA21iOS96QqGZ8khf3nAhvdMGRPlD5+47nd9CjY0mEdie+cP4k+yO edijeul7fxfuVl4WKkKBjN89mJbsHy6AkuwRbv0kS0mVVwT1KZCqhuZ8TMkpbm0h RmEhKaEAUySJgz6WJBJAOA5P30N1PCHrh4RcderhiNCAgh336k1NrfHlhGEPbAo1 RshQ7QCZ7L/Ju2ta5pvE/vv3N0L/POBiHLNtF5x5/t1Lu5vL6+IwqA5+yqGPxb1a D6YYoNqgkIj1ZlIHERZNxc/5F2/TDUiDU/EOPHNCiWtMMV4FL/zpfa5NVMjT0hXW iVEOnozNrbDTgFNkv0XI5/a/3ZJ6pjJnMaisvJ67Z+6kDeabpSzs8ehdtIrLYyHK NCxJqLv+zx58qWy5VXm85ViSCgjUDSTlG9yrOjGJfMeftoNz2iTJtkmmX1wFJ2lp hGwof5ON4/zKAoUDCWAmrEx+F97aKCDGfqb10w28QcfIpXu7wN2x7ACjs1gQVDug j7z8GKUib6pbziC0jST6XqeyqxAkvaY2qFvaHmMfQ6OXvgKDi7vP2k++DFHs8e9w mCwH0RsIJXg= =FFEd -----END PGP SIGNATURE----- --==_Exmh_1582148169_9713P-- --===============5147169337269644924== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============5147169337269644924==--