Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.raspberry-pi > #10747 > unrolled thread

installation

Started byT M Smith <tmsmith36@tmsmith36.plus.com>
First post2016-02-22 22:12 +0000
Last post2016-02-22 23:20 +0000
Articles 19 on this page of 79 — 21 participants

Back to article view | Back to comp.sys.raspberry-pi


Contents

  installation T M Smith <tmsmith36@tmsmith36.plus.com> - 2016-02-22 22:12 +0000
    Re: installation "A. Dumas" <alexandre@dumas.fr.invalid> - 2016-02-22 23:33 +0100
      Re: installation T M Smith <tmsmith36@tmsmith36.plus.com> - 2016-02-22 22:47 +0000
        Re: installation Rob <nomail@example.com> - 2016-02-22 23:13 +0000
        Re: installation "M.O.B. i L." <mobil@orbin.se> - 2016-02-23 00:15 +0100
      Re: installation T M Smith <tmsmith36@tmsmith36.plus.com> - 2016-02-22 23:12 +0000
        Re: installation "A. Dumas" <alexandre@dumas.fr.invalid> - 2016-02-23 01:26 +0100
          Re: installation Rob <nomail@example.com> - 2016-02-23 08:40 +0000
            Re: installation "A. Dumas" <alexandre@dumas.fr.invalid> - 2016-02-23 11:03 +0100
              Re: installation Rob <nomail@example.com> - 2016-02-23 12:24 +0000
                Re: installation "A. Dumas" <alexandre@dumas.fr.invalid> - 2016-02-23 14:42 +0100
            Re: installation T M Smith <tmsmith36@tmsmith36.plus.com> - 2016-02-23 20:47 +0000
          Re: installation T M Smith <tmsmith36@tmsmith36.plus.com> - 2016-02-23 20:30 +0000
            Re: installation Rob Morley <nospam@ntlworld.com> - 2016-02-24 00:20 +0000
              Re: installation T M Smith <tmsmith36@tmsmith36.plus.com> - 2016-02-24 19:55 +0000
            Re: installation Rob <nomail@example.com> - 2016-02-24 08:47 +0000
            Re: installation Jean-Pierre Kuypers <Kuypers@address.invalid> - 2016-02-24 09:55 +0100
              Re: installation Martin Gregorie <martin@address-in-sig.invalid> - 2016-02-24 18:47 +0000
                Re: installation T M Smith <tmsmith36@tmsmith36.plus.com> - 2016-02-24 20:15 +0000
                  Re: installation Jean-Pierre Kuypers <Kuypers@address.invalid> - 2016-02-24 23:05 +0100
                  Re: installation Martin Gregorie <martin@address-in-sig.invalid> - 2016-02-24 22:36 +0000
                    Re: installation "A. Dumas" <alexandre@dumas.fr.invalid> - 2016-02-25 00:24 +0100
                      Re: installation "A. Dumas" <alexandre@dumas.fr.invalid> - 2016-02-25 00:29 +0100
                        Re: installation Roger Bell_West <roger+csrp201602@nospam.firedrake.org> - 2016-02-25 00:25 +0000
                          Re: installation "A. Dumas" <alexandre@dumas.fr.invalid> - 2016-02-25 11:09 +0100
                            Re: installation Rob <nomail@example.com> - 2016-02-25 14:46 +0000
                    Re: installation T M Smith <tmsmith36@tmsmith36.plus.com> - 2016-02-25 21:32 +0000
                      Re: installation Martin Gregorie <martin@address-in-sig.invalid> - 2016-02-25 23:45 +0000
                        Re: installation "A. Dumas" <alexandre@dumas.fr.invalid> - 2016-02-26 04:33 +0100
                          Re: installation Martin Gregorie <martin@address-in-sig.invalid> - 2016-02-26 08:56 +0000
                        Re: installation T M Smith <tmsmith36@tmsmith36.plus.com> - 2016-02-26 22:00 +0000
                          Re: installation Jean-Pierre Kuypers <Kuypers@address.invalid> - 2016-02-26 23:32 +0100
                            Re: installation T M Smith <tmsmith36@tmsmith36.plus.com> - 2016-02-26 22:53 +0000
                          Re: installation alister <alister.ware@ntlworld.com> - 2016-02-26 23:57 +0000
                            Re: installation T M Smith <tmsmith36@tmsmith36.plus.com> - 2016-02-27 00:15 +0000
                          Re: installation "A. Dumas" <alexandre@dumas.fr.invalid> - 2016-02-27 15:04 +0100
                            Re: installation Charlie <cdknospam@msn.com> - 2016-02-27 12:53 -0500
                            Re: installation T M Smith <tmsmith36@tmsmith36.plus.com> - 2016-02-27 21:41 +0000
                          Debian: version vs. code name (was: installation) Jean-Pierre Kuypers <Kuypers@address.invalid> - 2016-03-02 11:04 +0100
                  installation nospam.mark.lewis@p73.f12.n3634.z1.binkp.net (mark lewis) - 2016-02-24 17:44 +1200
                    Re: installation T M Smith <tmsmith36@tmsmith36.plus.com> - 2016-02-25 21:13 +0000
                      Re: installation Martin Gregorie <martin@address-in-sig.invalid> - 2016-02-25 23:39 +0000
        Re: installation The Natural Philosopher <tnp@invalid.invalid> - 2016-02-23 10:24 +0000
          Re: installation Hils <hils@saynotospam.net> - 2016-02-23 13:25 +0000
            Re: installation colonel_hack@yahoo.com - 2016-02-25 21:04 -0700
    Re: installation mm0fmf <none@invalid.com> - 2016-02-22 22:35 +0000
      Re: installation T M Smith <tmsmith36@tmsmith36.plus.com> - 2016-02-22 22:42 +0000
        Re: installation alister <alister.ware@ntlworld.com> - 2016-02-23 10:04 +0000
          Re: installation Charlie <cdknospam@msn.com> - 2016-02-23 08:55 -0500
          Re: installation mm0fmf <none@invalid.com> - 2016-02-23 18:21 +0000
            Re: installation The Natural Philosopher <tnp@invalid.invalid> - 2016-02-23 18:28 +0000
            Re: installation alister <alister.ware@ntlworld.com> - 2016-02-23 19:48 +0000
              Re: installation mm0fmf <none@invalid.com> - 2016-02-23 22:49 +0000
                Re: installation alister <alister.ware@ntlworld.com> - 2016-02-24 10:40 +0000
                  Re: installation The Natural Philosopher <tnp@invalid.invalid> - 2016-02-24 10:50 +0000
                    Re: installation Folderol <general@musically.me.uk> - 2016-02-24 11:25 +0000
                      Re: installation The Natural Philosopher <tnp@invalid.invalid> - 2016-02-24 12:37 +0000
                      Re: installation Björn Lundin <b.f.lundin@gmail.com> - 2016-02-25 18:26 +0100
                        Re: installation Rob Morley <nospam@ntlworld.com> - 2016-02-25 17:42 +0000
                          Re: installation Björn Lundin <b.f.lundin@gmail.com> - 2016-02-25 22:46 +0100
                            Re: installation Michael J. Mahon <mjmahon@aol.com> - 2016-02-25 18:14 -0600
                              Re: installation The Natural Philosopher <tnp@invalid.invalid> - 2016-02-26 00:26 +0000
                                Re: installation Michael J. Mahon <mjmahon@aol.com> - 2016-02-25 22:39 -0600
                                Re: installation Ahem A Rivet's Shot <steveo@eircom.net> - 2016-02-26 09:33 +0000
                                  Re: installation The Natural Philosopher <tnp@invalid.invalid> - 2016-02-26 10:05 +0000
                                    Re: installation Michael J. Mahon <mjmahon@aol.com> - 2016-02-26 17:48 -0600
                                Re: installation Björn Lundin <b.f.lundin@gmail.com> - 2016-02-26 15:17 +0100
                                  Re: installation The Natural Philosopher <tnp@invalid.invalid> - 2016-02-26 14:27 +0000
                                    Re: installation Björn Lundin <b.f.lundin@gmail.com> - 2016-02-26 15:47 +0100
                                    Re: installation Michael J. Mahon <mjmahon@aol.com> - 2016-02-26 17:48 -0600
                                  Re: installation "A. Dumas" <alexandre@dumas.fr.invalid> - 2016-02-26 15:32 +0100
                              Re: installation Martin Gregorie <martin@address-in-sig.invalid> - 2016-02-26 09:22 +0000
                                Re: installation Björn Lundin <b.f.lundin@gmail.com> - 2016-02-26 15:18 +0100
                    Re: installation Rob Morley <nospam@ntlworld.com> - 2016-02-24 12:46 +0000
                      Re: installation The Natural Philosopher <tnp@invalid.invalid> - 2016-02-24 13:28 +0000
                  Re: installation mm0fmf <none@invalid.com> - 2016-02-24 18:42 +0000
                    Re: installation alister <alister.ware@ntlworld.com> - 2016-02-24 21:49 +0000
                      Re: installation druck <news@druck.org.uk> - 2016-02-25 13:24 +0000
    Re: installation ray carter <ray@zianet.com> - 2016-02-22 23:20 +0000

Page 4 of 4 — ← Prev page 1 2 3 [4]


#10813

FromMichael J. Mahon <mjmahon@aol.com>
Date2016-02-25 18:14 -0600
Message-ID<4PqdndYB5-NnBVLLnZ2dnUU7-IGdnZ2d@giganews.com>
In reply to#10810
Björn Lundin <b.f.lundin@gmail.com> wrote:
> On 2016-02-25 18:42, Rob Morley wrote:
>> On Thu, 25 Feb 2016 18:26:56 +0100
>> Björn Lundin <b.f.lundin@gmail.com> wrote:
>> 
>>> On 2016-02-24 12:25, Folderol wrote:
>>>> The only thing I regard as 'trivially easy' about programming is
>>>> the ease with which you can make stupid mistakes.
>>>> 
>>>> I've seen (and created) these covering the whole range from
>>>> hard-wired logic to high level languages such as C++ 
>>>> 
>>> 
>>> Then give Ada a try.
>>> It does prevent you from a fair bit of stupid mistakes.
>>> 
>> It will catch type mismatches, out-of-bounds references and similar
>> stuff but it won't fix faulty logic.
>> 
> 
> Correct.  Type mismatches, out-of-bounds references and pointer
> errors is what I call stupid mistakes.
> How many cases of buffer overflow has been reported?

Null-terminated (as opposed to count-controlled) strings are convenient,
but are a security nightmare. 

> How expensive was Heartbleed?
> 
> Can't happen with Ada, or at least I cannot see a way
> of provoking that.
> 
> Putting some effort into the program, it will also catch
> some faulty logic, like forgetting
> to take care of new enumeration values in a case statement.
> 
> But of course, it does not fix everything;
> like when you write
> 
> if a = b then
> 
> but you really mean
> 
> if a = c then
> 
> but at least, it does not try to assign
> anything to variable a in either case.
> 
> And you can be sure that a and b are of the same type,
> unless you have overridden "=",
> so you are not comparing apples with oranges
> 



-- 
-michael - NadaNet 3.1 and AppleCrate II:  http://michaeljmahon.com

[toc] | [prev] | [next] | [standalone]


#10814

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2016-02-26 00:26 +0000
Message-ID<nao635$abb$1@news.albasani.net>
In reply to#10813
On 26/02/16 00:14, Michael J. Mahon wrote:
> Björn Lundin<b.f.lundin@gmail.com>  wrote:
>> >On 2016-02-25 18:42, Rob Morley wrote:
>>> >>On Thu, 25 Feb 2016 18:26:56 +0100
>>> >>Björn Lundin<b.f.lundin@gmail.com>  wrote:
>>> >>
>>>> >>>On 2016-02-24 12:25, Folderol wrote:
>>>>> >>>>The only thing I regard as 'trivially easy' about programming is
>>>>> >>>>the ease with which you can make stupid mistakes.
>>>>> >>>>
>>>>> >>>>I've seen (and created) these covering the whole range from
>>>>> >>>>hard-wired logic to high level languages such as C++
>>>>> >>>>
>>>> >>>
>>>> >>>Then give Ada a try.
>>>> >>>It does prevent you from a fair bit of stupid mistakes.
>>>> >>>
>>> >>It will catch type mismatches, out-of-bounds references and similar
>>> >>stuff but it won't fix faulty logic.
>>> >>
>> >
>> >Correct.  Type mismatches, out-of-bounds references and pointer
>> >errors is what I call stupid mistakes.
>> >How many cases of buffer overflow has been reported?
> Null-terminated (as opposed to count-controlled) strings are convenient,
> but are terribly conveneint.

THAT is not the root of the problem. The problem goes right back to K & 
R's decision to use the stack as a terribly fast and efficient way of 
allocating temporary scratch space. Its wonderful because when you exit 
a function it vanishes. With no overhead.

Its so dangerous because it is the stack and contains instruction 
pointer addresses in its remit, and you can overwrite those and take 
arbitrary code jumps on return...

There are ways around it, but they are overhead, or require a different 
stack.

If you remember that C is no more than a fast way to write assembler, 
and gives you the ultimate power to fuck up totally, you wont make these 
beginner mistakes.


-- 
Bureaucracy defends the status quo long past the time the quo has lost 
its status.

Laurence Peter

[toc] | [prev] | [next] | [standalone]


#10817

FromMichael J. Mahon <mjmahon@aol.com>
Date2016-02-25 22:39 -0600
Message-ID<4cWdnYoyX4RhS1LLnZ2dnUU7-dsAAAAA@giganews.com>
In reply to#10814
The Natural Philosopher <tnp@invalid.invalid> wrote:
> On 26/02/16 00:14, Michael J. Mahon wrote:
>> Björn Lundin<b.f.lundin@gmail.com>  wrote:
>>>> On 2016-02-25 18:42, Rob Morley wrote:
>>>>>> On Thu, 25 Feb 2016 18:26:56 +0100
>>>>>> Björn Lundin<b.f.lundin@gmail.com>  wrote:
>>>>>> 
>>>>>>>> On 2016-02-24 12:25, Folderol wrote:
>>>>>>>>>> The only thing I regard as 'trivially easy' about programming is
>>>>>>>>>> the ease with which you can make stupid mistakes.
>>>>>>>>>> 
>>>>>>>>>> I've seen (and created) these covering the whole range from
>>>>>>>>>> hard-wired logic to high level languages such as C++
>>>>>>>>>> 
>>>>>>>> 
>>>>>>>> Then give Ada a try.
>>>>>>>> It does prevent you from a fair bit of stupid mistakes.
>>>>>>>> 
>>>>>> It will catch type mismatches, out-of-bounds references and similar
>>>>>> stuff but it won't fix faulty logic.
>>>>>> 
>>>> 
>>>> Correct.  Type mismatches, out-of-bounds references and pointer
>>>> errors is what I call stupid mistakes.
>>>> How many cases of buffer overflow has been reported?
>> Null-terminated (as opposed to count-controlled) strings are convenient,
>> but are terribly conveneint.
> 
> THAT is not the root of the problem. The problem goes right back to K & 
> R's decision to use the stack as a terribly fast and efficient way of 
> allocating temporary scratch space. Its wonderful because when you exit 
> a function it vanishes. With no overhead.
> 
> Its so dangerous because it is the stack and contains instruction 
> pointer addresses in its remit, and you can overwrite those and take 
> arbitrary code jumps on return...
> 
> There are ways around it, but they are overhead, or require a different 
> stack.

And that use of the stack is quite common for many languages, with
reasonable security. But allow the "buffer overflows" that can occur
without count control and security plummets. 

It is also safer if the stack grows upward, so that the return address and
other context is not easily trashed by an upward-indexed string copy. 
-- 
-michael - NadaNet 3.1 and AppleCrate II:  http://michaeljmahon.com

[toc] | [prev] | [next] | [standalone]


#10822

FromAhem A Rivet's Shot <steveo@eircom.net>
Date2016-02-26 09:33 +0000
Message-ID<20160226093326.afa74719e2c8668e8c1fa512@eircom.net>
In reply to#10814
On Fri, 26 Feb 2016 00:26:18 +0000
The Natural Philosopher <tnp@invalid.invalid> wrote:

> THAT is not the root of the problem. The problem goes right back to K & 
> R's decision to use the stack as a terribly fast and efficient way of 
> allocating temporary scratch space. Its wonderful because when you exit 
> a function it vanishes. With no overhead.

	It could be argued that the real root of the problem is not using
Harvard architecture designs with separate instruction and data spaces. But
there's no way back the only way is forwards and that means coping with the
past as it happened.

-- 
Steve O'Hara-Smith                          |   Directable Mirror Arrays
C:>WIN                                      | A better way to focus the sun
The computer obeys and wins.                |    licences available see
You lose and Bill collects.                 |    http://www.sohara.org/

[toc] | [prev] | [next] | [standalone]


#10823

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2016-02-26 10:05 +0000
Message-ID<nap80e$amm$1@news.albasani.net>
In reply to#10822
On 26/02/16 09:33, Ahem A Rivet's Shot wrote:
> On Fri, 26 Feb 2016 00:26:18 +0000
> The Natural Philosopher <tnp@invalid.invalid> wrote:
>
>> THAT is not the root of the problem. The problem goes right back to K &
>> R's decision to use the stack as a terribly fast and efficient way of
>> allocating temporary scratch space. Its wonderful because when you exit
>> a function it vanishes. With no overhead.
>
> 	It could be argued that the real root of the problem is not using
> Harvard architecture designs with separate instruction and data spaces. But
> there's no way back the only way is forwards and that means coping with the
> past as it happened.
>

Indeed, and the same thought was forming in my brain as you were 
probably writing that.

However there are advantages to being able to mix code and data.

I am not sure if a basic multitasking scheduler could be built without 
the ability to use data to modify code as it were. Still its early, so I 
could well be wrong there.


-- 
No Apple devices were knowingly used in the preparation of this post.

[toc] | [prev] | [next] | [standalone]


#10838

FromMichael J. Mahon <mjmahon@aol.com>
Date2016-02-26 17:48 -0600
Message-ID<r42dnQKal6XUeU3LnZ2dnUU7-N-dnZ2d@giganews.com>
In reply to#10823
The Natural Philosopher <tnp@invalid.invalid> wrote:
> On 26/02/16 09:33, Ahem A Rivet's Shot wrote:
>> On Fri, 26 Feb 2016 00:26:18 +0000
>> The Natural Philosopher <tnp@invalid.invalid> wrote:
>> 
>>> THAT is not the root of the problem. The problem goes right back to K &
>>> R's decision to use the stack as a terribly fast and efficient way of
>>> allocating temporary scratch space. Its wonderful because when you exit
>>> a function it vanishes. With no overhead.
>> 
>> It could be argued that the real root of the problem is not using
>> Harvard architecture designs with separate instruction and data spaces. But
>> there's no way back the only way is forwards and that means coping with the
>> past as it happened.
>> 
> 
> Indeed, and the same thought was forming in my brain as you were 
> probably writing that.
> 
> However there are advantages to being able to mix code and data.
> 
> I am not sure if a basic multitasking scheduler could be built without 
> the ability to use data to modify code as it were. Still its early, so I 
> could well be wrong there.

And the return address is data, so it's still vulnerable. Most programs can
be induced to commit mischief by suitably altering the return address. 
-- 
-michael - NadaNet 3.1 and AppleCrate II:  http://michaeljmahon.com

[toc] | [prev] | [next] | [standalone]


#10825

FromBjörn Lundin <b.f.lundin@gmail.com>
Date2016-02-26 15:17 +0100
Message-ID<napmju$7ov$1@dont-email.me>
In reply to#10814
On 2016-02-26 01:26, The Natural Philosopher wrote:
> 
> If you remember that C is no more than a fast way to write assembler,
> and gives you the ultimate power to fuck up totally, you wont make these
> beginner mistakes.

This is of course true.
But the very idea of 'have to remember' when a compiler can do that for
you is icky - in my point of view.

To get back on the pi-track, I have written several things in python,
from utilities to small bot-systems betting on UK/IE horse races,
but the lack of compiler makes me do mistakes (like indentation, or
trying to print an int on stdout without conversion)
which then becomes run-time crashes.

Yes I do know about pylint, but it has to be configured
and set up, which I don't HAVE to do, thus I don't do it.

A strict compiler, that is my best friend.



-- 
--
Björn

[toc] | [prev] | [next] | [standalone]


#10827

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2016-02-26 14:27 +0000
Message-ID<napnda$6ur$1@news.albasani.net>
In reply to#10825
On 26/02/16 14:17, Björn Lundin wrote:
> On 2016-02-26 01:26, The Natural Philosopher wrote:
>>
>> If you remember that C is no more than a fast way to write assembler,
>> and gives you the ultimate power to fuck up totally, you wont make these
>> beginner mistakes.
>
> This is of course true.
> But the very idea of 'have to remember' when a compiler can do that for
> you is icky - in my point of view.
>
> To get back on the pi-track, I have written several things in python,
> from utilities to small bot-systems betting on UK/IE horse races,
> but the lack of compiler makes me do mistakes (like indentation, or
> trying to print an int on stdout without conversion)
> which then becomes run-time crashes.
>
> Yes I do know about pylint, but it has to be configured
> and set up, which I don't HAVE to do, thus I don't do it.
>
> A strict compiler, that is my best friend.
>
>
I do agree. That picks up most of the inadvertent casting issues.

But it doesn't pick up buffer overflows.

Over the years I have basically asked myself two questions

(a) Is it possible the data going in this buffer could be larger than 
the buffer?
(b) If so, what would happen if I restricted the data to the buffer 
size, or threw an error?

There are other options,. like always using malloced data after doing a 
len() or strdup or whatever, but these all imply that you already have 
the data in a suitably large buffer..

If its coming in a byte at a time, you have to accept the overhead of 
checking it its out of bounds ...but that is better than having run time 
checking enforced by the language whether you need it or not.



>


-- 
No Apple devices were knowingly used in the preparation of this post.

[toc] | [prev] | [next] | [standalone]


#10829

FromBjörn Lundin <b.f.lundin@gmail.com>
Date2016-02-26 15:47 +0100
Message-ID<napod3$e9t$1@dont-email.me>
In reply to#10827
On 2016-02-26 15:27, The Natural Philosopher wrote:
> On 26/02/16 14:17, Björn Lundin wrote:
>> On 2016-02-26 01:26, The Natural Philosopher wrote:
>>>
>>> If you remember that C is no more than a fast way to write assembler,
>>> and gives you the ultimate power to fuck up totally, you wont make these
>>> beginner mistakes.
>>
>> This is of course true.
>> But the very idea of 'have to remember' when a compiler can do that for
>> you is icky - in my point of view.
>>
>> To get back on the pi-track, I have written several things in python,
>> from utilities to small bot-systems betting on UK/IE horse races,
>> but the lack of compiler makes me do mistakes (like indentation, or
>> trying to print an int on stdout without conversion)
>> which then becomes run-time crashes.
>>
>> Yes I do know about pylint, but it has to be configured
>> and set up, which I don't HAVE to do, thus I don't do it.
>>
>> A strict compiler, that is my best friend.
>>
>>
> I do agree. That picks up most of the inadvertent casting issues.
> 
> But it doesn't pick up buffer overflows.
> 
> Over the years I have basically asked myself two questions
> 
> (a) Is it possible the data going in this buffer could be larger than
> the buffer?
> (b) If so, what would happen if I restricted the data to the buffer
> size, or threw an error?
> 
> There are other options,. like always using malloced data after doing a
> len() or strdup or whatever, but these all imply that you already have
> the data in a suitably large buffer..
> 
> If its coming in a byte at a time, you have to accept the overhead of
> checking it its out of bounds ...but that is better than having run time
> checking enforced by the language whether you need it or not.

If the compiler knows enough, that is if you have
a strongly types language, the effect will actually be that
some run time checks are eliminated.

a simple for loop in c over an array

int len = 200;
int data[len] ;

for (int i=0; i<len; i++ ) {
  // do something with data[i]
}

for each turn in the loop
a comparison if i<len is made

However below, the compiler knows the boundaries of the array
so that check is usually optimsed away

data : array(1..200) of Integer;
for i in data'range loop
  -- do something with data(i)
end loop;


As for buffer overflows, I really can't see it happen at all in Ada.
Trying to write to element 201 in above array would get me an exception
(Constraint_Error)


while in C

for (int i=0; i<=len; i++ ) {
  // do something with data[i]
}

will get me undefined behavior



That being said, I think this evolved a bit too far out for a Raspberry
pi group.

--
Björn

[toc] | [prev] | [next] | [standalone]


#10839

FromMichael J. Mahon <mjmahon@aol.com>
Date2016-02-26 17:48 -0600
Message-ID<r42dnT2al6XUeU3LnZ2dnUU7-N8AAAAA@giganews.com>
In reply to#10827
The Natural Philosopher <tnp@invalid.invalid> wrote:
> On 26/02/16 14:17, Björn Lundin wrote:
>> On 2016-02-26 01:26, The Natural Philosopher wrote:
>>> 
>>> If you remember that C is no more than a fast way to write assembler,
>>> and gives you the ultimate power to fuck up totally, you wont make these
>>> beginner mistakes.
>> 
>> This is of course true.
>> But the very idea of 'have to remember' when a compiler can do that for
>> you is icky - in my point of view.
>> 
>> To get back on the pi-track, I have written several things in python,
>> from utilities to small bot-systems betting on UK/IE horse races,
>> but the lack of compiler makes me do mistakes (like indentation, or
>> trying to print an int on stdout without conversion)
>> which then becomes run-time crashes.
>> 
>> Yes I do know about pylint, but it has to be configured
>> and set up, which I don't HAVE to do, thus I don't do it.
>> 
>> A strict compiler, that is my best friend.
>> 
>> 
> I do agree. That picks up most of the inadvertent casting issues.
> 
> But it doesn't pick up buffer overflows.
> 
> Over the years I have basically asked myself two questions
> 
> (a) Is it possible the data going in this buffer could be larger than 
> the buffer?
> (b) If so, what would happen if I restricted the data to the buffer 
> size, or threw an error?
> 
> There are other options,. like always using malloced data after doing a 
> len() or strdup or whatever, but these all imply that you already have 
> the data in a suitably large buffer..
> 
> If its coming in a byte at a time, you have to accept the overhead of 
> checking it its out of bounds ...but that is better than having run time 
> checking enforced by the language whether you need it or not.

True. Security bugs are the result of sloppy programming. C just makes
sloppiness easy. ;-)

Think of C as a gun without a safety...convenient but dangerous in
undisciplined hands. 
-- 
-michael - NadaNet 3.1 and AppleCrate II:  http://michaeljmahon.com

[toc] | [prev] | [next] | [standalone]


#10828

From"A. Dumas" <alexandre@dumas.fr.invalid>
Date2016-02-26 15:32 +0100
Message-ID<56d061f3$0$24149$e4fe514c@news.xs4all.nl>
In reply to#10825
On 26-02-16 15:17, Björn Lundin wrote:
> A strict compiler, that is my best friend.

https://www.youtube.com/watch?v=hrCwttDHIeI

[toc] | [prev] | [next] | [standalone]


#10821

FromMartin Gregorie <martin@address-in-sig.invalid>
Date2016-02-26 09:22 +0000
Message-ID<nap5fs$31n$2@dont-email.me>
In reply to#10813
On Thu, 25 Feb 2016 18:14:50 -0600, Michael J. Mahon wrote:

> Null-terminated (as opposed to count-controlled) strings are convenient,
> but are a security nightmare.
>
However, they are easy enough to fix in C. A routine search for str...() 
functions followed by edits the replace them by equivalent strn...() 
functions each time you revisit some of your older code is very easy and 
should catch most problems.

I've found that searching for strcat, strcpy, sprintf and vsprintf does 
the job for me. The script is designed for easy extension if I find that 
there are library functions I need to include.

I implemented the scan in awk and drive it from a bash script called 
'sanitiser'. This walks the complete source code tree while building a 
list of source files that need attention. I hand the list to my favourite 
editor by running "$EDITOR $( sanitiser )" - At the same time the script 
builds a file showing the lines needing attention in a hints file that 
can be opened in a separate window and read in parallel with editing the 
source.


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

[toc] | [prev] | [next] | [standalone]


#10826

FromBjörn Lundin <b.f.lundin@gmail.com>
Date2016-02-26 15:18 +0100
Message-ID<napmmf$7ov$2@dont-email.me>
In reply to#10821
On 2016-02-26 10:22, Martin Gregorie wrote:
> On Thu, 25 Feb 2016 18:14:50 -0600, Michael J. Mahon wrote:
> 
>> Null-terminated (as opposed to count-controlled) strings are convenient,
>> but are a security nightmare.
>>
> However, they are easy enough to fix in C. A routine search for str...() 
> functions followed by edits the replace them by equivalent strn...() 
> functions each time you revisit some of your older code is very easy and 
> should catch most problems.
> 
> I've found that searching for strcat, strcpy, sprintf and vsprintf does 
> the job for me. The script is designed for easy extension if I find that 
> there are library functions I need to include.
> 
> I implemented the scan in awk and drive it from a bash script called 
> 'sanitiser'. This walks the complete source code tree while building a 
> list of source files that need attention. I hand the list to my favourite 
> editor by running "$EDITOR $( sanitiser )" - At the same time the script 
> builds a file showing the lines needing attention in a hints file that 
> can be opened in a separate window and read in parallel with editing the 
> source.
> 
> 

Clever. But really. Should one have to resort to this ?
Strict compilers for the people, please.

-- 
--
Björn

[toc] | [prev] | [next] | [standalone]


#10788

FromRob Morley <nospam@ntlworld.com>
Date2016-02-24 12:46 +0000
Message-ID<20160224124619.5cf98881@ntlworld.com>
In reply to#10785
On Wed, 24 Feb 2016 10:50:56 +0000
The Natural Philosopher <tnp@invalid.invalid> wrote:

> In  a hand compile, not only do you have to download the tar ball and 
> explode it, you also have to install any libraries and header files
> upon which it depends, and hope like hell that the distro you have
> has library versions late enough to satisfy the code writers code,
> which may well have been written against later versions of those
> libraries.

Can you not just statically link the libraries?

[toc] | [prev] | [next] | [standalone]


#10789

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2016-02-24 13:28 +0000
Message-ID<nakb5q$c0$1@news.albasani.net>
In reply to#10788
On 24/02/16 12:46, Rob Morley wrote:
> On Wed, 24 Feb 2016 10:50:56 +0000
> The Natural Philosopher <tnp@invalid.invalid> wrote:
>
>> In  a hand compile, not only do you have to download the tar ball and
>> explode it, you also have to install any libraries and header files
>> upon which it depends, and hope like hell that the distro you have
>> has library versions late enough to satisfy the code writers code,
>> which may well have been written against later versions of those
>> libraries.
>
> Can you not just statically link the libraries?
>
That depends. And in any case that means modifying the makefile, yet 
another thing a newb don't know - and indeed many who have been coding 
for years.

People who do this stuff daily, know all that. But that's not the same 
as coding. Many coders will never ever touch a makefile system in a 
large project. That's down to Someone Else.

Installing from the distro is petty easy. apt-get package,. Even if its 
source package its no big deal,. but once you step outside of that you 
need a LOT of background knowledge to get the compile to work.



-- 
A lie can travel halfway around the world while the truth is putting on 
its shoes.

[toc] | [prev] | [next] | [standalone]


#10791

Frommm0fmf <none@invalid.com>
Date2016-02-24 18:42 +0000
Message-ID<naktdn$erl$1@dont-email.me>
In reply to#10784
On 24/02/2016 10:40, alister wrote:
> I did not "dismis it out of hand" I said it should be considered a last
> resort. in other words only use if a suitable alternative is not available

You said "don't to that" when "that" included getting it from the repo. 
You saw mention of a tgz and *assumed* it was a source tarball and went 
off half-cocked.

You didn't look at what was suggested and happily admit you didn't look 
and therefore, by definition, you dismissed it out of hand. It's one of 
the best examples of dismissing something out of hand I've seen for a 
long time.




[toc] | [prev] | [next] | [standalone]


#10796

Fromalister <alister.ware@ntlworld.com>
Date2016-02-24 21:49 +0000
Message-ID<%zpzy.967626$Mi6.886619@fx35.am4>
In reply to#10791
On Wed, 24 Feb 2016 18:42:44 +0000, mm0fmf wrote:

> On 24/02/2016 10:40, alister wrote:
>> I did not "dismis it out of hand" I said it should be considered a last
>> resort. in other words only use if a suitable alternative is not
>> available
> 
> You said "don't to that" when "that" included getting it from the repo.
> You saw mention of a tgz and *assumed* it was a source tarball and went
> off half-cocked.
> 
> You didn't look at what was suggested and happily admit you didn't look
> and therefore, by definition, you dismissed it out of hand. It's one of
> the best examples of dismissing something out of hand I've seen for a
> long time.

I'd just like to say Horse Shit in reply.





-- 
When all else fails, try Kate Smith.

[toc] | [prev] | [next] | [standalone]


#10804

Fromdruck <news@druck.org.uk>
Date2016-02-25 13:24 +0000
Message-ID<namv53$tvn$1@dont-email.me>
In reply to#10796
On 24/02/2016 21:49, alister wrote:
> I'd just like to say Horse Shit in reply.

And I'd like to say take your horse somewhere else to do it's business.

This is supposed to be a friendly newsgroup catering for people both new 
to the Raspberry Pi, and having a fair share of Linux experts.
Many solutions are possible, but lets start with the one most 
appropriate to the OP's experience level.

---druck

[toc] | [prev] | [next] | [standalone]


#10755

Fromray carter <ray@zianet.com>
Date2016-02-22 23:20 +0000
Message-ID<dj1jdnFdmppU1@mid.individual.net>
In reply to#10747
On Mon, 22 Feb 2016 22:12:38 +0000, T M Smith wrote:

> Hope someone can straighten out my thinking. On my RP2 I have got 
> Sonic-pi installed by default and this is run by clicking on  
> Menu/programming/Sonic Pi. This is version 2.6.
> I want to upgrade to version 2.9 which is available on the Sonic Pi 
> web site.
> So click on the download button and a tgz file goes into my downloads 
> directory.
> Where do I go from here?
> 
> Malcolm Smith

Gerenally, make a directory, put the tgz file in that directory and then 
'untgz' it with:
 tar xavf *tgz
Then you'll probably have a 'readme' file of some sort. The procedure 
often goes:
 ./configure
 make
 make install

The latest version may not be ready for the Pi architecture, though. You 
may have to stay with the existing version.

The sequence:
 apt-get update
 apt-get upgrade
 apt-get dist-upgrade

will update all software with the latest versions in the repository.

[toc] | [prev] | [standalone]


Page 4 of 4 — ← Prev page 1 2 3 [4]

Back to top | Article view | comp.sys.raspberry-pi


csiph-web